equal
deleted
inserted
replaced
389 else |
389 else |
390 { |
390 { |
391 @define('ENANO_TEMPLATE_LOADED', ''); |
391 @define('ENANO_TEMPLATE_LOADED', ''); |
392 } |
392 } |
393 |
393 |
394 if ( is_object($page) && @get_class($page) == 'PageProcessor' ) |
394 if ( is_object($page) && ( @get_class($page) == 'PageProcessor' || preg_match('/^Namespace_/', @get_class($page)) ) ) |
395 { |
395 { |
396 $page_append = substr($paths->fullpage, strlen($paths->page)); |
396 $page_append = substr($paths->fullpage, strlen($paths->page)); |
397 if ( isset($paths->nslist[$page->namespace]) ) |
397 if ( isset($paths->nslist[$page->namespace]) ) |
398 { |
398 { |
399 $local_page = $paths->nslist[$page->namespace] . $page->page_id; |
399 $local_page = $paths->nslist[$page->namespace] . $page->page_id; |
403 $local_page = $page->namespace . substr($paths->nslist['Special'], -1) . $page->page_id . $page_append; |
403 $local_page = $page->namespace . substr($paths->nslist['Special'], -1) . $page->page_id . $page_append; |
404 } |
404 } |
405 $local_fullpage = $local_page . $page_append; |
405 $local_fullpage = $local_page . $page_append; |
406 $local_page_id =& $page->page_id; |
406 $local_page_id =& $page->page_id; |
407 $local_namespace =& $page->namespace; |
407 $local_namespace =& $page->namespace; |
408 $local_page_exists =& $page->page_exists; |
408 $local_page_exists = $page->exists(); |
409 $perms =& $page->perms; |
409 $perms =& $page->perms; |
410 } |
410 } |
411 else |
411 else |
412 { |
412 { |
413 $local_page =& $paths->page; |
413 $local_page =& $paths->page; |
582 // PAGE TOOLBAR (on-page controls/actions) |
582 // PAGE TOOLBAR (on-page controls/actions) |
583 // |
583 // |
584 |
584 |
585 // Initialize the toolbar |
585 // Initialize the toolbar |
586 $tb = ''; |
586 $tb = ''; |
|
587 $this->toolbar_menu = ''; |
587 |
588 |
588 // Create "xx page" button |
589 // Create "xx page" button |
589 |
590 |
590 $btn_selected = ( isset($tplvars['toolbar_button_selected'])) ? $tplvars['toolbar_button_selected'] : $tplvars['toolbar_button']; |
591 $btn_selected = ( isset($tplvars['toolbar_button_selected'])) ? $tplvars['toolbar_button_selected'] : $tplvars['toolbar_button']; |
591 $parser = $this->makeParserText($btn_selected); |
592 $parser = $this->makeParserText($btn_selected); |
603 |
604 |
604 // Page toolbar |
605 // Page toolbar |
605 // Comments button |
606 // Comments button |
606 if ( $perms->get_permissions('read') && getConfig('enable_comments', '1')=='1' && $local_cdata['comments_on'] == 1 ) |
607 if ( $perms->get_permissions('read') && getConfig('enable_comments', '1')=='1' && $local_cdata['comments_on'] == 1 ) |
607 { |
608 { |
608 |
|
609 $e = $db->sql_query('SELECT approved FROM '.table_prefix.'comments WHERE page_id=\''.$local_page_id.'\' AND namespace=\''.$local_namespace.'\';'); |
609 $e = $db->sql_query('SELECT approved FROM '.table_prefix.'comments WHERE page_id=\''.$local_page_id.'\' AND namespace=\''.$local_namespace.'\';'); |
610 if ( !$e ) |
610 if ( !$e ) |
611 { |
611 { |
612 $db->_die(); |
612 $db->_die(); |
613 } |
613 } |