Page MenuHomePhabricator

Language.php.diff

Authored By
bzimport
Nov 21 2014, 10:23 PM
Size
1 KB
Referenced Files
None
Subscribers
None

Language.php.diff

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

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4808
Default Alt Text
Language.php.diff (1 KB)

Event Timeline