Code formatting; clean up redundant method declarations.
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 21 Nov 2004 07:36:46 +0000 (07:36 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 21 Nov 2004 07:36:46 +0000 (07:36 +0000)
21 files changed:
languages/Language.php
languages/LanguageAr.php
languages/LanguageDa.php
languages/LanguageDe.php
languages/LanguageEo.php
languages/LanguageFa.php
languages/LanguageFo.php
languages/LanguageFr.php
languages/LanguageGa.php
languages/LanguageHe.php
languages/LanguageHu.php
languages/LanguageIs.php
languages/LanguageKo.php
languages/LanguageNl.php
languages/LanguageNn.php
languages/LanguageNv.php
languages/LanguageOc.php
languages/LanguagePl.php
languages/LanguageSl.php
languages/LanguageTt.php
languages/LanguageZh_cn.php

index 6d870b2..5bb1422 100644 (file)
@@ -1737,32 +1737,27 @@ class Language {
                return $wgLanguageNamesEn[$code];
        }
 
-       function getMonthName( $key )
-       {
+       function getMonthName( $key ) {
                global $wgMonthNamesEn;
                return wfMsg($wgMonthNamesEn[$key-1]);
        }
 
        /* by default we just return base form */
-       function getMonthNameGen( $key )
-       {
+       function getMonthNameGen( $key ) {
                return $this->getMonthName( $key );
        }
 
-       function getMonthAbbreviation( $key )
-       {
+       function getMonthAbbreviation( $key ) {
                global $wgMonthAbbreviationsEn;
                return wfMsg(@$wgMonthAbbreviationsEn[$key-1]);
        }
 
-       function getWeekdayName( $key )
-       {
+       function getWeekdayName( $key ) {
                global $wgWeekdayNamesEn;
                return wfMsg($wgWeekdayNamesEn[$key-1]);
        }
 
-       function userAdjust( $ts )
-       {
+       function userAdjust( $ts ) {
                global $wgUser, $wgLocalTZoffset;
 
                $tz = $wgUser->getOption( 'timecorrection' );
@@ -1788,8 +1783,7 @@ class Language {
                return date( 'YmdHis', $t );
        }
 
-       function date( $ts, $adj = false, $format = MW_DATE_USER_FORMAT )
-       {
+       function date( $ts, $adj = false, $format = MW_DATE_USER_FORMAT ) {
                global $wgAmericanDates, $wgUser, $wgUseDynamicDates;
 
                $ts=wfTimestamp(TS_MW,$ts);
@@ -1819,8 +1813,7 @@ class Language {
                }
        }
 
-       function time( $ts, $adj = false, $seconds = false )
-       {
+       function time( $ts, $adj = false, $seconds = false ) {
                $ts=wfTimestamp(TS_MW,$ts);
 
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
@@ -1832,44 +1825,37 @@ class Language {
                return $this->formatNum( $t );
        }
 
-       function timeanddate( $ts, $adj = false, $format = MW_DATE_USER_FORMAT )
-       {
+       function timeanddate( $ts, $adj = false, $format = MW_DATE_USER_FORMAT ) {
                $ts=wfTimestamp(TS_MW,$ts);
 
                return $this->time( $ts, $adj ) . ', ' . $this->date( $ts, $adj, $format );
        }
 
-       function rfc1123( $ts )
-       {
+       function rfc1123( $ts ) {
                return date( 'D, d M Y H:i:s T', $ts );
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesEn;
                return $wgValidSpecialPagesEn;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesEn;
                return $wgSysopSpecialPagesEn;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesEn;
                return $wgDeveloperSpecialPagesEn;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesEn;
                return @$wgAllMessagesEn[$key];
        }
 
-       function getAllMessages()
-       {
+       function getAllMessages() {
                global $wgAllMessagesEn;
                return $wgAllMessagesEn;
        }
@@ -1968,15 +1954,13 @@ class Language {
        function linkPrefixExtension() { return false; }
 
 
-       function &getMagicWords()
-       {
+       function &getMagicWords() {
                global $wgMagicWordsEn;
                return $wgMagicWordsEn;
        }
 
        # Fill a MagicWord object with data from here
-       function getMagic( &$mw )
-       {
+       function getMagic( &$mw ) {
                $raw =& $this->getMagicWords();
                if( !isset( $raw[$mw->mId] ) ) {
                        # Fall back to English if local list is incomplete
@@ -1988,8 +1972,7 @@ class Language {
        }
 
        # Italic is unsuitable for some languages
-       function emphasize( $text )
-       {
+       function emphasize( $text ) {
                return '<em>'.$text.'</em>';
        }
 
@@ -2084,8 +2067,7 @@ class Language {
                        if(!array_key_exists(1, $choice)) {
                                /* a single choice */
                                $text .= $choice{0};
-                       }
-                       else {
+                       } else {
                                $choice1=false;
                                $choice2=false;
                                foreach($choice as $c) {
@@ -2120,21 +2102,21 @@ class Language {
        /* this does the real conversion to the preferred variant.
           see LanguageZh.php for example
        */
-       function autoConvert($text, $toVariant=false) {
+       function autoConvert( $text, $toVariant=false ) {
                return $text;
        }
 
        /* hook for converting the title, which may needs special treatment
        */
-       function convertTitle($text) {
+       function convertTitle( $text ) {
                return $text;
        }
 
        # returns a list of language variants for conversion.
        # right now mainly used in the Chinese conversion
        function getVariants() {
-               $lang = strtolower(substr(get_class($this), 8));
-               return array($lang);
+               $lang = strtolower( substr( get_class( $this ), 8 ) );
+               return array( $lang );
        }
        
        # in case some variant is not defined in the markup, we need
@@ -2142,7 +2124,7 @@ class Language {
        # will define zh-cn and zh-tw, but less so for zh-sg or zh-hk.
        # when zh-sg is preferred but not defined, we will pick zh-cn
        # in this case. right now this is only used by zh.
-       function getVariantFallback($v) {
+       function getVariantFallback( $v ) {
                return false;
        }
 
@@ -2150,18 +2132,18 @@ class Language {
                global $wgUser;
                
                // if user logged in, get in from user's preference
-               if($wgUser->getID()!=0)
-                       return $wgUser->getOption('variant');
+               if( $wgUser->getID() != 0 )
+                       return $wgUser->getOption( 'variant' );
                
                // if we have multiple variants for this langauge, 
                // pick the first one as default
-               $v=$this->getVariants() ;
-               if(!empty($v))
+               $v = $this->getVariants();
+               if( !empty( $v ) )
                        return $v{0};
                
                // otherwise there should really be just one variant, 
                // get it from the class name
-               $lang = strtolower(substr(get_class($this), 8));
+               $lang = strtolower( substr( get_class( $this ), 8 ) );
                return $lang;
        }
 
@@ -2171,20 +2153,20 @@ class Language {
                tries to find it.
 
        */
-       function findVariantLink(&$link, &$nt) {
+       function findVariantLink( &$link, &$nt ) {
                static $count=0; //used to limit this operation
                global $wgDisableLangConversion, $wgContLang;
-               if($wgDisableLangConversion)
+               if( $wgDisableLangConversion )
                        return;
                $variants = $wgContLang->getVariants();
-               if(sizeof($variants) > 1 && $count++<200) {
-                       if($nt->getArticleID() == 0) {
-                               foreach ( $variants as $v ) {
-                                       if($v == $wgContLang->getPreferredVariant())
+               if( sizeof( $variants ) > 1 && $count++ < 200 ) {
+                       if( $nt->getArticleID() == 0 ) {
+                               foreach( $variants as $v ) {
+                                       if( $v == $wgContLang->getPreferredVariant() )
                                                continue;
-                                       $varlink = $wgContLang->autoConvert($link, $v);
-                                       $varnt = Title::newFromText($varlink);
-                                       if($varnt && $varnt->getArticleID()>0) {
+                                       $varlink = $wgContLang->autoConvert( $link, $v );
+                                       $varnt = Title::newFromText( $varlink );
+                                       if( $varnt && $varnt->getArticleID() > 0 ) {
                                                $nt = $varnt;
                                                $link = $varlink;
                                                break;
index c82dd40..881e487 100644 (file)
@@ -1142,36 +1142,26 @@ class LanguageAr extends LanguageUtf8 {
                "," => "٬"
        );
 
-       # TODO: TRANSLATION!
-
-       # Inherit everything except...
-
-       function getNamespaces()
-       {
+       function getNamespaces() {
                global $wgNamespaceNamesAr;
                return $wgNamespaceNamesAr;
        }
 
-
-       function getNsText( $index )
-       {
+       function getNsText( $index ) {
                global $wgNamespaceNamesAr;
                return $wgNamespaceNamesAr[$index];
        }
 
-       function getNsIndex( $text )
-       {
+       function getNsIndex( $text ) {
                global $wgNamespaceNamesAr;
 
-               foreach ( $wgNamespaceNamesAr as $i => $n )
-               {
+               foreach ( $wgNamespaceNamesAr as $i => $n ) {
                        if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
                }
                return LanguageUtf8::getNsIndex( $text );
        }
 
-       function getMonthAbbreviation( $key )
-       {
+       function getMonthAbbreviation( $key ) {
                /* No abbreviations in Arabic */
                return $this->getMonthName( $key );
        }
@@ -1180,9 +1170,8 @@ class LanguageAr extends LanguageUtf8 {
 
        function linkPrefixExtension() { return true; }
 
-       function getDefaultUserOptions () {
-               global $wgDefaultUserOptionsEn;
-               $opt = $wgDefaultUserOptionsEn;
+       function getDefaultUserOptions() {
+               $opt = parent::getDefaultUserOptions();
 
                # Swap sidebar to right side by default
                $opt['quickbar'] = 2;
@@ -1192,27 +1181,16 @@ class LanguageAr extends LanguageUtf8 {
                return $opt ;
        }
 
-       function checkTitleEncoding( $s ) {
-               global $wgInputEncoding;
-
-               # Check for non-UTF-8 URLs; assume they are windows-1256?
-               $ishigh = preg_match( '/[\x80-\xff]/', $s);
-               $isutf = ($ishigh ? preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
-                '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s ) : true );
-
-               if( $ishigh and !$isutf )
-                       return iconv( "windows-1256", "utf-8", $s );
-
-               return $s;
+       function fallback8bitEncoding() {
+               return "windows-1256";
        }
 
-       function getMessage( $key )
-       {
-                global $wgAllMessagesAr, $wgAllMessagesEn;
-                $m = $wgAllMessagesAr[$key];
+       function getMessage( $key ) {
+               global $wgAllMessagesAr, $wgAllMessagesEn;
+               $m = $wgAllMessagesAr[$key];
 
-                if ( "" == $m ) { return $wgAllMessagesEn[$key]; }
-                else return $m;
+               if ( "" == $m ) { return $wgAllMessagesEn[$key]; }
+               else return $m;
        }
 
        function formatNum( $number ) {
index a90355a..dbf21a1 100644 (file)
@@ -1122,11 +1122,6 @@ med den nye titel. Du er nødt til at flette dem sammen manuelt.",
 
 class LanguageDa extends LanguageUtf8 {
 
-        function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
-                return $opt;
-                }
-
        function getBookstoreList () {
                global $wgBookstoreListDa ;
                return $wgBookstoreListDa ;
@@ -1151,10 +1146,6 @@ class LanguageDa extends LanguageUtf8 {
                return false;
        }
 
-       function specialPage( $name ) {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
        function getQuickbarSettings() {
                global $wgQuickbarSettingsDa;
                return $wgQuickbarSettingsDa;
@@ -1170,8 +1161,6 @@ class LanguageDa extends LanguageUtf8 {
                return $wgDateFormatsDa;
        }
 
-       # Inherit userAdjust()
-
        function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
@@ -1181,19 +1170,10 @@ class LanguageDa extends LanguageUtf8 {
                return $d;
        }
 
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
        function timeanddate( $ts, $adj = false ) {
                return $this->date( $ts, $adj ) . " kl. " . $this->time( $ts, $adj );
        }
 
-       # Inherit rfc1123()
-
        function getValidSpecialPages() {
                global $wgValidSpecialPagesDa;
                return $wgValidSpecialPagesDa;
@@ -1218,26 +1198,6 @@ class LanguageDa extends LanguageUtf8 {
                }
        }
 
-       # Inherit iconv()
-
-       # Inherit ucfirst()
-
-       # Inherit lcfirst()
-       
-       # Inherit checkTitleEncoding()
-       
-       # Inherit stripForSearch()
-       
-       # Inherit setAltEncoding()
-       
-       # Inherit recodeForEdit()
-       
-       # Inherit recodeInput()
-
-       # Inherit isRTL()
-       
-       # Inherit getMagicWords()
-
 }
 
 ?>
index f562ff4..650ae72 100644 (file)
@@ -1184,14 +1184,10 @@ Diskussions-Seite nicht, da schon eine mit dem neuen Titel existiert. Bitte glei
 
 
 );
-class LanguageDe extends LanguageUtf8 {
 
-       function getDefaultUserOptions () {
-               $opt = Language::getDefaultUserOptions();
-               return $opt;
-       }
+class LanguageDe extends LanguageUtf8 {
 
-       function getBookstoreList () {
+       function getBookstoreList() {
                global $wgBookstoreListDe ;
                return $wgBookstoreListDe ;
        }
@@ -1215,10 +1211,6 @@ class LanguageDe extends LanguageUtf8 {
                return false;
        }
 
-       function specialPage( $name ) {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
        function getQuickbarSettings() {
                global $wgQuickbarSettingsDe;
                return $wgQuickbarSettingsDe;
@@ -1229,10 +1221,7 @@ class LanguageDe extends LanguageUtf8 {
                return $wgSkinNamesDe;
        }
 
-       # Inherit userAdjust()
-
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . ". " .
@@ -1242,39 +1231,22 @@ class LanguageDe extends LanguageUtf8 {
                return $d;
        }
 
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false )
-       {
-               return $this->time( $ts, $adj ) . ", " . $this->date( $ts, $adj );
-       }
-
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesDe;
                return $wgValidSpecialPagesDe;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesDe;
                return $wgSysopSpecialPagesDe;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesDe;
                return $wgDeveloperSpecialPagesDe;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesDe;
                if( isset( $wgAllMessagesDe[$key] ) ) {
                        return $wgAllMessagesDe[$key];
@@ -1283,7 +1255,6 @@ class LanguageDe extends LanguageUtf8 {
                }
        }
 
-
 }
 
 ?>
index 0a9344d..4712909 100644 (file)
@@ -1046,8 +1046,7 @@ class LanguageEo extends LanguageUtf8 {
        # Heredu userAdjust()
  
        # La dato- kaj tempo-funkciojn oni povas precizigi laŭ lingvo
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . ". " .
@@ -1057,26 +1056,22 @@ class LanguageEo extends LanguageUtf8 {
                return $d;
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesEo;
                return $wgValidSpecialPagesEo;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesEo;
                return $wgSysopSpecialPagesEo;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesEo;
                return $wgDeveloperSpecialPagesEo;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesEo;
                if(array_key_exists($key, $wgAllMessagesEo))
                        return $wgAllMessagesEo[$key];
@@ -1127,7 +1122,7 @@ class LanguageEo extends LanguageUtf8 {
        function checkTitleEncoding( $s ) {
                global $wgInputEncoding;
                
-               # Check for X-system backwards-compatibility URLs
+               # Check for X-system backwards-compatibility URLs
                $ishigh = preg_match( '/[\x80-\xff]/', $s);
                $isutf = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
                        '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );
index 7c376f8..d66d91a 100644 (file)
@@ -1127,11 +1127,11 @@ class LanguageFa extends LanguageUtf8 {
                "," => "٬"
        );
 
-       function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
-               $opt["quickbar"]=2;
-               $opt["underline"]=0;
-                return $opt;
+       function getDefaultUserOptions() {
+               $opt = Language::getDefaultUserOptions();
+               $opt["quickbar"] = 2;
+               $opt["underline"] = 0;
+               return $opt;
        }
 
        function getNamespaces() {
@@ -1153,10 +1153,6 @@ class LanguageFa extends LanguageUtf8 {
                return false;
        }
 
-       function specialPage( $name ) {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
        function getQuickbarSettings() {
                global $wgQuickbarSettingsFa;
                return $wgQuickbarSettingsFa;
@@ -1167,26 +1163,22 @@ class LanguageFa extends LanguageUtf8 {
                return $wgSkinNamesFa;
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesFa;
                return $wgValidSpecialPagesFa;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesFa;
                return $wgSysopSpecialPagesFa;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesFa;
                return $wgDeveloperSpecialPagesFa;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesFa;
                if(array_key_exists($key, $wgAllMessagesFa))
                        return $wgAllMessagesFa[$key];
index ff8aabc..7c2cca8 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 
 require_once( 'LanguageUtf8.php');
 
@@ -226,11 +226,6 @@ require_once( 'LanguageUtf8.php');
 );
 class LanguageFo extends LanguageUtf8 {
 
-       function getDefaultUserOptions () {
-               $opt = Language::getDefaultUserOptions();
-               return $opt;
-               }
-
        function getBookstoreList () {
                global $wgBookstoreListFo ;
                return $wgBookstoreListFo ;
@@ -255,10 +250,6 @@ class LanguageFo extends LanguageUtf8 {
                return false;
        }
 
-       function specialPage( $name ) {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
        function getQuickbarSettings() {
                global $wgQuickbarSettingsFo;
                return $wgQuickbarSettingsFo;
@@ -276,8 +267,7 @@ class LanguageFo extends LanguageUtf8 {
 
        # Inherit userAdjust()
 
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . ". " .
@@ -286,41 +276,26 @@ class LanguageFo extends LanguageUtf8 {
                return $d;
        }
 
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false )
-       {
+       function timeanddate( $ts, $adj = false ) {
                return $this->date( $ts, $adj ) . " kl. " . $this->time( $ts, $adj );
        }
 
-       # Inherit rfc1123()
-
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesFo;
                return $wgValidSpecialPagesFo;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesFo;
                return $wgSysopSpecialPagesFo;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesFo;
                return $wgDeveloperSpecialPagesFo;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
            global $wgAllMessagesFo, $wgAllMessagesEn;
            $m = $wgAllMessagesFo[$key];
 
@@ -328,26 +303,6 @@ class LanguageFo extends LanguageUtf8 {
            else return $m;
        }
 
-       # Inherit iconv()
-
-       # Inherit ucfirst()
-
-       # Inherit lcfirst()
-       
-       # Inherit checkTitleEncoding()
-       
-       # Inherit stripForSearch()
-       
-       # Inherit setAltEncoding()
-       
-       # Inherit recodeForEdit()
-       
-       # Inherit recodeInput()
-
-       # Inherit isRTL()
-       
-       # Inherit getMagicWords()
-
 }
 
 ?>
index b9092af..1b9d601 100644 (file)
@@ -1219,39 +1219,27 @@ sous le nouveau nom. S'il vous plait, fusionnez les manuellement.",
 'mw_math_mathml' => 'MathML',
 );
 
-class LanguageFr extends LanguageUtf8
-{
+class LanguageFr extends LanguageUtf8 {
 
-       function getDefaultUserOptions()
-       {
-               $opt = Language::getDefaultUserOptions();
-                return $opt;
+       function getBookstoreList () {
+               global $wgBookstoreListFr ;
+               return $wgBookstoreListFr ;
        }
 
-        function getBookstoreList () {
-                global $wgBookstoreListFr ;
-                return $wgBookstoreListFr ;
-        }
-
-       function getNamespaces()
-       {
+       function getNamespaces() {
                global $wgNamespaceNamesFr;
                return $wgNamespaceNamesFr;
        }
 
-
-       function getNsText( $index )
-       {
+       function getNsText( $index ) {
                global $wgNamespaceNamesFr;
                return $wgNamespaceNamesFr[$index];
        }
 
-       function getNsIndex( $text ) 
-       {
+       function getNsIndex( $text ) {
                global $wgNamespaceNamesFr, $wgSitename;
 
-               foreach ( $wgNamespaceNamesFr as $i => $n ) 
-               {
+               foreach ( $wgNamespaceNamesFr as $i => $n ) {
                        if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
                }
                if( $wgSitename == "Wikipédia" ) {
@@ -1261,19 +1249,12 @@ class LanguageFr extends LanguageUtf8
                return false;
        }
 
-       function specialPage( $name ) 
-       {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
-       function getQuickbarSettings() 
-       {
+       function getQuickbarSettings() {
                global $wgQuickbarSettingsFr;
                return $wgQuickbarSettingsFr;
        }
 
-       function getSkinNames()
-       {
+       function getSkinNames() {
                global $wgSkinNamesFr;
                return $wgSkinNamesFr;
        }
@@ -1281,8 +1262,7 @@ class LanguageFr extends LanguageUtf8
 
        // Inherit userAdjust()
 
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . " " .
@@ -1291,39 +1271,26 @@ class LanguageFr extends LanguageUtf8
                return $d;
        }
 
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false )
-       {
+       function timeanddate( $ts, $adj = false ) {
                return $this->date( $ts, $adj ) . " à " . $this->time( $ts, $adj );
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesFr;
                return $wgValidSpecialPagesFr;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesFr;
                return $wgSysopSpecialPagesFr;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesFr;
                return $wgDeveloperSpecialPagesFr;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesFr, $wgAllMessagesEn;
                if( isset( $wgAllMessagesFr[$key] ) ) {
                        return $wgAllMessagesFr[$key];
@@ -1332,7 +1299,6 @@ class LanguageFr extends LanguageUtf8
                }
        }
        
-       function isRTL() { return false; }
 }
 
 ?>
index dd54dfe..0f389e8 100755 (executable)
@@ -44,16 +44,6 @@ DISCUSSION!
        NS_CATEGORY_TALK    => 'Plé_ranga'
 ) + $wgNamespaceNamesEn;
 
-/* private */ $wgDefaultUserOptionsGa = array(
-    "quickbar" => 1, "underline" => 1, "hover" => 1,
-    "cols" => 80, "rows" => 25, "searchlimit" => 20,
-    "contextlines" => 5, "contextchars" => 50,
-    "skin" => $wgDefaultSkin, "math" => 1, "rcdays" => 7, "rclimit" => 50,
-    "highlightbroken" => 1, "stubthreshold" => 0,
-    "previewontop" => 1, "editsection"=>1,"editsectiononrightclick"=>0, "showtoc"=>1,
-    "date" => 0
-);
-
 /* private */ $wgQuickbarSettingsGa = array(
     "Faic", "Greamaithe ar chlé", "Greamaithe ar an taobh deas", "Ag faoileáil ar chlé"
 );
@@ -1460,87 +1450,76 @@ require_once( "LanguageUtf8.php" );
 
 class LanguageGa extends LanguageUtf8 {
 
-    function getDefaultUserOptions () {
-        global $wgDefaultUserOptionsGa ;
-        return $wgDefaultUserOptionsGa ;
-        }
-
-    function getBookstoreList () {
-        global $wgBookstoreListGa ;
-        return $wgBookstoreListGa ;
-    }
-
-    function getNamespaces() {
-        global $wgNamespaceNamesGa;
-        return $wgNamespaceNamesGa;
-    }
-
-    function getNsText( $index ) {
-        global $wgNamespaceNamesGa;
-        return $wgNamespaceNamesGa[$index];
-    }
-
-    function getNsIndex( $text ) {
-        global $wgNamespaceNamesGa;
-
-        foreach ( $wgNamespaceNamesGa as $i => $n ) {
-            if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
-        }
-        /* Fallback to English names for compatibility */
-        return Language::getNsIndex( $text );
-    }
-
-    function getQuickbarSettings() {
-        global $wgQuickbarSettingsGa;
-        return $wgQuickbarSettingsGa;
-    }
-
-    function getSkinNames() {
-        global $wgSkinNamesGa;
-        return $wgSkinNamesGa;
-    }
-
-    function getDateFormats() {
-        global $wgDateFormatsGa;
-        return $wgDateFormatsGa;
-    }
-
-    function getValidSpecialPages()
-    {
-        global $wgValidSpecialPagesGa;
-        return $wgValidSpecialPagesGa;
-    }
-
-    function getSysopSpecialPages()
-    {
-        global $wgSysopSpecialPagesGa;
-        return $wgSysopSpecialPagesGa;
-    }
-
-    function getDeveloperSpecialPages()
-    {
-        global $wgDeveloperSpecialPagesGa;
-        return $wgDeveloperSpecialPagesGa;
-    }
-
-    function getMessage( $key )
-    {
-        global $wgAllMessagesGa;
+       function getBookstoreList () {
+               global $wgBookstoreListGa;
+               return $wgBookstoreListGa;
+       }
+
+       function getNamespaces() {
+               global $wgNamespaceNamesGa;
+               return $wgNamespaceNamesGa;
+       }
+
+       function getNsText( $index ) {
+               global $wgNamespaceNamesGa;
+               return $wgNamespaceNamesGa[$index];
+       }
+
+       function getNsIndex( $text ) {
+               global $wgNamespaceNamesGa;
+
+               foreach ( $wgNamespaceNamesGa as $i => $n ) {
+                       if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
+               }
+               /* Fallback to English names for compatibility */
+               return Language::getNsIndex( $text );
+       }
+
+       function getQuickbarSettings() {
+               global $wgQuickbarSettingsGa;
+               return $wgQuickbarSettingsGa;
+       }
+
+       function getSkinNames() {
+               global $wgSkinNamesGa;
+               return $wgSkinNamesGa;
+       }
+
+       function getDateFormats() {
+               global $wgDateFormatsGa;
+               return $wgDateFormatsGa;
+       }
+
+       function getValidSpecialPages() {
+               global $wgValidSpecialPagesGa;
+               return $wgValidSpecialPagesGa;
+       }
+
+       function getSysopSpecialPages() {
+               global $wgSysopSpecialPagesGa;
+               return $wgSysopSpecialPagesGa;
+       }
+
+       function getDeveloperSpecialPages() {
+               global $wgDeveloperSpecialPagesGa;
+               return $wgDeveloperSpecialPagesGa;
+       }
+
+       function getMessage( $key ) {
+               global $wgAllMessagesGa;
                if( isset( $wgAllMessagesGa[$key] ) ) {
                        return $wgAllMessagesGa[$key];
                } else {
                        return Language::getMessage( $key );
                }
-    }
+       }
 
-    function getAllMessages()
-    {
-        global $wgAllMessagesGa;
-        return $wgAllMessagesGa;
-    }
+       function getAllMessages() {
+               global $wgAllMessagesGa;
+               return $wgAllMessagesGa;
+       }
 
-       function getMagicWords()
-       {
+       function getMagicWords() {
                global $wgMagicWordsGa;
                return $wgMagicWordsGa;
        }
index cadb7e4..d9d8efb 100644 (file)
@@ -814,13 +814,13 @@ $3 $9",
 
 class LanguageHe extends LanguageUtf8 {
 
-        function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
+       function getDefaultUserOptions () {
+               $opt = Language::getDefaultUserOptions();
                $opt["quickbar"]=2;
-                return $opt;
-        }
+               return $opt;
+       }
 
-       function getBookstoreList () {
+       function getBookstoreList() {
                global $wgBookstoreListHe ;
                return $wgBookstoreListHe ;
        }
@@ -854,36 +854,32 @@ class LanguageHe extends LanguageUtf8 {
                return $wgSkinNamesHe;
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesHe;
                return $wgValidSpecialPagesHe;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesHe;
                return $wgSysopSpecialPagesHe;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesHe;
                return $wgDeveloperSpecialPagesHe;
        }
 
-        function getMessage( $key )
-        {
-                global $wgAllMessagesHe;
-                if(array_key_exists($key, $wgAllMessagesHe))
-                        return $wgAllMessagesHe[$key];
-                else
-                        return Language::getMessage($key);
-        }
+       function getMessage( $key ) {
+               global $wgAllMessagesHe;
+               if(array_key_exists($key, $wgAllMessagesHe))
+                       return $wgAllMessagesHe[$key];
+               else
+                       return Language::getMessage($key);
+       }
 
-        function isRTL() { return true; }
+       function isRTL() { return true; }
 
-        function fallback8bitEncoding() { return "iso8859-8"; }                
+       function fallback8bitEncoding() { return "iso8859-8"; }                
 
 }
 
index a7bafec..8c315bb 100644 (file)
@@ -1160,26 +1160,22 @@ class LanguageHu extends LanguageUtf8 {
                return $wgDateFormatsHu;
        }
        
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesHu;
                return $wgValidSpecialPagesHu;
        }
        
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesHu;
                return $wgSysopSpecialPagesHu;
        }
        
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesHu;
                return $wgDeveloperSpecialPagesHu;
        }
        
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesHu;
                if(array_key_exists($key, $wgAllMessagesHu))
                        return $wgAllMessagesHu[$key];
@@ -1192,8 +1188,7 @@ class LanguageHu extends LanguageUtf8 {
        }
 
        # localised date and time
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
                
                $d = substr( $ts, 0, 4 ) . ". " .
@@ -1202,14 +1197,6 @@ class LanguageHu extends LanguageUtf8 {
                return $d;
        }
        
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-               
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-       
        function timeanddate( $ts, $adj = false )
        {
                return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj );
index 19f350c..ea0db21 100644 (file)
@@ -1123,7 +1123,7 @@ class LanguageIs extends LanguageUtf8 {
        function getDefaultUserOptions () {
                global $wgDefaultUserOptionsIs;
                return $wgDefaultUserOptionsIs;
-               }
+       }
 
        function getBookstoreList () {
                global $wgBookstoreListIs;
@@ -1164,26 +1164,22 @@ class LanguageIs extends LanguageUtf8 {
                return $wgDateFormatsIs;
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesIs;
                return $wgValidSpecialPagesIs;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesIs;
                return $wgSysopSpecialPagesIs;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesIs;
                return $wgDeveloperSpecialPagesIs;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesIs;
                if( isset( $wgAllMessagesIs[$key] ) ) {
                        return $wgAllMessagesIs[$key];
@@ -1192,19 +1188,15 @@ class LanguageIs extends LanguageUtf8 {
                }
        }
        
-       function getAllMessages()
-       {
+       function getAllMessages() {
                global $wgAllMessagesIs;
                return $wgAllMessagesIs;
        }
 
-       function getMagicWords() 
-       {
+       function getMagicWords() {
                global $wgMagicWordsIs;
                return $wgMagicWordsIs;
        }
 }
 
-# @include_once( "Language" . ucfirst( $wgLanguageCode ) . ".php" );
-
 ?>
index 68e320b..9d78ce4 100644 (file)
@@ -24,15 +24,6 @@ require_once( "LanguageUtf8.php" );
 
 ) + $wgNamespaceNamesEn;
 
-# I always compare this file with japanese file, when I'm confused.
-# And DefaultUserOption isn't there in japanese one. What's
-# this? I don't have to translate this. Am I right?
-
-# The Japanese file is a bit obsolete, so don't trust it too much!
-# Don't translate the text strings here, but you can customize any
-# option values if you like. These will be the defaults for any user
-# who isn't logged in, or a newly created user account.
-
 /* private */ $wgQuickbarSettingsKo = array(
 #      "None", "Fixed left", "Fixed right", "Floating left"
        "없음", "왼쪽 붙박이", "오른쪽 붙박이", "왼쪽 떠다님"
@@ -884,11 +875,11 @@ Wikipedia developers.",
 
 class LanguageKo extends LanguageUtf8 {
 
-        function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
-               $opt["rcdays"]=14;
-                return $opt;
-        }
+       function getDefaultUserOptions () {
+               $opt = Language::getDefaultUserOptions();
+               $opt["rcdays"] = 14;
+               return $opt;
+       }
 
        function getBookstoreList () {
                global $wgBookstoreListKo ;
@@ -926,8 +917,7 @@ class LanguageKo extends LanguageUtf8 {
 
        # Inherit default userAdjust()
  
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                global $wgWeekdayAbbreviationsKo;
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
@@ -944,41 +934,28 @@ class LanguageKo extends LanguageUtf8 {
                return $d;
        }
 
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false )
-       {
+       function timeanddate( $ts, $adj = false ) {
                return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
        }
 
        # inherit function rfc1123( $ts )
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesKo;
                return $wgValidSpecialPagesKo;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesKo;
                return $wgSysopSpecialPagesKo;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesKo;
                return $wgDeveloperSpecialPagesKo;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesKo, $wgAllMessagesEn;
                $m = $wgAllMessagesKo[$key];
 
index 6d33c29..700aca9 100644 (file)
@@ -905,13 +905,6 @@ class LanguageNl extends LanguageUtf8 {
                return $d;
        }
        
-       function time( $ts, $adj = false ) {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-               
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-       
        function timeanddate( $ts, $adj = false ) {
                return $this->date( $ts, $adj ) . " " . $this->time( $ts, $adj );
        }
@@ -919,8 +912,7 @@ class LanguageNl extends LanguageUtf8 {
        function getValidSpecialPages() {
                global $wgValidSpecialPagesNl;
                return $wgValidSpecialPagesNl;
-       }
-       
+       }       
        
        function getSysopSpecialPages() {
                global $wgSysopSpecialPagesNl;
@@ -941,8 +933,6 @@ class LanguageNl extends LanguageUtf8 {
                }
        }
        
-       function isRTL() { return false; }
-       
        # Inherit iconv(), ucfirst(), stripForSearch(), recodeForEdit(), recodeInput()
        # since they are same as English/Latin1
 
index aab97cc..e950556 100644 (file)
@@ -1324,7 +1324,7 @@ class LanguageNn extends LanguageUtf8 {
        function getDefaultUserOptions () {
                global $wgDefaultUserOptionsNn;
                return $wgDefaultUserOptionsNn;
-               }
+       }
 
        function getQuickbarSettings() {
                global $wgQuickbarSettingsNn;
index e933a5f..44c1e86 100755 (executable)
@@ -29,17 +29,6 @@ if($wgMetaNamespace === FALSE)
        NS_CATEGORY_TALK    => 'T\'ááłáhági_át\'éego_baa_yinísht\'į́'
 );
 
-/* private */ $wgDefaultUserOptionsNv = array(
-       'quickbar' => 1, 'underline' => 1, 'hover' => 1,
-       'cols' => 80, 'rows' => 25, 'searchlimit' => 20,
-       'contextlines' => 5, 'contextchars' => 50,
-       'skin' => $wgDefaultSkin, 'math' => 1, 'rcdays' => 7, 'rclimit' => 50,
-       'highlightbroken' => 1, 'stubthreshold' => 0,
-       'previewontop' => 1, 'editsection'=>1,'editsectiononrightclick'=>0, 'showtoc'=>1,
-       'showtoolbar' =>1,
-       'date' => 0
-);
-
 /* private */ $wgQuickbarSettingsNv = array(
        'None', 'Fixed left', 'Fixed right', 'Floating left'
 );
@@ -179,11 +168,6 @@ this</a> (alternative: like this<a href="" class="internal">?</a>).',
 
 class LanguageNv extends LanguageUtf8 {
 
-       function getDefaultUserOptions () {
-               global $wgDefaultUserOptionsNv ;
-               return $wgDefaultUserOptionsNv ;
-       }
-
        function getBookstoreList () {
                global $wgBookstoreListNv ;
                return $wgBookstoreListNv ;
@@ -245,25 +229,21 @@ class LanguageNv extends LanguageUtf8 {
        }
 
        /* by default we just return base form */
-       function getMonthNameGen( $key )
-       {
+       function getMonthNameGen( $key ) {
                return $this->getMonthName( $key );
        }
 
-       function getMonthAbbreviation( $key )
-       {
+       function getMonthAbbreviation( $key ) {
                global $wgMonthAbbreviationsNv;
                return @$wgMonthAbbreviationsNv[$key-1];
        }
 
-       function getWeekdayName( $key )
-       {
+       function getWeekdayName( $key ) {
                global $wgWeekdayNamesNv;
                return $wgWeekdayNamesNv[$key-1];
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesNv;
                return $wgValidSpecialPagesNv;
        }
index bf27667..d4fe310 100644 (file)
@@ -921,35 +921,25 @@ sous le nouveau nom. S'il vous plait, fusionnez les manuellement.", // Looxix
 
 );
 
-class LanguageOc extends LanguageUtf8
-{
+class LanguageOc extends LanguageUtf8{ 
 
-       function getDefaultUserOptions()
-       {
-                $opt = Language::getDefaultUserOptions();
-                return $opt;
+       function getBookstoreList () {
+               global $wgBookstoreListOc ;
+               return $wgBookstoreListOc ;
        }
 
-        function getBookstoreList () {
-                global $wgBookstoreListOc ;
-                return $wgBookstoreListOc ;
-        }
-
-       function getNamespaces()
-       {
+       function getNamespaces() {
                global $wgNamespaceNamesOc;
                return $wgNamespaceNamesOc;
        }
 
 
-       function getNsText( $index )
-       {
+       function getNsText( $index ) {
                global $wgNamespaceNamesOc;
                return $wgNamespaceNamesOc[$index];
        }
 
-       function getNsIndex( $text ) 
-       {
+       function getNsIndex( $text ) {
                global $wgNamespaceNamesOc;
 
                foreach ( $wgNamespaceNamesOc as $i => $n ) 
@@ -961,27 +951,19 @@ class LanguageOc extends LanguageUtf8
                return false;
        }
 
-       function specialPage( $name ) 
-       {
-               return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-       }
-
-       function getQuickbarSettings() 
-       {
+       function getQuickbarSettings() {
                global $wgQuickbarSettingsOc;
                return $wgQuickbarSettingsOc;
        }
 
-       function getSkinNames()
-       {
+       function getSkinNames() {
                global $wgSkinNamesOc;
                return $wgSkinNamesOc;
        }
 
        // Inherit userAdjust()
 
-       function date( $ts, $adj = false )
-       {
+       function date( $ts, $adj = false ) {
                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
 
                $d = (0 + substr( $ts, 6, 2 )) . " " .
@@ -990,39 +972,26 @@ class LanguageOc extends LanguageUtf8
                return $d;
        }
 
-       function time( $ts, $adj = false )
-       {
-               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-               return $t;
-       }
-
-       function timeanddate( $ts, $adj = false )
-       {
+       function timeanddate( $ts, $adj = false ) {
                return $this->date( $ts, $adj ) . " à " . $this->time( $ts, $adj );
        }
 
-       function getValidSpecialPages()
-       {
+       function getValidSpecialPages() {
                global $wgValidSpecialPagesOc;
                return $wgValidSpecialPagesOc;
        }
 
-       function getSysopSpecialPages()
-       {
+       function getSysopSpecialPages() {
                global $wgSysopSpecialPagesOc;
                return $wgSysopSpecialPagesOc;
        }
 
-       function getDeveloperSpecialPages()
-       {
+       function getDeveloperSpecialPages() {
                global $wgDeveloperSpecialPagesOc;
                return $wgDeveloperSpecialPagesOc;
        }
 
-       function getMessage( $key )
-       {
+       function getMessage( $key ) {
                global $wgAllMessagesOc, $wgAllMessagesEn;
                $m = $wgAllMessagesOc[$key];
 
index 264060a..d1a9aeb 100644 (file)
@@ -1076,131 +1076,77 @@ Wybierz, proszę, nową nazwę.",
 );
 
 class LanguagePl extends LanguageUtf8 {
-
-        function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
-                return $opt;
-        }
        
-        function getNamespaces() {
-                global $wgNamespaceNamesPl;
-                return $wgNamespaceNamesPl;
-        }
-
-        function getNsText( $index ) {
-                global $wgNamespaceNamesPl;
-                return $wgNamespaceNamesPl[$index];
-        }
-
-        function getNsIndex( $text ) {
-                global $wgNamespaceNamesPl;
-
-                foreach ( $wgNamespaceNamesPl as $i => $n ) {
-                        if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
-                }
-                return false;
-        }
-
-        function getQuickbarSettings() {
-                global $wgQuickbarSettingsPl;
-                return $wgQuickbarSettingsPl;
-        }
-
-        function getSkinNames() {
-                global $wgSkinNamesPl;
-                return $wgSkinNamesPl;
-        }
-
-        function getMonthNameGen( $key )
-        {
-                global $wgMonthNamesGenEn;
-                return wfMsg( $wgMonthNamesGenEn[$key-1] );
-        }
-
-
-        function userAdjust( $ts )
-        {
-                global $wgUser;
-
-                $diff = $wgUser->getOption( "timecorrection" );
-                if ( ! $diff ) { $diff = 0; }
-                if ( 0 == $diff ) { return $ts; }
-
-                $t = mktime( ( (int)substr( $ts, 8, 2) ) + $diff,
-                  (int)substr( $ts, 10, 2 ), (int)substr( $ts, 12, 2 ),
-                  (int)substr( $ts, 4, 2 ), (int)substr( $ts, 6, 2 ),
-                  (int)substr( $ts, 0, 4 ) );
-                return date( "YmdHis", $t );
-        }
-
-        function date( $ts, $adj = false )
-        {
-                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-                $d = (0 + substr( $ts, 6, 2 )) . 
-                  " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
-                  " " . substr( $ts, 0, 4 );
-                return $d;
-        }
-
-        function time( $ts, $adj = false )
-        {
-                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-                $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-                return $t;
-        }
-
-        function timeanddate( $ts, $adj = false )
-        {
-                return $this->time( $ts, $adj ) . ", " . $this->date( $ts, $adj );
-        }
-
-        function rfc1123( $ts )
-        {
-                return date( "D, d M Y H:i:s T", $ts );
-        }
-
-        function getValidSpecialPages()
-        {
-                global $wgValidSpecialPagesPl;
-                return $wgValidSpecialPagesPl;
-        }
-
-        function getSysopSpecialPages()
-        {
-                global $wgSysopSpecialPagesPl;
-                return $wgSysopSpecialPagesPl;
-        }
-
-        function getDeveloperSpecialPages()
-        {
-                global $wgDeveloperSpecialPagesPl;
-                return $wgDeveloperSpecialPagesPl;
-        }
-
-        function getMessage( $key )
-        {
-                global $wgAllMessagesPl;
-        if(array_key_exists($key, $wgAllMessagesPl))
-                        return $wgAllMessagesPl[$key];
-                else
-                        return Language::getMessage($key);
-        }
-
-        # Inherit ucfirst() and stripForSearch() from LanguageUtf8
-
-        function checkTitleEncoding( $s ) {
-        # Check for Latin-2 backwards-compatibility URLs
-                $ishigh = preg_match( '/[\x80-\xff]/', $s);
-                $isutf = preg_match( '/^([\x00-\x7f]|[\xc0-\xdf][\x80-\xbf]|' .
-                '[\xe0-\xef][\x80-\xbf]{2}|[\xf0-\xf7][\x80-\xbf]{3})+$/', $s );
-        
-        if($ishigh and !$isutf)
-                return iconv( "ISO-8859-2", "UTF-8", $s );
-        
-        return $s;
-        }
+       function getNamespaces() {
+               global $wgNamespaceNamesPl;
+               return $wgNamespaceNamesPl;
+       }
+
+       function getNsText( $index ) {
+               global $wgNamespaceNamesPl;
+               return $wgNamespaceNamesPl[$index];
+       }
+
+       function getNsIndex( $text ) {
+               global $wgNamespaceNamesPl;
+
+               foreach ( $wgNamespaceNamesPl as $i => $n ) {
+                       if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
+               }
+               return false;
+       }
+
+       function getQuickbarSettings() {
+               global $wgQuickbarSettingsPl;
+               return $wgQuickbarSettingsPl;
+       }
+
+       function getSkinNames() {
+               global $wgSkinNamesPl;
+               return $wgSkinNamesPl;
+       }
+
+       function getMonthNameGen( $key ) {
+               global $wgMonthNamesGenEn;
+               return wfMsg( $wgMonthNamesGenEn[$key-1] );
+       }
+
+       function date( $ts, $adj = false ) {
+               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
+
+               $d = (0 + substr( $ts, 6, 2 )) . 
+                 " " . $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) .
+                 " " . substr( $ts, 0, 4 );
+               return $d;
+       }
+
+       function getValidSpecialPages() {
+               global $wgValidSpecialPagesPl;
+               return $wgValidSpecialPagesPl;
+       }
+
+       function getSysopSpecialPages() {
+               global $wgSysopSpecialPagesPl;
+               return $wgSysopSpecialPagesPl;
+       }
+
+       function getDeveloperSpecialPages() {
+               global $wgDeveloperSpecialPagesPl;
+               return $wgDeveloperSpecialPagesPl;
+       }
+
+       function getMessage( $key ) {
+               global $wgAllMessagesPl;
+               if(array_key_exists($key, $wgAllMessagesPl))
+                       return $wgAllMessagesPl[$key];
+               else
+                       return Language::getMessage($key);
+       }
+
+       # Check for Latin-2 backwards-compatibility URLs
+       function fallback8bitEncoding() {
+               return "iso-8859-2";
+       }
 
 }
 
index 4ca7b28..b52b2f6 100644 (file)
@@ -899,79 +899,74 @@ V teh primerih boste morali prestaviti ali povezati stran ročno, če to želite
 #--------------------------------------------------------------------------
 
 class LanguageSl extends LanguageUtf8 {
-
-  function getDefaultUserOptions () {
-   $opt = Language::getDefaultUserOptions();
-   return $opt;
-  }
-
- function getNamespaces() {
-  global $wgNamespaceNamesSl;
-  return $wgNamespaceNamesSl;
- }
-
- function getNsText( $index ) {
-  global $wgNamespaceNamesSl;
-  return $wgNamespaceNamesSl[$index];
- }
-
- function getNsIndex( $text ) {
-  global $wgNamespaceNamesSl;
-
-  foreach ( $wgNamespaceNamesSl as $i => $n ) {
-   if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
-  }
-  if( 0 == strcasecmp( "Special", $text ) ) { return -1; }
-  if( 0 == strcasecmp( "User", $text ) ) { return 2; }
-  if( 0 == strcasecmp( "Wikipedia", $text ) ) { return 4; }
-  return false;
- }
-
- function getQuickbarSettings() {
-  global $wgQuickbarSettingsSl;
-  return $wgQuickbarSettingsSl;
- }
-
- function getSkinNames() {
-  global $wgSkinNamesSl;
-  return $wgSkinNamesSl;
- }
-
- function getDateFormats() {
-  global $wgDateFormatsSl;
-  return $wgDateFormatsSl;
- }
-
- function getValidSpecialPages()
- {
-  global $wgValidSpecialPagesSl;
-  return $wgValidSpecialPagesSl;
- }
-
- function getSysopSpecialPages()
- {
-  global $wgSysopSpecialPagesSl;
-  return $wgSysopSpecialPagesSl;
- }
-
- function getDeveloperSpecialPages()
- {
-  global $wgDeveloperSpecialPagesSl;
-  return $wgDeveloperSpecialPagesSl;
- }
-
- function getMessage( $key )
- {
+       
+       function getNamespaces() {
+               global $wgNamespaceNamesSl;
+               return $wgNamespaceNamesSl;
+       }
+       
+       function getNsText( $index ) {
+               global $wgNamespaceNamesSl;
+               return $wgNamespaceNamesSl[$index];
+       }
+       
+       function getNsIndex( $text ) {
+               global $wgNamespaceNamesSl;
+               
+               foreach ( $wgNamespaceNamesSl as $i => $n ) {
+                       if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
+               }
+               if( 0 == strcasecmp( "Special", $text ) ) { return -1; }
+               if( 0 == strcasecmp( "User", $text ) ) { return 2; }
+               if( 0 == strcasecmp( "Wikipedia", $text ) ) { return 4; }
+               return false;
+       }
+       
+       function getQuickbarSettings() {
+               global $wgQuickbarSettingsSl;
+               return $wgQuickbarSettingsSl;
+       }
+       
+       function getSkinNames() {
+               global $wgSkinNamesSl;
+               return $wgSkinNamesSl;
+       }
+       
+       function getDateFormats() {
+               global $wgDateFormatsSl;
+               return $wgDateFormatsSl;
+       }
+       
+       function getValidSpecialPages()
+       {
+               global $wgValidSpecialPagesSl;
+               return $wgValidSpecialPagesSl;
+       }
+       
+       function getSysopSpecialPages()
+       {
+               global $wgSysopSpecialPagesSl;
+               return $wgSysopSpecialPagesSl;
+       }
+       
+       function getDeveloperSpecialPages()
+       {
+               global $wgDeveloperSpecialPagesSl;
+               return $wgDeveloperSpecialPagesSl;
+       }
+       
+       function getMessage( $key )
+       {
                global $wgAllMessagesSl;
                if(array_key_exists($key, $wgAllMessagesSl))
                        return $wgAllMessagesSl[$key];
                else
                        return Language::getMessage($key);
- }
-
- function fallback8bitEncoding() {
      }
+       
      function fallback8bitEncoding() {
                return "iso-8859-2";
- }
      }
 }
 
 ?>
index 747e3a2..0cc2d13 100644 (file)
@@ -193,92 +193,83 @@ $wgLanguageNamesTt =& $wgLanguageNames;
 
 class LanguageTt extends LanguageUtf8 {
 
-        function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
-                return $opt;
-                }
-
-        function getBookstoreList () {
-                global $wgBookstoreListTt;
-                return $wgBookstoreListTt;
-        }
-
-        function getNamespaces() {
-                global $wgNamespaceNamesTt;
-                return $wgNamespaceNamesTt;
-        }
-
-        function getNsText( $index ) {
-                global $wgNamespaceNamesTt;
-                return $wgNamespaceNamesTt[$index];
-        }
-
-        function getNsIndex( $text ) {
-                global $wgNamespaceNamesTt;
-
-                foreach ( $wgNamespaceNamesTt as $i => $n ) {
-                        if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
-                }
-                return false;
-        }
-
-        function specialPage( $name ) {
-                return $this->getNsText( Namespace::getSpecial() ) . ":" . $name;
-        }
-
-        function getQuickbarSettings() {
-                global $wgQuickbarSettingsTt;
-                return $wgQuickbarSettingsTt;
-        }
-
-        function getSkinNames() {
-                global $wgSkinNamesTt;
-                return $wgSkinNamesTt;
-        }
-
-        function getDateFormats() {
-                global $wgDateFormatsTt;
-                return $wgDateFormatsTt;
-        }
-
-        # Inherit userAdjust()
-
-        function date( $ts, $adj = false ) {
-                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-                $d = (0 + substr( $ts, 6, 2 )) . ". " .
-                  $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
-                  substr( $ts, 0, 4 );
-                return $d;
-        }
-
-        function time( $ts, $adj = false ) {
-                if ( $adj ) { $ts = $this->userAdjust( $ts ); }
-
-                $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
-                return $t;
-        }
-
-        function timeanddate( $ts, $adj = false ) {
-                return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj );
-        }
-
-        # Inherit rfc1123()
-
-        function getValidSpecialPages() {
-                global $wgValidSpecialPagesTt;
-                return $wgValidSpecialPagesTt;
-        }
-
-        function getSysopSpecialPages() {
-                global $wgSysopSpecialPagesTt;
-                return $wgSysopSpecialPagesTt;
-        }
-
-        function getDeveloperSpecialPages() {
-                global $wgDeveloperSpecialPagesTt;
-                return $wgDeveloperSpecialPagesTt;
-        }
+       function getBookstoreList () {
+               global $wgBookstoreListTt;
+               return $wgBookstoreListTt;
+       }
+
+       function getNamespaces() {
+               global $wgNamespaceNamesTt;
+               return $wgNamespaceNamesTt;
+       }
+
+       function getNsText( $index ) {
+               global $wgNamespaceNamesTt;
+               return $wgNamespaceNamesTt[$index];
+       }
+
+       function getNsIndex( $text ) {
+               global $wgNamespaceNamesTt;
+
+               foreach ( $wgNamespaceNamesTt as $i => $n ) {
+                       if ( 0 == strcasecmp( $n, $text ) ) { return $i; }
+               }
+               return false;
+       }
+
+       function getQuickbarSettings() {
+               global $wgQuickbarSettingsTt;
+               return $wgQuickbarSettingsTt;
+       }
+
+       function getSkinNames() {
+               global $wgSkinNamesTt;
+               return $wgSkinNamesTt;
+       }
+
+       function getDateFormats() {
+               global $wgDateFormatsTt;
+               return $wgDateFormatsTt;
+       }
+
+       # Inherit userAdjust()
+
+       function date( $ts, $adj = false ) {
+               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
+
+               $d = (0 + substr( $ts, 6, 2 )) . ". " .
+                 $this->getMonthAbbreviation( substr( $ts, 4, 2 ) ) . " " .
+                 substr( $ts, 0, 4 );
+               return $d;
+       }
+
+       function time( $ts, $adj = false ) {
+               if ( $adj ) { $ts = $this->userAdjust( $ts ); }
+
+               $t = substr( $ts, 8, 2 ) . ":" . substr( $ts, 10, 2 );
+               return $t;
+       }
+
+       function timeanddate( $ts, $adj = false ) {
+               return $this->date( $ts, $adj ) . ", " . $this->time( $ts, $adj );
+       }
+
+       # Inherit rfc1123()
+
+       function getValidSpecialPages() {
+               global $wgValidSpecialPagesTt;
+               return $wgValidSpecialPagesTt;
+       }
+
+       function getSysopSpecialPages() {
+               global $wgSysopSpecialPagesTt;
+               return $wgSysopSpecialPagesTt;
+       }
+
+       function getDeveloperSpecialPages() {
+               global $wgDeveloperSpecialPagesTt;
+               return $wgDeveloperSpecialPagesTt;
+       }
 
        function getMessage( $key ) {
                global $wgAllMessagesTt;
@@ -289,32 +280,32 @@ class LanguageTt extends LanguageUtf8 {
                }
        }
 
-        # Inherit iconv()
+       # Inherit iconv()
 
-        # Inherit ucfirst()
+       # Inherit ucfirst()
 
-        # Inherit lcfirst()
+       # Inherit lcfirst()
 
-        # Inherit checkTitleEncoding()
+       # Inherit checkTitleEncoding()
 
-        # Inherit stripForSearch()
+       # Inherit stripForSearch()
 
-        # Inherit setAltEncoding()
+       # Inherit setAltEncoding()
 
-        # Inherit recodeForEdit()
+       # Inherit recodeForEdit()
 
-        # Inherit recodeInput()
+       # Inherit recodeInput()
 
-        # Inherit isRTL()
+       # Inherit isRTL()
 
-        # Inherit getMagicWords()
+       # Inherit getMagicWords()
 
-        function fallback8bitEncoding() {
-                # Windows codepage 1252 is a superset of iso 8859-1
-                # override this to use difference source encoding to
-                # translate incoming 8-bit URLs.
-                return "windows-1254";
-        }
+       function fallback8bitEncoding() {
+               # Windows codepage 1252 is a superset of iso 8859-1
+               # override this to use difference source encoding to
+               # translate incoming 8-bit URLs.
+               return "windows-1254";
+       }
 }
 
 ?>
index bb0517d..1be0213 100644 (file)
@@ -31,7 +31,7 @@ require_once( "LanguageUtf8.php" );
 ) + $wgNamespaceNamesEn;
 
 /* private */ $wgQuickbarSettingsZh_cn = array(
-        "无", /* "None" */ 
+       "无", /* "None" */ 
        "左侧固定", /* "Fixed left" */ 
        "右侧固定", /* "Fixed right" */ 
        "左侧漂移" /* "Floating left" */    
@@ -46,7 +46,7 @@ require_once( "LanguageUtf8.php" );
        'davinci' => "DaVinci",
        'mono' => "Mono",
        'monobook' => "MonoBook",
- "myskin" => "MySkin" 
+       'myskin' => "MySkin"
 );
 
 
@@ -953,11 +953,6 @@ Wikipedia与这些公司并没有任何商业关系,因此本表不应该
 
 class LanguageZh_cn extends LanguageUtf8 {
 
-        function getDefaultUserOptions () {
-                $opt = Language::getDefaultUserOptions();
-                return $opt;
-        }
-
        function getBookstoreList () {
                global $wgBookstoreListZh_cn ;
                return $wgBookstoreListZh_cn ;