Commit graph

38821 commits

Author SHA1 Message Date
jenkins-bot
f8ab4e5ffe Merge ""spellcheck" attribute for HTMLForm "text" and "textarea"" 2015-06-25 10:17:54 +00:00
jenkins-bot
3298f92a8b Merge "Add a preposition for clarity" 2015-06-25 08:08:36 +00:00
jenkins-bot
469f921fef Merge "Also support skin.json for updating JSON AutoloadClasses" 2015-06-25 07:18:14 +00:00
jenkins-bot
77111ce4f2 Merge "Remove the strong formatting for 'revdelete-suppress'" 2015-06-25 06:26:29 +00:00
Matthew Flaschen
2cb0f735e2 Also support skin.json for updating JSON AutoloadClasses
Bug: T88194
Change-Id: Ib56680e6e0e983184e31c336dcac174922a86551
2015-06-25 01:05:16 -04:00
Amir E. Aharoni
0774ee393e Add a preposition for clarity
Change-Id: I6a3e6b8e9d601d20f3e4c5907bca36d89f46834a
2015-06-25 00:16:38 +03:00
jenkins-bot
e678654487 Merge "$wgUseGzip had no effect" 2015-06-24 21:00:16 +00:00
jenkins-bot
799ca9856b Merge "Made ReplicatedBagOStuff wrapping the SQL class the default stash" 2015-06-24 20:09:53 +00:00
Translation updater bot
f3aa9bc0a7 Localisation updates from https://translatewiki.net.
Change-Id: I8e6299831393b366e9073856650fda2f72520826
2015-06-24 21:39:54 +02:00
Aaron Schulz
4825b4c08e 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
2015-06-24 19:37:03 +00:00
Timo Tijhof
0d98e9f2fb 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
2015-06-24 20:17:18 +01:00
Ori Livneh
6c3b7aa75f 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
2015-06-23 22:17:01 -07:00
Kunal Mehta
e4c41d5126 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
2015-06-24 01:21:10 +00:00
Sam Smith
16cea35d85 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
2015-06-23 19:31:20 -04:00
Translation updater bot
f31b5d3489 Localisation updates from https://translatewiki.net.
Change-Id: I0f85bdd122e4ce9f3e7b809b35aefc6aa2aacca3
2015-06-23 20:54:09 +02:00
jenkins-bot
ba9f387ecd Merge "API: Change default continuation format for action=query" 2015-06-23 18:40:09 +00:00
Ori Livneh
207dfd2adf 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
2015-06-23 11:23:57 -07:00
jenkins-bot
dae916558f Merge "EditPage: Check $wgContentHandlerUseDB" 2015-06-23 11:14:17 +00:00
jenkins-bot
8b04c0f0ae Merge "Added pre-emptive session renewal to avoid "random" submission errors" 2015-06-23 10:51:21 +00:00
jenkins-bot
0290b14a9c Merge "MediaWiki.php: Factor out tryNormaliseRedirect" 2015-06-23 09:14:04 +00:00
jenkins-bot
a72247699b Merge "Implement wfGlobalCacheKey() for database-agnostic keys" 2015-06-23 07:15:05 +00:00
Timo Tijhof
0f64b61271 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
2015-06-23 07:52:18 +01:00
Timo Tijhof
64431fcf8e 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
2015-06-23 07:18:35 +01:00
Ori Livneh
b0a79e9245 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
2015-06-22 20:55:34 -07:00
Ori Livneh
c099155a17 ellapsed => elapsed
Also fix some files that don't end with a newline.

Change-Id: Id0672d685b929a5832b42f733dad49683536180a
2015-06-23 03:32:33 +00:00
Ori Livneh
0586f3a44a WikiPage::isParserCacheUsed: change 'oldid' to 'oldId'
Change-Id: Ic68206a1f276c9e5a5b09ed5e2b0422589dfa161
2015-06-23 03:29:08 +00:00
jenkins-bot
f8ebb995b0 Merge "Make proxy behaviour of detectServer() configurable" 2015-06-22 22:00:06 +00:00
Gilles Dubuc
b276829806 Make proxy behaviour of detectServer() configurable
Bug: T75510
Change-Id: Ia6540962f8d913d925547189e101124f76d969c7
2015-06-22 21:19:22 +02:00
jenkins-bot
f6d42e3e4f Merge "Restore namespace-number keys in APIQuerySiteinfo siprop=namespaces" 2015-06-22 19:08:25 +00:00
jenkins-bot
2423f74d6e Merge "Use Linker::linkKnown for some links to MediaWiki pages from navigation" 2015-06-22 19:05:05 +00:00
jenkins-bot
6a35b1f500 Merge "Fix comment for grep in SpecialWantedfiles.php" 2015-06-22 19:05:01 +00:00
jenkins-bot
195f7096c7 Merge "Avoid undefined index on Special:Tags" 2015-06-22 19:04:55 +00:00
jenkins-bot
d68a94c735 Merge "Add LinkBatch to ImagePage for user pages in the file history" 2015-06-22 19:04:48 +00:00
Translation updater bot
c5a445f9b7 Localisation updates from https://translatewiki.net.
Change-Id: I414ed14d3d4e5a06c093eccd27ef73516239ac75
2015-06-22 20:52:00 +02:00
jenkins-bot
2a25c8ad7d Merge "Construct clean canonical URLs for wiki pages, ignoring request URL" 2015-06-22 18:18:40 +00:00
Ori Livneh
ade24dadcd 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
2015-06-22 18:45:34 +01:00
Kunal Mehta
ed8ef675aa EditPage: Check $wgContentHandlerUseDB
Reject any edits that attempt to change the content model of a page if
$wgContentHandlerUseDB is false.

Change-Id: Ic2e0ed8f74c3a54864793a457a452f72fe637f73
2015-06-22 09:51:52 -07:00
Gilles Dubuc
584a239318 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
2015-06-22 16:17:54 +00:00
Siebrand Mazeland
84c620bb94 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
2015-06-22 15:55:26 +02:00
Translation updater bot
cd618c1bfd Localisation updates from https://translatewiki.net.
Change-Id: I430a6c78fac98611b4a6c31b0a75ec42afeade41
2015-06-21 19:27:55 +02:00
Vivek Ghaisas
ec02aba4c0 Change spaces to tabs
Bug: T103243
Change-Id: I145c056ef1b058c9c24b4a402ac9e7778b23e260
2015-06-21 10:00:58 +03:00
Seb35
ad0d70fd52 $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
2015-06-20 19:07:07 +02:00
This, that and the other
f0d6c2bf9f Restore namespace-number keys in APIQuerySiteinfo siprop=namespaces
Per discussion at the task.

Bug: T102645
Change-Id: Ic40f7fa3f5612b3d994cc01bcd0929545576041d
2015-06-20 22:24:31 +10:00
Aaron Schulz
03c1d480a7 resourceloader: Small code cleanups to ResourceLoaderModule
* Changed Exception => LogicException
* Broke some 100 char+ lines

Change-Id: I37bc72065cb567fdd9596f707facc27c6841c434
2015-06-20 04:01:42 +01:00
umherirrender
b4068ae922 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
2015-06-19 22:04:25 +02:00
umherirrender
79c44dd0a6 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
2015-06-19 21:53:02 +02:00
Brad Jorsch
9c7385b8ad 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
2015-06-19 15:13:21 -04:00
jenkins-bot
352656b319 Merge "Fix some line indent of string concat" 2015-06-19 19:10:54 +00:00
jenkins-bot
f7ab1be261 Merge "Uncomment wfDeprecated call from I6ccd4df" 2015-06-19 19:09:40 +00:00
umherirrender
6b24d10b6d Fix some line indent of string concat
Change-Id: I5883c9cd57d106168648b4502051b4b49046fea2
2015-06-19 20:52:43 +02:00