$url = str_replace( '$1', $dbkey, $wgArticlePath );
wfRunHooks( 'GetLocalURL::Article', array( &$this, &$url ) );
} else {
- global $wgVariantArticlePath, $wgActionPaths;
+ global $wgVariantArticlePath, $wgActionPaths, $wgContLang;
$url = false;
$matches = array();
if ( $url === false &&
$wgVariantArticlePath &&
+ $wgContLang->getCode() === $this->getPageLanguage()->getCode() &&
$this->getPageLanguage()->hasVariants() &&
preg_match( '/^variant=([^&]*)$/', $query, $matches ) )
{
* @return Array list of errors
*/
private function checkReadPermissions( $action, $user, $errors, $doExpensiveQueries, $short ) {
- global $wgWhitelistRead, $wgWhitelistReadRegexp, $wgRevokePermissions;
+ global $wgWhitelistRead, $wgWhitelistReadRegexp;
$whitelisted = false;
if ( User::isEveryoneAllowed( 'read' ) ) {
* they will already be wrapped in paragraphs.
*
* @since 1.21
+ * @param int oldid Revision ID that's being edited
* @return Array
*/
- public function getEditNotices() {
+ public function getEditNotices( $oldid = 0 ) {
$notices = array();
# Optional notices on a per-namespace and per-page basis
$notices[$editnoticeText] = $editnoticeMsg->parseAsBlock();
}
}
+
+ wfRunHooks( 'TitleGetEditNotices', array( $this, $oldid, &$notices ) );
return $notices;
}
}