From: Nick Jenkins Date: Mon, 4 Dec 2006 11:28:48 +0000 (+0000) Subject: E_STRICT minor tweaks: X-Git-Tag: 1.31.0-rc.0~54995 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=0e2426cc655578e4d9a4f3c68b113a8a58da62fe;p=lhc%2Fweb%2Fwiklou.git E_STRICT minor tweaks: * Strict Standards: Undefined index: currevisionid in includes/Skin.php on line 287 * Strict Standards: Undefined index: oldid in includes/Skin.php on line 288 [ Repo above with error_logging(E_ALL | E_STRICT) in LocalSettings.php, and a non-default skin, e.g: http://localhost/wiki/index.php?title=Main_Page&useskin=nostalgia ] * Strict Standards: is_a(): Deprecated. Please use the instanceof operator in includes/UserMailer.php on line 42 --- diff --git a/includes/Skin.php b/includes/Skin.php index ab695df056..45e8f2803d 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -300,7 +300,7 @@ class Skin extends Linker { 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(); @@ -317,6 +317,8 @@ class Skin extends Linker { '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(), diff --git a/includes/UserMailer.php b/includes/UserMailer.php index a982439567..0101f74412 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -39,7 +39,7 @@ class MailAddress { * @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 {