r78264 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78263‎ | r78264 | r78265 >
Date:18:35, 12 December 2010
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Followup r75763, fixup wrong change of deprecated method

No need to do separate htmlspecialchars et al, Xml::expandAttributes
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -1006,7 +1006,7 @@
10071007 'undo' => $this->mNewid
10081008 ) );
10091009 $htmlLink = htmlspecialchars( wfMsg( 'editundo' ) );
1010 - $htmlTitle = $wgUser->getSkin()->titleAttrib( 'undo' );
 1010+ $htmlTitle = Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'undo' ) ) );
10111011 if ( $editable && !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) {
10121012 $this->mNewtitle .= " (<a href='$newUndo' $htmlTitle>" . $htmlLink . "</a>)";
10131013 }
Index: trunk/phase3/includes/EditPage.php
@@ -1223,7 +1223,7 @@
12241224 if ( $this->showHeader() === false )
12251225 return;
12261226
1227 - $action = htmlspecialchars($this->getActionURL($wgTitle));
 1227+ $action = htmlspecialchars( $this->getActionURL( $wgTitle ) );
12281228
12291229 if ( $wgUser->getOption( 'showtoolbar' ) and !$this->isCssJsSubpage ) {
12301230 # prepare toolbar for edit buttons
@@ -2355,7 +2355,9 @@
23562356 );
23572357 $checkboxes['minor'] =
23582358 Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
2359 - "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . $skin->titleAttrib( 'minoredit', 'withaccess' ) . ">{$minorLabel}</label>";
 2359+ "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" .
 2360+ Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'minoredit', 'withaccess' ) ) ) .
 2361+ ">{$minorLabel}</label>";
23602362 }
23612363
23622364 $watchLabel = wfMsgExt( 'watchthis', array( 'parseinline' ) );
@@ -2368,7 +2370,9 @@
23692371 );
23702372 $checkboxes['watch'] =
23712373 Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
2372 - "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . $skin->titleAttrib( 'watch', 'withaccess' ) . ">{$watchLabel}</label>";
 2374+ "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" .
 2375+ Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'watch', 'withaccess' ) ) ) .
 2376+ ">{$watchLabel}</label>";
23732377 }
23742378 wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) );
23752379 return $checkboxes;

Follow-up revisions

RevisionCommit summaryAuthorDate
r78276Fix fatal error from r78264ialex20:45, 12 December 2010
r784371.17: Merge tagged revisions from trunk: r77878, r77981, r77982, r77994, r780...catrope14:14, 15 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75763Update a few deprecated method callsreedy23:46, 31 October 2010

Comments

#Comment by Reedy (talk | contribs)   18:37, 12 December 2010

Needs backporting to 1.17 when confirmed ok

#Comment by Raymond (talk | contribs)   20:40, 12 December 2010

PHP Fatal error: Call to a member function titleAttrib() on a non-object in /www/w/includes/diff/DifferenceEngine.php on line 1009

Status & tagging log