Changeset 852

Show
Ignore:
Timestamp:
09/17/07 19:15:15 (15 months ago)
Author:
freakerz
Message:

Fixing two problems prior commit caused.

is_callable() for some reason did not work right.

k2 theme.php used $this in a non-object context, using User::identify() now.

Sorry!

Location:
trunk/htdocs
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/theme.php

    r851 r852  
    356356        $this->template_engine->$key= $value; 
    357357    } 
    358      
    359358     
    360359    /** 
     
    363362    public function header() { 
    364363        Plugins::act( 'template_header' ); 
    365         if ( is_callable( array( THEME_CLASS, 'header' ) ) ) { 
     364        if ( function_exists( THEME_CLASS . '::header' ) ) { 
    366365            call_user_func( array( THEME_CLASS, 'header' ) ); 
    367366        } 
     
    378377    public function footer() { 
    379378        Plugins::act( 'template_footer' ); 
    380         if ( is_callable( array( THEME_CLASS, 'footer' ) ) ) { 
     379        if ( function_exists( THEME_CLASS . '::footer' ) ) { 
    381380            call_user_func( array( THEME_CLASS, 'footer' ) ); 
    382381        } 
  • trunk/htdocs/user/themes/k2/theme.php

    r851 r852  
    6565    public function header() 
    6666    { 
    67         if ( $this->user instanceof User ) { 
     67        if ( User::identify() != FALSE ) { 
    6868            Stack::add( 'template_header_javascript', Site::get_url('scripts') . '/jquery.js', 'jquery' ); 
    6969        }