Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5247
Language.php.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:23 PM
2014-11-21 22:23:48 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
Language.php.diff
View Options
Index: Language.php
===================================================================
--- Language.php (revision 44188)
+++ Language.php (working copy)
@@ -1929,16 +1929,21 @@
function listToText( $l ) {
$s = '';
$m = count($l) - 1;
- for ($i = $m; $i >= 0; $i--) {
- if ($i == $m) {
- $s = $l[$i];
- } else if ($i == $m - 1) {
- $s = $l[$i] . $this->getMessageFromDB( 'and' ) . $this->getMessageFromDB( 'word-separator' ) . $s;
- } else {
- $s = $l[$i] . $this->getMessageFromDB( 'comma-separator' ) . $s;
+ if ($m == 1) {
+ return $l[0] . $this->getMessageFromDB( 'and' ) . $this->getMessageFromDB( 'word-separator' ) . $l[1];
+ }
+ else {
+ for ($i = $m; $i >= 0; $i--) {
+ if ($i == $m) {
+ $s = $l[$i];
+ } else if ($i == $m - 1) {
+ $s = $l[$i] . $this->getMessageFromDB( 'comma-separator' ) . $this->getMessageFromDB( 'and' ) . $this->getMessageFromDB( 'word-separator' ) . $s;
+ } else {
+ $s = $l[$i] . $this->getMessageFromDB( 'comma-separator' ) . $s;
+ }
}
+ return $s;
}
- return $s;
}
/**
Index: MessagesEn.php
===================================================================
--- MessagesEn.php (revision 44188)
+++ MessagesEn.php (working copy)
@@ -642,7 +642,7 @@
'mytalk' => 'My talk',
'anontalk' => 'Talk for this IP',
'navigation' => 'Navigation',
-'and' => ', and',
+'and' => ' and',
# Metadata in edit box
'metadata_help' => 'Metadata:',
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4808
Default Alt Text
Language.php.diff (1 KB)
Attached To
Mode
T18484: User rights log adds extra comma when unneeded
Attached
Detach File
Event Timeline
Log In to Comment