'Allmessages' => new SpecialPage( 'Allmessages' ),
'Log' => new SpecialPage( 'Log' ),
'Blockip' => new SpecialPage( 'Blockip', 'block' ),
- 'Undelete' => new SpecialPage( 'Undelete' ),
+ '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' ),
+ 'Revisiondelete' => new SpecialPage( 'Revisiondelete', 'deleterevision' ),
);
-if ( $wgUseValidation )
- $wgSpecialPages['Validate'] = new SpecialPage( 'Validate' );
-
if( !$wgDisableCounters ) {
$wgSpecialPages['Popularpages'] = new SpecialPage( 'Popularpages' );
}
$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
* @param $including output is being captured for use in {{special:whatever}}
*/
function executePath( &$title, $including = false ) {
- global $wgSpecialPages, $wgOut, $wgTitle;
+ global $wgOut, $wgTitle;
$fname = 'SpecialPage::executePath';
wfProfileIn( $fname );
function getFile() { return $this->mFile; }
function isListed() { return $this->mListed; }
/**#@-*/
-
+
/**#@+
* Accessor and mutator
*/
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)
* Checks user permissions, calls the function given in mFunction
*/
function execute( $par ) {
- global $wgUser, $wgOut, $wgTitle;
+ global $wgUser;
$this->setHeaders();
if(!function_exists($func) and $this->mFile) {
require_once( $this->mFile );
}
+ 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();
}
}
+ function outputHeader() {
+ global $wgOut, $wgContLang;
+
+ $msg = $wgContLang->lc( $this->name() ) . '-summary';
+ $out = wfMsg( $msg );
+ if ( ! wfEmptyMsg( $msg, $out ) and $out !== '' and ! $this->including() )
+ $wgOut->addWikiText( $out );
+
+ }
+
# Returns the name that goes in the <h1> in the special page itself, and also the name that
# will be listed in Special:Specialpages
#