r42701 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42700‎ | r42701 | r42702 >
Date:23:57, 27 October 2008
Author:simetrical
Status:old
Tags:
Comment:
Allow '0' as an accesskey.

PHP weak typing strikes again!
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -1719,7 +1719,7 @@
17201720 }
17211721
17221722 $accesskey = wfMsg( "accesskey-$name" );
1723 - if( $accesskey && $accesskey != '-' &&
 1723+ if( $accesskey != '' && $accesskey != '-' &&
17241724 !wfEmptyMsg( "accesskey-$name", $accesskey ) ) {
17251725 if( isset( $attribs['title'] ) ) {
17261726 $attribs['title'] .= " [$accesskey]";
@@ -1756,7 +1756,7 @@
17571757
17581758 if( isset( $attribs['title'] ) && $options == 'withaccess' ) {
17591759 $accesskey = wfMsg( "accesskey-$name" );
1760 - if( $accesskey && $accesskey != '-' &&
 1760+ if( $accesskey != '' && $accesskey != '-' &&
17611761 !wfEmptyMsg( "accesskey-$name", $accesskey ) ) {
17621762 $attribs['title'] .= " [$accesskey]";
17631763 }
Index: trunk/phase3/RELEASE-NOTES
@@ -289,6 +289,7 @@
290290 JavaScript is disabled.
291291 * (bug 4253) Recentchanges IRC messages no longer include title in diff URLs and
292292 the comment is trimmed if necessary to maintain proper message length.
 293+* Allow '0' to be an accesskey.
293294
294295 === API changes in 1.14 ===
295296

Status & tagging log