Ticket #40 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

SmartyEngine Errors

Reported by: smerrill Owned by:
Priority: minor Milestone: 0.5
Component: Habari Core Software Version: SVN
Keywords: Smarty, has_patch Cc:

Description

Moved from GCode Issue #314

eported by smerrill, Apr 19, 2007

While trying to test SmartyEngine templates, I got the following error:

 Fatal error: Class SmartyEngine contains 2 abstract methods and must
therefore be declared abstract or implement the remaining methods
(TemplateEngine::template_exists, TemplateEngine::assigned) in
/home/www/skippy.net/system/classes/smartyengine.php on line 18

Comment 1 by pjkeane, Apr 19, 2007

Here's a patch for smartyengine.php that will fix this error. I am currently working
on a barebones Smarty Theme example which will depend on this patch.

    public function template_exists( $tmpl_file )
    {
        return file_exists( $this->template_dir . $tmpl_file . '.tpl');
    }

    public function assigned( $name )
    {
        if ($this->smarty->get_template_vars( $name )) {
            return true;
        } else {
            return false;
        }
    }

Attachments

smartyengine.php.r653.diff Download (981 bytes) - added by miklb 4 years ago.

Change History

Changed 4 years ago by miklb

comment:1 Changed 4 years ago by miklb

  • Reporter changed from miklb to smerrill

comment:2 Changed 4 years ago by morydd

  • Component changed from -none- to Habari Core Software

comment:3 Changed 4 years ago by miklb

  • Milestone changed from 0.4 to 0.5

bumping milestone, smartengine not in plans for .4

comment:4 Changed 4 years ago by itrebal

  • Keywords Smarty, has_patch added; Smarty removed

comment:5 Changed 4 years ago by freakerz

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for the initial patch pjkeane!

Sorry for the year late commit, but it's in there now.

Committed in r1602.

Note: See TracTickets for help on using tickets.