r75763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75762‎ | r75763 | r75764 >
Date:23:46, 31 October 2010
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Update a few deprecated method calls
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceInterface.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceInterface.php
@@ -1010,7 +1010,7 @@
10111011 'undo' => $this->mNewid
10121012 ) );
10131013 $htmlLink = htmlspecialchars( wfMsg( 'editundo' ) );
1014 - $htmlTitle = $wgUser->getSkin()->tooltip( 'undo' );
 1014+ $htmlTitle = $wgUser->getSkin()->titleAttrib( 'undo' );
10151015 if( $editable && !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) {
10161016 $this->mNewtitle .= " (<a href='$newUndo' $htmlTitle>" . $htmlLink . "</a>)";
10171017 }
Index: trunk/phase3/includes/Linker.php
@@ -2068,7 +2068,6 @@
20692069 return Xml::expandAttributes( $this->tooltipAndAccesskeyAttribs( $name ) );
20702070 }
20712071
2072 -
20732072 /** @deprecated Returns raw bits of HTML, use titleAttrib() */
20742073 public function tooltip( $name, $options = null ) {
20752074 global $wgEnableTooltipsAndAccesskeys;
Index: trunk/phase3/includes/EditPage.php
@@ -2283,7 +2283,7 @@
22842284 );
22852285 $checkboxes['minor'] =
22862286 Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
2287 - "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . $skin->tooltip( 'minoredit', 'withaccess' ) . ">{$minorLabel}</label>";
 2287+ "&#160;<label for='wpMinoredit' id='mw-editpage-minoredit'" . $skin->titleAttrib( 'minoredit', 'withaccess' ) . ">{$minorLabel}</label>";
22882288 }
22892289
22902290 $watchLabel = wfMsgExt( 'watchthis', array( 'parseinline' ) );
@@ -2296,7 +2296,7 @@
22972297 );
22982298 $checkboxes['watch'] =
22992299 Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
2300 - "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . $skin->tooltip( 'watch', 'withaccess' ) . ">{$watchLabel}</label>";
 2300+ "&#160;<label for='wpWatchthis' id='mw-editpage-watch'" . $skin->titleAttrib( 'watch', 'withaccess' ) . ">{$watchLabel}</label>";
23012301 }
23022302 wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) );
23032303 return $checkboxes;

Follow-up revisions

RevisionCommit summaryAuthorDate
r78264Followup r75763, fixup wrong change of deprecated method...reedy18:35, 12 December 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   05:59, 11 December 2010

See bug 26302. Damn these kind of innocent, little, changes :)

#Comment by Reedy (talk | contribs)   14:38, 11 December 2010

Bloody computers, cheers for tying it up to the bug and pinging me.

Wifi is beyond tempremental atm, if I can find something stable, I'll try and poke it to fix it

Else, if someone else wants to fix it (or fix it by reverting), and then backport to 1.17 for a revert. I'm not too bothered. I can always update the deprecated method calls at a later date (or I imagine, someone else will...)


Cheers

#Comment by Aaron Schulz (talk | contribs)   06:04, 11 December 2010

titleAttrib() is just the attribute content, it doesn't include the 'title="..."' part.

Also, the doc comment says "you must HTML-escape" the result of the function.

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

Interestingly,

/** @deprecated Returns raw bits of HTML, use titleAttrib() */

Presumably that means it should've been escaped before? ;)

Status & tagging log