includes/template.php
changeset 935 9e124177c9a4
parent 915 91f4da84966f
child 936 41090c4d2648
--- a/includes/template.php	Thu Apr 16 21:01:47 2009 -0400
+++ b/includes/template.php	Thu Apr 16 22:48:59 2009 -0400
@@ -391,7 +391,7 @@
       @define('ENANO_TEMPLATE_LOADED', '');
     }
     
-    if ( is_object($page) && @get_class($page) == 'PageProcessor' )
+    if ( is_object($page) && ( @get_class($page) == 'PageProcessor' || preg_match('/^Namespace_/', @get_class($page)) ) )
     {
       $page_append = substr($paths->fullpage, strlen($paths->page));
       if ( isset($paths->nslist[$page->namespace]) )
@@ -405,7 +405,7 @@
       $local_fullpage = $local_page . $page_append;
       $local_page_id =& $page->page_id;
       $local_namespace =& $page->namespace;
-      $local_page_exists =& $page->page_exists;
+      $local_page_exists = $page->exists();
       $perms =& $page->perms;
     }
     else
@@ -584,6 +584,7 @@
     
     // Initialize the toolbar
     $tb = '';
+    $this->toolbar_menu = '';
     
     // Create "xx page" button
     
@@ -605,7 +606,6 @@
     // Comments button
     if ( $perms->get_permissions('read') && getConfig('enable_comments', '1')=='1' && $local_cdata['comments_on'] == 1 )
     {
-      
       $e = $db->sql_query('SELECT approved FROM '.table_prefix.'comments WHERE page_id=\''.$local_page_id.'\' AND namespace=\''.$local_namespace.'\';');
       if ( !$e )
       {