make methods compatible with parent class 'Language'
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 10 Jul 2006 20:22:49 +0000 (20:22 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 10 Jul 2006 20:22:49 +0000 (20:22 +0000)
17 files changed:
languages/Language.php
languages/LanguageAr.php
languages/LanguageBg.php
languages/LanguageBr.php
languages/LanguageCy.php
languages/LanguageDa.php
languages/LanguageHu.php
languages/LanguageIs.php
languages/LanguageKo.php
languages/LanguageNn.php
languages/LanguagePt.php
languages/LanguageRu.php
languages/LanguageSr.php
languages/LanguageSr_ec.php
languages/LanguageSr_el.php
languages/LanguageTt.php
languages/LanguageZh_cn.php

index cbb5e31..1eda8ed 100644 (file)
@@ -1048,8 +1048,8 @@ class Language {
         * @param string $wordform3 (optional)
         * @return string
         */
-       function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
-               return $count == '1' ? $wordform1 : $wordform2;
+       function convertPlural( $count, $w1, $w2, $w3) {
+               return $count == '1' ? $w1 : $w2;
        }
 
        /**
index f56053d..ebd2a6f 100644 (file)
@@ -147,7 +147,7 @@ class LanguageAr extends LanguageUtf8 {
                return 'windows-1256';
        }
 
-       function getMagicWords()  {
+       function &getMagicWords()  {
                global $wgMagicWordsAr;
                return $wgMagicWordsAr;
        }
index da60098..1a158db 100644 (file)
@@ -167,7 +167,7 @@ class LanguageBg extends LanguageUtf8 {
        * Exports $wgMagicWordsBg
        * @return array
        */
-       function getMagicWords()  {
+       function &getMagicWords()  {
                global $wgMagicWordsBg;
                return $wgMagicWordsBg;
        }
index 3093986..8a1bf9a 100644 (file)
@@ -94,8 +94,10 @@ class LanguageBr extends LanguageUtf8 {
                return $wgSkinNamesBr;
        }
 
-
-       function date( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . " " .
@@ -104,7 +106,10 @@ class LanguageBr extends LanguageUtf8 {
                return $d;
        }
 
-       function timeanddate( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                return $this->date( $ts, $adj ) . " da " . $this->time( $ts, $adj );
        }
 
index 840248c..543b5e6 100644 (file)
@@ -127,7 +127,7 @@ class LanguageCy extends LanguageUtf8 {
                return $wgAllMessagesCy;
        }
 
-       function getMagicWords() {
+       function &getMagicWords() {
                global $wgMagicWordsCy, $wgMagicWordsEn;
                return $wgMagicWordsCy + $wgMagicWordsEn;
        }
index 2639106..ae7d2f6 100644 (file)
@@ -80,7 +80,10 @@ class LanguageDa extends LanguageUtf8 {
                return $wgDateFormatsDa;
        }
 
-       function date( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . ". " .
@@ -89,7 +92,10 @@ class LanguageDa extends LanguageUtf8 {
                return $d;
        }
 
-       function timeanddate( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                return $this->date( $ts, $adj ) . " kl. " . $this->time( $ts, $adj );
        }
 
index 277998d..8500102 100644 (file)
@@ -109,8 +109,10 @@ class LanguageHu extends LanguageUtf8 {
                return "iso8859-2";
        }
 
-       # localised date and time
-       function date( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = substr( $ts, 0, 4 ) . ". " .
@@ -119,7 +121,10 @@ class LanguageHu extends LanguageUtf8 {
                return $d;
        }
 
-       function timeanddate( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj );
        }
 
index 97c5aa3..4b958fd 100644 (file)
@@ -103,7 +103,10 @@ class LanguageIs extends LanguageUtf8 {
                return $this->mMessagesIs;
        }
 
-       function date( $ts, $adj = false, $format = true) {
+       /**
+        * $timecorrection is for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
                $format = $this->dateFormat($format);
 
@@ -123,7 +126,10 @@ class LanguageIs extends LanguageUtf8 {
 
        }
 
-       function time($ts, $adj = false, $format = true) {
+       /**
+        * $timecorrection is for compatibility with language::time
+        */
+       function time($ts, $adj = false, $format = true, $timecorrection = false) {
                global $wgUser;
                if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
 
@@ -137,7 +143,10 @@ class LanguageIs extends LanguageUtf8 {
 
        }
 
-       function timeanddate( $ts, $adj = false, $format = true) {
+       /**
+        * $timecorrection is for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                global $wgUser;
 
                $format = $this->dateFormat($format);
index d1a64b9..9d55598 100644 (file)
@@ -101,7 +101,10 @@ class LanguageKo extends LanguageUtf8 {
                return $this->mMessagesKo;
        }
 
-       function date( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $year = (int)substr( $ts, 0, 4 );
index 78229ec..1ef973b 100644 (file)
@@ -171,7 +171,10 @@ class LanguageNn extends LanguageUtf8 {
        }
 
 
-       function time($ts, $adj = false, $format = true) {
+       /**
+        * $timecorrection is for compatibility with language::time
+        */
+       function time($ts, $adj = false, $format = true, $timecorrection = false) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
 
                $format = $this->dateFormat($format);
@@ -184,7 +187,10 @@ class LanguageNn extends LanguageUtf8 {
 
        }
 
-       function date( $ts, $adj = false, $format = true) {
+       /**
+        * $timecorrection is for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                global $wgUser;
                if ( $adj ) { $ts = $this->userAdjust( $ts ); } # Adjust based on the timezone setting.
                $format = $this->dateFormat($format);
@@ -205,7 +211,10 @@ class LanguageNn extends LanguageUtf8 {
 
        }
 
-       function timeanddate( $ts, $adj = false, $format = true) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                global $wgUser;
 
                $format = $this->dateFormat($format);
index 47f8f95..ecd47eb 100644 (file)
@@ -194,7 +194,7 @@ class LanguagePt extends LanguageUtf8 {
        * Exports $wgMagicWordsPt
        * @return array
        */
-       function getMagicWords()  {
+       function &getMagicWords()  {
                global $wgMagicWordsPt;
                return $wgMagicWordsPt;
        }
index 4b1b385..2041639 100644 (file)
@@ -154,7 +154,7 @@ class LanguageRu extends LanguageUtf8 {
        //only for quotation mark
        function linkPrefixExtension() { return true; }
 
-       function getMagicWords()  {
+       function &getMagicWords()  {
                global $wgMagicWordsRu;
                return $wgMagicWordsRu;
        }
index ffbb678..2eede4b 100644 (file)
@@ -66,7 +66,7 @@ class SrConverter extends LanguageConverter {
        /* rules should be defined as -{ekavian | iyekavian-} -or-
                -{code:text | code:text | ...}-
        */
-       function parseManualRule($rule, $flags) {
+       function parseManualRule($rule, $flags=array()) {
 
                $echoices = preg_split("/(<[^>]+>)/",$rule,-1,PREG_SPLIT_DELIM_CAPTURE);
                $choices = array();
index bacca1b..fea3c2b 100644 (file)
@@ -157,7 +157,7 @@ class LanguageSr_ec extends LanguageUtf8 {
        * Exports $wgMagicWordsSr_ec
        * @return array
        */
-       function getMagicWords()  {
+       function &getMagicWords()  {
                global $wgMagicWordsSr_ec;
                return $wgMagicWordsSr_ec;
        }
index 2c56bd8..8251573 100644 (file)
@@ -157,7 +157,7 @@ class LanguageSr_el extends LanguageUtf8 {
        * Exports $wgMagicWordsSr_el
        * @return array
        */
-       function getMagicWords()  {
+       function &getMagicWords()  {
                global $wgMagicWordsSr_el;
                return $wgMagicWordsSr_el;
        }
index 80eec2a..eb049fb 100644 (file)
@@ -90,8 +90,10 @@ class LanguageTt extends LanguageUtf8 {
                return $wgDateFormatsTt;
        }
 
-
-       function date( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . ". " .
@@ -100,14 +102,20 @@ class LanguageTt extends LanguageUtf8 {
                return $d;
        }
 
-       function time( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with language::time
+        */
+       function time($ts, $adj = false, $format = true, $timecorrection = false) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
                return $t;
        }
 
-       function timeanddate( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj );
        }
 
index df008d7..c5a1636 100644 (file)
@@ -95,7 +95,10 @@ class LanguageZh_cn extends LanguageUtf8 {
                return false;
        }
 
-       function date( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function date( $ts, $adj = false, $format = true, $timecorrection = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = substr( $ts, 0, 4 ) . "年" .
@@ -104,7 +107,10 @@ class LanguageZh_cn extends LanguageUtf8 {
                return $d;
        }
 
-       function timeanddate( $ts, $adj = false ) {
+       /**
+        * $format and $timecorrection are for compatibility with Language::date
+        */
+       function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false ) {
                return $this->time( $ts, $adj ) . " " . $this->date( $ts, $adj );
        }