Commit graph

15 commits

Author SHA1 Message Date
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
jenkins-bot
d4ecfc1a5c Merge "Don't modify $wgHooks on language object construction" 2016-02-11 04:05:56 +00:00
Tim Starling
059fd9a2ae Don't modify $wgHooks on language object construction
Previously various language objects would install a hook to update the
shared conversion table cache when the object was constructed. This is
not a good idea since language objects may be constructed even when they
are not the content language, but only the content language is
associated with variant conversion and the conversion cache.

Instead, have WikiPage call a method on $wgContLang directly. I put this
with message cache update since the logic is almost identical.

Change-Id: Ief9c0ef993e39645e74a6e158cb4e6e2139ce91d
2016-01-29 15:03:56 +11:00
Tim Starling
e0a74a848c Remove require_once for language classes
Remove require_once for LanguageConverter and base classes. These
are in the autoloader now, so an explicit require is no longer
necessary.

Change-Id: Ie34ffc58fd9ec89fb57cf077dd5ac1746c35c48e
2016-01-29 10:05:25 +11:00
umherirrender
2000672ac3 Fixed spacing
- Added spaces after if/foreach/catch
- Added new line before end of file
- Added or removed spaces before/after parenthesis, comma
- Added spaces around string concat

Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f
2014-03-20 20:37:30 +00:00
robin
9fbf07d05f Shorter lines in LanguageUz.php comments
Follows up gerrit change 116914

Change-Id: I75215416277eb8f5d9e16a1bf91637c673be0a48
2014-03-09 19:36:44 +01:00
robin
d2c5fd29d6 Fix Uzbek converter
Improve the Latin to Cyrillic conversion of "e" per https://meta.wikimedia.org/w/index.php?title=User_talk:SPQRobin&oldid=7720901#Request

The code of this change is inspired on LanguageKk.php

As far as I tested, it works as intended

Change-Id: I20f293c8d1f753af7b5344543ec2ce459edcba0c
2014-03-05 13:46:45 +01:00
Timo Tijhof
beb1c4a0ec phpcs: More require/include is not a function
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.

Also updated usage in text in documentation and the
installer LocalSettingsGenerator.

Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;

Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
2013-05-21 23:26:28 +02:00
umherirrender
3c7bcf4658 Fixed spacing in languages folder
Added spaces before if
Added some braces for one line statements

Change-Id: I980771894369499646532b13b801db6447381773
2013-04-17 21:10:02 +02:00
Siebrand Mazeland
4b62b0339c Prefix new ContentHandler hooks in WikiPage with Page instead of Article
Covers 3 hooks:
* ArticleContentInsertComplete -> PageContentInsertComplete
* ArticleContentSave -> PageContentSave
* ArticleContentSaveComplete -> PageContentSaveComplete

Change-Id: I186669a5941d8982725ed364b481215d291b2043
2012-10-11 18:22:52 +02:00
daniel
a138706729 Fix usage of deprecated ArticleSaveComplete hook in core
Change-Id: Ic01fd95d50a909470d6f0ffd93c972322789d49a
2012-10-08 14:13:59 +02:00
Marius Hoch
652c4be7c2 Clean up: Declare variables with public instead of var
Variables in classes should be declared using public $foo
instead of var $foo for various reasons. As we require PHP 5.3
we don't have to take care about that PHP4 left over, but can
get rid of it in favour of the more clear and better readable
public.
See also: http://php.net/manual/en/language.oop5.visibility.php
(Divided into several commits to keep reviewable)

Change-Id: Ic723d0347ab2e3c78bc0097345c68bbee3dc035a
2012-09-14 21:00:00 +02:00
jeroendedauw
38c7f444e1 Use __DIR__ instead of dirname( __FILE__ )
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)

Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
2012-08-27 21:45:00 +02:00
robin
96c5ca4725 Add rule in Uzbek language converter
Per user feedback, make sure yo? gets converted to ??, and not to ???

Change-Id: I7a161cfd4c2bc782091ef3844ff5facf0cf27278
2012-08-10 22:59:59 +02:00
robin
c6156c4b06 Add language converter for Uzbek.
Also add tests per Hashar, based on the Serbian file but less since
Uzbek does not have "variant guessing" or custom plural rules.

Change-Id: I27da994b88fbe13cfb7df12851e704d881397666
2012-07-27 15:59:13 +02:00