includes/pageprocess.php
changeset 372 5bd429428101
parent 369 d0825e599853
child 377 bb3e6c3bd4f4
--- a/includes/pageprocess.php	Wed Jan 23 12:48:22 2008 -0500
+++ b/includes/pageprocess.php	Thu Jan 24 22:06:09 2008 -0500
@@ -131,6 +131,8 @@
   {
     global $db, $session, $paths, $template, $plugins; // Common objects
     
+    profiler_log("PageProcessor [{$namespace}:{$page_id}]: Started constructor");
+    
     // See if we can get some debug info
     if ( function_exists('debug_backtrace') && $this->debug['enable'] )
     {
@@ -148,8 +150,9 @@
     if ( !is_int($revision_id) )
       $revision_id = 0;
     
+    profiler_log("PageProcessor [{$namespace}:{$page_id}]: Ran initial checks");
+    
     $this->_setup( $page_id, $namespace, $revision_id );
-    
   }
   
   /**
@@ -162,9 +165,12 @@
     global $db, $session, $paths, $template, $plugins; // Common objects
     global $lang;
     
+    profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Started send process");
+    
     if ( !$this->perms->get_permissions('read') )
     {
       $this->err_access_denied();
+      profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Finished send process");
       return false;
     }
     $pathskey = $paths->nslist[ $this->namespace ] . $this->page_id;
@@ -193,6 +199,7 @@
           if ( $this->password != $password )
           {
             $this->err_wrong_password();
+            profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Finished send process");
             return false;
           }
         }
@@ -211,7 +218,10 @@
       $func_name = "page_{$this->namespace}_{$this->page_id}";
       if ( function_exists($func_name) )
       {
-        return @call_user_func($func_name);
+        profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Calling special/admin page");
+        $result = @call_user_func($func_name);
+        profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Finished send process");
+        return $result;
       }
       else
       {
@@ -230,6 +240,7 @@
           echo "<h2>$title</h2>
                 <p>$message</p>";
         }
+        profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Finished send process");
         return false;
       }
     }
@@ -297,6 +308,7 @@
       if ( $text == 'err_no_text_rows' )
       {
         $this->err_no_rows();
+        profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Finished send process");
         return false;
       }
       else
@@ -327,6 +339,7 @@
         }
       }
     }
+    profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Finished send process");
   }
   
   /**
@@ -596,6 +609,7 @@
     
     $this->title = get_page_title_ns($this->page_id, $this->namespace);
     
+    profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Ran _setup()");
   }
   
   /**