Localisation updates from http://translatewiki.net.
[lhc/web/wiklou.git] / includes / Xml.php
index 35019ff..d5e9189 100644 (file)
@@ -208,7 +208,7 @@ class Xml {
 
        /**
         * Construct a language selector appropriate for use in a form or preferences
-        * 
+        *
         * @param string $selected The language code of the selected language
         * @param boolean $customisedOnly If true only languages which have some content are listed
         * @param string $inLanguage The ISO code of the language to display the select list in (optional)
@@ -576,7 +576,8 @@ class Xml {
         */
        public static function textarea( $name, $content, $cols = 40, $rows = 5, $attribs = array() ) {
                return self::element( 'textarea',
-                                       array(  'name' => $name,
+                                       array(
+                                               'name' => $name,
                                                'id' => $name,
                                                'cols' => $cols,
                                                'rows' => $rows
@@ -681,22 +682,11 @@ class Xml {
         * @return string
         */
        public static function encodeJsCall( $name, $args ) {
-               $s = "$name(";
-               $first = true;
-
-               foreach ( $args as $arg ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-
-                       $s .= Xml::encodeJsVar( $arg );
+               foreach ( $args as &$arg ) {
+                       $arg = Xml::encodeJsVar( $arg );
                }
 
-               $s .= ");\n";
-
-               return $s;
+               return "$name(" . implode( ', ', $args ) . ");\n";
        }
 
        /**