r89123 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89122‎ | r89123 | r89124 >
Date:18:32, 29 May 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Fix up a couple of deprecated calls

Documentation
Modified paths:
  • /trunk/phase3/skins/Chick.php (modified) (history)
  • /trunk/phase3/skins/CologneBlue.php (modified) (history)
  • /trunk/phase3/skins/Modern.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Nostalgia.php (modified) (history)
  • /trunk/phase3/skins/Simple.php (modified) (history)
  • /trunk/phase3/skins/Standard.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/CologneBlue.php
@@ -19,6 +19,9 @@
2020 var $skinname = 'cologneblue', $stylename = 'cologneblue',
2121 $template = 'CologneBlueTemplate';
2222
 23+ /**
 24+ * @param $out OutputPage
 25+ */
2326 function setupSkinUserCss( OutputPage $out ){
2427 parent::setupSkinUserCss( $out );
2528 $out->addModuleStyles( 'skins.cologneblue' );
@@ -55,6 +58,9 @@
5659
5760 class CologneBlueTemplate extends LegacyTemplate {
5861
 62+ /**
 63+ * @return string
 64+ */
5965 function doBeforeContent() {
6066 $mainPageObj = Title::newMainPage();
6167
@@ -95,6 +101,9 @@
96102 return $s;
97103 }
98104
 105+ /**
 106+ * @return string
 107+ */
99108 function doAfterContent(){
100109 global $wgLang;
101110
@@ -136,6 +145,9 @@
137146 return $s;
138147 }
139148
 149+ /**
 150+ * @return string
 151+ */
140152 function sysLinks() {
141153 global $wgUser, $wgLang;
142154 $li = SpecialPage::getTitleFor( 'Userlogin' );
@@ -194,6 +206,8 @@
195207 /**
196208 * Compute the sidebar
197209 * @access private
 210+ *
 211+ * @return string
198212 */
199213 function quickBar(){
200214 global $wgOut, $wgUser;
@@ -347,11 +361,19 @@
348362 return $s;
349363 }
350364
 365+ /**
 366+ * @param $key string
 367+ * @return string
 368+ */
351369 function menuHead( $key ) {
352370 $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
353371 return $s;
354372 }
355373
 374+ /**
 375+ * @param $label string
 376+ * @return string
 377+ */
356378 function searchForm( $label = '' ) {
357379 global $wgRequest, $wgUseTwoButtonsSearchForm;
358380
Index: trunk/phase3/skins/Standard.php
@@ -18,6 +18,9 @@
1919 var $skinname = 'standard', $stylename = 'standard',
2020 $template = 'StandardTemplate';
2121
 22+ /**
 23+ * @param $out OutputPage
 24+ */
2225 function setupSkinUserCss( OutputPage $out ){
2326 parent::setupSkinUserCss( $out );
2427 $out->AddModuleStyles( 'skins.standard' );
@@ -51,6 +54,9 @@
5255
5356 class StandardTemplate extends LegacyTemplate {
5457
 58+ /**
 59+ * @return string
 60+ */
5561 function doAfterContent() {
5662 global $wgContLang, $wgLang;
5763 wfProfileIn( __METHOD__ );
@@ -99,6 +105,9 @@
100106 return $s;
101107 }
102108
 109+ /**
 110+ * @return string
 111+ */
103112 function quickBar() {
104113 global $wgOut, $wgUser, $wgRequest, $wgContLang;
105114
Index: trunk/phase3/skins/Vector.php
@@ -108,7 +108,7 @@
109109 }
110110 if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) {
111111 $nav[$section][$key]['key'] =
112 - Linker::tooltip( $xmlID );
 112+ Linker::titleAttrib( $xmlID );
113113 } else {
114114 $nav[$section][$key]['key'] =
115115 Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) );
@@ -258,6 +258,8 @@
259259
260260 /**
261261 * Render a series of portals
 262+ *
 263+ * @params $portals array
262264 */
263265 private function renderPortals( $portals ) {
264266 // Force the rendering of the following portals
@@ -297,7 +299,7 @@
298300 $msg = $name;
299301 }
300302 ?>
301 -<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
 303+<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::titleAttrib( 'p-' . $name ) ?>>
302304 <h5<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h5>
303305 <div class="body">
304306 <?php
@@ -327,6 +329,8 @@
328330 /**
329331 * Render one or more navigations elements by name, automatically reveresed
330332 * when UI is in RTL mode
 333+ *
 334+ * @param $elements array
331335 */
332336 private function renderNavigation( $elements ) {
333337 global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
Index: trunk/phase3/skins/Chick.php
@@ -21,6 +21,9 @@
2222 var $skinname = 'chick', $stylename = 'chick',
2323 $template = 'MonoBookTemplate', $useHeadElement = true;
2424
 25+ /**
 26+ * @param $out OutputPage
 27+ */
2528 function setupSkinUserCss( OutputPage $out ){
2629 parent::setupSkinUserCss( $out );
2730
Index: trunk/phase3/skins/Nostalgia.php
@@ -18,6 +18,9 @@
1919 var $skinname = 'nostalgia', $stylename = 'nostalgia',
2020 $template = 'NostalgiaTemplate';
2121
 22+ /**
 23+ * @param $out OutputPage
 24+ */
2225 function setupSkinUserCss( OutputPage $out ){
2326 parent::setupSkinUserCss( $out );
2427 $out->addModuleStyles( 'skins.nostalgia' );
@@ -27,6 +30,9 @@
2831
2932 class NostalgiaTemplate extends LegacyTemplate {
3033
 34+ /**
 35+ * @return string
 36+ */
3137 function doBeforeContent() {
3238 $s = "\n<div id='content'>\n<div id='top'>\n";
3339 $s .= '<div id="logo">' . $this->getSkin()->logoText( 'right' ) . '</div>';
@@ -59,6 +65,9 @@
6066 return $s;
6167 }
6268
 69+ /**
 70+ * @return string
 71+ */
6372 function topLinks() {
6473 global $wgOut, $wgUser;
6574 $sep = " |\n";
@@ -105,6 +114,9 @@
106115 return $s;
107116 }
108117
 118+ /**
 119+ * @return string
 120+ */
109121 function doAfterContent() {
110122 $s = "\n</div><br clear='all' />\n";
111123
Index: trunk/phase3/skins/MonoBook.php
@@ -23,6 +23,9 @@
2424 var $skinname = 'monobook', $stylename = 'monobook',
2525 $template = 'MonoBookTemplate', $useHeadElement = true;
2626
 27+ /**
 28+ * @param $out OutputPage
 29+ */
2730 function setupSkinUserCss( OutputPage $out ) {
2831 global $wgHandheldStyle;
2932 parent::setupSkinUserCss( $out );
@@ -211,6 +214,8 @@
212215 /**
213216 * Prints the cactions bar.
214217 * Shared between MonoBook and Modern
 218+ *
 219+ * @param $skin Skin
215220 */
216221 function cactions( Skin $skin ) {
217222 ?>
Index: trunk/phase3/skins/Modern.php
@@ -21,6 +21,9 @@
2222 var $skinname = 'modern', $stylename = 'modern',
2323 $template = 'ModernTemplate', $useHeadElement = true;
2424
 25+ /**
 26+ * @param $out OutputPage
 27+ */
2528 function setupSkinUserCss( OutputPage $out ){
2629 parent::setupSkinUserCss( $out );
2730 $out->addModuleStyles ('skins.modern');
Index: trunk/phase3/skins/Simple.php
@@ -21,6 +21,9 @@
2222 var $skinname = 'simple', $stylename = 'simple',
2323 $template = 'MonoBookTemplate', $useHeadElement = true;
2424
 25+ /**
 26+ * @param $out OutputPage
 27+ */
2528 function setupSkinUserCss( OutputPage $out ) {
2629 parent::setupSkinUserCss( $out );
2730

Follow-up revisions

RevisionCommit summaryAuthorDate
r94024Revert r89123 -- caused bug 30259 (switched correct calls with incorrect call...brion12:06, 6 August 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   11:59, 6 August 2011

Causes bug 30259 -- outputs tooltip text in some cases directly into the middle of an <a> element instead of as an attribute.

#Comment by Brion VIBBER (talk | contribs)   12:08, 6 August 2011

Reverted on trunk & REL1_18 to fix the bug.

#Comment by Brion VIBBER (talk | contribs)   12:08, 6 August 2011

(and a general comment -- please don't mix functional changes like switching out functions with code style tweaks like adding doc comments on unrelated stuff)

Status & tagging log