lhc/web/wiklou.git
8 years agoMerge "Add more return types to Database class"
jenkins-bot [Fri, 26 Jun 2015 17:53:53 +0000 (17:53 +0000)]
Merge "Add more return types to Database class"

8 years agoShow {{DEFAULTSORT:0}} on info page
Fomafix [Wed, 24 Jun 2015 20:27:25 +0000 (20:27 +0000)]
Show {{DEFAULTSORT:0}} on info page

The info page of a page with {{DEFAULTSORT:0}} shows the page title
as default sort value.

Using empty() will consider the string '0' to be false, so use isset() instead.

Bug: T103745
Change-Id: I56ea5a38dcd33e822e0fc5b8685777fe1d212b22

8 years agoAdd more return types to Database class
addshore [Fri, 26 Jun 2015 14:47:58 +0000 (16:47 +0200)]
Add more return types to Database class

We expect these to be implemented and where
implemented we expect them to return these types.

This means when typehinting against Database
(Which is done throughout the code as we dont know
what DB we will eb using) warnings about void return
types will no longer be shown by static analysis stuff

Change-Id: I03d85560d9eb92d6df11dba8bc90339bf41cee8c

8 years agoMerge "Made text profiler output a bit less noisy by bumping "thresholdMs""
jenkins-bot [Fri, 26 Jun 2015 07:43:41 +0000 (07:43 +0000)]
Merge "Made text profiler output a bit less noisy by bumping "thresholdMs""

8 years agoMerge "database: Make LoadBalancer not yield DB objects that hopelessly lost the...
jenkins-bot [Fri, 26 Jun 2015 07:40:58 +0000 (07:40 +0000)]
Merge "database: Make LoadBalancer not yield DB objects that hopelessly lost the connection"

8 years agoMerge "database: Throw exceptions when dead mysql DB handles are used instead of...
jenkins-bot [Fri, 26 Jun 2015 07:36:32 +0000 (07:36 +0000)]
Merge "database: Throw exceptions when dead mysql DB handles are used instead of fatals"

8 years agoMade text profiler output a bit less noisy by bumping "thresholdMs"
Aaron Schulz [Mon, 22 Jun 2015 18:05:39 +0000 (11:05 -0700)]
Made text profiler output a bit less noisy by bumping "thresholdMs"

Change-Id: Ie66794c94fb3f6a3dc86ad604162b8e4f91c35ba

8 years agodatabase: Make LoadBalancer not yield DB objects that hopelessly lost the connection
Aaron Schulz [Fri, 26 Jun 2015 06:09:52 +0000 (23:09 -0700)]
database: Make LoadBalancer not yield DB objects that hopelessly lost the connection

* This is useful if the first slave picked went down and others
  can be used, especially in longer running scripts.
* A possible improvement to this would be to eventually allow
  retries by removing the bad handles from the load balancer,
  since isOpen() will never change from false. This would only
  be useful for very very long running CLI scripts and is
  probably an edge case for now.

Change-Id: Iecfc4004b4b2289907a4645b431de19198790d6c

8 years agodatabase: Throw exceptions when dead mysql DB handles are used instead of fatals
Aaron Schulz [Fri, 26 Jun 2015 05:58:23 +0000 (22:58 -0700)]
database: Throw exceptions when dead mysql DB handles are used instead of fatals

Bug: T103435
Change-Id: I75c4f3a950b3b333a289d0a6a41eb4f00c292121

8 years agoMerge "Made User::loadFromId() use READ_NORMAL by default"
jenkins-bot [Fri, 26 Jun 2015 06:21:23 +0000 (06:21 +0000)]
Merge "Made User::loadFromId() use READ_NORMAL by default"

8 years agoMerge "Fix some PHPCS issues"
jenkins-bot [Fri, 26 Jun 2015 05:44:31 +0000 (05:44 +0000)]
Merge "Fix some PHPCS issues"

8 years agoFix some PHPCS issues
Jackmcbarn [Fri, 26 Jun 2015 05:32:28 +0000 (01:32 -0400)]
Fix some PHPCS issues

Change-Id: I6289ce362f8dfde7baf2b665f082820898844973

8 years agomediawiki.ui: Add a new 'highlightColor' argument to .button-colors() instead of...
Prateek Saxena [Sun, 15 Mar 2015 23:27:21 +0000 (04:57 +0530)]
mediawiki.ui: Add a new 'highlightColor' argument to .button-colors() instead of using mix()

Results from mix() aren't the same as the ones in the specification.
Added the correct colors as variables

Change-Id: I43e9413fc8d195f897426eeadce44f9ece294706

8 years agoMerge "Fix-up for I2ac604d3c042d"
jenkins-bot [Fri, 26 Jun 2015 05:07:14 +0000 (05:07 +0000)]
Merge "Fix-up for I2ac604d3c042d"

8 years agoFix-up for I2ac604d3c042d
Ori Livneh [Fri, 26 Jun 2015 04:56:49 +0000 (21:56 -0700)]
Fix-up for I2ac604d3c042d

Log time until picked up.

Change-Id: I67310aa2fdbfcb8b1fd394f490ef4885cf596b0c

8 years agoMerge "mw.loader: Omit private modules from the request queue"
jenkins-bot [Fri, 26 Jun 2015 04:18:07 +0000 (04:18 +0000)]
Merge "mw.loader: Omit private modules from the request queue"

8 years agoregistration: 'FilterLogTypes' is a JSON object
Kunal Mehta [Fri, 26 Jun 2015 00:29:33 +0000 (17:29 -0700)]
registration: 'FilterLogTypes' is a JSON object

Change-Id: I01eb28b9d01db8e500e376db9296b4eee85854c1

8 years agoMade User::loadFromId() use READ_NORMAL by default
Aaron Schulz [Thu, 25 Jun 2015 20:03:43 +0000 (13:03 -0700)]
Made User::loadFromId() use READ_NORMAL by default

* This covers CentralAuthHooks::onUserLoadFromSession()
  among other cases (OAuth user loading, ect).

Bug: T92357
Change-Id: I9c90027d8852ff8c1d626c03b5dbd765b95b0ce1

8 years agoAdd new alias for movepage in Bosnian
Niklas Laxström [Thu, 25 Jun 2015 19:54:19 +0000 (21:54 +0200)]
Add new alias for movepage in Bosnian

Requested by Srdjan_m on IRC

Change-Id: Ied1505d6c3a583c938a20fd37c8175693fcb909c

8 years agoMerge "Localisation updates from https://translatewiki.net."
Translation updater bot [Thu, 25 Jun 2015 18:18:52 +0000 (18:18 +0000)]
Merge "Localisation updates from https://translatewiki.net."

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 25 Jun 2015 18:16:57 +0000 (20:16 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I97aeeac2ad64abd4a8017299f5a79e964155676a

8 years agoFix instances of preg_quote() without second parameter
Bartosz Dziewoński [Thu, 25 Jun 2015 17:43:56 +0000 (19:43 +0200)]
Fix instances of preg_quote() without second parameter

This might work in specific cases, depending on the string we're
quoting, but is never correct. The instance in SpecialAllMessages.php
was resulting in incorrect behavior (and log spam, T103879).

Searched for this regex: preg_quote\((?:\([^)]+?\)|[^,()])+?\)

Change-Id: Icc88775970f4927ddf953e5ad7c5c19d59491573

8 years agoRemove 'direction: ltr' from 'pre' styles
Bartosz Dziewoński [Thu, 25 Jun 2015 11:08:18 +0000 (13:08 +0200)]
Remove 'direction: ltr' from 'pre' styles

The 'direction' and 'unicode-bidi' rules must not be made default.
Right-to-left languages can use preformatted text too!

Follow-up to 054b1c9e3cd82ee96bb6ee2be3026497e5f9f099.

(Also linked T2260, which that commit fixed.)

Bug: T103780
Change-Id: Ieab6b1473e6ce0faed3617d11e57cd2b4f3ef6df

8 years agoMerge "Change "userright" to "user right""
jenkins-bot [Thu, 25 Jun 2015 10:26:02 +0000 (10:26 +0000)]
Merge "Change "userright" to "user right""

8 years agoMerge ""spellcheck" attribute for HTMLForm "text" and "textarea""
jenkins-bot [Thu, 25 Jun 2015 10:17:54 +0000 (10:17 +0000)]
Merge ""spellcheck" attribute for HTMLForm "text" and "textarea""

8 years agoMerge "Add a preposition for clarity"
jenkins-bot [Thu, 25 Jun 2015 08:08:36 +0000 (08:08 +0000)]
Merge "Add a preposition for clarity"

8 years agoMerge "Also support skin.json for updating JSON AutoloadClasses"
jenkins-bot [Thu, 25 Jun 2015 07:18:14 +0000 (07:18 +0000)]
Merge "Also support skin.json for updating JSON AutoloadClasses"

8 years agoMerge "Wrap lines in <pre> and .mw-code by default"
jenkins-bot [Thu, 25 Jun 2015 07:00:09 +0000 (07:00 +0000)]
Merge "Wrap lines in <pre> and .mw-code by default"

8 years agoMerge "Remove the strong formatting for 'revdelete-suppress'"
jenkins-bot [Thu, 25 Jun 2015 06:26:29 +0000 (06:26 +0000)]
Merge "Remove the strong formatting for 'revdelete-suppress'"

8 years agoAlso support skin.json for updating JSON AutoloadClasses
Matthew Flaschen [Fri, 12 Jun 2015 03:31:32 +0000 (23:31 -0400)]
Also support skin.json for updating JSON AutoloadClasses

Bug: T88194
Change-Id: Ib56680e6e0e983184e31c336dcac174922a86551

8 years agoWrap lines in <pre> and .mw-code by default
Timo Tijhof [Thu, 25 Jun 2015 04:38:10 +0000 (05:38 +0100)]
Wrap lines in <pre> and .mw-code by default

No longer create inline scrollbars and/or page-level scrollbarts
with the content escaping the skin container.

This used to be an option in SyntaxHighlighter Geshi (using enclose="div")
but it makes more sense to do by default.

Also move the 'direction' and 'unicode-bidi' rules that currently
live in SyntaxHighlighter extension. Make them the default instead.

Pre-wrap is supported by IE 8+, Firefox 3.5+, Chrome 1+, Opera 8+,
and Safari 3+.

Bug: T103780
Change-Id: Icd8b9bd56d6abc7b64c93e89541cf32c55cf7686

8 years agomediawiki.util: Remove use of deprecated $.isDomElement in test suite
Timo Tijhof [Thu, 25 Jun 2015 01:16:39 +0000 (02:16 +0100)]
mediawiki.util: Remove use of deprecated $.isDomElement in test suite

Follows-up 3fa4519b0ee0c0.

Fixes the warning that was output in all Jenkins builds:
> WARN: 'Use of "isDomElement" is deprecated.'

Change-Id: Ic4a1a22ff5b58d9e6181b4c8f9aaa07d83c27b5e

8 years ago[BREAKING CHANGE] Merge in VE's link input functionality to title widget
Ed Sanders [Sat, 13 Jun 2015 15:48:26 +0000 (16:48 +0100)]
[BREAKING CHANGE] Merge in VE's link input functionality to title widget

Major changes:
* Supports page images and descriptions
* Uses prefix search

Change-Id: Ib463e60cad9651eb338701279f370711ade6030b

8 years agoChange "userright" to "user right"
Amir E. Aharoni [Wed, 24 Jun 2015 22:22:15 +0000 (01:22 +0300)]
Change "userright" to "user right"

I don't see a reason to write it without a space.

Change-Id: I885685fbbead2583f25e7036e47f84b7c152d26e

8 years agoAdd a preposition for clarity
Amir E. Aharoni [Wed, 24 Jun 2015 21:16:38 +0000 (00:16 +0300)]
Add a preposition for clarity

Change-Id: I6a3e6b8e9d601d20f3e4c5907bca36d89f46834a

8 years agoMerge "$wgUseGzip had no effect"
jenkins-bot [Wed, 24 Jun 2015 21:00:16 +0000 (21:00 +0000)]
Merge "$wgUseGzip had no effect"

8 years agoMerge "resourceloader: Pass $context to getDependencies() in PHPUnit tests"
jenkins-bot [Wed, 24 Jun 2015 20:38:16 +0000 (20:38 +0000)]
Merge "resourceloader: Pass $context to getDependencies() in PHPUnit tests"

8 years agoresourceloader: Pass $context to getDependencies() in PHPUnit tests
Andrew Green [Mon, 22 Jun 2015 17:31:01 +0000 (13:31 -0400)]
resourceloader: Pass $context to getDependencies() in PHPUnit tests

Send the ResourceLoaderContext param in calls to getDependencies() in
PHPUnit tests for ResourceLoader. (This so an RL module in CentralNotice
can emit a warning when that parameter is not provided, and still pass
tests. Sending the parameter here will also be necessary when the parameter
is made non-optional in the future.)

Change-Id: I6033e03e2d8a46b4bd7f7a04ae13fd9f387ebd10

8 years agoMerge "Made ReplicatedBagOStuff wrapping the SQL class the default stash"
jenkins-bot [Wed, 24 Jun 2015 20:09:53 +0000 (20:09 +0000)]
Merge "Made ReplicatedBagOStuff wrapping the SQL class the default stash"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 24 Jun 2015 19:39:54 +0000 (21:39 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8e6299831393b366e9073856650fda2f72520826

8 years agoMade ReplicatedBagOStuff wrapping the SQL class the default stash
Aaron Schulz [Thu, 21 May 2015 19:05:39 +0000 (12:05 -0700)]
Made ReplicatedBagOStuff wrapping the SQL class the default stash

* To make this work, a slaveOnly flag was added to SqlBagOStuff
  and it no longer prunes expired items on get(), it just treats
  them as missing. The use of garbageCollect() for the writeFactory
  cache and the use of replace() on updates already makes this
  a non-issue.
* This also makes the default $wgMainStash non-bogus.

Bug: T88493
Change-Id: I9d1f31305e08430de29a3cd521cdb10a82dffd10

8 years agoobjectcache: Add tests for ReplicatedBagOStuff
Timo Tijhof [Wed, 24 Jun 2015 19:08:22 +0000 (20:08 +0100)]
objectcache: Add tests for ReplicatedBagOStuff

Fixed PHP runtime warnings:
> Declaration of ReplicatedBagOStuff::getMulti() should be compatible with BagOStuff.
> Declaration of ReplicatedBagOStuff::decr() should be compatible with BagOStuff.

Change-Id: Icf1a0bf2c30408c4a5bef2de0b69ae2162b234d5

8 years agoMerge "Revert r47388 / 8d9243cf3: Use Title::getLocalURL() for rel=canonical links"
jenkins-bot [Wed, 24 Jun 2015 16:05:11 +0000 (16:05 +0000)]
Merge "Revert r47388 / 8d9243cf3: Use Title::getLocalURL() for rel=canonical links"

8 years agoMerge "Add language Doteli (dty)"
jenkins-bot [Wed, 24 Jun 2015 13:03:58 +0000 (13:03 +0000)]
Merge "Add language Doteli (dty)"

8 years agoRevert r47388 / 8d9243cf3: Use Title::getLocalURL() for rel=canonical links
Ori Livneh [Wed, 24 Jun 2015 03:21:16 +0000 (20:21 -0700)]
Revert r47388 / 8d9243cf3: Use Title::getLocalURL() for rel=canonical links

Using relative links for <link rel=canonical> is a missed chance to signal the
preferred hostname and protocol for accessing our sites, which invites Google
(and other search engines) to guess, or to treat the request URL's hostname as
canonical. Compared to that, the number of bytes saved by using a relative link
is insubstantial.

Change-Id: I483b4425c1c14211e67bbb6e7ae077b7faa4ee25

8 years agoDocument that ParserCache::get() may be passed a WikiPage or Article
Kunal Mehta [Tue, 23 Jun 2015 21:57:52 +0000 (14:57 -0700)]
Document that ParserCache::get() may be passed a WikiPage or Article

This is terrible, but at least it is no longer lying.

Change-Id: Id1cc1616b60dbde45a12ce9a23b76282efd1c6a9

8 years agoConfigure logged in session length independently
Sam Smith [Sat, 21 Jun 2014 14:01:52 +0000 (15:01 +0100)]
Configure logged in session length independently

* Add the $wgExtendedLoginCookies configuration variable, which defines
  the set of login cookies that can have their lifetime configured
  independently
* Add the $wgExtendedLoginCookieExpiration configuration variable, which
  dictates when the extended lifetime login cookies expire
* Default $wgExtendedLoginCookieExpiration to null so that the current
  behaviour is unaffected

Bug: T68699
Change-Id: I0cc24524e4d7d9d1d21c9fa8a28c7c76b677b96c

8 years agoUpdate OOjs UI to v0.11.6
James D. Forrester [Tue, 23 Jun 2015 22:04:51 +0000 (15:04 -0700)]
Update OOjs UI to v0.11.6

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.11.6/History.md

Change-Id: Iec7f1cf857f2ca76a5287306780f1e7e47b49987

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 23 Jun 2015 18:54:09 +0000 (20:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0f85bdd122e4ce9f3e7b809b35aefc6aa2aacca3

8 years agoMerge "API: Change default continuation format for action=query"
jenkins-bot [Tue, 23 Jun 2015 18:40:09 +0000 (18:40 +0000)]
Merge "API: Change default continuation format for action=query"

8 years agoAdd RejectParserCacheValue hook
Ori Livneh [Tue, 23 Jun 2015 05:09:53 +0000 (22:09 -0700)]
Add RejectParserCacheValue hook

Add a new hook, 'RejectParserCacheValue', which allows extensions to reject an
otherwise-successful parser cache lookup. The intent is to allow extensions to
manage the eviction of archaic HTML output from the cache.

Change-Id: I660679a48c46608f859bd52b31d6a888aabcc9ac

8 years agoMerge "Set Southern Kurdish to use Kurdish ordered list style type"
jenkins-bot [Tue, 23 Jun 2015 11:35:48 +0000 (11:35 +0000)]
Merge "Set Southern Kurdish to use Kurdish ordered list style type"

8 years agoMerge "EditPage: Check $wgContentHandlerUseDB"
jenkins-bot [Tue, 23 Jun 2015 11:14:17 +0000 (11:14 +0000)]
Merge "EditPage: Check $wgContentHandlerUseDB"

8 years agoMerge "Hygiene: Use [i] instead of charAt(i) for string index access"
jenkins-bot [Tue, 23 Jun 2015 10:55:51 +0000 (10:55 +0000)]
Merge "Hygiene: Use [i] instead of charAt(i) for string index access"

8 years agoMerge "Added pre-emptive session renewal to avoid "random" submission errors"
jenkins-bot [Tue, 23 Jun 2015 10:51:21 +0000 (10:51 +0000)]
Merge "Added pre-emptive session renewal to avoid "random" submission errors"

8 years agoMerge "MediaWiki.php: Factor out tryNormaliseRedirect"
jenkins-bot [Tue, 23 Jun 2015 09:14:04 +0000 (09:14 +0000)]
Merge "MediaWiki.php: Factor out tryNormaliseRedirect"

8 years agoMerge "Implement wfGlobalCacheKey() for database-agnostic keys"
jenkins-bot [Tue, 23 Jun 2015 07:15:05 +0000 (07:15 +0000)]
Merge "Implement wfGlobalCacheKey() for database-agnostic keys"

8 years agoImplement wfGlobalCacheKey() for database-agnostic keys
Timo Tijhof [Tue, 23 Jun 2015 04:52:30 +0000 (05:52 +0100)]
Implement wfGlobalCacheKey() for database-agnostic keys

Some code paths abuse wfForeignMemcKey() for this purpose. This is semantically
incorrect and seems fragile. Also the empty second argument (for db-prefix) is
either misused or akwardly set to the empty string.

It also creates a namespace conflict between arbitrary application keys (from
the software) and any database names (from users). This commit reduces the
conflict surface down to a single key (namely, "global").

Also added unit tests to assert the implicit restrictions and
assumptions between these cache key functions are valid.

Change-Id: Ia0953b51005fe3de3b881dd1bd64c9d3c85e8c66

8 years agoMediaWiki.php: Factor out tryNormaliseRedirect
Timo Tijhof [Fri, 19 Jun 2015 19:56:36 +0000 (20:56 +0100)]
MediaWiki.php: Factor out tryNormaliseRedirect

This is in preparation for fixing T67402, which requires adding
logic inside this condition block. However the to-be-added code
will influences whether or not a redirect should be made.

In case a redirect is not made, it has to fall through to the next
'elseif' handler in MediaWiki::performRequest(), which is not possible
from inside the 'if' block.

Hence, move it out in a separate block and use a boolean return value
to communicate whether the case has been handled.

This also allows us to unit test this thing. Which is desperately
needed. Albeit ugly as it requires lots of mocking.

Change-Id: If3157f2ff1fd3ab2ca20a5d1f550d864ea62c493

8 years agoMerge "Rename WikiPage::isParserCacheUsed to WikiPage::shouldCheckParserCache"
jenkins-bot [Tue, 23 Jun 2015 04:14:15 +0000 (04:14 +0000)]
Merge "Rename WikiPage::isParserCacheUsed to WikiPage::shouldCheckParserCache"

8 years agoMerge "Suppress deprecation warnings in 'jquery.mwExtension.test'"
jenkins-bot [Tue, 23 Jun 2015 04:00:45 +0000 (04:00 +0000)]
Merge "Suppress deprecation warnings in 'jquery.mwExtension.test'"

8 years agoRename WikiPage::isParserCacheUsed to WikiPage::shouldCheckParserCache
Ori Livneh [Tue, 23 Jun 2015 03:38:43 +0000 (20:38 -0700)]
Rename WikiPage::isParserCacheUsed to WikiPage::shouldCheckParserCache

'isParserCachedUsed' implies that the parser cache usage has already occurred,
and obscures the true purpose of this method, which is to determine whether or
not the requested page *should* be looked up in the parser cache.

Only usage in extensions is in TextExtracts, which I changed to be both
backward- and forward-compatible in If5d5da8eab13.

Change-Id: I7de67937f0e57b1dffb466319192e4d400b867de

8 years agoSuppress deprecation warnings in 'jquery.mwExtension.test'
Timo Tijhof [Tue, 23 Jun 2015 02:39:36 +0000 (03:39 +0100)]
Suppress deprecation warnings in 'jquery.mwExtension.test'

Follows-up b0ee0c0.

Change-Id: I1e38ec9b7e822c177e038b2c83827a3910fe75ad

8 years agoDeclare .icc files to be binary in .gitattributes
Ori Livneh [Tue, 23 Jun 2015 03:48:58 +0000 (20:48 -0700)]
Declare .icc files to be binary in .gitattributes

Follows I2ae35ddad: TinyRGB support for JPG thumbnails.

Change-Id: Ib8e7a74a6bc7b6cfbc674c8e271faa35b1f1a3c7

8 years agoellapsed => elapsed
Ori Livneh [Tue, 23 Jun 2015 03:31:22 +0000 (20:31 -0700)]
ellapsed => elapsed

Also fix some files that don't end with a newline.

Change-Id: Id0672d685b929a5832b42f733dad49683536180a

8 years agoWikiPage::isParserCacheUsed: change 'oldid' to 'oldId'
Ori Livneh [Tue, 23 Jun 2015 03:26:48 +0000 (20:26 -0700)]
WikiPage::isParserCacheUsed: change 'oldid' to 'oldId'

Change-Id: Ic68206a1f276c9e5a5b09ed5e2b0422589dfa161

8 years agoHygiene: Use [i] instead of charAt(i) for string index access
Timo Tijhof [Mon, 22 Jun 2015 23:33:32 +0000 (00:33 +0100)]
Hygiene: Use [i] instead of charAt(i) for string index access

Was mostly this way for IE6 compatibility which is no longer
relevant for our JavaScript runtime.

Change-Id: I7c441c7b40f40bb2974c4da5ea9f7a87119e7462

8 years agoFix undeclared dependency on jquery.mwExtension
Ori Livneh [Mon, 22 Jun 2015 22:12:35 +0000 (15:12 -0700)]
Fix undeclared dependency on jquery.mwExtension

Since jquery.mwExtension is deprecated, fix the undeclared dependency by making
the module not depend on $.ucFirst rather than by declaring the dependency.

Change-Id: I32b57662464e7dde0f61d6875196764fb61dcfba

8 years agoMerge "Make proxy behaviour of detectServer() configurable"
jenkins-bot [Mon, 22 Jun 2015 22:00:06 +0000 (22:00 +0000)]
Merge "Make proxy behaviour of detectServer() configurable"

8 years agoMake proxy behaviour of detectServer() configurable
Gilles Dubuc [Mon, 22 Jun 2015 18:59:05 +0000 (20:59 +0200)]
Make proxy behaviour of detectServer() configurable

Bug: T75510
Change-Id: Ia6540962f8d913d925547189e101124f76d969c7

8 years agoMerge "Restore namespace-number keys in APIQuerySiteinfo siprop=namespaces"
jenkins-bot [Mon, 22 Jun 2015 19:08:25 +0000 (19:08 +0000)]
Merge "Restore namespace-number keys in APIQuerySiteinfo siprop=namespaces"

8 years agoMerge "Use Linker::linkKnown for some links to MediaWiki pages from navigation"
jenkins-bot [Mon, 22 Jun 2015 19:05:05 +0000 (19:05 +0000)]
Merge "Use Linker::linkKnown for some links to MediaWiki pages from navigation"

8 years agoMerge "Fix comment for grep in SpecialWantedfiles.php"
jenkins-bot [Mon, 22 Jun 2015 19:05:01 +0000 (19:05 +0000)]
Merge "Fix comment for grep in SpecialWantedfiles.php"

8 years agoMerge "Avoid undefined index on Special:Tags"
jenkins-bot [Mon, 22 Jun 2015 19:04:55 +0000 (19:04 +0000)]
Merge "Avoid undefined index on Special:Tags"

8 years agoMerge "Add LinkBatch to ImagePage for user pages in the file history"
jenkins-bot [Mon, 22 Jun 2015 19:04:48 +0000 (19:04 +0000)]
Merge "Add LinkBatch to ImagePage for user pages in the file history"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 22 Jun 2015 18:52:00 +0000 (20:52 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I414ed14d3d4e5a06c093eccd27ef73516239ac75

8 years agoMerge "Construct clean canonical URLs for wiki pages, ignoring request URL"
jenkins-bot [Mon, 22 Jun 2015 18:18:40 +0000 (18:18 +0000)]
Merge "Construct clean canonical URLs for wiki pages, ignoring request URL"

8 years agoConstruct clean canonical URLs for wiki pages, ignoring request URL
Ori Livneh [Mon, 22 Jun 2015 04:26:22 +0000 (21:26 -0700)]
Construct clean canonical URLs for wiki pages, ignoring request URL

Canonical URLs allow webmasters to indicate the preferred URL form for
accessing some content that can be reached via a multitude of URL patterns.
It is usually (but not always) distinct from the request URL, which may
feature things like aliases and session-specific query parameters.
We currently derive canonical URLs from request URLs, which is backwards:
it is the web application, not the client, that ought to know the canonical
way to refer to some content.

This patch ensures MediaWiki derives a clean canonical URL for all wiki
pages from the request context's title object and action.

For some assurance that this is the correct approach, see:
  http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

This Google blog post identifies Wikia as exemplary in its usage of canonical
URLs. Wikia disregards things like the requested revision ID (oldid=NNN) when
constructing the canonical URL. See, for example:
  http://fallout.wikia.com/wiki/Aqua_Pura_delivery_program?oldid=2171222

Wikia goes as far as canonicalizing the action=history to the page view URL.
I think that this is incorrect, because the history and info actions are not
views of the page content, but rather its associated metadata.

This affects all requests where "setArticleRelated" is true. This is typically
all urls that show content (title query, curid, oldid, diff), and all actions
thereof (edit, delete, purge, info, history etc.). It does not apply to
File pages and Special pages.

Bug: T67402
Change-Id: I1549ca056637981a0d751020c634b9fab387f7bc

8 years agoEditPage: Check $wgContentHandlerUseDB
Kunal Mehta [Sat, 20 Jun 2015 04:32:30 +0000 (21:32 -0700)]
EditPage: Check $wgContentHandlerUseDB

Reject any edits that attempt to change the content model of a page if
$wgContentHandlerUseDB is false.

Change-Id: Ic2e0ed8f74c3a54864793a457a452f72fe637f73

8 years agoTinyRGB support for JPG thumbnails
Gilles Dubuc [Mon, 15 Jun 2015 16:23:46 +0000 (18:23 +0200)]
TinyRGB support for JPG thumbnails

TinyRGB is an ICC profile released by Facebook under CC0.
It is designed to be fully compatible with sRGB.
It offers the vast advantages of being much smaller than sRGB,
as well as being free as in freedom (the sRGB profile found in the
majority of JPGs is copyrighted).

This change aims to provide the ability to swap sRGB for TinyRGB at
the time thumbnails are generated.

JPGs that use another ICC profile than sRGB or no profile at all are
unaffected.

Bug: T100976
Change-Id: I2ae35ddad4e8a82db8b9541974367dc76c884e7a

8 years agoMerge "Remove i18n references to Popularpages"
jenkins-bot [Mon, 22 Jun 2015 14:56:38 +0000 (14:56 +0000)]
Merge "Remove i18n references to Popularpages"

8 years agoMerge "Deprecate jquery.mwExtension"
jenkins-bot [Mon, 22 Jun 2015 13:58:39 +0000 (13:58 +0000)]
Merge "Deprecate jquery.mwExtension"

8 years agoMerge "Remove use of $.escapeRE in favour of mw.RegExp.escape"
jenkins-bot [Mon, 22 Jun 2015 13:58:36 +0000 (13:58 +0000)]
Merge "Remove use of $.escapeRE in favour of mw.RegExp.escape"

8 years agoMerge "Introduce mediawiki.RegExp module"
jenkins-bot [Mon, 22 Jun 2015 13:58:32 +0000 (13:58 +0000)]
Merge "Introduce mediawiki.RegExp module"

8 years agoRemove the strong formatting for 'revdelete-suppress'
Siebrand Mazeland [Mon, 22 Jun 2015 13:55:26 +0000 (15:55 +0200)]
Remove the strong formatting for 'revdelete-suppress'

Just came across this in the interface, and it drew my attention, but I
see no reason why this option is more or less important than 'watchthis'
or any other option.

Change-Id: I8fd2c27dea5f0822514b7ce78a9ad8ff2bbe42f4

8 years agoSet Southern Kurdish to use Kurdish ordered list style type
mjbmr [Mon, 22 Jun 2015 12:29:28 +0000 (12:29 +0000)]
Set Southern Kurdish to use Kurdish ordered list style type

* http://unicode.org/cldr/trac/ticket/8445

Follow-up to I9310a3b4a50c0b8ea6551d9f45e7a2e276a8a389

Change-Id: I6093494c4813b872323bb750cadfc024d6b5ed32

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 21 Jun 2015 17:27:55 +0000 (19:27 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I430a6c78fac98611b4a6c31b0a75ec42afeade41

8 years agoChange spaces to tabs
Vivek Ghaisas [Sat, 20 Jun 2015 20:42:40 +0000 (23:42 +0300)]
Change spaces to tabs

Bug: T103243
Change-Id: I145c056ef1b058c9c24b4a402ac9e7778b23e260

8 years agoExplicitly declare property visibility, remove use of var
Vivek Ghaisas [Sat, 20 Jun 2015 21:07:13 +0000 (00:07 +0300)]
Explicitly declare property visibility, remove use of var

Codesniffer says that the `var` keyword must not be used to declare a
property and that visibility must be declared on class properties.

Change-Id: I28240aa0f394588b1df315621dbcd260c51430c1

8 years agotests/phpunit/phpunit.php: Add @codingStandardsIgnore comment
Vivek Ghaisas [Sat, 20 Jun 2015 20:55:06 +0000 (23:55 +0300)]
tests/phpunit/phpunit.php: Add @codingStandardsIgnore comment

MediaWiki Codesniffer warns that "Silencing errors is discouraged".
Assuming this was done with good reason, this patch surrounds the
offending line with comments asking codesniffer to ignore the line.

Ironically, silencing errors about silencing errors.

Change-Id: Ib811b03b0a53735ce0da38bc8861ff38f9d1a666

8 years agomaintenance/exportSites: Fix minor whitespace issue
Vivek Ghaisas [Sat, 20 Jun 2015 20:49:49 +0000 (23:49 +0300)]
maintenance/exportSites: Fix minor whitespace issue

Opening parentheses should be followed by a single space.

Change-Id: I9d73334c3c79bf5277248c56e0f146a91938b35c

8 years ago$wgUseGzip had no effect
Seb35 [Sat, 20 Jun 2015 17:07:07 +0000 (19:07 +0200)]
$wgUseGzip had no effect

Since MediaWiki 1.24 a constructor is defined in HTMLFileCache,
so the constructor of the parent class, FileCacheBase, is no more
called, and $wgUseGzip is no more used. This fix explicitely calls
the parent constructor.

Bug: T103237
Change-Id: I80c1871881049b9618c23aa76e6665867ecec2aa

8 years agoRestore namespace-number keys in APIQuerySiteinfo siprop=namespaces
This, that and the other [Sat, 20 Jun 2015 12:24:31 +0000 (22:24 +1000)]
Restore namespace-number keys in APIQuerySiteinfo siprop=namespaces

Per discussion at the task.

Bug: T102645
Change-Id: Ic40f7fa3f5612b3d994cc01bcd0929545576041d

8 years agoRemove use of $.escapeRE in favour of mw.RegExp.escape
Timo Tijhof [Sat, 20 Jun 2015 06:17:23 +0000 (07:17 +0100)]
Remove use of $.escapeRE in favour of mw.RegExp.escape

Removes dependency on the generic jquery.mwExtension module I
wrote in 2011 which has rotten and contains largely unused utilities.

Change-Id: Id7025dc2be958840735f4a9a5b020bd876011740

8 years agoDeprecate jquery.mwExtension
Ori Livneh [Sat, 8 Mar 2014 11:36:52 +0000 (03:36 -0800)]
Deprecate jquery.mwExtension

* Deprecating per Krinkle's comment on PS2 of Ie5f0e7d1c.
* No usage in NS_MEDIAWIKI on Wikimedia wikis after these two edits:
  - https://www.mediawiki.org/w/index.php?diff=prev&oldid=923287
  - https://www.mediawiki.org/w/index.php?diff=prev&oldid=923290

Change-Id: Ifb57ae9643bfc652c385b271a73f51577186f2d2

8 years agoIntroduce mediawiki.RegExp module
Timo Tijhof [Sat, 20 Jun 2015 05:46:24 +0000 (06:46 +0100)]
Introduce mediawiki.RegExp module

Simple module based on the $.escapeRE method of the old
"jquery.mwExtension" module.

Change-Id: I9e108a3f8c24d87bb239b63a14807a691c25aa3e

8 years agoresourceloader: Small code cleanups to ResourceLoaderModule
Aaron Schulz [Thu, 18 Jun 2015 20:52:17 +0000 (13:52 -0700)]
resourceloader: Small code cleanups to ResourceLoaderModule

* Changed Exception => LogicException
* Broke some 100 char+ lines

Change-Id: I37bc72065cb567fdd9596f707facc27c6841c434

8 years agoRemove double str_replace( ' ', '_', $ ) when using LinkBatch
umherirrender [Fri, 19 Jun 2015 20:04:25 +0000 (22:04 +0200)]
Remove double str_replace( ' ', '_', $ ) when using LinkBatch

LinkBatch::add already handle the underscore/space part, that means it
is not need to do it on the caller side when adding user names to
LinkBatch

Change-Id: I09e80712903a539164141cc0a88d321203114677

8 years agoAdd LinkBatch to ImagePage for user pages in the file history
umherirrender [Fri, 19 Jun 2015 19:39:50 +0000 (21:39 +0200)]
Add LinkBatch to ImagePage for user pages in the file history

Each user in the file history trigger an own query to get the state of
the user page, talk page and gender information. Use a LinkBatch to
combine all of these queries to two (one for pages, one for gender).

Change-Id: Ic1973c1ccfa17002b343d8c0d110a7c1d20b0460

8 years agoAPI: Change default continuation format for action=query
Brad Jorsch [Sat, 13 Sep 2014 18:03:35 +0000 (14:03 -0400)]
API: Change default continuation format for action=query

The new format is much easier to use correctly, and should therefore be
the default. The old format is maintained for clients that need the
additional flexibility.

Bug: T96858
Change-Id: I984e63581f4ef23ccada916b6d45131d1fb5e001