lhc/web/wiklou.git
10 years agoMerge "Allow adding Deleted log entries"
jenkins-bot [Fri, 30 May 2014 21:58:54 +0000 (21:58 +0000)]
Merge "Allow adding Deleted log entries"

10 years agoSave advanced search namespace prefs on Special:Search itself
Nemo bis [Tue, 6 May 2014 16:33:04 +0000 (18:33 +0200)]
Save advanced search namespace prefs on Special:Search itself

* Checkbox on own row below power search checkboxes per MatmaRex;
  avoiding a mw-search-ns* id leaves it untouched by All/None JS.
* The option searcheverything is removed: a "shortcut" which is no
  longer necessary now that options can be (un)selected at once
  with All/None buttons on search page itself.
* Require a token for saving: no accidental preferences changes.
* Keep the searchoptions/advancedsearchoptions prefs section in case
  something is using it (no known extension does though); options
  are converted to "api" type so it's empty and hidden by default.
* Add minimal documentation for saveSettings() and friends
  (@todo since 155ddf6de, 2009!).

Bug: 52817
Change-Id: I514cee835988600cc013658049e88a10b670e64a

10 years agoMerge "Fixed fatal in SwiftFileBackend when a bogus HTTP status is given"
jenkins-bot [Fri, 30 May 2014 21:01:02 +0000 (21:01 +0000)]
Merge "Fixed fatal in SwiftFileBackend when a bogus HTTP status is given"

10 years agoFixed fatal in SwiftFileBackend when a bogus HTTP status is given
Aaron Schulz [Fri, 30 May 2014 18:48:14 +0000 (11:48 -0700)]
Fixed fatal in SwiftFileBackend when a bogus HTTP status is given

* Error was "Fatal error: Call to a member function getSize() on a non-object"

Change-Id: Id1a1b1add9daee4402b2ed017b95c9a9f0e08170

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 30 May 2014 18:33:58 +0000 (18:33 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I2ac98863fc1326e9eae37272a19a7174d80a8822

10 years agoAdd PPFrame::isVolatile and PPFrame::setVolatile
Brad Jorsch [Fri, 6 Dec 2013 23:28:09 +0000 (18:28 -0500)]
Add PPFrame::isVolatile and PPFrame::setVolatile

Most wikitext is safe to parse once and then cache for when that same
wikitext is used again, such as for multiple transclusions of the same
template within a page. There are occasions, though, where some piece of
wikitext has side effects and so should not be cached; a prominent
example of such wikitext is the <ref> and <references> tags in Cite.php.

This change adds PPFrame::setVolatile so parser hooks such as <ref> and
<references> can indicate that they have done something that should not
be cached, and PPFrame::isVolatile so that callers of PPFrame::expand
can know when to avoid caching.

Bug: 46815
Bug: 31834
Change-Id: I95b3cf8781cf047cdb63da221cef45f3e7d1632e

10 years agoMerge "Reduce some code duplication"
jenkins-bot [Fri, 30 May 2014 17:48:45 +0000 (17:48 +0000)]
Merge "Reduce some code duplication"

10 years agoRelease notes for Ie32cc54a
Bartosz Dziewoński [Fri, 30 May 2014 17:09:43 +0000 (19:09 +0200)]
Release notes for Ie32cc54a

Change-Id: I93d2dce7705b8855819ba0a816b2dc39fdeb3e38

10 years agoMerge "PostgreSQL: Only rollback when in a transaction"
jenkins-bot [Fri, 30 May 2014 16:27:44 +0000 (16:27 +0000)]
Merge "PostgreSQL: Only rollback when in a transaction"

10 years agoMerge "Fix typo"
jenkins-bot [Fri, 30 May 2014 16:20:43 +0000 (16:20 +0000)]
Merge "Fix typo"

10 years agoPostgreSQL: Only rollback when in a transaction
Jeff [Fri, 30 May 2014 06:42:41 +0000 (23:42 -0700)]
PostgreSQL: Only rollback when in a transaction

SQL errors would issue a rollback, even when it was
not actually in a transactions.  Doing so would cause
another error to be reported.  This could obscure the
original error, particularly during unit tests.

Fix this by not rolling back when not in a transaction.

Bug: 58095
Change-Id: Ib5220e37dd6c364feee6b7f8e7ecbdae2a2e0ba1

10 years agomediawiki.special.unwatchedPages: Use closest() instead of parents()
Timo Tijhof [Fri, 30 May 2014 05:24:27 +0000 (07:24 +0200)]
mediawiki.special.unwatchedPages: Use closest() instead of parents()

Follows-up Ie32cc54abb6f.

While it is unlikely that this item will ever end up being nested
inside another list, it is semantically incorrect and also
quite a bit slower to use parents() here.

parents() collects all ancestors between this node and the <html>
document element (each and every one of the elements in between),
and then, if a selector (e.g. "li") is supplied, it reduces that
set to only <li> elements. This can be more than one if your list
is a nested list (whether a plain sublist, or perhaps many levels
apart, e.g. part of the skin layout or whatever).

This one is slower (traverses all the way up) and creates two
collections (all ancestors, then filtered down).

closest(), as the name implies, always requires a selector and
traverses only up to the first match and then returns.

This one is faster (traverses only once and not all the way).

A 1:1 (closest) vs. a 1:many (parents) relationship.

Change-Id: I1cd9a4638285aeab4b5d538072e598601eb475b6

10 years agoMerge "PostgreSQL: Support table prefixes"
jenkins-bot [Fri, 30 May 2014 02:57:05 +0000 (02:57 +0000)]
Merge "PostgreSQL: Support table prefixes"

10 years agoMerge "Restrict empty-frame cache entries to their parent"
jenkins-bot [Fri, 30 May 2014 01:43:02 +0000 (01:43 +0000)]
Merge "Restrict empty-frame cache entries to their parent"

10 years agoRestrict empty-frame cache entries to their parent
Jackmcbarn [Thu, 29 May 2014 00:54:55 +0000 (20:54 -0400)]
Restrict empty-frame cache entries to their parent

Remove the parser's global $mTplExpandCache, and replace it with an
alternative that is separated by parent frame. This allows the integrity
of the empty-frame expansion cache to be maintained while also allowing
parent frame access.

A page with 3 copies of
http://ja.wikipedia.org/wiki/%E4%B8%AD%E5%A4%AE%E7%B7%9A_(%E9%9F%93%E5%9B%BD)
has the following statistics: Without this change, there are 4625 cache hits
on this page, and a sample of 3 parses took 16.6, 16.9, and 16.8 seconds.
With this change, there are 2588 cache hits, and a sample of 3 parses took
16.7, 16.7, and 17.0 seconds.

Change-Id: I621e9075e0f136ac188a4d2f53418b7cc957408d

10 years agoMerge "jquery.suggestions: Handle CSS ellipsis better for IE"
jenkins-bot [Thu, 29 May 2014 22:24:13 +0000 (22:24 +0000)]
Merge "jquery.suggestions: Handle CSS ellipsis better for IE"

10 years agoPostgreSQL: Support table prefixes
Jeff [Thu, 29 May 2014 06:28:04 +0000 (23:28 -0700)]
PostgreSQL: Support table prefixes

PostgreSQL is usually not used with table name prefixes,
and some of the PostgreSQL-specific code took the
shortcut of not dealing with prefixes.  However, the PHPUnit
tests do force a prefix to be used, exposing this limitation.

Make PostgreSQL code add the prefix to table names being used
in FOR UPDATE OF clause.

This fixes 13 of the 17 PostgreSQL unit tests errors against
git HEAD:

EditPageTest::testAutoMerge with data set #1 ('Elmo', 'one
EditPageTest::testAutoMerge with data set #2 ('Elmo', 'Intro
EditPageTest::testAutoMerge with data set #3 ('Adam', 'one
EditPageTest::testAutoMerge with data set #4 ('Adam', 'one
EditPageTest::testAutoMerge with data set #5 ('Adam', 'Intro
EditPageTest::testAutoMerge with data set #6 ('Berta', 'one
EditPageTest::testAutoMerge with data set #7 ('Berta', 'one
EditPageTest::testAutoMerge with data set #8 ('Berta', 'Intro
WikiPageTest::testDoEdit
WikiPageTest::testDoEditContent
WikiPageTest::testDoRollback
WikiPageTest::testDoRollbackFailureSameContent
WikiPageTest::testExists

The change also applies to 1.22.6 and fixes several unit tests
errors there.

Change-Id: I054690f49e250cadd2dc2a6d9e20dea879d896b6

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 29 May 2014 19:25:00 +0000 (19:25 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I4b2468b880c571df42a99f1a61bc452fc7c66567

10 years agoHide toc caption on print when collapsed
Fomafix [Thu, 29 May 2014 18:40:06 +0000 (18:40 +0000)]
Hide toc caption on print when collapsed

Increase specificity of the CSS selector to re-enable this function.

Bug: 482
Change-Id: I0157884c30e1a0e5624b65aa06b2c5db666dc064

10 years agoMerge "SECURITY: Don't parse usernames as wikitext"
jenkins-bot [Thu, 29 May 2014 17:33:43 +0000 (17:33 +0000)]
Merge "SECURITY: Don't parse usernames as wikitext"

10 years agoMerge "Add hash_equals() fallback and use it"
jenkins-bot [Thu, 29 May 2014 17:29:08 +0000 (17:29 +0000)]
Merge "Add hash_equals() fallback and use it"

10 years agoSECURITY: Don't parse usernames as wikitext
csteipp [Mon, 19 May 2014 19:00:57 +0000 (12:00 -0700)]
SECURITY: Don't parse usernames as wikitext

On Special:PasswordReset, don't parse the username as wikitext since
the wikitext is parsed according to the wiki's configuration (might
include wgRawHtml), and the wiki may be private.

Bug: 65501
Change-Id: Ic3e5d42e1be5acc42ba89ae853c5ecbfec04fa91

10 years agoMerge "Allow media handlers to mark files as expensive"
jenkins-bot [Thu, 29 May 2014 09:02:13 +0000 (09:02 +0000)]
Merge "Allow media handlers to mark files as expensive"

10 years agoMerge "Update OOjs UI to v0.1.0-pre (09b223d279)"
jenkins-bot [Thu, 29 May 2014 01:42:17 +0000 (01:42 +0000)]
Merge "Update OOjs UI to v0.1.0-pre (09b223d279)"

10 years agoMerge "Add border and background styling to the Parsoid styles for images"
jenkins-bot [Thu, 29 May 2014 01:41:09 +0000 (01:41 +0000)]
Merge "Add border and background styling to the Parsoid styles for images"

10 years agoUpdate OOjs UI to v0.1.0-pre (09b223d279)
James D. Forrester [Thu, 29 May 2014 01:37:16 +0000 (18:37 -0700)]
Update OOjs UI to v0.1.0-pre (09b223d279)

New changes:
09b223d StackLayout: Clean up inconsistent event firing and documentation

Change-Id: I1297880400f776bcf73753ef31ae613f0fcb0ad4

10 years agoAdd border and background styling to the Parsoid styles for images
Roan Kattouw [Thu, 29 May 2014 01:32:10 +0000 (18:32 -0700)]
Add border and background styling to the Parsoid styles for images

Without these, framed images aren't actually framed in the Parsoid HTML.

Change-Id: Ie19f1c9b4652562aef1a92de8c52c484c4407c95

10 years agoAdd hash_equals() fallback and use it
Kevin Israel [Sun, 13 Apr 2014 17:11:18 +0000 (13:11 -0400)]
Add hash_equals() fallback and use it

Two classes (User and SpecialRunJobs) currently contain string
equality checks that purport to be timing-attack resistant.

Reduce code duplication by adding and using a fallback for the
hash_equals() function from PHP 5.6 (currently in beta), in a way
addressing the comment "@todo: make a common method for this".

Change-Id: Iece006ec0216edb3fc5fbef7cc6ec00a6d182775

10 years agoMerge "Reorganize commonPrint.css"
jenkins-bot [Wed, 28 May 2014 23:07:50 +0000 (23:07 +0000)]
Merge "Reorganize commonPrint.css"

10 years agoReorganize commonPrint.css
Waldir Pimenta [Mon, 29 Oct 2012 19:14:19 +0000 (19:14 +0000)]
Reorganize commonPrint.css

- Group related rulesets together
- Harmonize comment headers for group rulesets
  and make them more visible for improved navigation

Change-Id: Ie9928e8fe566c3907fcc2b2790f2e0a15ffd0436

10 years agoMerge "Add SelfLinkBeginHook"
jenkins-bot [Wed, 28 May 2014 22:07:37 +0000 (22:07 +0000)]
Merge "Add SelfLinkBeginHook"

10 years agojquery.suggestions: Handle CSS ellipsis better for IE
Bartosz Dziewoński [Sun, 25 May 2014 12:09:10 +0000 (14:09 +0200)]
jquery.suggestions: Handle CSS ellipsis better for IE

IE is not impressed by our puny hacks and still reports the width
"in context of" the position in the document, limited by the width
of ancestor elements.

Let's temporarily apply position: absolute; to the involved elements.
This pulls them out of normal document flow and lets us figure out the
real width at last.

Also wrote a proper comment on why we need this stuff.

Verified that this fixes:
* IE 8
* IE 11

Verified that it doesn't break:
* Firefox 3.6
* Firefox 29
* Opera 12
* Opera 22

It *does not* fix IE 6. I don't think that investigating why is a good
use of my time, so I didn't. I84fbae5a made the functionality usable
on IE 6, which feels good enough for me.

Bug: 65224
Change-Id: I4a7357543ca244585ade2061b92f5a6d1e439278

10 years agoMerge "Skin: Remove dried up remains of Standard/Classic skin"
jenkins-bot [Wed, 28 May 2014 20:58:22 +0000 (20:58 +0000)]
Merge "Skin: Remove dried up remains of Standard/Classic skin"

10 years agoMerge "mediawiki.searchSuggest: Show full article title as a tooltip for each suggestion"
jenkins-bot [Wed, 28 May 2014 20:57:13 +0000 (20:57 +0000)]
Merge "mediawiki.searchSuggest: Show full article title as a tooltip for each suggestion"

10 years agoAllow media handlers to mark files as expensive
Gergő Tisza [Tue, 27 May 2014 20:09:49 +0000 (20:09 +0000)]
Allow media handlers to mark files as expensive

Allows media handlers to signal that thumbnail generation
for this file is expensive and should be throttled more agressively.
For now this is only done for large TIFF files.

Bug: 65691
Change-Id: I01b34a1d46745649f179fdee435a8cfb19c5474e

10 years agoMerge "Adding header font change to release notes for 1.24"
kaldari [Wed, 28 May 2014 20:22:57 +0000 (20:22 +0000)]
Merge "Adding header font change to release notes for 1.24"

10 years agoSkin: Remove dried up remains of Standard/Classic skin
Bartosz Dziewoński [Mon, 26 May 2014 10:27:02 +0000 (12:27 +0200)]
Skin: Remove dried up remains of Standard/Classic skin

Change-Id: I70a35cbe0d17bf8d35bbe04b1254ee0d6ce0accd

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 28 May 2014 19:22:35 +0000 (19:22 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I4d2d181fa0ccda0dd781008d4ed0e68103de451a

10 years agoMerge "Correctly parse 'redirect' XML tag during Special:Import."
jenkins-bot [Wed, 28 May 2014 18:56:40 +0000 (18:56 +0000)]
Merge "Correctly parse 'redirect' XML tag during Special:Import."

10 years agovector: Add tabindex back to search box
Alex Monk [Sat, 24 May 2014 15:22:01 +0000 (16:22 +0100)]
vector: Add tabindex back to search box

Another regression, this time in Iaea60834. This brings back the
implementation as it was originally before I220057c799bef7e removed it as
part of the collapsibleNav module.

Bug: 29199
Change-Id: I3f29c3d80e43b9df16b397fff3dc983dc60652a7

10 years agoAdded BeforeHttpsRedirect hook allowing extensions to cancel forceHTTPS
Yuri Astrakhan [Mon, 12 May 2014 20:05:00 +0000 (16:05 -0400)]
Added BeforeHttpsRedirect hook allowing extensions to cancel forceHTTPS

For ZERO, we need to be able to avoid forceHTTPS from taking place in
case user logged in while on wifi, and later switched to
zero.wikipedia.org for the carrier who doesn't support HTTPS.
In that case, the extension will need to be able to cancel redirect
and force regular HTTP handling.

Open Question: should this code log off user in case hook returns false?

Bug 65567

Change-Id: If04c83066c5d47b3c04ad7674e3c4e95a4cd464b

10 years agoAdd release notes for Ie3f7273c
Brad Jorsch [Wed, 28 May 2014 16:12:59 +0000 (12:12 -0400)]
Add release notes for Ie3f7273c

Change-Id: Id39c4d779d138493a2a7a1db2cc4388b125e5bb5

10 years agoAllow filtering log entries by namespace (API)
Jackmcbarn [Sat, 24 May 2014 23:21:33 +0000 (19:21 -0400)]
Allow filtering log entries by namespace (API)

Add parameter lenamespace to the API, allowing filtering of log entries by
namespace.

Change-Id: I53c4c6411e0b9e6383969afced0e4c193f1b64a1

10 years agoCorrectly parse 'redirect' XML tag during Special:Import.
Sebastian Brückner [Mon, 19 May 2014 12:23:32 +0000 (14:23 +0200)]
Correctly parse 'redirect' XML tag during Special:Import.

Bug: 65481
Change-Id: Id9b3b7878b2e7b6fc7a06b163e5bac60e700490e

10 years agoTweaked HTMLCacheUpdate immediate run treshold
Aaron Schulz [Tue, 27 May 2014 17:36:04 +0000 (10:36 -0700)]
Tweaked HTMLCacheUpdate immediate run treshold

Change-Id: I123c27862821e01fe232f55d984905fcda2a2498

10 years agoReduce Title::invalidateCache contention a bit
Aaron Schulz [Tue, 27 May 2014 18:21:07 +0000 (11:21 -0700)]
Reduce Title::invalidateCache contention a bit

* Lots of deadlocks seems to happen on page deletion,
  where the ID is likely 0 (this also has the worst locks)

bug: 37519
Change-Id: I028783a998946615b93e1425c6f69e00afd7b1bb

10 years agoAdd Composer managed libraries
Bryan Davis [Fri, 21 Mar 2014 04:10:46 +0000 (22:10 -0600)]
Add Composer managed libraries

This is the initial step towards implementing the Structured logging RFC
[0].

The Psr\Log library is declared as a requirement in the composer.json
file and Monolog is suggested as a package that can enhance MediaWiki.

To use this in a local checkout:
* Install composer [1]
* `composer update`
* `composer require monolog/monolog 1.9.*`
* `composer dump-autoload --optimize`
* `git update-index --assume-unchanged composer.json`

Additional work will be needed to provide both the Psr\Log and Monolog
libraries available for deployment to the Wikimedia Foundation servers.
The Psr\Log library will also need to be packaged in the release
tarballs.

[0]: https://www.mediawiki.org/wiki/Requests_for_comment/Structured_logging
[1]: https://getcomposer.org/doc/00-intro.md#installation-nix

See also: I1431b24 (Monolithic implementation)

Change-Id: Ie667944416187cfd2ae6016c9e2fa28f4204bcd7

10 years agoMerge "Add missing possible errors to ApiRollback.php"
jenkins-bot [Wed, 28 May 2014 00:25:02 +0000 (00:25 +0000)]
Merge "Add missing possible errors to ApiRollback.php"

10 years agoAdd SelfLinkBeginHook
cicalese [Sun, 6 Apr 2014 02:06:43 +0000 (22:06 -0400)]
Add SelfLinkBeginHook

Called before a link to the current article is displayed to allow the display
of the link to be customized.

Bug: 63592
Change-Id: I343e1b1b08ec841d22a1b22bcb8af43bb65a5a50

10 years agoUpdate OOjs UI to v0.1.0-pre (7b283a9dcc)
James D. Forrester [Tue, 27 May 2014 22:41:46 +0000 (15:41 -0700)]
Update OOjs UI to v0.1.0-pre (7b283a9dcc)

New changes:
71d9671 Add more Agora dialogs styling
457a0ef Localisation updates from https://translatewiki.net.
c92ba96 Compute directionality for frame correctly
f3414b8 Localisation updates from https://translatewiki.net.
90fbb6f Localisation updates from https://translatewiki.net.
1d4d52a Localisation updates from https://translatewiki.net.
08d1c7b Add ability to put a header at the top of a toolGroup pop-up

Change-Id: I6f4adbca80abeec0931380233e0e45a9f45af330

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 27 May 2014 19:50:28 +0000 (19:50 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I1ac7593bbc66a78e74a62ea03bab4fd105728a28

10 years agoMerge "Remove Vector from the default LESS import path"
jenkins-bot [Tue, 27 May 2014 19:17:49 +0000 (19:17 +0000)]
Merge "Remove Vector from the default LESS import path"

10 years agoRemove Vector from the default LESS import path
Daniel Friesen [Fri, 9 May 2014 15:18:45 +0000 (08:18 -0700)]
Remove Vector from the default LESS import path

When Ia193571a added Vector to core for VectorBeta's benefit it introduced
a regression that broke all skins that used imports like 'variables.less'
which happen to match a filename used by Vector.

These paths aren't supposed to be exposed anyway, and VectorBeta has been
fixed to no longer rely on this.

Bug: 64595
Change-Id: Iee47bdc23630e02ccfcbd28496ec5268892eb629

10 years agoMerge "Enable mediawiki.skinning.content.parsoid on Mobile target too"
jenkins-bot [Tue, 27 May 2014 19:05:17 +0000 (19:05 +0000)]
Merge "Enable mediawiki.skinning.content.parsoid on Mobile target too"

10 years agoMerge "Remove "Help/Project" profile from Special:Search"
jenkins-bot [Tue, 27 May 2014 18:54:09 +0000 (18:54 +0000)]
Merge "Remove "Help/Project" profile from Special:Search"

10 years agoMerge "Remove silly 'm' prefix from StubObject/DeprecatedGlobal members"
jenkins-bot [Tue, 27 May 2014 18:53:00 +0000 (18:53 +0000)]
Merge "Remove silly 'm' prefix from StubObject/DeprecatedGlobal members"

10 years agoMerge "Move Modern and CologneBlue out of core"
jenkins-bot [Tue, 27 May 2014 18:51:46 +0000 (18:51 +0000)]
Merge "Move Modern and CologneBlue out of core"

10 years agoEnable mediawiki.skinning.content.parsoid on Mobile target too
James D. Forrester [Tue, 27 May 2014 18:41:38 +0000 (11:41 -0700)]
Enable mediawiki.skinning.content.parsoid on Mobile target too

Bug: 65823
Change-Id: Iee2e3d00576556418c666d393e8935f75801326c

10 years agoMerge "Introduce ContentHandler::exportTransform()"
jenkins-bot [Tue, 27 May 2014 18:31:05 +0000 (18:31 +0000)]
Merge "Introduce ContentHandler::exportTransform()"

10 years agoMove Modern and CologneBlue out of core
jrobson [Thu, 20 Mar 2014 22:10:05 +0000 (15:10 -0700)]
Move Modern and CologneBlue out of core

Import in the new repositories:

- Modern: I5348fedddf14affcee2688833f4e759e5af6499c
- CologneBlue: I9cc051f48074a033c684e5efa56a7b4dde51d366

Change-Id: I65768b4c29faf46895a7005a3090f43cf6e86258

10 years agoMerge "Introduce ContentHandler::importTransform."
jenkins-bot [Tue, 27 May 2014 18:26:19 +0000 (18:26 +0000)]
Merge "Introduce ContentHandler::importTransform."

10 years agoMerge "Cleaned up database reconnection logic"
jenkins-bot [Tue, 27 May 2014 18:17:02 +0000 (18:17 +0000)]
Merge "Cleaned up database reconnection logic"

10 years agoMerge "Installer: output css correctly when session errors occur"
jenkins-bot [Tue, 27 May 2014 18:15:37 +0000 (18:15 +0000)]
Merge "Installer: output css correctly when session errors occur"

10 years agoMerge "Use language from context in Skin::subPageSubtitle"
jenkins-bot [Tue, 27 May 2014 17:39:08 +0000 (17:39 +0000)]
Merge "Use language from context in Skin::subPageSubtitle"

10 years agoMerge "Add ar_text to the list from Revision::selectArchiveFields(). It is checked...
jenkins-bot [Tue, 27 May 2014 16:00:14 +0000 (16:00 +0000)]
Merge "Add ar_text to the list from Revision::selectArchiveFields(). It is checked later."

10 years agoMerge "Fix docs on File::getImageSize() they were very misleading"
jenkins-bot [Tue, 27 May 2014 14:53:08 +0000 (14:53 +0000)]
Merge "Fix docs on File::getImageSize() they were very misleading"

10 years agoMerge "Revert more visibility changes in HistoryBlob.php"
jenkins-bot [Tue, 27 May 2014 14:50:51 +0000 (14:50 +0000)]
Merge "Revert more visibility changes in HistoryBlob.php"

10 years agoMerge "Don't use isset() to check for null"
jenkins-bot [Tue, 27 May 2014 14:50:29 +0000 (14:50 +0000)]
Merge "Don't use isset() to check for null"

10 years agoAdd ar_text to the list from Revision::selectArchiveFields(). It is checked later.
Joerg [Tue, 27 May 2014 13:37:09 +0000 (09:37 -0400)]
Add ar_text to the list from Revision::selectArchiveFields(). It is checked later.

See Revision::newFromArchiveRow().  This is called from
populateRevisionLength.php's upgradeRow() which ultimately populates
$row from the fields returned by Revision::selectArchiveFields().

Revision::newFromArchiveRow() has the following condition:

if ( isset( $row->ar_text ) && !$row->ar_text_id ) {

And from the bug report:

> for old archived revisions, the rows in the archive table do _not_
> contain a pointer to the text in the text table, but that the text
> is stored in the archive table directly. Obviously the above code
> cannot handle this situation properly.

Credit goes to Joerg who found this and figured out the problem.

Bug: 65765
Change-Id: Iadcaae5e531d439780f5b6095286df78926ccaa7

10 years agoMerge "Change one Linker::formatSize call to Message::sizeParams"
jenkins-bot [Tue, 27 May 2014 10:55:04 +0000 (10:55 +0000)]
Merge "Change one Linker::formatSize call to Message::sizeParams"

10 years agoMerge "DBConnectionError: Expand {{SITENAME}} in pagetitle with Message::text()"
jenkins-bot [Tue, 27 May 2014 10:46:18 +0000 (10:46 +0000)]
Merge "DBConnectionError: Expand {{SITENAME}} in pagetitle with Message::text()"

10 years agoMerge "Restructure Media related tests to avoid duplicated code"
jenkins-bot [Tue, 27 May 2014 09:12:15 +0000 (09:12 +0000)]
Merge "Restructure Media related tests to avoid duplicated code"

10 years agoRestructure Media related tests to avoid duplicated code
Brian Wolff [Mon, 26 May 2014 20:16:07 +0000 (17:16 -0300)]
Restructure Media related tests to avoid duplicated code

Change-Id: I4428d38e0199b12255f3746e79f8093259a03da1

10 years agoMerge "Fix doc comments on get[General](Short|Long)Desc"
jenkins-bot [Tue, 27 May 2014 08:43:55 +0000 (08:43 +0000)]
Merge "Fix doc comments on get[General](Short|Long)Desc"

10 years agoMerge "SpecialRevisiondelete: Simplify if/elseif logic"
jenkins-bot [Tue, 27 May 2014 05:10:29 +0000 (05:10 +0000)]
Merge "SpecialRevisiondelete: Simplify if/elseif logic"

10 years agoSpecialRevisiondelete: Simplify if/elseif logic
umherirrender [Mon, 26 May 2014 18:21:10 +0000 (20:21 +0200)]
SpecialRevisiondelete: Simplify if/elseif logic

This avoids checking $comment twice
by Krinkle on I3b21f66f84d68777a18e66e4e5f59886e55d7936

Change-Id: I39df27d3edb097024d136455145505429ccdbe39

10 years agoMerge "DerivativeContext::setConfig should take a Config object"
jenkins-bot [Tue, 27 May 2014 04:23:35 +0000 (04:23 +0000)]
Merge "DerivativeContext::setConfig should take a Config object"

10 years agoMerge "Allow more flexibility in RC feeds"
jenkins-bot [Tue, 27 May 2014 02:43:24 +0000 (02:43 +0000)]
Merge "Allow more flexibility in RC feeds"

10 years agoDerivativeContext::setConfig should take a Config object
Kunal Mehta [Tue, 27 May 2014 02:36:59 +0000 (19:36 -0700)]
DerivativeContext::setConfig should take a Config object

Change-Id: Icc16a9c206c57fac2d26547cb874e02ef09c0485
Follows-Up: I13baec0b6d4ea7badf20b9c5f9b40846348838e4

10 years agoAllow more flexibility in RC feeds
Kunal Mehta [Tue, 27 May 2014 00:50:11 +0000 (17:50 -0700)]
Allow more flexibility in RC feeds

The user can now specify which feeds to send to in
RecentChange::notifyFeeds if they don't want to use
$wgRCFeeds.

Additionally, the 'formatter' in $wgRCFeeds can now be an object
rather than just a class name.

Change-Id: Ibfdffc17a934e35223887c123331795563102752

10 years agoMerge "Make abstract Config class truly implementation-agnostic"
jenkins-bot [Tue, 27 May 2014 01:43:39 +0000 (01:43 +0000)]
Merge "Make abstract Config class truly implementation-agnostic"

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 26 May 2014 19:58:28 +0000 (19:58 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: Idab23e6c2f532b1aae67dc15e9138f6602c15a0f

10 years agoUse language from context in Skin::subPageSubtitle
umherirrender [Mon, 26 May 2014 19:09:25 +0000 (21:09 +0200)]
Use language from context in Skin::subPageSubtitle

Change-Id: Ia6cff8aa9e0b12215839f8b9c5a64a09150d4002

10 years agoChange one Linker::formatSize call to Message::sizeParams
umherirrender [Mon, 26 May 2014 19:00:02 +0000 (21:00 +0200)]
Change one Linker::formatSize call to Message::sizeParams

Change-Id: I2a91f0ef1cf82360da2d17c7dc42633ae3e79100

10 years agoReduce some code duplication
Brian Wolff [Sat, 24 May 2014 19:58:43 +0000 (16:58 -0300)]
Reduce some code duplication

MediaHandler::getLongDesc and getGeneralLongDesc have same
implementation, so forward one method to the other. Same for
short.

Also get rid of one unnecessary $wgLang global usage.

Change-Id: I688e27ce2b9cf950defa16ec6bce2e52c5959b03

10 years agoDBConnectionError: Expand {{SITENAME}} in pagetitle with Message::text()
Kevin Israel [Mon, 26 May 2014 17:40:34 +0000 (13:40 -0400)]
DBConnectionError: Expand {{SITENAME}} in pagetitle with Message::text()

Follows-up 485ff9ead94b by making the same change in DBConnectionError,
which overrides MWException::msg() to not use database messages.

Bug: 58447
Change-Id: Iafa9dd741f1f099a4a6cfb8cf655b7d5f504011a

10 years agoMake abstract Config class truly implementation-agnostic
Kunal Mehta [Sat, 10 May 2014 08:19:00 +0000 (01:19 -0700)]
Make abstract Config class truly implementation-agnostic

Follow up to I13baec0b6 ("Config: Add Config and GlobalConfig classes"):

Config:
* Rather than returning Status objects, Config::set will now throw an exception
  if an error is encountered
* Config::factory was moved into it's own ConfigFactory class.
* Since there are no more functions in it, Config was turned into an interface.

GlobalConfig:
* Remove $prefix args from Config::set and ::get. The idea of having an
  abstract Config class is to abstract some notion of configuration data from
  the particular way in which it is currently implemented (global variables).
  So the abstract base class has no business dealing with variable name
  prefixes.
** Instead GlobalVarConfig's implementations of get and set call getWithPrefix
   and setWithPrefix internally, which are now protected
* Rename GlobalConfig to GlobalVarConfig, which makes it clearer that it isn't
  referring to the scope of the configuration value, but to the scope of the
  variable name which provides it.

ConfigFactory:
* ConfigFactory is where Config objects are registered, and later constructed.
* Config objects are registered with a given name, and a callback factory function.
  This allows for implementations to construct the object with the parameters they want,
  and avoids the overhead of needing an entire class.
** The name 'main' is the default object returned by RequestContext::getConfig(),
   and is intended to be used by core.
* This is a singleton class, the main instance can be obtained with:
  ConfigFactory::getDefaultInstance()

In addition to the above:
* $wgConfigClass was removed, and $wgConfigRegistry was introduced, which
  stores a name => callback. The name is to be what the Config instance is
  registered with, and the callback should return an implementation of Config.
* Tests were written for the new ConfigFactory, and GlobalVarConfig's tests
  were improved.

Co-Authored-By: Ori Livneh <ori@wikimedia.org>
Co-Authored-By: Chad Horohoe <chadh@wikimedia.org>
Co-Authored-By: Mattflaschen <mflaschen@wikimedia.org>
Co-Authored-By: Parent5446 <tylerromeo@gmail.com>
Co-Authored-By: Reedy <reedy@wikimedia.org>
Co-Authored-By: Daniel Kinzler <daniel.kinzler@wikimedia.de>
Change-Id: I5a5857fcfa07598ba4ce9ae5bbb4ce54a567d31e

10 years agoMerge "Return value directly when using getter"
jenkins-bot [Mon, 26 May 2014 08:57:48 +0000 (08:57 +0000)]
Merge "Return value directly when using getter"

10 years agoMerge "Revert "Pass phpcs-strict on includes/revisiondelete/""
jenkins-bot [Sun, 25 May 2014 23:36:31 +0000 (23:36 +0000)]
Merge "Revert "Pass phpcs-strict on includes/revisiondelete/""

10 years agoRevert more visibility changes in HistoryBlob.php
Kevin Israel [Sun, 25 May 2014 13:12:00 +0000 (09:12 -0400)]
Revert more visibility changes in HistoryBlob.php

This follows-up bebcf2c58381, which only fixed DiffHistoryBlob.

MediaWiki will fail to load some revisions if the following properties
do not unserialize correctly:

* HistoryBlobStub::$mOldId
* HistoryBlobStub::$mHash
* HistoryBlobCurStub::$mCurId

Visibility of HistoryBlobStub::$mRef is also restored; though the
property's value does not appear to be used after unserialization,
the property is nevertheless a serialized property.

Bug: 65665
Change-Id: I2724d15f9206d66d615d020117e60bb772048c19

10 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 25 May 2014 19:24:39 +0000 (19:24 +0000)]
Localisation updates from https://translatewiki.net.

Change-Id: I5fcddad181c862b8f825611aa2aa3a17864e1b28

10 years agoHTMLForm: fix double escaping of checkbox labels in vform
Pcoombe [Tue, 15 Apr 2014 14:58:51 +0000 (15:58 +0100)]
HTMLForm: fix double escaping of checkbox labels in vform

mLabel has already been escaped if required. It isn't run through htmlspecialchars()
in other display formats, so doesn't need to be done in vform.

Change-Id: I0b0feec408687cdadf01da5f2078980015538bb7

10 years agoMerge "Fix broken @return documentation"
jenkins-bot [Sun, 25 May 2014 07:45:03 +0000 (07:45 +0000)]
Merge "Fix broken @return documentation"

10 years agoMerge "Removed double hook explanation AfterFinalPageOutput"
jenkins-bot [Sun, 25 May 2014 06:28:53 +0000 (06:28 +0000)]
Merge "Removed double hook explanation AfterFinalPageOutput"

10 years agoRemoved double hook explanation AfterFinalPageOutput
florianschmidtwelzow [Sun, 25 May 2014 06:23:02 +0000 (08:23 +0200)]
Removed double hook explanation AfterFinalPageOutput

Bug: 65690
Change-Id: I0990568875db854579974f611e7378bca0b0eaed

10 years agoRevert "Pass phpcs-strict on includes/revisiondelete/"
Brian Wolff [Sun, 25 May 2014 01:38:41 +0000 (01:38 +0000)]
Revert "Pass phpcs-strict on includes/revisiondelete/"

Causes fatal when using revdeleting an old image

This reverts commit 2e8ec52154ad33680f92c3bf49d3b35ed5a33153.

Bug: 65733
Change-Id: I948cbf0f9a60929020d8cd92f4264bee7a11104e

10 years agoMerge "jquery.makeCollapsible: Use .prop() for value attribute of list item"
jenkins-bot [Sat, 24 May 2014 21:28:02 +0000 (21:28 +0000)]
Merge "jquery.makeCollapsible: Use .prop() for value attribute of list item"

10 years agojquery.makeCollapsible: Use .prop() for value attribute of list item
Timo Tijhof [Sat, 24 May 2014 01:27:25 +0000 (03:27 +0200)]
jquery.makeCollapsible: Use .prop() for value attribute of list item

The issue with "value" attributes is popularised through form
fields (e.g. change <input> value with prop, because it doesn't work
with attribute, attributes only change the DOM, not the live rendering).
However the attribute/property issue isn't limited to form fields and the
typical value/selected/disabled properties . It applies to all properties
and for any element that affects active state (if it changes the display,
one should use a property, not an attribute).

As far as I know, unlike for form fields, browsers do actually synchronise
attributes in the many of those cases (including list items), so there is
no immediate danger. But since it's caught by jQuery Migrate and a good
practice regardless, change it to use prop() as well.

To test:
 https://test.wikipedia.org/?oldid=199994#head-collapsible-ol

Change-Id: I246c26bd2958209feed73fc2ef31cf678b12fa3b

10 years agoFix broken @return documentation
Thiemo Mättig [Sat, 24 May 2014 20:06:01 +0000 (22:06 +0200)]
Fix broken @return documentation

I found one of these in Wikibase and run a global search.

Change-Id: I76c1519a47d7222f136272c59ea454b650808a86

10 years agoFix doc comments on get[General](Short|Long)Desc
Brian Wolff [Sat, 24 May 2014 19:10:46 +0000 (16:10 -0300)]
Fix doc comments on get[General](Short|Long)Desc

Follow up f3cc3980bc78afdb where somehow I managed to do this.

Change-Id: I25e5a01ddbecd1a991f6d121a7ac3f3598004b25