Commit graph

55593 commits

Author SHA1 Message Date
jenkins-bot
b31c093855 Merge "Add jQuery Migrate" 2014-05-09 09:13:15 +00:00
jenkins-bot
ec8c65a851 Merge "ResourceLoaderModule: Add @since annotations to new methods" 2014-05-09 08:49:57 +00:00
Brian Wolff
5a81ad0e8a Throw an error if calling parser recursively
People accidentally (or sometimes intentionally) calling the
parser recursively has been a major source of bugs over the
years. I think its much better to fail suddenly, instead
of having unclear signs like UNIQ's all over the place.

Change-Id: I0e42aa69835c15a5df7aecb0dc5c3dec946bdf6a
2014-05-09 09:53:21 +02:00
Timo Tijhof
e5502d1ffa Add jQuery Migrate
We're currently on jQuery v1.8.3. jQuery v1.9 introduces breaking
changes. The jQuery Migrate plugin adds a compatibility layer
that brings back most removed or altered functionality.

It can also be loaded on an older version of jQuery to make use
of the plugins' accessor tracking that helps finding code
that makes use of the deprecated functionality prior to upgrading.

Code:
 http://code.jquery.com/jquery-migrate-1.2.1.js

Info:
 http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
 http://jquery.com/upgrade-guide/1.9/#jquery-migrate-plugin
 https://github.com/jquery/jquery-migrate/

> The plugin can be included with versions of jQuery as old as
> 1.6.4 to identify potential upgrade issues via its JQMIGRATE
> console warnings. However, the plugin is only required for
> version 1.9.0 or higher to restore deprecated and removed
> functionality.

Loading it alongside jquery.js should be harmless. However to
benefit performance, I'm only loading it in debug mode.

Plus, there's a small chance that it does actually change
functionality because of the way it is implemented. The plugin
always overloads the methods with compatibility versions, which
should effectively be a no-op on top of old version of jQuery
like ours (one that already has the old functionality), but it
feels too risky at this stage when our only intent is
instrumentation.

Bug: 44740
Change-Id: I468d6b45eae8368fac6af746bbb2ccb702f862ff
2014-05-08 23:51:54 +00:00
Addshore
767b1d8574 Merge "Fix CodeSniffer errors and warnings in includes/utils/" 2014-05-08 23:41:01 +00:00
Translation updater bot
e7ce30cffe Localisation updates from https://translatewiki.net.
Change-Id: I8b8596065dd60b84be5b34be6a2795d97b982da1
2014-05-08 20:44:47 +00:00
Bartosz Dziewoński
62e7156f76 ResourceLoaderModule: Add @since annotations to new methods
Change-Id: I91434fcdc87efdf6d49ec94348f26d20c840abad
2014-05-08 22:26:42 +02:00
jenkins-bot
540309a237 Merge "Fix declaration of ForeignDBFile::delete()" 2014-05-08 20:03:10 +00:00
Siebrand Mazeland
25f917688c Fix CodeSniffer errors and warnings in includes/utils/
Change-Id: I5e59dd8136fcbd8dc833d7c9f6288656e13df6e9
2014-05-08 21:15:09 +02:00
Faidon Liambotis
d1c62a372a img_auth: handle files in the transcoded zone
img_auth.php does not currently handle filepaths for transcoded videos
at all, and instead falls back attempting to open files out of the
public zone, which obviously fails as these files do not exist there.

Add a branch that handles transcoded containers in the same manner as
thumbs and thus allowing access to those files from private wiki.

Bug: 65007
Change-Id: I7182206ba09dd2466fc51aa1d51116dd13db980c
2014-05-08 16:17:33 +00:00
Timo Tijhof
40b569aa38 mediawiki.user.test: Remove dated comment about "qunit/index.html"
That file was removed in MediaWiki 1.20.

Change-Id: Iffeb039bbbc6843a83d3796541ebb1773281c01f
2014-05-08 13:03:30 +02:00
Siebrand Mazeland
8f5062a8df Fix i18n issue in Special:NewImages
As Rillke has reported in
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Showhidebots/en
the text for the check box was incorrect. It turned out to be a strange
re-use of messages. Replaced it with a proper message.

No re-uses in core. Remaining re-use outside of core has been taken care of
in I4458ab7f6e53

Change-Id: I48042d0e60ce213db3db123179d9658cdd013a8f
2014-05-08 07:48:22 +00:00
umherirrender
969349e945 Fix declaration of ForeignDBFile::delete()
Strict Standards: Declaration of ForeignDBFile::delete() should be
compatible with that of LocalFile::delete()

Followed-Up: I60cab27e0708a818c77791cc89194b6dd726da0b
Change-Id: I11d32c0a529ec76978cde38c038b4984ca13e8ba
2014-05-08 05:01:14 +00:00
Siebrand Mazeland
8846668a17 Convert leading spaces to tabs
Change-Id: I416376c861661fdd34ab42675e06c8c43041a978
2014-05-07 22:48:45 +02:00
Translation updater bot
85c05d41c5 Localisation updates from https://translatewiki.net.
Change-Id: Ie146731bd82d74d95820be5b8fc0df914f7f4abc
2014-05-07 19:53:34 +00:00
jenkins-bot
399668448a Merge "mediawiki.page.watch.ajax: Don't use deprecated tooltipAccessKeyRegexp" 2014-05-07 19:46:25 +00:00
Timo Tijhof
2edfe7c80e mediawiki.page.watch.ajax: Don't use deprecated tooltipAccessKeyRegexp
Remove dependency on 'mediawiki.page.startup' since this is no
longer needed (it was there to ensure mw.util.init, which used to
populate mw.util.tooltipAccessKeyRegexp, ran first).

Change-Id: Iceecc228bce676de84de35220fa4d217be0f0b75
2014-05-07 19:49:25 +02:00
jenkins-bot
e404c01589 Merge "Release notes for Ib5032e4e" 2014-05-07 13:32:50 +00:00
jenkins-bot
b5d713a30a Merge "mediawiki.action.edit.editWarning: Reuse jQuery collections" 2014-05-07 12:27:47 +00:00
Derk-Jan Hartman
965fec558e mediawiki.action.edit.editWarning: Reuse jQuery collections
Change-Id: I3084efe5962bb6a13700f95745c415fb074bc7bd
2014-05-07 12:23:00 +00:00
Bartosz Dziewoński
87c5865ed4 Release notes for Ib5032e4e
Change-Id: I47899d0a8a6ae01fc71d76b9c913e170e87fa9c1
2014-05-07 14:14:07 +02:00
jenkins-bot
1122fdbed0 Merge "resourceloader: Report problematic modules in only=styles as well" 2014-05-07 11:46:09 +00:00
Timo Tijhof
29a12bec58 mediawiki.toc: Clean up left overs
Follows-up d7a40c8 which creates the mediawiki.toc module and
moved the tocToggle method from mediawiki.util.

The tocToggle callback used to be a public method and therefore
had two things about that that are obsolete:

* Taking the toggle as parameter.
  This is a private method now, and we already have a reference
  to the toggle.

* Asserting that the #toc has an <ul>.
  There is no need to defer this check this far in, nor to repeat
  it on each click. The old code checked it earlier was well, but
  we used to repeat the check here as the method was public.
  Now that it is a private helper method we can simply return
  early before setting it all up in the first place.

Also:

* Removed jsduck-like construction. This file is being indexed,
  as part of src/mediawiki/, but turning this into a class seems
  odd. It doesn't really have any structure to it.
  It's just UI glue. Turned it into an ignored file (no doc blocks).

Change-Id: I21d4f735032b96f00291502e06d9d35a74648143
2014-05-07 07:40:19 +00:00
jenkins-bot
26fcab1f18 Merge "Clarify docs for wgCookieExpiration" 2014-05-07 02:38:09 +00:00
Matthew Flaschen
8113306191 Clarify docs for wgCookieExpiration
Change-Id: Ie6c77c5251e906dcee1650b3a4598da6adb30e30
2014-05-06 22:33:18 -04:00
Antoine Musso
5e3a3412ba API: Expose git branch in siteinfo
For browser testing, I need a reliable way to determine the branch in use
on a target wiki.  One could parse the generator name forged when
querying the siteinfo, but that yields:

 MediaWiki 1.24alpha  instead of master
 MediaWiki 1.24wmf2   instead of wmf/1.24wmf2

I am not really willing to reverse engineer the version to figure out
the branch, instead just expose it over the API.

Bug: 62509
Change-Id: If3db8f480ce0d590522741d40fb8e43b753efb41
2014-05-07 00:25:51 +00:00
Fomafix
1d15388d21 mediawiki.toc: Hide toc without animation in initial collapsed state
Bug: 64927
Change-Id: I5b46390b3dc6e42031f636119673892507151f54
2014-05-07 01:13:58 +02:00
jenkins-bot
eb26e86e80 Merge "Pass $user to LocalFileDeleteBatch" 2014-05-06 21:20:21 +00:00
jenkins-bot
a4c6f45090 Merge "Make gallery properties publically accessible." 2014-05-06 20:32:48 +00:00
Translation updater bot
a614c57b0f Merge "Localisation updates from https://translatewiki.net." 2014-05-06 20:03:57 +00:00
Translation updater bot
0c86349b97 Localisation updates from https://translatewiki.net.
Change-Id: Ieca93135f7af56bc2079362cc763e7204a8024cb
2014-05-06 19:51:14 +00:00
umherirrender
2d11016ecd Pass $user to LocalFileDeleteBatch
This avoids the use of $wgUser

Change-Id: I60cab27e0708a818c77791cc89194b6dd726da0b
2014-05-06 21:31:29 +02:00
Bryan Davis
831265410e Check for valid git repository in GitInfo::getHeadCommitDate
Ensure that GitInfo::getHead returns a valid value before attempting to
use the git binary to extract a commit date.

Bug: 64948
Change-Id: Ib0d245306842706dbb5d4b9522bb381a5f55526c
2014-05-06 13:19:43 -06:00
jenkins-bot
11eab8755a Merge "Fix typo for system message name" 2014-05-06 19:04:05 +00:00
Chad Horohoe
b08254f12f Merge "SpecialSearch: Get title from one we already have on hand in the context" 2014-05-06 16:04:28 +00:00
withoutaname
07382d63fe Fix typo for system message name
Change-Id: Ic23f71ab9f6018152f89f35a944c9daae9f94970
2014-05-06 08:53:25 -07:00
jenkins-bot
21a66ecc9a Merge "Add version comments for 1.24 to all updaters" 2014-05-06 13:04:41 +00:00
jenkins-bot
12fcee145b Merge "Special:BookSources: Remove link to PriceSCAN" 2014-05-06 13:03:42 +00:00
jenkins-bot
97fbf724fa Merge "Fix missing import in mediawiki.ui" 2014-05-06 12:18:59 +00:00
jenkins-bot
a247bc4227 Merge "resourceloader: Use $.ajax instead of duplicating its "script" logic" 2014-05-06 10:24:29 +00:00
jenkins-bot
10e90f34dc Merge "Move profile In/OUT call out of MWPHPUnitCommand" 2014-05-06 10:18:51 +00:00
jenkins-bot
2997510c53 Merge "mediawiki.util: Clean up mw.util.$content" 2014-05-06 10:16:26 +00:00
Timo Tijhof
9f2720839f resourceloader: Use $.ajax instead of duplicating its "script" logic
Also removed isFunction check. This is an internal method and the
parameter is either a function or omitted/nulled. No need for aggressive
validation.

Change-Id: I6bbd82ca1b986b45a2f4653427396b9a6fceb6e8
2014-05-06 10:15:25 +00:00
jenkins-bot
2f81495eb2 Merge "Move teardownTestDB and wfLogProfilingData out of MWPHPUnitCommand" 2014-05-06 10:13:59 +00:00
Timo Tijhof
dbc16057d9 mediawiki.util: Clean up mw.util.$content
* Document how to use it (including the tricky bit with it needing
 a dependency on mediawiki.page.startup).

* Refer to mw.hook and #mw-content-text as recommended method of
  getting just the wikipage content.

* Remove the deprecated backwards-compatibility selectors.
  The core skins (Vector, Monobook, Modern, CologneBlue) all
  have mw-body now. Third-party skins should adopt those if they
  haven't already.

Change-Id: I30bdd893e0a0a340076efa7ce32fbd4b775bc3db
2014-05-06 10:12:16 +00:00
jenkins-bot
446227fe22 Merge "Remove includepath stuff from MediaWikiPHPUnitCommand" 2014-05-06 10:00:16 +00:00
Gilles Dubuc
b38c1a2e37 Fix missing import in mediawiki.ui
The .box-sizing() LESS function was moved in:

https://gerrit.wikimedia.org/r/#/c/127843/

And the usage in forms.less wasn't finding it anymore.

Change-Id: I7ae97bd5d4aa113af039182ff39817926bbbf3ed
2014-05-06 11:11:37 +02:00
Timo Tijhof
678b4d5547 Vector: Don't supress focus outline on watch star
This is an old remnant that was intended to remove outline from
images inside anchor links. However the watch star is no longer
implemented this way and this is doing nothing. Except when
the element is focussed (using keyboard tab index), then this
rule is overriding the default :focus and causing the user to
potentially get confused since it is no longer clear where the
focus has gone to.

Bug: 64934
Change-Id: I57ee089c1ae18bb7a6c55ae17eab3a06f9e1f7d2
2014-05-06 02:40:51 +02:00
Bryan Davis
71fc32c303 Support precomputed data in GitInfo
Support reading git repository information from a JSON file in the cache
directory. When present, this file serves to provide information needed
by getHead, getHeadSHA1, getHeadCommitDate, getCurrentBranch and a new
getRemoteUrl method. A GitInfo::precomputeValues method is also provided
which can generate the cache file for a given GitInfo instance.

This support can be combined with a deployment step to reduce the need
to repeatedly gather information from the .git files/git binary. It also
allows computing information that can be lost when directory structures
differ between deployment staging hosts and hosts running MediaWiki.

This change also adds memoization of computed values for a given GitInfo
instance which may provide a small performance boost even for
deployments which are not using precomputed cache files.

Bug: 53972
Change-Id: I66e058acc5a71e5d82644f85d819f49d6ee9d1e6
2014-05-05 23:50:12 +00:00
jenkins-bot
ed945112a8 Merge "mediawiki.mixins: Move .box-sizing mixin from mediawiki.ui utilities" 2014-05-05 23:41:47 +00:00