includes/paths.php
changeset 116 77c75179bb95
parent 109 93ef7df77847
child 118 0c5efda996bf
equal deleted inserted replaced
115:261f367623af 116:77c75179bb95
   345       
   345       
   346       if($this->namespace=='System') 
   346       if($this->namespace=='System') 
   347       {
   347       {
   348         $this->cpage['protected'] = 1;
   348         $this->cpage['protected'] = 1;
   349       }
   349       }
   350       if($this->namespace=='Special')
   350       if($this->namespace == 'Special')
   351       {
   351       {
   352         // Can't load nonexistent pages
   352         // Can't load nonexistent pages
   353         $this->main_page();
   353         if( is_string(getConfig('main_page')) )
       
   354         {
       
   355           $main_page = makeUrl(getConfig('main_page'));
       
   356         }
       
   357         else
       
   358         {
       
   359           $main_page = makeUrl($this->pages[0]['urlname']);
       
   360         }
       
   361         $sp_link = '<a href="' . makeUrlNS('Special', 'SpecialPages') . '">here</a>';
       
   362         redirect($main_page, 'Can\'t load special page', 'The special page you requested could not be found. This may be due to a plugin failing to load. A list of all special pages on this website can be viewed '.$sp_link.'. You will be redirected to the main page in 15 seconds.', 14);
       
   363         exit;
   354       }
   364       }
   355       // Allow the user to create/modify his user page uncondtionally (admins can still protect the page)
   365       // Allow the user to create/modify his user page uncondtionally (admins can still protect the page)
   356       if($this->page == $this->nslist['User'].str_replace(' ', '_', $session->username)) 
   366       if($this->page == $this->nslist['User'].str_replace(' ', '_', $session->username)) 
   357       {
   367       {
   358         $this->wiki_mode = true;
   368         $this->wiki_mode = true;