function getHeadScripts() {
global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType, $wgStyleVersion;
global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang;
- global $wgTitle, $wgCanonicalNamespaceNames, $wgOut;
+ global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle, $wgRequest;
$ns = $wgTitle->getNamespace();
$nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText();
'titleprefixeddbkey' => $wgTitle->getPrefixedDBKey(),
'titletext' => $wgTitle->getText(),
'articleid' => $wgTitle->getArticleId(),
+ 'currevisionid' => isset( $wgArticle ) ? $wgArticle->getLatest() : 0,
+ 'oldid' => $wgRequest->getVal( 'oldid' ),
'isarticle' => $wgOut->isArticle(),
'username' => $wgUser->isAnon() ? NULL : $wgUser->getName(),
'userlang' => $wgLang->getCode(),
* @param string $name Human-readable name if a string address is given
*/
function MailAddress( $address, $name=null ) {
- if( is_object( $address ) && is_a( $address, 'User' ) ) {
+ if( is_object( $address ) && $address instanceof User ) {
$this->address = $address->getEmail();
$this->name = $address->getName();
} else {