lhc/web/wiklou.git
11 years ago(bug 37714) Use log type in target object when deleting logs of the same type
Alex Monk [Sat, 13 Oct 2012 13:52:49 +0000 (14:52 +0100)]
(bug 37714) Use log type in target object when deleting logs of the same type

Change-Id: I8d721ef5784df624dc0de57adcdf75a4bc3fb604

11 years agoMerge "Remove a bunch of trailing spaces and unneeded newlines"
MaxSem [Fri, 12 Oct 2012 18:36:46 +0000 (18:36 +0000)]
Merge "Remove a bunch of trailing spaces and unneeded newlines"

11 years agoMerge "Skip parser tests if main NS isn't wikitext."
Aaron Schulz [Fri, 12 Oct 2012 17:44:14 +0000 (17:44 +0000)]
Merge "Skip parser tests if main NS isn't wikitext."

11 years agoMerge "[Bug 40716] Fix SearchEngineTest etc with non-wikitext content."
Aaron Schulz [Fri, 12 Oct 2012 17:43:11 +0000 (17:43 +0000)]
Merge "[Bug 40716] Fix SearchEngineTest etc with non-wikitext content."

11 years agoMerge "Added note about sites functionality into the release notes"
Daniel Kinzler [Fri, 12 Oct 2012 17:39:09 +0000 (17:39 +0000)]
Merge "Added note about sites functionality into the release notes"

11 years agoUpdate @since tags from 1.20 to 1.21
jeroendedauw [Fri, 12 Oct 2012 16:28:53 +0000 (18:28 +0200)]
Update @since tags from 1.20 to 1.21

Change-Id: Iea7bad4367782ee8baa676921625b44dc2b7c45f

11 years agoAdded note about sites functionality into the release notes
jeroendedauw [Fri, 12 Oct 2012 16:27:55 +0000 (18:27 +0200)]
Added note about sites functionality into the release notes

Change-Id: Ib8376f846be86b46b9b4f347f04cce73f7d7e609

11 years agoMerge "Add *_content_(model|format) fields to PostgreSQL"
MaxSem [Fri, 12 Oct 2012 16:22:03 +0000 (16:22 +0000)]
Merge "Add *_content_(model|format) fields to PostgreSQL"

11 years agoMerge "* Oracle schema update: rc_moved, cat_hidden, ss_admin * tables.sql + updater...
Demon [Fri, 12 Oct 2012 16:09:09 +0000 (16:09 +0000)]
Merge "* Oracle schema update: rc_moved, cat_hidden, ss_admin * tables.sql + updater patches for *_content_(model|format) fieldswq"

11 years agoAdded sites functionality, a much more generic and flexible version of the existing...
jeroendedauw [Wed, 12 Sep 2012 17:22:39 +0000 (19:22 +0200)]
Added sites functionality, a much more generic and flexible version of the existing interwiki code

This code is meant to replace the current interwiki code, but does not do so just yet. It is however used by the Wikibase extension. This allows us to try out some more things and have the code stabilize more before we migrate over existing interwiki functionality.

Change-Id: I23c47c2c3909a1500350fb560a5f2ec654e2c37e

11 years agoSkip parser tests if main NS isn't wikitext.
daniel [Fri, 12 Oct 2012 13:39:01 +0000 (15:39 +0200)]
Skip parser tests if main NS isn't wikitext.

Change-Id: Ie3267e4db4246d522b6564204e9688258fc41324

11 years ago[Bug 40716] Fix SearchEngineTest etc with non-wikitext content.
daniel [Fri, 12 Oct 2012 11:09:08 +0000 (13:09 +0200)]
[Bug 40716] Fix SearchEngineTest etc with non-wikitext content.

Several core tests fail if there is non-wikitext content in the main namespace.
This change fixes SearchEngineTest and TitlePermissionTest for this case.
More fixes are to come.

Change-Id: I6a19b568c5700bc8584689de8f33e4b0b6ffc277

11 years agoUpdates findHooks.php for ContentHandler changes.
Alexandre Emsenhuber [Fri, 12 Oct 2012 06:32:13 +0000 (08:32 +0200)]
Updates findHooks.php for ContentHandler changes.

- Added includes/content/ to the list of directories
- Added ContentHandler::runLegacyHooks() to the list of functions that run hooks

Change-Id: I1f21af71443468232b4bc119454f1c93ad343137

11 years agoMerge "Additional tests to keep Parsoid on track."
GWicke [Thu, 11 Oct 2012 22:45:52 +0000 (22:45 +0000)]
Merge "Additional tests to keep Parsoid on track."

11 years agoAdd *_content_(model|format) fields to PostgreSQL
freakolowsky [Wed, 10 Oct 2012 14:09:37 +0000 (16:09 +0200)]
Add *_content_(model|format) fields to PostgreSQL

Create ContentHandler field for PostgreSQL
(for installer and the update).

TEXT was chosen as replacement for MySQL VARBINARY(32)

Change-Id: Ia86ae79d37517630e1767dfb976604bbb174104b

11 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Thu, 11 Oct 2012 20:02:55 +0000 (20:02 +0000)]
Merge "Localisation updates from translatewiki.net."

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 11 Oct 2012 19:55:00 +0000 (19:55 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Icef5d6502611b01298f5a8f66ea4ce25979ac6c0

11 years agoInitial stab at responsive images for screen densities.
Brion Vibber [Tue, 18 Sep 2012 07:18:50 +0000 (00:18 -0700)]
Initial stab at responsive images for screen densities.

* adds $wgResponsiveImages setting, defaulting to true, to enable the feature
* adds 'srcset' attribute with 1.5x and 2x URLs to image links and image thumbs
* adds jquery.hidpi plugin to check pixel density and implement partial 'srcset' polyfill
** $.devicePixelRatio() returns window.devicePixelRatio, with compat fallback for IE 10
** $().hidpi() performs a 'srcset' polyfill for browsers with no native 'srcset' support
* adds mediawiki.hidpi RL script to trigger hidpi loads after main images load

Note that this is a work in progress. There will be places where this doesn't yet work which output their imgs differently. If moving from a low to high-DPI screen on a MacBook Pro Retina display, you won't see images load until you reload.

Confirmed basic images and thumbs in wikitext appear to work in Safari 6, Chrome 21, Firefox 18 nightly on MacBook Pro Retina display, and IE 10 in Windows 8 at 150% zoom, 200% zoom, and 140% and 180%-ratio Metro tablet sizes.

Internally this is still a bit of a hack; Linker::makeImageLink and Linker::makeThumbLink explicitly ask for 1.5x and 2x scaled versions and insert their URLs, if different, into the original thumbnail object which (in default handler) outputs the srcset. This means that a number of places that handle images differently won't see the higher-resolution versions, such as <gallery> and the large thumbnail on the File: description page.

At some point we may wish to redo some of how the MediaHandler stuff works so that requesting a single thumbnail automatically produces the extra sizes in all circumstances. We might also consider outputting a 'srcset' or multiple src sizes in 'imageinfo' API requests, which would make ApiForeignRepo/InstantCommons more efficient. (Currently it has to make three requests for each image to get the three sizes.)

Change-Id: Id80ebd07a1a9f401a2c2bfeb21aae987e5aa863b

11 years agoMerge "Prefix new ContentHandler hooks in WikiPage with Page instead of Article"
Aaron Schulz [Thu, 11 Oct 2012 17:12:50 +0000 (17:12 +0000)]
Merge "Prefix new ContentHandler hooks in WikiPage with Page instead of Article"

11 years agoAdditional tests to keep Parsoid on track.
Subramanya Sastry [Thu, 11 Oct 2012 16:54:09 +0000 (11:54 -0500)]
Additional tests to keep Parsoid on track.

Change-Id: Ic57c10f8e5ff16446834af4a22043465aa0495ce

11 years agoMerge "Allow ORMTable to access a foreign wiki."
Aaron Schulz [Thu, 11 Oct 2012 16:23:01 +0000 (16:23 +0000)]
Merge "Allow ORMTable to access a foreign wiki."

11 years agoPrefix new ContentHandler hooks in WikiPage with Page instead of Article
Siebrand Mazeland [Thu, 11 Oct 2012 16:22:52 +0000 (18:22 +0200)]
Prefix new ContentHandler hooks in WikiPage with Page instead of Article

Covers 3 hooks:
* ArticleContentInsertComplete -> PageContentInsertComplete
* ArticleContentSave -> PageContentSave
* ArticleContentSaveComplete -> PageContentSaveComplete

Change-Id: I186669a5941d8982725ed364b481215d291b2043

11 years agoMerge "fix typoed in EditPage->mPreloadContent"
Demon [Thu, 11 Oct 2012 16:10:28 +0000 (16:10 +0000)]
Merge "fix typoed in EditPage->mPreloadContent"

11 years agoMerge "introducing MW_SUPPORTS_CONTENTHANDLER for fun and profit"
Demon [Thu, 11 Oct 2012 16:08:11 +0000 (16:08 +0000)]
Merge "introducing MW_SUPPORTS_CONTENTHANDLER for fun and profit"

11 years agoAllow ORMTable to access a foreign wiki.
daniel [Wed, 26 Sep 2012 15:42:32 +0000 (17:42 +0200)]
Allow ORMTable to access a foreign wiki.

wfGetDB() allows us to connect to another wiki's database using
LoadBalancer's openForeignConnection method. This change adds an
option to ORMTable that allows it to use this facility, so it
can be used to access tables on other wikis.

Change-Id: I261a2a31e7188f6793b8a110ab764be5ecd09920

11 years agofix typoed in EditPage->mPreloadContent
daniel [Thu, 11 Oct 2012 15:46:03 +0000 (17:46 +0200)]
fix typoed in EditPage->mPreloadContent

Change-Id: Idcb568061caf7a7818bbe4fba0f5fb19dc14fe69

11 years agointroducing MW_SUPPORTS_CONTENTHANDLER for fun and profit
daniel [Thu, 11 Oct 2012 15:43:39 +0000 (17:43 +0200)]
introducing MW_SUPPORTS_CONTENTHANDLER for fun and profit

Change-Id: I22d8a43e538e5219174b58b69787757f76141698

11 years agoremove exception, introduced with content handler merge
aude [Thu, 11 Oct 2012 12:14:40 +0000 (12:14 +0000)]
remove exception, introduced with content handler merge

There is a bug [1] in the Title::isRedirect() method, when called from Linker,
in some cases when the link cache is not aware of a title.  The bug
should be fixed ASAP. Until then, this removes the exception and maintains
same behavior as before the merge.

[1] https://bugzilla.wikimedia.org/show_bug.cgi?id=37209

Change-Id: I7874a5ecdd24417108685f811bbc2e6a2d82aa94

11 years agoMerge "Tidy up InfoAction and note it's hook in docs/hooks.txt"
Reedy [Thu, 11 Oct 2012 09:35:01 +0000 (09:35 +0000)]
Merge "Tidy up InfoAction and note it's hook in docs/hooks.txt"

11 years agoMerge "Fix creation of pages in the MediaWiki namespace."
Tim Starling [Thu, 11 Oct 2012 05:51:18 +0000 (05:51 +0000)]
Merge "Fix creation of pages in the MediaWiki namespace."

11 years agoShow redirects correctly on diff pages.
Liangent [Fri, 28 Sep 2012 13:07:04 +0000 (21:07 +0800)]
Show redirects correctly on diff pages.

Change-Id: Ic3c2d6cff016a8fecdde511e2d14b30426737c8a

11 years ago(bug 40899) Cache resources for anonymous users
Jakub Vrana [Tue, 9 Oct 2012 22:20:05 +0000 (15:20 -0700)]
(bug 40899) Cache resources for anonymous users

Changes mTouched for anonymous users to '1' because '0' is treated as 'now' by wfTimestamp()

Change-Id: If0d77f72dc776c4709a1e5da360fbd6273178b29

11 years agoTidy up InfoAction and note it's hook in docs/hooks.txt
Alex Monk [Sun, 7 Oct 2012 21:34:02 +0000 (22:34 +0100)]
Tidy up InfoAction and note it's hook in docs/hooks.txt

Also add $context parameter to the hook and (bug 40845) don't
overwrite pageInfo's $title parameter.

Change-Id: I41128abb72553142b45e90befabde541b2d8941f

11 years agoAvoid fatals for bad filenames given for chunk uploads.
Aaron Schulz [Wed, 10 Oct 2012 23:15:29 +0000 (16:15 -0700)]
Avoid fatals for bad filenames given for chunk uploads.

Change-Id: I904a801ecbf9eabd9156d70a42d46323455507bd

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 10 Oct 2012 20:42:47 +0000 (20:42 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Iaab523e4848ae6eebcfd016511802678b2eb199b

11 years agoAvoid thumb.php fatal for bad titles on private wikis.
Aaron Schulz [Wed, 10 Oct 2012 18:16:28 +0000 (11:16 -0700)]
Avoid thumb.php fatal for bad titles on private wikis.

Change-Id: Id2c19d888989fdbaad6412aa9eb62bb22a75f241

11 years agoRemove a bunch of trailing spaces and unneeded newlines
umherirrender [Wed, 10 Oct 2012 18:13:40 +0000 (20:13 +0200)]
Remove a bunch of trailing spaces and unneeded newlines

Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997

11 years agoMerge "(bug 16020) Fix race condition in User::addToDatabase()"
Aaron Schulz [Wed, 10 Oct 2012 18:08:53 +0000 (18:08 +0000)]
Merge "(bug 16020) Fix race condition in User::addToDatabase()"

11 years agoFix the jqueryMsg tests for plural rule parsing
Santhosh Thottingal [Wed, 10 Oct 2012 09:17:24 +0000 (14:47 +0530)]
Fix the jqueryMsg tests for plural rule parsing

mediawiki.language.data was not retrieved from server corresponding to language
changes

mediawiki.language.convertPlural depends on currentUI language from
mw.config.get( 'wgUserLanguage' ). Set that for each parser test and
restore it at teardown of QUnit.

Change-Id: I5b81cd8573311d1c0d8817e430108f4ad76de6bd

11 years agoAdd three tests for categories mixed with templates.
Mark Holmquist [Wed, 10 Oct 2012 17:02:38 +0000 (10:02 -0700)]
Add three tests for categories mixed with templates.

Apparently we didn't catch a regression in this area, so I've added
a set of tests to make sure we don't miss it again.

Change-Id: I3c4bfa15ce1182a6a697fb70e74489e06e1d9969

11 years ago* Oracle schema update: rc_moved, cat_hidden, ss_admin
freakolowsky [Wed, 10 Oct 2012 10:29:29 +0000 (12:29 +0200)]
* Oracle schema update: rc_moved, cat_hidden, ss_admin
* tables.sql + updater patches for *_content_(model|format) fieldswq

Change-Id: Ifb0dfbcdf3da10cab2d71c2efa437ef4a878a1f8

11 years agoFix test SpecialSearchTest.testSearchTermIsNotExpanded
Antoine Musso [Wed, 10 Oct 2012 09:48:20 +0000 (11:48 +0200)]
Fix test SpecialSearchTest.testSearchTermIsNotExpanded

Ief0bdd10 / 9299bab "Stop expanding search term in <title> of the search
results page" had an issue comparing the site title that could be in
different language.  I have converted the assertion to make sur we
always have the plain search term (aka: {{SITENAME}}) which will work
regardless of the language currently set.

Change-Id: Idbb778174978c17a75fa7671d4967851c2732c15

11 years agoMerge "Convert -{}- markups in title="" and alt=""."
Siebrand [Wed, 10 Oct 2012 07:46:26 +0000 (07:46 +0000)]
Merge "Convert -{}- markups in title="" and alt=""."

11 years agoStop expanding search term in <title> of the search results page
Liangent [Fri, 13 Apr 2012 10:08:45 +0000 (18:08 +0800)]
Stop expanding search term in <title> of the search results page

When entering a search term such as {{SITENAME}} on Special:Search,
the <title> was generated with template expansion.

This patch prevents transformation by using search term as rawParams
of the 'searchresults-title' and 'pagetitle' messages.

Change-Id: Ief0bdd10ad882ebfaeefd11bf4217e70dd922d9d

11 years agoDisplay converted namespace names in Html::namespaceSelector().
Liangent [Tue, 29 May 2012 09:56:21 +0000 (17:56 +0800)]
Display converted namespace names in Html::namespaceSelector().

By the way, the code to get converted titles and namespaces
has been cleaned up.

Change-Id: Ifcbd56c989d83b9d32dfa99e0b2f06d01e17a2bd

11 years agoCheck headers for default variant when initializing default user options.
Liangent [Sat, 12 May 2012 15:52:52 +0000 (23:52 +0800)]
Check headers for default variant when initializing default user options.

Currently, if a user with Accept-Language: zh-tw header accesses a zh site,
the page contents are served in zh-tw variant, but the interface language
is zh (falling back to zh-hans) so the user is seeing interface messages
in zh(-hans) unless a &variant= is manually set (originally variant set in
URL is checked by getDefaultVariant).

There were debates that serving different languages based on headers from
the same URL breaks cache, but currently contents are served in different
variants based on headers and it works. So I assume this is not an issue.

PS2-4: HTTP header settings shouldn't affect user preference settings of
logged-in users.

PS5-6: Move code loading variant settings for anonymous requests from
User::getDefaultOptions() to User::loadOptions() to avoid pollution of
defaults. A visual bug of this is that if I have variant set to zh and
load index.php?title=Special:Preferences&variant=zh-cn, the dropdown is
shown as zh-cn because I was using the default value and now it thinks the
default value is zh-cn instead of zh.

PS7-8: Rebase to add dependency and tweak commit summary etc.

PS9: Remove the argument added to getDefaultVariant, which was intended to
keep B/C of getDefaultVariant (not to check headers by default).

Change-Id: Ie600ab24294a1add804875e921c32febe6ed645f

11 years agoFix Ibcb23c81, and tweak array merge order
Liangent [Tue, 18 Sep 2012 15:11:34 +0000 (23:11 +0800)]
Fix Ibcb23c81, and tweak array merge order

PS2 in Ibcb23c81 didn't do things correctly...

Change-Id: I6c1946b5a6ef1720767e236b419a3c5dd1332bf4

11 years agoMerge "Update jQuery to 1.8.2"
Krinkle [Tue, 9 Oct 2012 22:22:59 +0000 (22:22 +0000)]
Merge "Update jQuery to 1.8.2"

11 years agoUpdate jQuery to 1.8.2
Reedy [Tue, 9 Oct 2012 14:50:32 +0000 (15:50 +0100)]
Update jQuery to 1.8.2

http://blog.jquery.com/2012/09/20/jquery-1-8-2-released/

Change-Id: Ie127f95eae951c36f6c330b4bdaee05f59cd58e2

11 years agoMerge "Updated/added include/template tests to reflect Parsoid support."
GWicke [Tue, 9 Oct 2012 21:24:36 +0000 (21:24 +0000)]
Merge "Updated/added include/template tests to reflect Parsoid support."

11 years agoMerge "Localisation updates from http://translatewiki.net."
Siebrand [Tue, 9 Oct 2012 20:46:05 +0000 (20:46 +0000)]
Merge "Localisation updates from translatewiki.net."

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Tue, 9 Oct 2012 20:03:38 +0000 (20:03 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ibb5772a1bc30cebb4b456f0171de901e48bef15c

11 years agoAdd a message key from ContentHandler merge to messages.inc
raymond [Tue, 9 Oct 2012 20:26:48 +0000 (22:26 +0200)]
Add a message key from ContentHandler merge to messages.inc

Change-Id: I421c0dd49f8cd96ec84c866bafb112c6a9e820df

11 years agoRemove artefact from the ContentHandler merge
raymond [Tue, 9 Oct 2012 19:23:45 +0000 (21:23 +0200)]
Remove artefact from the ContentHandler merge

Change-Id: I0a2d615c73efef8a7319d59e24991c403ce8e7cf

11 years agoMerge "(bug 40789) Fixed $wgSecureLogin after-login redirect."
CSteipp [Tue, 9 Oct 2012 17:37:25 +0000 (17:37 +0000)]
Merge "(bug 40789) Fixed $wgSecureLogin after-login redirect."

11 years agoUpdated/added include/template tests to reflect Parsoid support.
Subramanya Sastry [Tue, 9 Oct 2012 17:23:19 +0000 (12:23 -0500)]
Updated/added include/template tests to reflect Parsoid support.

* This is primarily a spec for what Parsoid will support around
  uncommon uses of templates and include-tags.

Change-Id: Ic869da7ee6e89cae2f04beaeec7520b1f83f4e97

11 years agoMerge "(bug 40834) mw.loader: Fix comma-joined 404 error."
Trevor Parscal [Tue, 9 Oct 2012 17:24:28 +0000 (17:24 +0000)]
Merge "(bug 40834) mw.loader: Fix comma-joined 404 error."

11 years agoMerge "Fix flush-like commit in DeferredUpdates."
IAlex [Tue, 9 Oct 2012 16:26:16 +0000 (16:26 +0000)]
Merge "Fix flush-like commit in DeferredUpdates."

11 years agoMerge "Removed READ_LATEST default from Revision::newFromPageId()."
IAlex [Tue, 9 Oct 2012 16:21:14 +0000 (16:21 +0000)]
Merge "Removed READ_LATEST default from Revision::newFromPageId()."

11 years agoMerge "[FileBackend] Tweaked TempFSFile::bind() to handle __get()."
Demon [Tue, 9 Oct 2012 16:08:55 +0000 (16:08 +0000)]
Merge "[FileBackend] Tweaked TempFSFile::bind() to handle __get()."

11 years agoFix flush-like commit in DeferredUpdates.
daniel [Tue, 9 Oct 2012 13:34:47 +0000 (15:34 +0200)]
Fix flush-like commit in DeferredUpdates.

In the presence of DBO_TRX, commit() may be used like a "flush".
Added a flag to trigger this mode to commit() and changed DeferredUpdates
to used the flush mode.

Change-Id: I529117618194a2669535f3c5c0fed07588597299

11 years agoMerge "Report legacy hook handlers."
Siebrand [Tue, 9 Oct 2012 13:11:25 +0000 (13:11 +0000)]
Merge "Report legacy hook handlers."

11 years agoFix creation of pages in the MediaWiki namespace.
daniel [Tue, 9 Oct 2012 12:58:25 +0000 (14:58 +0200)]
Fix creation of pages in the MediaWiki namespace.

Creation of pages in the MediaWiki namespace failed with a "no such section"
error if the corresponding system message did not exist. Fixed now.

Change-Id: Ia6e879c66a6330ea2a63246b3aed51c9c6e1d49d

11 years agoFix merge artifact in Article::showCssOrJsPage.
daniel [Tue, 9 Oct 2012 12:23:42 +0000 (14:23 +0200)]
Fix merge artifact in Article::showCssOrJsPage.

Change-Id: I1e9608809b81d2c5feeb048ddee96d5324b62a81

11 years agoReport legacy hook handlers.
daniel [Tue, 9 Oct 2012 12:20:03 +0000 (14:20 +0200)]
Report legacy hook handlers.

ContentHandler::runLegacyHooks() now includes the list of handlers registered
for a legacy hook in the warning it produces.

Change-Id: I48032b62d4be791f1dc71889051dd6211541ac50

11 years agoMerge "Silenice trx warnings from LoadBalancer."
Siebrand [Tue, 9 Oct 2012 11:05:26 +0000 (11:05 +0000)]
Merge "Silenice trx warnings from LoadBalancer."

11 years agoSilenice trx warnings from LoadBalancer.
daniel [Tue, 9 Oct 2012 10:26:47 +0000 (12:26 +0200)]
Silenice trx warnings from LoadBalancer.

This is a follow-up to Idbe4a903.

LoadBalancer::commitMasterChanges used to cause a warning if an implicite
transaction was in progress. This is now supressed.

Note that warnign when an automatic transaction is committed explicitely,
it does make sense to issue a warning. But that should not be done for summary
commits when closing a connection, etc.

Change-Id: Id68c3607f6b9d930c00422baa6658b0651f2e42e

11 years agoMerge "Remove unused variables."
IAlex [Tue, 9 Oct 2012 10:23:38 +0000 (10:23 +0000)]
Merge "Remove unused variables."

11 years agoMerge "Replace deprecated call."
IAlex [Tue, 9 Oct 2012 10:19:53 +0000 (10:19 +0000)]
Merge "Replace deprecated call."

11 years agoRemove unused variables.
Siebrand Mazeland [Tue, 9 Oct 2012 09:29:48 +0000 (11:29 +0200)]
Remove unused variables.

Change-Id: I4b76cbbca22555eacb8ef4de58993b485f7cdd18

11 years agoReplace deprecated call.
Siebrand Mazeland [Tue, 9 Oct 2012 09:29:09 +0000 (11:29 +0200)]
Replace deprecated call.

Change-Id: I71866194d72bca059e28b0bd74f4ecd5686743c4

11 years agoUpdate docs for return and exception info
Siebrand Mazeland [Sun, 7 Oct 2012 23:35:26 +0000 (01:35 +0200)]
Update docs for return and exception info

* Removed some inline tabs in the process.
* IDE fixed some incorrect leading spaces, too.

Change-Id: Ic9303eff6db4424ac3f1fa2816839692b43e6190

11 years agoMerge "Merge branch 'Wikidata' into master."
Siebrand [Tue, 9 Oct 2012 09:39:47 +0000 (09:39 +0000)]
Merge "Merge branch 'Wikidata' into master."

11 years agoMerge branch 'Wikidata' into master.
daniel [Tue, 9 Oct 2012 09:34:24 +0000 (11:34 +0200)]
Merge branch 'Wikidata' into master.

This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.

For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191

The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.

Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98

11 years agoMerge "Removed useless $title parameter to InfoAction::pageInfo()"
Siebrand [Tue, 9 Oct 2012 08:59:22 +0000 (08:59 +0000)]
Merge "Removed useless $title parameter to InfoAction::pageInfo()"

11 years agoMerge "Use parseAsBlock() instead of parse() to show the error message in OutputPage...
Siebrand [Tue, 9 Oct 2012 08:58:25 +0000 (08:58 +0000)]
Merge "Use parseAsBlock() instead of parse() to show the error message in OutputPage::showErrorPage()"

11 years agoRemoved useless $title parameter to InfoAction::pageInfo()
Alexandre Emsenhuber [Sun, 7 Oct 2012 13:37:00 +0000 (15:37 +0200)]
Removed useless $title parameter to InfoAction::pageInfo()

The $title variable is set to $this->getTitle() before its
first use in that method, so it's useless to pass it as parameter.

Also changed the call to exist() in InfoAction::onView() to use
the Page object instead of the Title object.

Change-Id: Ic07ee0ccccfd9cc3aabd497aebf7965136a2d3bd

11 years agoAvoid direct access to $wgGroupPermissions
umherirrender [Thu, 4 Oct 2012 16:17:46 +0000 (18:17 +0200)]
Avoid direct access to $wgGroupPermissions

Created a new method User::groupHasPermission and check also
$wgRevokePermissions for the given right

Change-Id: I41edb091fa35c8c68b6f95cc5fd208ea99418cdb

11 years agoMerge "Add version number to deprecated setting"
Siebrand [Tue, 9 Oct 2012 06:30:03 +0000 (06:30 +0000)]
Merge "Add version number to deprecated setting"

11 years agoMerge changes I9d2b148e,Iccf6ea81
Siebrand [Tue, 9 Oct 2012 06:27:04 +0000 (06:27 +0000)]
Merge changes I9d2b148e,Iccf6ea81

* changes:
  Clean and repair many phpunit tests (+ fix implied configuration)
  Fix HtmlTest, XmlTest; Add setMwGlobals method to base TestCase.

11 years agoAdd version number to deprecated setting
umherirrender [Fri, 5 Oct 2012 19:30:46 +0000 (21:30 +0200)]
Add version number to deprecated setting

Fix one doc

Change-Id: I527639c3694d7b72d9f3bff62fb8b0b7eb6ee126

11 years ago(bug 34876) Make jquery.makeCollapsible less slow.
Timo Tijhof [Wed, 29 Aug 2012 12:31:10 +0000 (14:31 +0200)]
(bug 34876) Make jquery.makeCollapsible less slow.

Several optimisations:

* Re-using the same $collapsible jQuery object instead of
  re-creation of $(this).
* Use .data instead of dom manipulation (className property).
* Use $.nodeName( HTMLElement, tag ) to check something is <a>,
  instead of using creating a jQuery object and calling
  "is.('a')", which goes through a lot of selector stuff.
- Fix bug where it says it does instantHide but actually still
  triggers the event that causes initial animations.

Thanks to Lupo for most of these ideas, based on this patch:
 * https://bugzilla.wikimedia.org/attachment.cgi?id=10200

Verified that these test cases all still work:
 https://test.wikipedia.org/wiki/User:Krinkle/CollapsingTestpageMw

(copy wikitext to localhost)

Change-Id: Idb9ca00c03ec7d70903ed7fd79e427efa270ace4

11 years agoMerge "Disable transaction warnings for automatic trx."
Aaron Schulz [Tue, 9 Oct 2012 01:15:21 +0000 (01:15 +0000)]
Merge "Disable transaction warnings for automatic trx."

11 years agoMerge "Deprecate $wgSharedDB"
Aaron Schulz [Tue, 9 Oct 2012 01:09:29 +0000 (01:09 +0000)]
Merge "Deprecate $wgSharedDB"

11 years agoClean and repair many phpunit tests (+ fix implied configuration)
Timo Tijhof [Mon, 8 Oct 2012 10:56:20 +0000 (12:56 +0200)]
Clean and repair many phpunit tests (+ fix implied configuration)

This commit depends on the introduction of
MediaWikiTestCase::setMwGlobals in change Iccf6ea81f4.

Various tests already set their globals, but forgot to restore
them afterwards, or forgot to call the parent setUp, tearDown...

Either way they won't have to anymore with setMwGlobals.

Consistent use of function characteristics:
* protected function setUp
* protected function tearDown
* public static function (provide..)

(Matching the function signature with PHPUnit/Framework/TestCase.php)

Replaces:
 * public function (setUp|tearDown)\(
 * protected function $1(

 * \tfunction (setUp|tearDown)\(
 * \tprotected function $1(

 * \tfunction (data|provide)\(
 * \tpublic static function $1\(

Also renamed a few "data#", "provider#" and "provides#" functions
to "provide#" for consistency. This also removes confusion where
the /media tests had a few private methods called dataFile(),
which were sometimes expected to be data providers.

Fixes:

TimestampTest often failed due to a previous test setting a
different language (it tests "1 hour ago" so need to make sure
it is set to English).

MWNamespaceTest became a lot cleaner now that it executes with
a known context. Though the now-redundant code that was removed
didn't work anyway because wgContentNamespaces isn't keyed by
namespace id, it had them was values...

FileBackendTest:
* Fixed: "PHP Fatal: Using $this when not in object context"

HttpTest
* Added comment about:
  "PHP Fatal: Call to protected MWHttpRequest::__construct()"
  (too much unrelated code to fix in this commit)

ExternalStoreTest
* Add an assertTrue as well, without it the test is useless
  because regardless of whether wgExternalStores is true or false
  it only uses it if it is an array.

Change-Id: I9d2b148e57bada64afeb7d5a99bec0e58f8e1561

11 years ago(bug 16020) Fix race condition in User::addToDatabase()
Tim Starling [Mon, 8 Oct 2012 22:45:03 +0000 (09:45 +1100)]
(bug 16020) Fix race condition in User::addToDatabase()

Fix the DB error which comes from User::addToDatabase() if it is called
when the user already exists. This is the most common DB error we log at
WMF in normal operation, perhaps because of double clicks on the "create
account" button, or perhaps due to CentralAuth autocreation when
multiple pages on another wiki are opened in the browser simultaneously,
as the bug reporter suggests.

See the doc comment for the interface rationale. Patched
Special:Userlogin to be aware of the new return value. Most extension
callers will continue to work, I will patch a couple that need it in
subsequent commits.

Change-Id: I1f6ef5e6319bfe692fb82a3fa50dc66c9fde8f15

11 years agoFix HtmlTest, XmlTest; Add setMwGlobals method to base TestCase.
Timo Tijhof [Mon, 8 Oct 2012 10:59:55 +0000 (12:59 +0200)]
Fix HtmlTest, XmlTest; Add setMwGlobals method to base TestCase.

The HTML and XML test now set the globals they depend on
(instead of relying on the default settings).

Tests for the "other" scenarios still exist, globals are
overridden inline. They are automatically restored after each
test## function by PHPUnit from MediaWikiTestCase::tearDown.

Also fixed 2 other problems with the test suite:

* HtmlTest::testDropDefaults forgot to pass
  $message to the assertion from the provider ($case[3]).

* The data provider for HtmlTest::testDropDefaults was calling
  Html::element directly (instead of calling it within the test)
  which is problematic because data providers are expected to be
  static. PHPUnit calls them outside the setUp/tearDown flow.
  (also fixed the function to be public static, as PHPUnit
  expects).

That last one was crucial to make the test still pass correctly.

Updated the expected strings to what they are with these
fixed non-leakage settings.

Took wgHtml5 without xmlform as default. And added tests
for variations where it made sense.

Change-Id: Iccf6ea81f4bc2639273ab2ad101c58788ee49d45

11 years agoAdd parameters to LanguageQqx-generated messages.
Niklas Laxström [Mon, 8 Oct 2012 20:51:46 +0000 (20:51 +0000)]
Add parameters to LanguageQqx-generated messages.

This avoids outputing bunch of unhelpful (parentheses) messages.

Change-Id: I55fab4f132f28be3fe7e4bc8f51d403b11d24284

11 years agoMerge "Update version to 1.21."
Reedy [Mon, 8 Oct 2012 20:39:35 +0000 (20:39 +0000)]
Merge "Update version to 1.21."

11 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 8 Oct 2012 20:12:39 +0000 (20:12 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ic82f456bab4bc20f5b808a3e915b113b2551da9a

11 years agoUpdate version to 1.21.
Siebrand Mazeland [Mon, 8 Oct 2012 18:45:55 +0000 (20:45 +0200)]
Update version to 1.21.

Change-Id: I0305bb936104eadd60a2f43cdbf7cb676a55d3cb

11 years agoRelease notes tweaks.
Siebrand Mazeland [Mon, 8 Oct 2012 18:21:02 +0000 (20:21 +0200)]
Release notes tweaks.

Change-Id: I9e975c27b94657cd8769267ecdd262b2e9bc6b75

11 years agoCleanup of Wikidata branch.
daniel [Mon, 8 Oct 2012 15:26:11 +0000 (17:26 +0200)]
Cleanup of Wikidata branch.

This cleans up several issues raised in comments to I3b2dad3a,
mostly style and merge artifacts.

Change-Id: I99f5e300a671db1353db151cd187ffd2e4478d03

11 years agoMerge "Phase out tests/jasmine; Update mediawiki i18n tests"
Nikerabbit [Mon, 8 Oct 2012 13:57:07 +0000 (13:57 +0000)]
Merge "Phase out tests/jasmine; Update mediawiki i18n tests"

11 years agoMerge "Fix typo in comment."
IAlex [Mon, 8 Oct 2012 12:58:33 +0000 (12:58 +0000)]
Merge "Fix typo in comment."

11 years agoFix typo in comment.
Siebrand Mazeland [Mon, 8 Oct 2012 12:49:11 +0000 (14:49 +0200)]
Fix typo in comment.

Change-Id: Ib88d3023aaf8b07363c0a2f00adb660732a849c1

11 years agoMerge "Fix behavior of Hooks class."
Reedy [Mon, 8 Oct 2012 12:30:54 +0000 (12:30 +0000)]
Merge "Fix behavior of Hooks class."

11 years agoFix usage of deprecated ArticleSaveComplete hook in core
daniel [Mon, 8 Oct 2012 12:13:59 +0000 (14:13 +0200)]
Fix usage of deprecated ArticleSaveComplete hook in core

Change-Id: Ic01fd95d50a909470d6f0ffd93c972322789d49a

11 years agomerge latest master into Wikidata branch
daniel [Mon, 8 Oct 2012 11:58:54 +0000 (13:58 +0200)]
merge latest master into Wikidata branch

Change-Id: Id4e0f40c03679c13d8934a6add99b5cd86d0437d

11 years agoDisable transaction warnings for automatic trx.
daniel [Fri, 5 Oct 2012 08:19:42 +0000 (10:19 +0200)]
Disable transaction warnings for automatic trx.

This tracks which transaction was opened automatically because of the
DBO_TRX flag, and then supresses any warnings about committing these
transactions implicitely, even if write operations were performed by
that transaction. To get warnings about implicitely committed writes
from automatic transactions, enable $wgDebugDBTransactions.

This change is a follow-up to I1e746322 and the older I3f1dd5fd, and
should be considered an alternative to I3eacc5a9. The new warning
behavior is:

* when beginning a transaction, warn if there is a transaction pending
that has also been started explicitely by calling begin().

* when beginning a transaction and $wgDebugDBTransactions is on, log
any implicit commit of an automatic transaction if write operations
where performed within that transaction.

The idea is to provide warnings about nested explicite transactions
while staying quiet about implicite commits to automatic transactions.

Change-Id: Idbe4a9034b13413e351f432408d358a704f6b77d