Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F8269
portlettitle_rewrite.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 11:56 PM
2014-11-21 23:56:28 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
portlettitle_rewrite.patch
View Options
Index: includes/SkinTemplate.php
===================================================================
--- includes/SkinTemplate.php (revision 99358)
+++ includes/SkinTemplate.php (working copy)
@@ -1645,8 +1645,11 @@
* If you don't want an accesskey, set $item['tooltiponly'] = true;
*/
function makeLink( $key, $item ) {
+ $attrs = $item;
+
if ( isset( $item['text'] ) ) {
$text = $item['text'];
+ unset( $attrs['text'] );
} else {
$text = $this->translator->translate( isset( $item['msg'] ) ? $item['msg'] : $key );
}
@@ -1655,13 +1658,6 @@
return htmlspecialchars( $text );
}
- $attrs = array();
- foreach ( array( 'href', 'id', 'class', 'rel', 'type', 'target') as $attr ) {
- if ( isset( $item[$attr] ) ) {
- $attrs[$attr] = $item[$attr];
- }
- }
-
if ( isset( $item['id'] ) ) {
$item['single-id'] = $item['id'];
}
@@ -1677,6 +1673,7 @@
Linker::tooltipAndAccesskeyAttribs( $item['single-id'] )
);
}
+ unset( $attrs['single-id'] );
}
return Html::element( 'a', $attrs, $text );
@@ -1708,12 +1705,9 @@
$html .= $this->makeLink( $linkKey, $link );
}
} else {
- $link = array();
- foreach ( array( 'text', 'msg', 'href', 'rel', 'type', 'tooltiponly', 'target' ) as $k ) {
- if ( isset( $item[$k] ) ) {
- $link[$k] = $item[$k];
- }
- }
+ $link = $item;
+ unset( $link['id'] );
+ unset( $link['class'] );
if ( isset( $item['id'] ) ) {
// The id goes on the <li> not on the <a> for single links
// but makeSidebarLink still needs to know what id to use when
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7793
Default Alt Text
portlettitle_rewrite.patch (1 KB)
Attached To
Mode
T33505: The title attribute of interwiki links is missing in Monobook/Vector/Modern skins
Attached
Detach File
Event Timeline
Log In to Comment