list via Special:Undelete. Default is off, replicating the 1.5 behavior,
but it can be turned back on for random users to replicate the previous
1.6 dev behavior.
+* Add 'GetInternalURL' hook to match the GetFullURL and GetLocalURL ones
=== Caveats ===
$subject: subject of the mail
$text: text of the mail
+'GetInternalURL': modify fully-qualified URLs used for squid cache purging
+$title: Title object of page
+$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getInternalURL()
+
+'GetLocalURL': modify local URLs as output into page links
+$title: Title object of page
+$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getLocalURL()
+
+'GetFullURL': modify fully-qualified URLs used in redirects/export/offsite data
+$title: Title object of page
+$url: string value as output (out parameter, can modify)
+$query: query options passed to Title::getFullURL()
+
'LogPageValidTypes': action being logged.
$type: array of strings
$metadata = $this->mMetaData ;
$metadata = htmlspecialchars( $wgContLang->recodeForEdit( $metadata ) ) ;
$helppage = Title::newFromText( wfMsg( "metadata_page" ) ) ;
- $top = wfMsg( 'metadata', $helppage->getInternalURL() );
+ $top = wfMsg( 'metadata', $helppage->getLocalURL() );
$metadata = $top . "<textarea name='metadata' rows='3' cols='{$cols}'{$ew}>{$metadata}</textarea>" ;
}
else $metadata = "" ;
# Squid purging
if ( $wgUseSquid ) {
- $urlArr = Array(
+ $urlArr = array(
$wgInternalServer.wfImageArchiveUrl( $oldimage ),
- $wgInternalServer.$this->mTitle->getFullURL()
+ $this->mTitle->getInternalURL()
);
wfPurgeSquidServers($urlArr);
}
}
function revert() {
- global $wgOut, $wgRequest, $wgUser, $wgUseSquid, $wgInternalServer;
+ global $wgOut, $wgRequest, $wgUser;
$oldimage = $wgRequest->getText( 'oldimage' );
if ( strlen( $oldimage ) < 16 ) {
*/
function getInternalURL( $query = '' ) {
global $wgInternalServer;
- return $wgInternalServer . $this->getLocalURL( $query );
+ $url = $wgInternalServer . $this->getLocalURL( $query );
+ wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) );
+ return $url;
}
/**