* Fix explicit s-maxage=0 on raw pages; should help with proxy issues in
[lhc/web/wiklou.git] / includes / SpecialPage.php
index d1eecec..f9a5ed9 100644 (file)
@@ -69,18 +69,17 @@ $wgSpecialPages = array(
        'Version'               => new SpecialPage( 'Version' ),
        'Allmessages'   => new SpecialPage( 'Allmessages' ),
        'Log'           => new SpecialPage( 'Log' ),
-       'Block'         => new SpecialPage( 'Blockip', 'block' ),
-       'Undelete'              => new SpecialPage( 'Undelete' ),
+       'Blockip'               => new SpecialPage( 'Blockip', 'block' ),
+       'Undelete'              => new SpecialPage( 'Undelete', 'deletedhistory' ),
        "Import"                => new SpecialPage( "Import", 'import' ),
        'Lockdb'                => new SpecialPage( 'Lockdb', 'siteadmin' ),
        'Unlockdb'              => new SpecialPage( 'Unlockdb', 'siteadmin' ),
        'Userrights'    => new SpecialPage( 'Userrights', 'userrights' ),
        'MIMEsearch'    => new SpecialPage( 'MIMEsearch' ),
+       'Unwatchedpages' => new SpecialPage( 'Unwatchedpages', 'unwatchedpages' ),
+       'Listredirects' => new SpecialPage( 'Listredirects' )
 );
 
-if ( $wgUseValidation )
-       $wgSpecialPages['Validate'] = new SpecialPage( 'Validate' );
-
 if( !$wgDisableCounters ) {
        $wgSpecialPages['Popularpages'] = new SpecialPage( 'Popularpages' );
 }
@@ -93,9 +92,6 @@ if( $wgEmailAuthentication ) {
        $wgSpecialPages['Confirmemail'] = new UnlistedSpecialPage( 'Confirmemail' );
 }
 
-if ( $wgEnableUnwatchedpages )
-        $wgSpecialPages['Unwatchedpages'] = new SpecialPage( 'Unwatchedpages' );
-
 /**
  * Parent special page class, also static functions for handling the special
  * page list
@@ -189,8 +185,7 @@ class SpecialPage
                        'Mytalk' => Title::makeTitle( NS_USER_TALK, $wgUser->getName() ),
                        'Mycontributions' => Title::makeTitle( NS_SPECIAL, 'Contributions/' . $wgUser->getName() ),
                        'Listadmins' => Title::makeTitle( NS_SPECIAL, 'Listusers/sysop' ), # @bug 2832
-                       'Randompage' => Title::makeTitle( NS_SPECIAL, 'Random' ),
-                       'Blockip' => Title::makeTitle( NS_SPECIAL, 'Block' )
+                       'Randompage' => Title::makeTitle( NS_SPECIAL, 'Random' )
                );
                wfRunHooks( 'SpecialPageGetRedirect', array( &$redirects ) );
 
@@ -205,9 +200,9 @@ class SpecialPage
        function getPages() {
                global $wgSpecialPages;
                $pages = array(
-                       '' => array(),
-                       'sysop' => array(),
-                       'developer' => array()
+                 '' => array(),
+                 'sysop' => array(),
+                 'developer' => array()
                );
 
                foreach ( $wgSpecialPages as $name => $page ) {
@@ -350,7 +345,7 @@ class SpecialPage
        function getFile() { return $this->mFile; }
        function isListed() { return $this->mListed; }
        /**#@-*/
-       
+
        /**#@+
          * Accessor and mutator
          */
@@ -362,7 +357,7 @@ class SpecialPage
        function includable( $x = NULL ) { return wfSetVar( $this->mIncludable, $x ); }
        function including( $x = NULL ) { return wfSetVar( $this->mIncluding, $x ); }
        /**#@-*/
-       
+
        /**
         * Checks if the given user (identified by an object) can execute this
         * special page (as defined by $mRestriction)
@@ -412,8 +407,13 @@ class SpecialPage
                        if(!function_exists($func) and $this->mFile) {
                                require_once( $this->mFile );
                        }
-                       $this->outputHeader();
+                       if ( wfRunHooks( 'SpecialPageExecuteBeforeHeader', array( &$this, &$par, &$func ) ) )
+                               $this->outputHeader();
+                       if ( ! wfRunHooks( 'SpecialPageExecuteBeforePage', array( &$this, &$par, &$func ) ) )
+                               return;
                        $func( $par, $this );
+                       if ( ! wfRunHooks( 'SpecialPageExecuteAfterPage', array( &$this, &$par, &$func ) ) )
+                               return;
                } else {
                        $this->displayRestrictionError();
                }