includes/pageprocess.php
changeset 1068 4bcefa85649c
parent 1027 98c052fc3337
child 1081 745200a9cc2a
equal deleted inserted replaced
1067:4058c844ee38 1068:4bcefa85649c
  1120   {
  1120   {
  1121     return $this->ns->exists();
  1121     return $this->ns->exists();
  1122   }
  1122   }
  1123   
  1123   
  1124   /**
  1124   /**
  1125    * Pushes to the redirect stack and resets the instance. This depends on the page ID and namespace already being validated and sanitized, and does not check the size of the redirect stack.
       
  1126    * @param string Page ID to redirect to
       
  1127    * @param string Namespace to redirect to
       
  1128    * @access private
       
  1129    */
       
  1130   
       
  1131   /*
       
  1132   function _handle_redirect($page_id, $namespace)
       
  1133   {
       
  1134     global $db, $session, $paths, $template, $plugins; // Common objects
       
  1135     global $lang;
       
  1136     $arr_pid = array($this->page_id, $this->namespace);
       
  1137     if ( $namespace == 'Special' || $namespace == 'Admin' )
       
  1138     {
       
  1139       return ;
       
  1140     }
       
  1141     $looped = false;
       
  1142     foreach ( $this->redirect_stack as $page )
       
  1143     {
       
  1144       if ( $page[0] == $arr_pid[0] && $page[1] == $arr_pid[1] )
       
  1145       {
       
  1146         $looped = true;
       
  1147         break;
       
  1148       }
       
  1149     }
       
  1150     if ( $looped )
       
  1151     {
       
  1152       return ;
       
  1153     }
       
  1154     $page_id_key = $paths->nslist[ $namespace ] . sanitize_page_id($page_id);
       
  1155     if ( !isPage($page_id_key) )
       
  1156     {
       
  1157       return $lang->get('page_err_redirect_to_nonexistent');
       
  1158     }
       
  1159     $this->redirect_stack[] = $arr_pid;
       
  1160     
       
  1161     
       
  1162     // Nuke the text cache to avoid infinite loops, gah...
       
  1163     $this->text_cache = '';
       
  1164     $this->_setup($page_id, $namespace, 0);
       
  1165     $this->send();
       
  1166     return true;
       
  1167   }
       
  1168   */
       
  1169   
       
  1170   /**
       
  1171    * Send the error message to the user that the access to this page is denied.
  1125    * Send the error message to the user that the access to this page is denied.
  1172    * @access private
  1126    * @access private
  1173    */
  1127    */
  1174   
  1128   
  1175   function err_access_denied()
  1129   function err_access_denied()