r18156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18155‎ | r18156 | r18157 >
Date:11:28, 4 December 2006
Author:nickj
Status:old
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/UserMailer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/UserMailer.php
@@ -39,7 +39,7 @@
4040 * @param string $name Human-readable name if a string address is given
4141 */
4242 function MailAddress( $address, $name=null ) {
43 - if( is_object( $address ) && is_a( $address, 'User' ) ) {
 43+ if( is_object( $address ) && $address instanceof User ) {
4444 $this->address = $address->getEmail();
4545 $this->name = $address->getName();
4646 } else {
Index: trunk/phase3/includes/Skin.php
@@ -300,7 +300,7 @@
301301 function getHeadScripts() {
302302 global $wgStylePath, $wgUser, $wgAllowUserJs, $wgJsMimeType, $wgStyleVersion;
303303 global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang;
304 - global $wgTitle, $wgCanonicalNamespaceNames, $wgOut;
 304+ global $wgTitle, $wgCanonicalNamespaceNames, $wgOut, $wgArticle, $wgRequest;
305305
306306 $ns = $wgTitle->getNamespace();
307307 $nsname = isset( $wgCanonicalNamespaceNames[ $ns ] ) ? $wgCanonicalNamespaceNames[ $ns ] : $wgTitle->getNsText();
@@ -317,6 +317,8 @@
318318 'titleprefixeddbkey' => $wgTitle->getPrefixedDBKey(),
319319 'titletext' => $wgTitle->getText(),
320320 'articleid' => $wgTitle->getArticleId(),
 321+ 'currevisionid' => isset( $wgArticle ) ? $wgArticle->getLatest() : 0,
 322+ 'oldid' => $wgRequest->getVal( 'oldid' ),
321323 'isarticle' => $wgOut->isArticle(),
322324 'username' => $wgUser->isAnon() ? NULL : $wgUser->getName(),
323325 'userlang' => $wgLang->getCode(),

Follow-up revisions

RevisionCommit summaryAuthorDate
r18164Reverting oldid parts of r18156 and r18150, as should not be taking 'oldid' o...nickj23:29, 4 December 2006