From: Aryeh Gregor Date: Mon, 27 Oct 2008 23:57:43 +0000 (+0000) Subject: Allow '0' as an accesskey. X-Git-Tag: 1.31.0-rc.0~44550 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=commitdiff_plain;h=3f493982942e5112788dd8372d92acb3f70e12d7;p=lhc%2Fweb%2Fwiklou.git Allow '0' as an accesskey. PHP weak typing strikes again! --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2632c39963..88a32366f7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -289,6 +289,7 @@ The following extensions are migrated into MediaWiki 1.14: JavaScript is disabled. * (bug 4253) Recentchanges IRC messages no longer include title in diff URLs and the comment is trimmed if necessary to maintain proper message length. +* Allow '0' to be an accesskey. === API changes in 1.14 === diff --git a/includes/Linker.php b/includes/Linker.php index 8981947100..ad41cb01aa 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1719,7 +1719,7 @@ class Linker { } $accesskey = wfMsg( "accesskey-$name" ); - if( $accesskey && $accesskey != '-' && + if( $accesskey != '' && $accesskey != '-' && !wfEmptyMsg( "accesskey-$name", $accesskey ) ) { if( isset( $attribs['title'] ) ) { $attribs['title'] .= " [$accesskey]"; @@ -1756,7 +1756,7 @@ class Linker { if( isset( $attribs['title'] ) && $options == 'withaccess' ) { $accesskey = wfMsg( "accesskey-$name" ); - if( $accesskey && $accesskey != '-' && + if( $accesskey != '' && $accesskey != '-' && !wfEmptyMsg( "accesskey-$name", $accesskey ) ) { $attribs['title'] .= " [$accesskey]"; }