Commit graph

8 commits

Author SHA1 Message Date
Fomafix
6866cfec37 Simplify PHP by using ?? and ?:
Also remove not necessary surrounding parentheses.

Change-Id: I0eb5c9c1bdfb09a800258379cdcefb5fd4d3d21c
2018-07-10 20:03:17 +00:00
Umherirrender
c9d303d39e Remove "Created on" from file header comments
It is the job of git and svn to provide this information/metadata.
The form was different, some with short, some with long month name
some with leading zero at the day, some without.
The year is also present in the Copyright clause

Change-Id: If006907b82b9e45f13cfa2e45d41107a95570e1a
2018-01-26 23:12:40 +00:00
Brad Jorsch
9f86261000 API: Account for PHP 7.2 change
PHP 7.2 broke existing functionality in making count( null ) raise a
warning. So add tests for null all over the place, or change tests where
we know the value is null or an array (but not false, empty-string, or
0) to just cast to boolean.

Bug: T182004
Change-Id: Idfe23a07daa9f60eee72f2daf04304be87057a29
2017-12-04 13:46:33 -05:00
Brad Jorsch
2e1f3a53c8 Remove execute bits from non-executable files
Change-Id: I4d6a202c63bef3e52b67b55fb6daef04dc2fdd62
2017-06-22 11:28:39 -04:00
Brad Jorsch
45093c330f API: Split description messages into summary + additional text
To fix T123930, it would be very handy to have the summary for each
module without any of the additional explanatory text.

Bug: T166411
Change-Id: I778bab2b87971875aed4c804341ad59c1c6e021f
2017-06-15 13:46:55 -04:00
Baha
036b9c4167 Make API documentation links language aware
Links generated by the API are now aware of the user's preferred
language and will show documents in that language if available.

To test, log in to mediawiki.org and set your language preference to 'es',
then on an MediaWiki installation with this patch view the generated
expanded API help at `api.php?action=help&recursivesubmodules=1&modules=main`.
Each link to documentation on mediawiki.org should take you to its
translated /es subpage, if one exists.

Bug: T104518
Change-Id: I339a1f3ae1bce9d759cf251899d57c32b1def91e
2017-04-05 11:08:25 -04:00
MtDu
b64abcf64e Add a reason field to both Special:PageLanguage and ApiSetPageLanguage
Most MediaWiki actions allow a user to enter a comment/reason for taking the action.
This is logged in the change log.
Currently, both ApiSetPageLanguage and Special:PageLanguage don't do this.
This patch fixes this issue.

Bug: T154644
Change-Id: I6ae021086e1ec4440d6b2894a1b85d62eb36e172
2017-01-06 07:39:20 -06:00
MtDu
d08751030c Add API action to set the language of a page
Currently, a user who wants to set a page's language must use the
Special:PageLanguage interface. However, this is not easy for bots and
scripts to use. The addition of action=setpagelanguage to the API makes
this process easier for such users.

Bug: T74958
Change-Id: I42e74ed3bcd0bfa9ec0c344ba67668210450c975
2017-01-05 03:19:32 +00:00