includes/pageprocess.php
changeset 557 26479224936a
parent 542 5841df0ab575
child 570 4d0d5dae61e5
equal deleted inserted replaced
556:63e131c38876 557:26479224936a
   172     global $db, $session, $paths, $template, $plugins; // Common objects
   172     global $db, $session, $paths, $template, $plugins; // Common objects
   173     global $lang;
   173     global $lang;
   174     
   174     
   175     profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Started send process");
   175     profiler_log("PageProcessor [{$this->namespace}:{$this->page_id}]: Started send process");
   176     
   176     
       
   177     if ( $this->send_headers )
       
   178     {
       
   179       $template->init_vars($this);
       
   180     }
       
   181     
   177     if ( !$this->perms->get_permissions('read') )
   182     if ( !$this->perms->get_permissions('read') )
   178     {
   183     {
   179       // Permission denied to read page. Is this one of our core pages that must always be allowed?
   184       // Permission denied to read page. Is this one of our core pages that must always be allowed?
   180       // NOTE: Not even the administration panel will work if ACLs deny access to it.
   185       // NOTE: Not even the administration panel will work if ACLs deny access to it.
   181       if ( $this->namespace == 'Special' && in_array($this->page_id, array('Login', 'Logout', 'LangExportJSON', 'CSS')) )
   186       if ( $this->namespace == 'Special' && in_array($this->page_id, array('Login', 'Logout', 'LangExportJSON', 'CSS')) )
   226     {
   231     {
   227       doStats($this->page_id, $this->namespace);
   232       doStats($this->page_id, $this->namespace);
   228     }
   233     }
   229     if ( $this->namespace == 'Special' || $this->namespace == 'Admin' )
   234     if ( $this->namespace == 'Special' || $this->namespace == 'Admin' )
   230     {
   235     {
       
   236       $this->revision_time = time();
       
   237       
   231       if ( !$this->page_exists )
   238       if ( !$this->page_exists )
   232       {
   239       {
   233         $func_name = "page_{$this->namespace}_{$this->page_id}";
   240         $func_name = "page_{$this->namespace}_{$this->page_id}";
   234         
   241         
   235         die_semicritical($lang->get('page_msg_admin_404_title'), $lang->get('page_msg_admin_404_body', array('func_name' => $func_name)), (!$this->send_headers));
   242         die_semicritical($lang->get('page_msg_admin_404_title'), $lang->get('page_msg_admin_404_body', array('func_name' => $func_name)), (!$this->send_headers));