Commit graph

2062 commits

Author SHA1 Message Date
Fomafix
d59af4c341 Use PHP's implode() with the suggested order of arguments
https://secure.php.net/manual/en/function.implode.php defines the order
of arguments as

 string implode ( string $glue , array $pieces )
 string implode ( array $pieces )

Note:
  implode() can, for historical reasons, accept its parameters in
  either order. For consistency with explode(), however, it may be less
  confusing to use the documented order of arguments.

Change-Id: I03bf5712204e283f52d3ede54af9b9ec117d4280
2018-02-22 20:24:00 +01:00
Reedy
39f0f919c5 Update suppressWarning()/restoreWarning() calls
Bug: T182273
Change-Id: I9e1b628fe5949ca54258424c2e45b2fb6d491d0f
2018-02-10 08:50:12 +00:00
Max Semenik
cbd75a5473 Hard deprecate UtfNormalUtil
Deprecated in 1.25, last vestiges have been removed.

Inline one last function that's not supposed to be public anyway.

Change-Id: If44c6a9cce7d2d95dc63e6f135b73b8c969f1c07
2018-02-06 14:44:37 -08:00
Umherirrender
ad776c7d5f Use ::class to resolve class names in maintenance scripts
This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666
2018-01-23 17:40:16 +00:00
jenkins-bot
08324f14b4 Merge "build: Updating mediawiki/mediawiki-codesniffer to 15.0.0" 2018-01-02 10:12:27 +00:00
Umherirrender
255d76f2a1 build: Updating mediawiki/mediawiki-codesniffer to 15.0.0
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable

For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore

Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
2018-01-01 14:10:16 +01:00
Chiefwei
f778609cd0 Chinese Conversion Table Update 2017-6
Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I4bf1e1ae2efd157fa74650b9ece0cce211c66598
2017-12-09 16:54:29 +08:00
jenkins-bot
2ef178072f Merge "Chinese Conversion Table Update 2017-5" 2017-12-09 04:50:47 +00:00
Bryan Davis
9e34eeff23 Maintenance: add fatalError() method
Deprecate the second argument to Maintenance::error() in favor of a new
Maintenance::fatalError() method. This is intended to make it easier to
review flow control in maintenance scripts.

Change-Id: I75699008638f7e99b11210c7bb9e2e131fca7c9e
2017-11-21 21:34:16 -07:00
Paladox
d97455ca21 build: Updating mediawiki/mediawiki-codesniffer to 14.1.0
And moved phpcs.xml to .phpcs.xml (T177256).

Change-Id: Idaa1fe006a528c25ce34abd0a857c657c26e8b0f
2017-10-21 03:12:55 +00:00
Chiefwei
d255f6a886 Chinese Conversion Table Update 2017-5
Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I8ad74e6d7696e51aa691e0f026e11b07c8f90a78
2017-10-20 16:37:50 +08:00
Chiefwei
7cfabd5ff5 Chinese Conversion Table Update 2017-4
Update the Chinese conversion table routinely to fix bugs reported from https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ic66546d3a47e4dd946ae67c636a638ca181b0ca1
2017-09-12 23:04:18 +00:00
Thiemo Mättig
91a920fd85 Remove auto-generated "Constructor" documentation on constructors
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.

This is similar to I994d11e. Even more trivial, because this here is
about comments that don't say anything but "constructor".

Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
2017-07-21 12:19:30 +02:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
Chiefwei
b8076aa1c7 Chinese Conversion Table Update 2017-3
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82
.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I42c80634bc57cf0d3ccf87c055a0594909684752
2017-04-30 10:22:59 +08:00
Chiefwei
0c8cd4271b Chinese Conversion Table Update 2017-2
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82
.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I4c71183a5c7b8cadb04ea2b8026c0ac09b512584
2017-03-05 17:35:56 +08:00
Chiefwei
786795eb6e Chinese Conversion Table Update 2017-1
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I7684fc2805f7f2076b974a2136fcbb3e9dd86607
2017-02-05 11:53:05 +00:00
Chiefwei
ed06aaec5c Chinese Conversion Table Update 2016-7
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ie6793fb995269fc842878a5d07d806fc715d6686
2016-11-12 17:50:04 +08:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
Amir Sarabadani
9850c542c6 Clean up array() syntax in docs, part VII
Last part

Change-Id: I38f015e2122ef4fd2d2141718bd889794c29f06c
2016-09-27 06:53:25 +03:30
Chiefwei
c321e628a2 Chinese Conversion Table Update 2016-6
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I36aaffc024fe0e2df5a029b232d825f7d15cd3ed
2016-08-27 17:55:31 +08:00
Chiefwei
c4c185bcd7 Chinese Conversion Table Update 2016-5
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I63054fc4a6cdc6e0fc350a6509ca1154f9464f42
2016-07-16 14:25:30 +08:00
Chiefwei
56b97b194f Chinese Conversion Table Update 2016-4
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I69a61766a9a1aa2cdb58d55434606afabba0e9b9
2016-06-23 20:57:11 +08:00
Chiefwei
0d63491e7d Chinese Conversion Table Update 2016-3
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ie9010f0e58a0949ea64362a2e2690fbcde3e0aad
2016-05-07 14:29:50 +08:00
Chiefwei
883ba49b2f Chinese Conversion Table Update 2016-2
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ibbfb156d307bff81752d9b5f82733131b8b398de
2016-04-14 13:34:46 +08:00
Kevin Israel
5b48bf1b92 Clean up after "Kill mbstring fallbacks"
* Removed fallback code from Language, the associated data file
  (Utf8Case.ser), and the code to generate that data file.
* Removed comment in LanguageFi that "mb_substr has a compatibility
  function in GlobalFunctions.php".
* Removed check for mbstring in bench_utf8_title_check.php.
* In the tests for StringUtils::isUtf8():
  * Removed separate test for the non-mbstring code path.
  * Removed mentions of mbstring from function names and assertion
    messages, since mb_check_encoding() is now always used.
* Also updated the comment in StringUtils::isUtf8() referring to
  PHP 5.3, which is no longer supported in MediaWiki, to indicate
  that the same issue also exists in old versions of HHVM. (If
  we don't have to support 3.4 or older, then the function could
  be deprecated and removed if desired.)

Follows-up 943563062f.

Change-Id: I55e5cd534b849c6ea06a7fadacbbf34a12d87ebe
2016-04-07 09:02:37 -04:00
Reedy
83fb19cb13 Swap the rest of array() -> []
Change-Id: I76a7259ed952a0673a1941f08b39b545211fba07
2016-03-30 22:04:58 +00:00
jenkins-bot
2379efaad6 Merge "Fix accidential variable overriding in manualWordsTable" 2016-03-30 07:55:18 +00:00
jenkins-bot
99340a1ea8 Merge "Try to fix some other broken-looking legacy maintenance script options" 2016-03-18 21:13:39 +00:00
Chiefwei
2b14116908 Convert array() syntax to [] in Makefile.py
Update Makefile.py for Chinese conversion table to convert array() syntax to [] in languages/data/ZhConversion.php .

Change-Id: I10ba5d16ca619f64458feba51e12c3bd5d18435d
2016-03-12 12:27:05 +00:00
Alex Monk
aa838b52de Try to fix some other broken-looking legacy maintenance script options
Bug: T125748
Change-Id: I2004d9b1fd7389623a3f2da6682f9007efd679dc
2016-03-12 00:47:36 +00:00
Liangent
3ac6ef57fb Fix accidential variable overriding in manualWordsTable
It doesn't make sense to get a table passed in then ignore that one
completely so it doesn't look like the intentional behavior, and
regardless of this, the edited code is still more logical.

Change-Id: I98bc841e982d328e268309c06fefd3d3ca9f6cd7
2016-03-11 02:23:42 +00:00
Chiefwei
673df15655 Chinese Conversion Table Update 2016-1
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I39f9945a38078364a740dbb552f87d4bcf62033c
2016-03-11 01:45:50 +00:00
Timo Tijhof
9a2e9ff1cd maintenance: Remove odd use of $wgLang
* testCompression.php: Called $wgLang, but didn't set it.
  It just assumed it was English. Use a local variable instead.

* update.php: Set $wgLang to English. Set main RequestContext as well.

* transstat.php: Rename $wgLanguages to $languages for less confusion.
  It's just a local instance of language.inc's Languages class.

Change-Id: I67865f4d8710946001f7586ab0a17e125366b184
2016-03-03 01:37:45 +00:00
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
e57998f533 Merge "Use autoloader for PHP data files instead of include/require" 2016-02-01 15:11:54 +00:00
Max Semenik
59db24e90b Use addDescription() instead of accessing mDescription directly
Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
2016-01-30 01:28:32 -08:00
Tim Starling
f43e0d840f Use autoloader for PHP data files instead of include/require
Move ZhConversion.php and Names.php to languages/data and make them both
expose their data as static class variables instead of in the local
scope. This means that the autoloader can be used to load the data,
which is efficient and secure. This also makes additional request-local
caching of the arrays unnecessary.

Change-Id: Iafb96ac4165d0965fcb9a69f1d0a91139ea9790c
2016-01-30 13:08:46 +11:00
Chiefwei
62b6d7cb91 Chinese Conversion Table Update 2015-9
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Icb47cf7d30a9bf09d55af9e96e34b9b5c6d6c9cf
2016-01-14 06:18:26 +00:00
Chad Horohoe
bfa365a8ac zhtable makefile: Remove unused variables, fix almost all pep8 errors
Change-Id: I7ab1ffeeb2a5592fbe143f27801c11248c167093
2015-10-16 00:49:06 -07:00
Chiefwei
703a2c2ae7 Chinese Conversion Table Update 2015-8
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ic9a467a79a0a4c2af8092ff8e22200993e801492
2015-09-29 14:47:38 +08:00
jenkins-bot
4a136f3ee0 Merge "Chinese Conversion Table Update 2015-7" 2015-09-08 20:23:24 +00:00
Kevin Israel
43ad3e8f6c Cleanup after extraction of utfnormal library
* Delete includes/compat/normal/.gitignore, which excluded files
  now located in various directories within the utfnormal repo.
* Remove "For NFC see includes/compat/normal" comments from
  maintenance/language, replacing them with a note that "This
  data file is used after normalizing to NFC."

Change-Id: I0ac990ec1a547b4c454ed738ce1dfffce0f53ba4
2015-08-17 02:57:04 -04:00
Chiefwei
936b15267c Chinese Conversion Table Update 2015-7
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82
.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I4cb1d13903a31241ed50ab1eaf0c6f3bd6435e83
2015-08-16 12:33:33 +08:00
Chiefwei
d52f4a1a0f Chinese Conversion Table Update 2015-6
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82 .

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ibf6d776d07a611a2afcb2c6c984074c39c8c0d70
2015-07-16 05:08:51 +00:00
Ori Livneh
8338476b8e Create a subdirectory for compatibility stubs
Instead of littering includes/ with stub back-compat aliases, house such
classes in includes/compat/.

Change-Id: I4c1b83e35c8d6c18777a4a3e17d81023915cfb7f
2015-06-29 19:27:13 +00:00
Chiefwei
ac69d6c9be Chinese Conversion Table Update 2015-5
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I0933141b0f06c5b7d7f1fb8153f6433276dc872f
2015-06-27 13:46:51 +08:00
Kunal Mehta
f6e5079a69 Use mediawiki/at-ease library for suppressing warnings
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.

Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.

Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.

Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
2015-06-11 18:49:29 +00:00
Chiefwei
839ffb0830 Chinese Conversion Table Update 2015-4
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ic1355c98e8e18217c73461239d4754f9d117999d
2015-06-02 16:59:05 +08:00
Chiefwei
60d58c19c5 Chinese Conversion Table Update 2015-3
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I8c9a52a3c03031330b8be771f3c74e6007efab73
2015-05-18 08:13:03 +00:00
Chad Horohoe
f94e85e976 wfRunHooks() -> Hooks::run() in maintenance scripts
Change-Id: I6550bca3a6a3a6cd67bb1ed94c09805deed86dbc
2015-04-27 21:42:17 -07:00
Liangent
18e70e9705 Improve Makefile.py for zhtable
* Fix incorrect parsing of phrases with spaces in them by using tabs as
  separators only in *.manual
* Make the order of items in PHP array output more stable, so contribs
  from different people don't conflict with each other
* Include version number in file name of Unihan database, so existing
  old file doesn't prevent downloading of a newer version of Unihan

Change-Id: Ifb6b33b937a7b82218172e3fdd937bda4ea4cc6c
2015-04-23 04:15:37 +00:00
jenkins-bot
cf73ab56ff Merge "Chinese Conversion Table Update 2015-2" 2015-04-21 06:45:29 +00:00
Chiefwei
63c79fc250 Chinese Conversion Table Update 2015-2
Update the Chinese conversion table to fix bugs reported.

It is only data changes and only works for Chinese WikiProjects.

Bug: T92758
Change-Id: I89a425517b2ba48645e57c48103a48ac5b1718c2
2015-04-18 14:13:36 +08:00
Kunal Mehta
13975fe76a Use wikimedia/utfnormal library, add backwards-compatability layer
This drops support for the custom utf8 normal PHP extension in favor
of the intl extension.

Bug: T90825
Change-Id: Ifbaeb2ef684217cf6187ccc4fb4d303f89608300
2015-03-24 12:59:26 -07:00
jenkins-bot
28b59da2a1 Merge "Update the Chinese conversion table for Chinese WikiProjects" 2015-03-10 13:58:22 +00:00
Chiefwei
f968119a28 Update the Chinese conversion table for Chinese WikiProjects
The Chinese conversion table is substantially updated to fix a lot of
bugs reported in recent years, and the script generating conversion
table (LanguageZh.php) is also modified to facilitate the maintenance.

Zh-sg and zh-my is set to fallback to zh-cn to improve reading
experience, since there is only trivial difference among them, just like
zh-hk and zh-mo. Further optimization for zh-sg and zh-my will be
performed in local conversion table of Chinese WikiProjects.

Bug: T91620
Change-Id: I1bb0315d6d7a2c9653905654d933942e362bcc42
2015-03-06 19:51:13 +00:00
Kunal Mehta
c8900f30af Move includes/normal to includes/libs/normal
Change-Id: Ib530ad9dbe1d3a33dc53ef8b9620f61d4e1a2d62
2015-01-29 00:00:35 +00:00
Aaron Schulz
6921770414 Updated some try-catch statements: MWException -> Exception
Change-Id: I76601a86e30f4984e3b1a8c8ec5ef5a0f652433a
2015-01-09 17:20:22 -08:00
Ricordisamoa
fc5fd5c37a Typo fixes and non-code tweaks
Skipped replacements:
* prefered → preferred
* prolly → probably

Skipped files:
* resources/lib/jquery.ui/jquery.ui.mouse.js
* resources/lib/jquery/jquery.form.js

Change-Id: Ib7923f362ddfca1b892bf5d601785d6b5aa5d44c
2014-12-12 18:31:15 +00:00
csteipp
f4e6bebea7 Use 0x for hexadecimal prefix
0X is a legal hex prefix, but tools like pfff and my syntax highlighter
prefer the more common 0x.

Change-Id: I38bba068f9a97566b0df9fb0a2fe72d25519a21b
2014-09-16 18:59:07 +00:00
umherirrender
25971af694 Cleanup some docs (maintenance)
- Fixed spacing inside docs
- Makes beginning of @param/@return in capital

Change-Id: I864b8b3f1f67e34e369aba7aadaf87e7752c894d
2014-08-09 22:08:40 +02:00
umherirrender
2b021dc48a Fixed spacing
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif

Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
2014-07-19 23:12:10 +02:00
Max Semenik
dadec1b2d3 Add a maintenance script to list variants and languages with then
Change-Id: Ide9ab040e93f3fc942b67363b7444903521ef79a
2014-06-04 15:31:30 -07:00
Alexandre Emsenhuber
527932136f Remove not-working scripts in maintenance/language
Change-Id: Idd6b1d5dc93a5bd71f0ad7445ce2f6ddc4beeb33
2014-05-24 07:32:16 +02:00
Alexandre Emsenhuber
7c7dbce0f0 Remove messageTypes.inc and replace it by a hook
The list is now maintained in the translatewiki repo:
https://git.wikimedia.org/blob/translatewiki.git/HEAD/groups%2FMediaWiki%2FMediaWiki.yaml

Change-Id: I4a33b22e425cbc1eeaf8b53870ef7b7947e91b40
2014-05-13 21:45:28 +02:00
Bartosz Dziewoński
1c4b578214 Remove messages.inc, rebuildLanguage.php, writeMessagesArray.inc
They are not being used anymore since the messages lists are in JSON
format, no idea why they were still here. Especially messages.inc is
just confusing everyone adding or removing messages.

Change-Id: If104ca1609e122b6871a97521065916a26734516
2014-05-12 16:00:24 +02:00
Jackmcbarn
f14e48f4f9 Allow moving category pages
Allow category pages to be moved. This is to preserve attribution of the
page only and does not cause pages in the category to recategorize to the
new one. A warning explains this when such a move is attempted. The new
right move-categorypages is required to do this, which is assigned to user
and sysop by default (the same as other move-related rights). The message
category-move-redirect-override can be used to cause custom text to be
placed on the "old" category page in lieu of a redirect.

Bug: 28569
Bug: 5451
Change-Id: Ic93616a54c8e98e3dc71daee3c92c466d64daffc
2014-05-09 18:12:25 +01:00
Brad Jorsch
e9d4d06276 HTMLForm: Add "cloner" type
SecurePoll is going to need the ability to have a form for stuff like
"one or more admin usernames" and "one or more poll questions, each with
one or more options".

This change implements a generic field container that simply displays as
a <ul> followed by an "add more" button, with each <li> containing
various fields including a "remove" button.

Since this is only going to show up in SecurePoll to people creating a
poll (not to general users), the current design is functional but not
necessarily beautiful. Those interested in beauty are welcome to do so
in a followup change.

Change-Id: I46fad3971739ddc961259fe32eb6e1cd265a1c06
2014-05-02 15:02:40 +00:00
jenkins-bot
e03f5e9c9e Merge "Update formatting in maintenance/ (3/4)" 2014-04-23 23:12:45 +00:00
Aaron Schulz
89d85a4be4 Added pool counter support for all thumb.php requests
* This can limit how many workers work on a given file at once,
  regardless of which specific thumbnail parameters are requested.
* Also added a BagOStuff::incrWithInit() method per DRY.
* Tweaked the register_shutdown_function() callback to avoid
  File/MediaTransformOutput references, since they may involve
  TempFSFile objects.

Change-Id: Ic01461cb974ab23b179ac3b60cf6de12e36360f6
2014-04-23 20:57:17 +00:00
Siebrand Mazeland
5a77286a1e Update formatting in maintenance/ (3/4)
Change-Id: I4390c4ea12a6a626b0e6817b6446635116ca9fe3
2014-04-23 20:09:13 +02:00
umherirrender
c81ceae2f8 Remove superfluous # at end of line from languages.inc
Change-Id: Ia625e8de5e4d04dd35b537fd905af53b66f4026b
2014-04-18 19:03:13 +02:00
umherirrender
e78776373e Fixed some @params documentation (maintenance)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I727deec35a712de0f0c676cc87dfa661f1ee965b
2014-04-17 22:48:32 +02:00
tonythomas01
74756a2409 Removed 'Remember my login' preference
Removed 'Remember my login' from Preferences, as it was unwanted. It adds
to the complexity of the user preferences

Bug: 52342
Co-Author: Tyler Romeo <tylerromeo@gmail.com>
Change-Id: I7c957e1e1aaecf47f7c47bc063b5d3b364644afc
2014-04-16 12:49:44 +05:30
Liangent
68d2b5f861 zhtable: Add zh2Hant rule 箱里 => 箱裡
Change-Id: Iab42af3a6246174263a1aa752912349a76cdb6a8
2014-04-09 08:45:27 +00:00
Bartosz Dziewoński
ef2c7d1df8 Remove unused 'prefs-beta' message
Unused since change Id8b9a47a in WikiEditor (9 months ago).

Bug: 28555
Change-Id: I76667a15ccbb1f6bdc5e5a67ffcb0a65ce55d124
2014-04-06 01:49:03 +02:00
Alexandre Emsenhuber
6ea0417cef Fix language statistics after messages have been moved to JSON
Statistics are now showing always no messages since languages.inc
does not manage to load the JSON messages.

Had to make LocalisationCache::readJSONFile() public so that it can
be used in  languages.inc; since all methods from LocalisationCache
return localisations merged with fallbacks, which is not what we
want here.

Fix for I918cfdc46c (0dd91d5).

Change-Id: Ib52287db618b9d072e847130070d165a3e7ae44b
2014-04-02 20:05:51 +02:00
Aaron Schulz
eb03cf3f7d Added a Redis pool counter class
* This should be easier to set up for typical installs

Change-Id: Icb4a7481b944fa0818c4635e3edbe12d08af9924
2014-04-01 15:57:31 -07:00
unknown
610236b467 Implement listing for tracking categories
Special page to implement list of Tracking Categories. Global
$wgTrackingCategories added containing list of tracking categories

Bug: 60333
Change-Id: I7d4bb90622a6bae60845942ef93cfe64f229d2d2
2014-03-29 14:50:39 +05:30
jenkins-bot
b382dfd42b Merge "Add a 'revdelete-selected-file' message on Special:RevisionDelete" 2014-03-26 17:18:57 +00:00
Brian Wolff
24276faf68 Add Special:ListDuplicatedFiles expensive query special page.
I saw some comments recently on commons suggesting that
better ways are needed to manage duplicate files (There are tools
for if a specific file is a duplicate, but no backlog of
outstanding duplicate files).

This seems like a fairly easy first step in that direction.

Wasn't sure if this should be an image gallery type
query page, or just a list. I think in this case a plain
list is more useful.

Change-Id: Ibe4b9da71ca6451ec4e6b0050feaf3ca70e1b888
2014-03-24 00:16:05 -03:00
jenkins-bot
96024533a6 Merge "Add link to PD help translatable pages from sidebar" 2014-03-20 23:17:26 +00:00
Ladsgroup
16a5102765 Change URLs to mediawiki.org in comments to HTTPS
These are only documentation fixes
http://www.mediawiki.org --> https://www.mediawiki.org

Change-Id: I62ad42be1a3aac410cc53e98ce79389ceddd8988
2014-03-20 16:59:46 +00:00
Federico Leva
3a6ea89d4a Add link to PD help translatable pages from sidebar
Reuses the existing helppage default message and
adds it to ignored messages as Special:MyLanguage
is used and translations have to be removed:
this does not bother customised local links.

Now using HTTPS URL to mediawiki.org per Brion
on bug 54835. This slightly increases the footprint
of the change but should keep everything functionally
equivalent. The sidebar is not bothered by full URLs,
except in self-defeating tests which are also fixed here.

Bug: 53887
Change-Id: I999b97729536dbab4a3a5efd8d6f86527f031948
2014-03-19 23:01:09 +01:00
jenkins-bot
df1a0cc446 Merge "Link to existing login help page by default from helplogin-url" 2014-03-19 10:48:19 +00:00
csteipp
9d7af803a1 Allow login with passwords not meeting complexity requirements
As part of https://www.mediawiki.org/wiki/Requests_for_comment/Passwords

This patch:
* Allows users to login with a password that does not meet the
  requirements of User::isValidPassword(), including the minimum password
  length.
* Adds a configuration flag that specifies if users should be sent to
  the change password form when they login with a password that doesn't
  meet the requirements of User::isValidPassword().

To test the UX as it will be on WMF wikis, set
$wgMinimalPasswordLength=6 in your LocalSettings.php.

Change-Id: Ib7b72005fea1c69073c0a33a68c0a0df0d6528d2
2014-03-18 20:46:44 +00:00
Federico Leva
7821e9d814 Link to existing login help page by default from helplogin-url
Detailed rationale discussed on bugzilla, bug 53888 and parent,
where consensus on the design was gained.

Using https link per Brion et al. in comments and bug 54835,
with new keys for the messages in order to avoid any conflict
with existing messages. (The translations of the removed messages
will be automatically removed by localisation updates.)

https://www.mediawiki.org/wiki/Help:Logging_in was improved by Lloffiwr
and now also marked for translation. The link is ready for future
translations thanks to the use of the standard Special:MyLanguage, hence
the message is made ignored to allow customisations only locally.

Bug: 53888
Change-Id: I8cefafbcd3bd1d6a03cec7cf1d0efdf607fec21d
2014-03-18 00:26:38 +00:00
umherirrender
c0ed76d715 Add a 'revdelete-selected-file' message on Special:RevisionDelete
This allows a file adjusted message when delete file versions and can
make clear the difference between deleting a revision of the file
description page or a version of the file.

Also renamed 'revdelete-selected' to 'revdelete-selected-text' to be
able to reorder the params, this allows using the same code for each
type (log, text and file)

Change-Id: I02514eda2f267ede16b4298ed5cae64c6787f79d
2014-03-16 08:23:15 +00:00
jenkins-bot
bedc38649b Merge "Split revdelete-text on Special:RevisionDelete for each type" 2014-03-14 23:02:34 +00:00
umherirrender
3ff5a3da27 Split revdelete-text on Special:RevisionDelete for each type
This allows specific text for each type.
Types here are: text, file and log

Change-Id: Icb24dfb483f940e90215ecc01f5765185963c7ed
2014-03-12 20:11:27 +01:00
Siebrand Mazeland
bae9f58d1a Prevent "Log in" being used in two different contexts
Spotted by Lloffiwr and reported at
https://translatewiki.net/wiki/Thread:Support/MediaWiki:Pt-login/en

Change-Id: Ibfbe4abfbb29860c05ebaac83e2220f373940a59
2014-03-12 18:13:48 +00:00
jenkins-bot
c2665e4b6e Merge "Remove user preference "noconvertlink"" 2014-03-11 10:01:16 +00:00
jrobson
91ee73ac0a Revert "Warn on account creation when username is adjusted"
This reverts commit a0c72523c7.
which has terrible effects on mobile.

Most browser inputs on a mobile phone default to lowercase meaning
a username with a lowercase starting character will always trigger the
warning.

This means the user will have to re-enter their passwords, fill out the captcha
again and their email again (as all these are sensitive and not retained when
reloading the form with the warning)

If this is truly wanted on desktop, more thought it needed for the mobile use
case.

Bug: 61416
Change-Id: I8b93e5a4ca687f87305ced4343dcb28ca2909939
2014-03-06 17:58:28 +00:00
jenkins-bot
242c489722 Merge "Give links to a user's suppressed edits on Special:Contribs" 2014-03-06 17:18:02 +00:00
Bartosz Dziewoński
a0c72523c7 Warn on account creation when username is adjusted
The user name can be adjusted due to various technical restrictions:
the first letter is capitalized, underscores are changed to spaces,
numerous other less visible changes happen. Some of these tweaks can
be unwanted by some users.

Generate a warning if that happens. If the user has JavaScript
enabled, the check happens entirely client-side – a little warning box
is shown, the user doesn't have to do anything. Otherwise the check
happens server-side and the user has to resubmit the form.

The way this is done makes it trivial to also check if the username
is invalid or already taken, so let's do that. It also means that we
can't check for all error conditions, e.g. these enforced by
extensions – that is still handled server-side. (Client-side we
intentionally never say that whatever the user typed in is valid – we
only warn when we know it's not.)

API behavior is unchanged.

Co-Authored-By: umherirrender <umherirrender_de.wp@web.de>
Co-Authored-By: Bartosz Dziewoński <matma.rex@gmail.com>
Bug: 34447
Bug: 61416
Change-Id: Ic461a5e597ad71b854dc65bbf8a395c0f55d1fc3
2014-03-05 22:20:58 +01:00
Alexandre Emsenhuber
793f17481e Update messages.inc and rebuild MessagesEn.php. Again.
Follow-up Id5c0225431 (7d923a6).

Change-Id: I663c28aa05a42917ba3988a02c2609b6c4e9a438
2014-03-01 20:05:51 +01:00
jenkins-bot
e997530e24 Merge "Add option to show only creations in Special:Contribs, API" 2014-02-28 16:40:25 +00:00
PiRSquared17
2dfbd7761a Add option to show only creations in Special:Contribs, API
* Add newOnly option to Special:Contributions
* Add to i18n files
* Add ucshow={new,!new,top,!top} to list=usercontribs
* Deprecated 'uctoponly' in favor of ucshow=top per Anomie.
* Add param 'newonly' to API action=feedcontributions
* Implementation: rev_parent_id=0

Bug: 42026
Change-Id: I07d597ef378d897690097804bf7c774fdadb654c
2014-02-28 16:21:28 +00:00
Bartosz Dziewoński
476888e06a Make 'quotation-marks' message non-optional (again)
Follow-up to Iaf9e42ed. See I9282c787 for reasoning.

Change-Id: I43078741b9fd7a8a1f59bbc6b757682db9c3b48e
2014-02-27 14:35:44 +01:00
Alexandre Emsenhuber
c537bdca6d Update messages.inc and rebuild MessagesEn.php
Change-Id: If068c9b2946ca6fccc2fc37d31f456b12f9cc08b
2014-02-27 14:18:06 +01:00
jenkins-bot
96603cd221 Merge "Make show/hide link in RC individually localizable" 2014-02-27 12:50:05 +00:00
Douglas Gardner
4986f91509 Make show/hide link in RC individually localizable
This commit concerns the filters on the [[Special:RecentChanges]] box.
Previously, "Show" and "Hide" in messages such as "Show anonymous users" were a
shared system message: now each filter can be assigned a verb individually.

For example:
* Argument $1 of `rcshowhideminor` used to come from `show` or `hide`.
* $1 now comes from `rcshowhideminor-show` or `rcshowhideminor-hide`.

In place of `show` and `hide`, the following system messages are affected:
* `rcshowhideminor` uses `rcshowhideminor-show` and `rcshowhideminor-hide`.
* `rcshowhidebots` uses `rcshowhidebots-show` and `rcshowhidebots-hide`.
* `rcshowhideanons` uses `rcshowhideanons-show` and `rcshowhideanons-hide`.
* `rcshowhidepatr` uses `rcshowhidepatr-show` and `rcshowhideanons-hide`.
* `rcshowhidemine` uses `rcshowhidemine-show` and `rcshowhidemine-hide`.

This change attempts to correct an issue encountered when localising into
Chechen (ce); previous behaviour made it impossible to translate the entire
sentence fragment correctly (as the verb is rendered slightly differently
depending on the rest of the sentence, and this was not possible with a shared
Show/Hide message).

Bug: 58449
Change-Id: Ibbfc3cd0477b029c8f22a3c812a891ac2109d660
2014-02-27 13:42:25 +01:00
PiRSquared17
3525bc5620 Give links to a user's suppressed edits on Special:Contribs
For users who are able to see the log, provide links to view
suppression log entries for actions done by the user. A link is also
added on Special:DeletedContributions.

This was formerly done by the Oversight extension.

Bug: 59120
Change-Id: I0e606636e80810f9917d6aa624a79f1e190297f6
2014-02-27 03:03:37 +00:00
Alex Ivanov
f1a81ca186 Add personal tools messages for messages login, userlogout, createaccount
Add personal tools messages for:
* login -- pt-login
* userlogout -- pt-userlogout
* createaccount -- pt-createaccount

Those messages shouldn't be used as personal tools messages.

Bug: 52861
Change-Id: I8fb229b15c4736945db46672b42a26fd7dafb5f6
2014-02-23 16:37:03 +02:00
csteipp
01c8c421f8 Password Expiration
Add functionality to expire users' passwords:
 * Adds column to the user table to keep a password expiration
 * Adds $wgPasswordExpirationDays, which will force users to reset
   their passwords after a set number of days. By default, this set
   to false, so passwords never expire.
 * Adds a default grace period of 7 days, where if the user's password
   is expired, they can still login, but are encouraged to reset their
   password.
 * Adds hook 'LoginPasswordResetMessage' to update reset message, in
   case an extension wants to vary the message on a particular reset
   event.
 * Adds hook 'ResetPasswordExpiration' to allow extensions to change
   the expiration date when the user resets their password. E.g., if
   an extension wants to vary the expiration based on the user's group.

If the user is in the grace period, they get a password reset form
added to the login successful page. If an extension prevents showing
the login successful page (like CentralAuth), it should be updated to
show a password change form during the grace period. After the grace
period, the user will not be able to login without changing their
password.

Also prevents a successful reset if the user is "changing" their
password to their existing password.

No passwords will expire by default. Sites will have to call
User->expirePassword() from their own maintenance script to trigger a
password reset for a user.

Bug: 54997
Change-Id: I92a9fc63b409b182b1d7b48781d73fc7216f8061
2014-02-20 09:41:51 -08:00
tonythomas01
11c04f9ecb Removed 'Enable simplified search bar (Vector skin only)' from MW user Preference
The vector-simplesearch preference is enabled by default since version 1.22.
The option is removed to decrease the clutter in the preference page

Bug: 52815
Change-Id: I6d8dd997a4c4a6b8fb06b4674dda5f306432c6af
2014-02-19 17:53:55 +01:00
Roman Tsukanov
782afa6ef0 Added summary to Special:ProtectedPages and Special:ProtectedTitles.
Bug: 61454
Change-Id: I3a98f09458d4cb31b1ffe6ffd110b8515126fcea
2014-02-18 08:23:26 +00:00
jenkins-bot
c56495090a Merge "Use TablePager on Special:ProtectedPages (using log_search)" 2014-02-13 20:02:22 +00:00
umherirrender
ca7c098134 Use TablePager on Special:ProtectedPages (using log_search)
Adding the pr_id to log_search table and use a join to get the user,
timestamp and comment from the logging table. For logs without the pr_id
a placeholder text is shown.
The code for page protection is changed from a replace to delete/insert
to have for each pr_id a log_id and not reusing pr_ids which was used
for the first protection on a protection change.
The log_deleted field is checked to avoid showing revision deleted data
from the logging table.

This is a alternative patch for
Ie40057398a7829c698df3d68813006798a72dccb
and Iade82653999ca770586762b3c1383f73dfe3a5ee to avoid a schema change
on table page_restriction.
Idea by Aaron Schulz.

Change-Id: Ia0dc5895ec672896fe4b75c2e0f76da2474bd6e4
2014-02-13 20:48:53 +01:00
Aaron Schulz
dc496c02d9 Limit attempts to render the same thumbnail after failures
bug: 49118
Change-Id: I9379ec445bf2e77bd3b085c00182c5e406ed300d
2014-02-12 16:55:57 -07:00
raymond
c78a834f92 Message has no translatable content -> ignore it
Spotted by सिद्धार्थ घई
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Createaccount-hook-aborted/en

Change-Id: Ie80ff03902adce9f8db01908c1d6c7b71b4def52
2014-02-10 16:41:27 +01:00
Liangent
333bf3ae5b Remove user preference "noconvertlink"
This toggle was introduced in 8d06ad6e, but the most useful feature for
human users there (disabling <h1> conversion on a per-user basis) has
been dropped due to cache fragmentation. The only remaining part is not
quite useful and can be covered by the URL parameter &linkconvert=no.

Change-Id: I12f2cdc9b0d44d6e47487b14fa8ef010de5c94a7
2014-02-08 03:10:16 +00:00
apexkid
e65fd1bef5 Show range start and end in special page pagination
Changes pagination message from "starting with #X" to
"in range #X to #Y" for special pages such as
Special:MostLinkedCategories

Bug: 11269
Change-Id: Ibf9191f3a694014ad02eba9a58c600833e8361ec
2014-02-05 21:58:48 +00:00
Brad Jorsch
5073379d35 Detect already-undone edits for undo
When an edit has already been undone by a later edit, the current
behavior of displaying undo-success with an empty diff tends to confuse
users. It seems it would be better to detect this situation and display
a message along the lines of "This edit has already been undone".

Bug: 29762
Change-Id: Ia40a06046a72b0de52a2b75165ca105bbf4e2e6a
2014-02-04 14:47:40 -05:00
jenkins-bot
cdf4a17a56 Merge "Adding python 3 support for the Makefile.py file for the zhtable" 2014-01-31 18:46:43 +00:00
jenkins-bot
1f84a574e3 Merge "Improve clarity of diff-multi message" 2014-01-31 17:24:00 +00:00
jenkins-bot
187b46ce0c Merge "Removed "Justify paragraphs" from MW user Preference." 2014-01-29 05:13:27 +00:00
jenkins-bot
70ae276db1 Merge "(bug 47070) check content model namespace on import." 2014-01-28 20:56:02 +00:00
Waldir Pimenta
1078e93358 skin: Remove the id "anonlogin" and merge pt-anonlogin with pt-login
This was used as an alternative id for the login link in the
personal tools at the top right for ShowIPinHeader context.

This seems to have been inherited since the days of the
PHPTal-based skins (at least git-blame shows their presence back
in Brion's rewrite of the skin in november 2004).

I've asked several maintainers about this and nobody could figure
out why it would need a different id. After all, whenever the
user sees the login link it means they are using the wiki as an
anonymous user.

My best guess is that this was meant to allow the ability to
style the login differently when the (anonymous) user has
already made an edit (or if we init a session for other reasons).

This is also what toggles the anon userlinks are shown (i.e. the
links to the IP userpage and talkpage), but I see no evidence of
this, and in any case it would be better to change the class of
the whole personal tools div instead of changing the IDs.

Change-Id: Ib3445934853db5361c3c6fecfe75623b0b921400
2014-01-27 18:04:22 -08:00
Bartosz Dziewoński
31f32f990e No longer display the number of rows shown on Special:Watchlist
My rationale for doing this is that passing this several functions
down is awkward and arguably bad design.

It's still a better rationale than the one used to add this in 2004,
which was replacing another value to fix HTML injection bug (r4728).

Change-Id: Iada3a93762dd25fdaf35fb707304abc40bd4a5b1
2014-01-26 20:51:38 +01:00
tonythomas01
2f9cfa3d26 Removed "Justify paragraphs" from MW user Preference.
Removed the option 'Justify paragraphs' from MW Preferences
as it is not a necessary option there.
Added RELEASE NOTES.

Bug: 52810
Change-Id: I1fe6a5857070828726077e6ba229b786c017c858
2014-01-25 09:57:57 +05:30
Federico Leva
fa5576bee5 Add direct links to translation interface on Special:AllMessages
The local Special:AllMessages page is the first and most friendly place
where average users will look for the message and try to translate it:
when they find it, add a link to translatewiki.net so that they can start
translating without searching for it from scratch.

Special:SearchTranslations is the only target usable for this: the solr
search is smart enough to present the most relevant results first and the
translation interface is directly available in place.
On the bright side, similar messages popping up from other projects or areas
of the code will provide suggestions and help find other occurrences of
translations which can similarly be improved.

More specifically, we are using a combined language, key and text search:
* the English text is the only thing guaranteed to exist, if the message is
  available, though quoting it can give some false negatives and not quoting
  it would give it too much weight if it's long;
* the key can be used thanks to the feature revealed by Niklas Laxström in
  comments to this patch: it is simpler to handle but allows only exact matches
  and can be wrong if TWN adds a prefix for the extension, so it can't be used
  alone, but in the best case it's what we're looking for;
* the language makes sense in combination with the key match.
We boost key and language to get the current translation of the message where
possible; if it's not, the first result will usually be English text.
https://wiki.apache.org/solr/SolrQuerySyntax
https://lucene.apache.org/core/2_9_4/queryparsersyntax.html

From the initial search, the user can further refine its search and navigate
the interface to find the message(s) and editor where to add or edit the
translation.

Change-Id: I8de3faba829c50cdc0f2d09726f738c585792e00
2014-01-25 04:24:27 +00:00
tonythomas01
aadd16aab1 Remove preference "Show table of contents (for pages with more ...)"
The table of contents box is auto-inserted, can trivially be hidden or
exposed on a per-page basis with __MAGICWORDS__, includes a sticky
[show|hide] link, and can be easily hidden with site-wide CSS as
necessary. It needlessly adds complexity and user interface clutter.

Bug: 52813
Change-Id: If2139317dae4aa980b373c73d7b81dac627b5af8
2014-01-24 12:59:44 -08:00
tonythomas01
f6aa7b3e88 Removed "Enable section editing via [edit] links" from preferences
Unwanted user preference option in MW adding to the clutter.
Users interested in hiding section-edit links can use per-user
(or site-wide) CSS.
Removed 'editsection' from Defaultsettings.php and
ResourceLoaderUserCSSPrefsModule.php
Updated Release Notes

Bug: 52811
Change-Id: I5fc49106621943ca7180ddb37590b624edac67d5
2014-01-25 00:04:40 +05:30
jenkins-bot
5bca585cc9 Merge "Add Status outparam for AbortNewAccount hook to fix API error handling" 2014-01-23 20:27:00 +00:00
Brion Vibber
c8e3c424f9 Add Status outparam for AbortNewAccount hook to fix API error handling
With this fix and relevant fix for ConfirmEdit in, an API account creation
attempt that fails the captcha check will return a much cleaner error such as:

{
  'error': {
    'code': 'captcha-createaccount-fail',
    'info': 'Incorrect or missing CAPTCHA.'
  }
}

Abort hooks that use the old interface and send a text message will now
be reported with the generic 'createaccount-hook-abort' message code, with the
string passed back intact.

Previously, the returned result would list the contents of the message
_as_ the error code, making it hard for a client to determine the error.

'AbortNewAccount' hook clients can add a '&$status=null' function paramater
on their signature, and along with the back-compat message parameter
you can set something like:

  $msg = wfMessage( 'captcha-createaccount-fail' )->text(); // back-compat
  $status = Status::newFatal( 'captcha-createaccount-fail' ); // new

This is done for ConfirmEdit in If9cc08e

Bug: 60008
Change-Id: I6ae34c00d1051d34363b6d654424be17dcb1ea30
2014-01-23 10:02:50 -08:00
Douglas Gardner
1d25d8bd60 Remove login-throttled system message reuse
Replaced calls to the `login-throttled` system message to new, separate system
messages for [[Special:ChangeEmail]] and [[Special:ChangePassword]] in order to
minimise message reuse.

* [[Special:ChangeEmail]] now uses `changeemail-throttled` instead of
  `login-throttled`.
* [[Special:ChangePassword]] now uses `changepassword-throttled` instead of
  `login-throttled`.

Follow-up to I565971a90fc383327a51d717a80013cb7a3e9c9b.

Bug: 53655
Change-Id: Icc7ad829b381514627dca16cde62ccf0831967b6
2014-01-20 15:51:08 +00:00
raymond
6a2d25eed0 Make 2 messages optional for translation
Spotted by Joseph
https://translatewiki.net/wiki/Thread:Support/Optional_messages_(10)

Change-Id: Iaf9e42ed21edffd2d36f4ba09a5316f369b4812c
2014-01-18 23:03:47 +01:00
Chad Horohoe
05cbfe0ad4 Allow SearchResults to specify that they matched file content
Change-Id: I214406250d10b971dcca025da508272d9805567b
2014-01-17 10:50:08 -05:00
jenkins-bot
12238a3704 Merge "Generate Utf8Case.ser directly from UnicodeData.txt" 2014-01-12 03:10:50 +00:00
Kevin Israel
0eab1ace67 WebInstaller: Don't call getSoftwareLink()
This gets the web installer working without the mysql or mysqli
PHP extension, which is not needed for other database systems.

* Avoid "lego" construction: put link text directly in the messages,
  which because the messages are parsed as wikitext, is easy to do.
* Put URLs in separate, ignored messages to avoid duplication in
  Database*::getSoftwareLink().
* Because I had to touch a MySQL-related i18n message, I figured
  this would be a good time to address bug 28281 (regarding MySQL
  forks and Special:Version).
* Other miscellaneous message changes, such as recommending the
  mysqli PHP extension over the old, deprecated mysql extension.

Bug: 28281
Bug: 58167
Change-Id: I6dbc9d32c8c2d8f233a67d574229b80444885aea
2014-01-10 03:38:44 -05:00
Jackmcbarn
874fed9306 Improve clarity of diff-multi message
When one user has made all of the intermediate revisions in a diff,
make it clear whether or not this is the same user that made the
latest revision.

Bug: 59833
Change-Id: I7db9a02ae8bc7a8e092fcdc257b5e17595de02b4
2014-01-09 10:10:35 -05:00
jenkins-bot
873344fc1c Merge "Add validation of the content model edited by EditPage" 2014-01-09 15:02:08 +00:00
Chad Horohoe
f5e7453f5c Remove searchlimit preference
Change-Id: Ib3dd2ba54261514b827d12a21536392530c7e02e
2014-01-07 17:48:35 -08:00
Kevin Israel
74557dedd0 Generate Utf8Case.ser directly from UnicodeData.txt
This allows getting rid of serialized/serialize.php. I also moved
includes/normal/Utf8CaseGenerate.php to maintenance/language/
generateUtf8Case.php and updated it to subclass Maintenance, as
it seems to be largely unrelated to normalization.

Using version 6.0.0 of UnicodeData.txt, the updated script generates
exactly the same serialized output as was previously checked in.

Also updated the Makefile to reflect the current set of .ser files
and added some .gitignore entries.

Change-Id: I05afece3dc4505a9f43993ac4d7726b37d9c6956
2014-01-06 18:22:24 -05:00
raymond
1e5e4d91e2 Make message key optional
https://gerrit.wikimedia.org/r/#/c/65299/

Change-Id: I2c27359696a346d92761452f598e8fe00d88156a
2014-01-06 14:56:49 +01:00
jenkins-bot
ea68eb36f2 Merge "Fix user-friendlyness of block confirmation screen" 2014-01-04 13:27:51 +00:00
m4tx
c2c81563b4 Fix user-friendlyness of block confirmation screen
* "Confirm block" checkbox is now highlighted
* Added "check the box if you're sure" message to the errors at the top

Bug: 58783
Change-Id: I2b496d763a14fe47d7458525cb1e8bb9fa5788f6
2014-01-04 14:19:58 +01:00
jenkins-bot
9c4f40123d Merge "Further cleanup to Special:Version" 2014-01-04 02:08:51 +00:00
Matt Walker
219b1ecdb3 Further cleanup to Special:Version
Cleaned up some HTML, added some CSS classes for the version
information, and refactored some of the code.

Also added column headers for the extension descriptions.

Change-Id: I5bbc4d4024620ea57ab1bf778255a487fbc9b378
2014-01-03 17:32:51 -08:00
jenkins-bot
a5a6f595db Merge "Add licensing for extensions to Special:Version" 2014-01-04 00:42:28 +00:00
Matt Walker
357eb3d488 Add licensing for extensions to Special:Version
Allow extensions to register a software license and present
this on the Special:Version page. A new $wgExtensionCredits
parameter has been introduced for this purpose: 'license-name'.

This will also automatically pick up the presense of additional
licensing and/or credits files. If ((AUTHORS)|(CREDITS))(\.txt)?
exists in the extension base directory a credits link will be
created. If ((LICENSE)|(COPYING))(\.txt)? exists a license link
will be created.

The API has also been updated to produce VCS information and present
links to the license/credits files.

Bug: 48418
Change-Id: I388f3b630462f1909f30751c987f7af585e98881
2014-01-03 11:02:54 -08:00
Brad Jorsch
81486e15ee Do not reveal RevDeled file title
When an file is being uploaded, we tell the user if it has been
uploaded and deleted in the past. But we shouldn't reveal the title
under which that was done if the file was suppressed via RevDel.

Note this introduces a breaking API change: clients may now receive a
"deleted-archive" warning with an empty value if the title was
suppressed.

Bug: 59167
Change-Id: I01a3ac2ba0cbac6b28de26a7f1a1d09b6b02097e
2014-01-03 12:40:26 -05:00
mayankmadan
7d50f334c1 Adding a message for api-error-stasherror
Bug: 54460
Change-Id: I2895fe77d147a9065710912b5c2673ab833dd29f
2014-01-03 03:59:41 +05:30
Jackmcbarn
9ac0314959 Allow hiding redirects in Special:ProtectedPages
Add a checkbox to hide redirects in Special:ProtectedPages.

Bug: 19233
Change-Id: If1753eddc834f55c301a6e78e0802ee9d94a24b2
2014-01-02 13:52:17 -05:00
jenkins-bot
b56eebdef1 Merge "Deprecate $wgPasswordSenderName" 2014-01-02 18:14:16 +00:00
theopolisme
1768f90bc8 Deprecate $wgPasswordSenderName
The sender name for system mailings can now be configured
locally by modifying the system message "emailsender". The
new default sender name is simply "{{SITENAME}}". Added to
release notes.

Also modify UserMailer to strip CR/LF linebreaks from header
values to prevent mail header injection now that the sender
name can be modified.

Bug: 32770
Change-Id: Ibfd28cd181365c8c0b5f3e8ffe8f5de8c89844a3
2014-01-01 08:27:59 -06:00
jenkins-bot
6abd85ca92 Merge "Show a warning on page deletion if a page is linked to" 2013-12-30 17:18:19 +00:00
Amir E. Aharoni
75eda407a3 Show a warning on page deletion if a page is linked to
Developed at Hackathon TLV 2013. Based on Ronen Gilead-Raz and Vladimir
Krapp's patch.

Bug: 35485
Change-Id: I623235736aa735232d6a727702d764538b0b65e7
2013-12-30 13:37:47 +02:00