Commit graph

3176 commits

Author SHA1 Message Date
Translation updater bot
111b2a929a Localisation updates from https://translatewiki.net.
Change-Id: I1175766566835e0f1aa5d23b5fd74a23db9659de
2018-07-01 21:52:47 +02:00
Translation updater bot
28eb784704 Localisation updates from https://translatewiki.net.
Change-Id: Ia319ca22827e6f4f8302c03342db181e3e350596
2018-06-27 21:53:09 +02:00
Translation updater bot
979b7b5911 Localisation updates from https://translatewiki.net.
Change-Id: Ie589a2973df5cc34bc5b622cd135608b7bb29a34
2018-06-25 21:54:09 +02:00
Translation updater bot
74e7bbcfce Localisation updates from https://translatewiki.net.
Change-Id: I9a6171181bfab383402ad99e1f59315d5aded560
2018-06-24 22:07:51 +02:00
Fomafix
125cbd8c01 Use \u{00A0} instead of   or  
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entities   or   or  .

With the UTF-8 character the generated HTML is shorter and better to read.

Also change the special value for the label in HTMLForm from   to
U+00A0 but also support   for backward compability.

Bug: T154300
Change-Id: I882599ac1120789bb4e524c4394870680caca4f4
2018-06-24 01:20:13 +00:00
Niklas Laxström
4cc7dea1d5 Only use languages with localisation in the installer
To match recent change to Special:Preferences, only allow languages
with localisation as interface or content language.

Bug: T188030
Change-Id: I8acae47ee70feb98bcde982d9b0e3637daf96ffb
2018-06-20 16:21:08 +02:00
Translation updater bot
c9d7f667ec Localisation updates from https://translatewiki.net.
Change-Id: Idafba5d45cb472eb430092517016d0666fe0f30d
2018-06-18 21:54:31 +02:00
Translation updater bot
e599ca3982 Localisation updates from https://translatewiki.net.
Change-Id: I98ff6cea4c6f300ddbe91e383d709e65da2fdcfd
2018-06-17 22:00:00 +02:00
Translation updater bot
cfd5a649bd Localisation updates from https://translatewiki.net.
Change-Id: Ie01e48ef17e431ae619237e8ae1e2810d454d1de
2018-06-10 22:02:06 +02:00
jenkins-bot
d62d7eff49 Merge "WebInstaller::docLink: Use Html::element to generate the link" 2018-06-10 08:17:23 +00:00
jenkins-bot
f5db267236 Merge "WebInstaller::getDocUrl: Use getUrl to generate the URL" 2018-06-10 08:16:52 +00:00
jenkins-bot
9bc186e021 Merge "Get rid of call_user_func(_array)(), part 3" 2018-06-10 02:46:30 +00:00
Max Semenik
1e680456b4 Get rid of call_user_func(_array)(), part 3
Also cleaned up nearby code in a couple places.

Change-Id: Ibf44ee7c0ceb739d7e79406e4ff39303c316e285
2018-06-10 02:21:24 +00:00
Max Semenik
9bab7de5f8 Clean up CSPRNG support for PHP7
Replace it all with random_bytes(), leave
only MWCryptRand::generateHex() as a convenience helper.

Change-Id: Ic30376a90e66d8f00dab86e7e6466fb3a750b87d
2018-06-10 00:52:04 +00:00
Max Semenik
6e956d55aa Replace call_user_func_array(), part 2
Uses new PHP 5.6 syntax like ...parameter unpacking and
calling anything looking like a callback to make the code more readable.
There are much more occurrences but this commit is intentionally limited
to an easily reviewable size.

In one occurrence, a simple conditional instead of trickery was much more readable.

This patch finishes all the easy stuf in the core, the remainder is either unobvious
or would result in smaller readability gains. It will be carefully dealt with in
further commits.

Change-Id: I79a16c48bfb98b75e5b99f2f6f4fa07b3ae02c5b
2018-06-07 20:19:26 -07:00
Translation updater bot
7ac6279d14 Localisation updates from https://translatewiki.net.
Change-Id: I76a6f7a48e28f135120f73121eac582dd96b3411
2018-06-07 23:19:17 +02:00
jenkins-bot
693c3ad67b Merge "installer: Fix display of UPGRADE by disabling InterwikiLookup" 2018-06-07 16:49:40 +00:00
jenkins-bot
0e96bc1a9e Merge "Replace call_user_func_array(), part 1" 2018-06-07 12:11:10 +00:00
Fomafix
83afef0e47 WebInstaller::docLink: Use Html::element to generate the link
Change-Id: I1e3163d9814345e6b108072886b9756cc84d168a
2018-06-07 11:34:37 +02:00
Fomafix
374c81791a WebInstaller::getDocUrl: Use getUrl to generate the URL
This changes ensures to generate the same URLs on doclinks like in the
navigation bar.

mw-config/?page=Welcome has as "Restart installation" the URL
  /.../mw-config/?page=Restart&lastPage=Language
and as "a copy of the GNU General Public License" the URL
before this change
  /.../mw-config/index.php?page=Copying&lastPage=Welcome
after this change
  /.../mw-config/?page=Copying&lastPage=Welcome

Change-Id: Ide5cb52d71363c3a54e1b6ac48c272e1de823322
2018-06-07 11:19:02 +02:00
Kunal Mehta
a498abf272 installer: Fix display of UPGRADE by disabling InterwikiLookup
Since 129067c907, parsing section titles has looked up interwiki
prefixes with InterwikiLookup. In the web upgrader, this triggers
database access, and since that service is disabled, it throws
exceptions, causing parsing to fail.

Work around that by using a dummy InterwikiLookup service that knows
about no interwiki prefixes. Maybe one could be written to just read
from the stock `interwiki.list`, but that's a project for another time.

Bug: T196607
Change-Id: I13485a9af79297b552a1128240cb8597c2ef83d8
2018-06-07 01:01:13 -07:00
jenkins-bot
769953fe7b Merge "Avoid recreating ar_revid index after it's replaced by ar_revid_uniq" 2018-06-05 16:39:00 +00:00
Brad Jorsch
5c380739b2 Avoid recreating ar_revid index after it's replaced by ar_revid_uniq
Bug: T193180
Change-Id: I274e33de0a348c0ee42b08b349272db7e2151647
2018-06-05 11:35:03 -04:00
Max Semenik
8085c58a4b Replace call_user_func_array(), part 1
Uses new PHP 5.6 syntax like ...parameter unpacking and
calling anything looking like a callback to make the code more readable.
There are much more occurrences but this commit is intentionally limited
to an easily reviewable size.

Change-Id: Idcec077ef3fdf029b632cceafd0150851ad723e3
2018-06-04 23:39:04 -07:00
Translation updater bot
2831e08363 Localisation updates from https://translatewiki.net.
Change-Id: Ie0a45d76ed84797881c62ffcea29ba698df924c9
2018-06-04 22:28:16 +02:00
jenkins-bot
1865739bb5 Merge "Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals (part 2)" 2018-06-04 18:42:43 +00:00
jenkins-bot
a3dfaf0586 Merge "Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals" 2018-06-04 18:37:31 +00:00
Bartosz Dziewoński
03583f7a91 Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals (part 2)
This is a follow-up to Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a
containing some less trivial changes.

Change-Id: Ia7af2c1d000307d43278cde4a246df413d4ef263
2018-06-04 16:40:48 +00:00
Bartosz Dziewoński
0313128b10 Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals
In cases where we're operating on text data (and not binary data),
use e.g. "\u{00A0}" to refer directly to the Unicode character
'NO-BREAK SPACE' instead of "\xc2\xa0" to specify the bytes C2h A0h
(which correspond to the UTF-8 encoding of that character). This
makes it easier to look up those mysterious sequences, as not all
are as recognizable as the no-break space.

This is not enforced by PHP, but I think we should write those in
uppercase and zero-padded to at least four characters, like the
Unicode standard does.

Note that not all "\xNN" escapes can be automatically replaced:
* We can't use Unicode escapes for binary data that is not UTF-8
  (e.g. in code converting from legacy encodings or testing the
  handling of invalid UTF-8 byte sequences).
* '\xNN' escapes in regular expressions in single-quoted strings
  are actually handled by PCRE and have to be dealt with carefully
  (those regexps should probably be changed to use the /u modifier).
* "\xNN" referring to ASCII characters ("\x7F" and lower) should
  probably be left as-is.

The replacements in this commit were done semi-manually by piping
the existing "\xNN" escapes through the following terrible Ruby
script I devised:

  chars = eval('"' + ARGV[0] + '"').force_encoding('utf-8')
  puts chars.split('').map{|char|
    '\\u{' + char.ord.to_s(16).upcase.rjust(4, '0') + '}'
  }.join('')

Change-Id: Idc3dee3a7fb5ebfaef395754d8859b18f1f8769a
2018-06-04 16:20:13 +00:00
Brad Jorsch
c84083e413 Make archive.ar_rev_id unique
To follow up I39b0825c, this change replaces the existing non-unique
index on the column with a unique index, to help avoid some of these
sort of bugs in the future.

Bug: T193180
Change-Id: I932478c9c6a13210bc9dff75286d0f08da56682c
2018-06-04 08:52:06 +00:00
Translation updater bot
c6682e6c7d Localisation updates from https://translatewiki.net.
Change-Id: I8b7bbd573c2cc2a9e6499fd372443b2b67f0cb8c
2018-06-03 21:53:40 +02:00
Translation updater bot
662a418d92 Localisation updates from https://translatewiki.net.
Change-Id: Iccda6c6d7b123642f366c37440486b9132357286
2018-06-02 22:26:03 +02:00
jenkins-bot
25eb07c8f0 Merge "installer: Don't allow setting $wgDBmysql5" 2018-06-01 21:35:50 +00:00
jenkins-bot
1b4f357901 Merge "installer: Hide binary/utf-8 charset option from users" 2018-06-01 21:25:58 +00:00
Translation updater bot
d3e3d7a452 Localisation updates from https://translatewiki.net.
Change-Id: I31d331db53d5f1425541930dbff6f7b28ba470f7
2018-06-01 21:54:03 +02:00
Kunal Mehta
c9339ba552 installer: Don't allow setting $wgDBmysql5
It was possible to pass --dbmysql5 to the command line installer to
enable this experimental option. This removes that ability, and removes
setting of $wgDBmysql5 in the generated LocalSettings.php, so new
installs will fallback to the default of false.

Bug: T196185
Change-Id: Id5ff69f493d14cf7b16157f729fbe4f4b4e2e8c8
2018-06-01 11:57:52 -07:00
Translation updater bot
26c52b50a7 Localisation updates from https://translatewiki.net.
Change-Id: Idb5f51f8339fd3774d0090a5be5660356d5bdc84
2018-05-31 21:53:46 +02:00
Kunal Mehta
d5cde75416 installer: Hide binary/utf-8 charset option from users
This is still used internally for the preUpgrade() checks that see if
the user has an existing table using the utf8 charset, but hide it from
users so they don't accidentally pick utf8.

Bug: T196092
Change-Id: Iaace2e5bf9df7563e1d233496366c95b3f1faf16
2018-05-31 11:29:19 -07:00
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
Translation updater bot
aabe0ee110 Localisation updates from https://translatewiki.net.
Change-Id: I74622ed8964fc45ad35223301346fa1533e3f14a
2018-05-30 22:05:58 +02:00
Translation updater bot
b379b06951 Localisation updates from https://translatewiki.net.
Change-Id: Ia47406929fcf2e288dbc4621ae6cf64ad2c3d070
2018-05-29 22:01:52 +02:00
Translation updater bot
f3dd9d3f7b Localisation updates from https://translatewiki.net.
Change-Id: Ied787b7f07a91cabbe26a85d04e2ed730444637e
2018-05-28 22:17:22 +02:00
Translation updater bot
a98c478ea4 Localisation updates from https://translatewiki.net.
Change-Id: I5c895f4b61a73570671acf36c817cc405f54ec0b
2018-05-27 21:57:03 +02:00
Translation updater bot
233161ccfc Localisation updates from https://translatewiki.net.
Change-Id: I4500053ecbb780a723d5f2398a3d1693a9d12d31
2018-05-26 23:03:33 +02:00
Translation updater bot
4d93b24c7a Localisation updates from https://translatewiki.net.
Change-Id: I1bb2563f7ebba3c66062b79bd523c3f226b54cb9
2018-05-25 21:54:09 +02:00
Translation updater bot
8536c0ca88 Localisation updates from https://translatewiki.net.
Change-Id: Ie807be662d077fe0e177e82834d70581210a5f3e
2018-05-24 21:53:30 +02:00
jenkins-bot
0c46a32f47 Merge "Have class match filename in some maintenance scripts" 2018-05-24 16:49:18 +00:00
James D. Forrester
9d875febd5 Bump PHP version requirement to 7.0.0+
Bug: T172165
Change-Id: I740f32ac859d9bb3787fdf8414f82ae6f410492f
2018-05-24 16:15:56 +01:00
Kunal Mehta
a2c166cb51 Have class match filename in some maintenance scripts
Each of these scripts had a class name that was not referenced outside
of the script file itself, and are safe to rename as a result.

Change-Id: Id605aca11db51ee433baeaa998a0e33184c930ca
2018-05-23 19:36:51 -07:00
Translation updater bot
b837f56210 Localisation updates from https://translatewiki.net.
Change-Id: I12af86ca297eae5af2e7c74fce0d198e6c473827
2018-05-23 22:00:37 +02:00