r68079 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68078‎ | r68079 | r68080 >
Date:15:06, 15 June 2010
Author:hartman
Status:ok
Tags:
Comment:
Add the titles of interlanguage links to the tooltip of those pages (title attribute)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)
  • /trunk/phase3/skins/MonoBook.php (modified) (history)
  • /trunk/phase3/skins/Vector.php (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/Vector.php
@@ -639,7 +639,7 @@
640640 <div class="body">
641641 <ul>
642642 <?php foreach ( $this->data['language_urls'] as $langlink ): ?>
643 - <li class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>"><?php echo $langlink['text'] ?></a></li>
 643+ <li class="<?php echo htmlspecialchars( $langlink['class'] ) ?>"><a href="<?php echo htmlspecialchars( $langlink['href'] ) ?>" title="<?php echo htmlspecialchars( $langlink['title'] ) ?>"><?php echo $langlink['text'] ?></a></li>
644644 <?php endforeach; ?>
645645 </ul>
646646 </div>
Index: trunk/phase3/skins/MonoBook.php
@@ -310,7 +310,8 @@
311311 <ul>
312312 <?php foreach($this->data['language_urls'] as $langlink) { ?>
313313 <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
314 - ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
 314+ ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>" title="<?php
 315+ echo htmlspecialchars($langlink['title']) ?>"><?php echo $langlink['text'] ?></a></li>
315316 <?php } ?>
316317 </ul>
317318 </div>
Index: trunk/phase3/includes/SkinTemplate.php
@@ -433,6 +433,7 @@
434434 'href' => $nt->getFullURL(),
435435 'text' => ( $wgContLang->getLanguageName( $nt->getInterwiki() ) != '' ?
436436 $wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ),
 437+ 'title' => $nt->getText(),
437438 'class' => $class
438439 );
439440 }
Index: trunk/phase3/includes/Skin.php
@@ -1894,12 +1894,13 @@
18951895 $nt = Title::newFromText( $l );
18961896 $url = $nt->escapeFullURL();
18971897 $text = $wgContLang->getLanguageName( $nt->getInterwiki() );
 1898+ $title = htmlspecialchars( $nt->getText() );
18981899
18991900 if ( $text == '' ) {
19001901 $text = $l;
19011902 }
19021903 $style = $this->getExternalLinkAttributes();
1903 - $s .= "<a href=\"{$url}\"{$style}>{$text}</a>";
 1904+ $s .= "<a href=\"{$url}\" title=\"{$title}\"{$style}>{$text}</a>";
19041905 }
19051906 if( $wgContLang->isRTL() ) {
19061907 $s .= '</span>';
Index: trunk/phase3/RELEASE-NOTES
@@ -82,6 +82,7 @@
8383 experimental feature.
8484 * Show validity period of the login cookie in Special:UserLogin and
8585 Special:Preferences
 86+* Interlanguage links display the page title in their tooltip.
8687
8788 === Bug fixes in 1.17 ===
8889 * (bug 17560) Half-broken deletion moved image files to deletion archive

Follow-up revisions

RevisionCommit summaryAuthorDate
r687451.16wmf4: Merge Vector fixes from trunk: r68079, r68105, r68109, r68177, r682...catrope21:18, 29 June 2010

Status & tagging log