# HG changeset patch # User Dan # Date 1189134231 14400 # Node ID 77c75179bb952702ceb0d2689e3bc78c4f8fdbd3 # Parent 261f367623afe92088118f38de20df0560bef1ba Made most special pages "visible"; fixup for non-existent special page redirect in paths.php; rewrote Special:AllPages to have pagination (WiP, Special:SpecialPages is possibly next, depending on whether paginate_array works or not) diff -r 261f367623af -r 77c75179bb95 includes/paths.php --- a/includes/paths.php Tue Sep 04 12:52:23 2007 -0400 +++ b/includes/paths.php Thu Sep 06 23:03:51 2007 -0400 @@ -347,10 +347,20 @@ { $this->cpage['protected'] = 1; } - if($this->namespace=='Special') + if($this->namespace == 'Special') { // Can't load nonexistent pages - $this->main_page(); + if( is_string(getConfig('main_page')) ) + { + $main_page = makeUrl(getConfig('main_page')); + } + else + { + $main_page = makeUrl($this->pages[0]['urlname']); + } + $sp_link = 'here'; + 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); + exit; } // Allow the user to create/modify his user page uncondtionally (admins can still protect the page) if($this->page == $this->nslist['User'].str_replace(' ', '_', $session->username)) diff -r 261f367623af -r 77c75179bb95 index.php --- a/index.php Tue Sep 04 12:52:23 2007 -0400 +++ b/index.php Thu Sep 06 23:03:51 2007 -0400 @@ -263,7 +263,7 @@ ?>