lhc/web/wiklou.git
10 years agoAdd extmetadata to the ForeignAPIFile iiprops
Mark Holmquist [Wed, 9 Oct 2013 22:14:52 +0000 (15:14 -0700)]
Add extmetadata to the ForeignAPIFile iiprops

Also clean up iiprop handling in ForeignAPIRepo.

Change-Id: I4a1b46669658cc7b7d074f8fb85dd172e6c45633

10 years agoAdd "extended" file metadata to API
Brian Wolff [Mon, 12 Aug 2013 16:18:29 +0000 (13:18 -0300)]
Add "extended" file metadata to API

Part of the point of this, is to add a hook to allow extensions to add
their own metadata (I intend to create a companion extension to parse
Commons description pages - I5e6bc45f9751)

It's hoped that this would provide a simple system to get file metadata,
and would be able to return information on any wiki (even without any
extensions installed to provide additional information). So it could
fallback to exif data, if there's no better source of information for
the file available. It's also meant to be done in such a way that, in
the future, when Wikibase is deployed on Commons, it could be integrated
without too much fuss.

marktraceur changed this patch to be a little less heavy-handed: it will
now return unformatted data by default from the API, but there's also a
method for formatting that data in the way that bawolff originally
intended. I'm still trying to figure out if there's much use in that
method, but for now it's not particularly useful.

Change-Id: I77303d8e535fc1c42e14cfb853814e5c434a81ec

10 years agoMake FormatMetadata accept RequestContext, instead of hard coding $wgLang.
Brian Wolff [Wed, 7 Aug 2013 23:03:34 +0000 (20:03 -0300)]
Make FormatMetadata accept RequestContext, instead of hard coding $wgLang.

The point of this patch is to allow someone to use this class
to get the metadata formatted in the language of their choice
(by passing in an appropriate context object), instead of
forcing $wgLang. This is important for future evil plans I
have.

To do this, some of the previous static methods were changed
to non-static. I checked and fixed all users of such methods
(including extensions). Some of the implied private methods
were also explicitly marked as such.

Change-Id: I673d99fa36280d1baf14c150f4aaff039676830a

10 years agoAdd an interface for getting "standard" file metadata.
Brian Wolff [Wed, 28 Aug 2013 23:09:07 +0000 (17:09 -0600)]
Add an interface for getting "standard" file metadata.

Currently file metadata is handler dependant. However they usually
end up extracting the same type of data (author, date, etc) plus
one or two handler specific things. This adds a handler independent
interface for getting metadata that is likely to be common for all
types of file (At the moment, this is the exif/iptc/xmp information)

This commit used to also contain stuff adding parser functions,
which is now split to its own commit. This commit is needed
by a bunch of other commits, in particular I0d957891e0.

Change-Id: I43d9252f69dc5b8ba0b848cf40aa1b97329c85ae

10 years agoMerge "Escape backticks when quoting MySQL identifiers"
jenkins-bot [Wed, 9 Oct 2013 22:12:26 +0000 (22:12 +0000)]
Merge "Escape backticks when quoting MySQL identifiers"

10 years agoMerge "Add mediawiki.inspect module"
jenkins-bot [Wed, 9 Oct 2013 22:01:19 +0000 (22:01 +0000)]
Merge "Add mediawiki.inspect module"

10 years agoAdd mediawiki.inspect module
Ori Livneh [Tue, 8 Oct 2013 06:08:54 +0000 (23:08 -0700)]
Add mediawiki.inspect module

This patch adds a mediawiki.inspect ResourceLoader module. The module contains
tools for inspecting page composition and performance. It is currently
restricted to a set of static methods for querying the ResourceLoader module
registry, the most useful of which is #inspectLoadedModules, which prints a
list of loaded ResourceLoader modules and their size in kilobytes, ordered from
largest to smallest. This method has a lazy-loading alias: mw.loader.inspect.

Change-Id: I5a007fdf11196664f425cd7800eec7fc3fdb629f

10 years agoEscape backticks when quoting MySQL identifiers
Bryan Davis [Tue, 8 Oct 2013 18:14:52 +0000 (12:14 -0600)]
Escape backticks when quoting MySQL identifiers

Previously mysql_real_escape_string() was improperly used which escapes
for inclusion in a plain string rather than an identifier.

Also adds basic test support for the DatabaseMysqlBase class.

Co-Authored by: Antoine Musso <hashar@free.fr>
Bug: 55427
Change-Id: Ic045e195c89d8d5d0f0edbda0cd1df781de7025c

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 9 Oct 2013 19:36:07 +0000 (19:36 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I91e6b1a32aaca18175c97130685a26e9a5704f8d

10 years agoMerge "Fix ForeignAPIRepo::fileExistsBatch()"
jenkins-bot [Wed, 9 Oct 2013 19:11:44 +0000 (19:11 +0000)]
Merge "Fix ForeignAPIRepo::fileExistsBatch()"

10 years agoMerge "Tests for API section editing"
jenkins-bot [Wed, 9 Oct 2013 18:14:09 +0000 (18:14 +0000)]
Merge "Tests for API section editing"

10 years agoTests for API section editing
Kunal Mehta [Sat, 7 Sep 2013 05:56:37 +0000 (22:56 -0700)]
Tests for API section editing

Change-Id: Ibc05c54cd2c9e1775f72dd969e7677b5238e12ad

10 years agoMerge "Remove wfDl() and cleanup everything it touched"
jenkins-bot [Wed, 9 Oct 2013 18:00:43 +0000 (18:00 +0000)]
Merge "Remove wfDl() and cleanup everything it touched"

10 years agoMerge "Fix PHP CodeSniffer warnings and errors"
jenkins-bot [Wed, 9 Oct 2013 17:58:50 +0000 (17:58 +0000)]
Merge "Fix PHP CodeSniffer warnings and errors"

10 years agoRemove wfDl() and cleanup everything it touched
Chad Horohoe [Wed, 9 Oct 2013 16:46:57 +0000 (09:46 -0700)]
Remove wfDl() and cleanup everything it touched

wfDl() is a wrapper around dl(), which is an evil function and
basically only works from the command line of Zend. Luckily
no extension has ever used this thing, so let's just remove it
outright.

For comparison, here's a list of places it does not work:
- hhvm
- php as apache module
- php compiled with zts support
- safe_mode
- Basically any shared host that cares about security

Most callers are using it to check for extension support and are
actually failing gracefully when wfDl() returns false. In these
places we're just going to use extension_loaded().

While we're at it, clean up some of the test skip logic in the
media tests so we can bail as early as possible if we know we
can't complete the test.

This also immediately removes $wgLoadFileinfoExtension. It's been
enabled by default since 5.3 and falls back gracefully when the
support isn't available.

Change-Id: Ieb430dfc74483731dde51d6e20fa700d641ba1f4

10 years agoFix ForeignAPIRepo::fileExistsBatch()
Brad Jorsch [Wed, 26 Dec 2012 16:55:49 +0000 (11:55 -0500)]
Fix ForeignAPIRepo::fileExistsBatch()

ForeignAPIRepo::fileExistsBatch() is extremely broken:
* If passed an array with numeric keys (e.g. as called from
  FileRepo::fileExists()), it will cache the fact that the item at index
  0 from the first call was found or not found, no matter what the
  actual file being queried is!
* But it doesn't even use its cache correctly. Rather than checking the
  value cached, it just assumes anything that was cached exists.
* It checks whether the page in the remote repository has a description
  page, not whether a file actually exists for the title.
* But it doesn't do that right either, so in the vast majority of cases
  it will decide everything exists.

All of this is offset by the fact that I can't find any code path that
would actually call this function.

Change-Id: I421e8892b642f5267b8dd755183ebd711db83152

10 years agoFix PHP CodeSniffer warnings and errors
Siebrand Mazeland [Tue, 8 Oct 2013 17:11:35 +0000 (19:11 +0200)]
Fix PHP CodeSniffer warnings and errors

Also apply formatting convention.

Change-Id: I792210d0d1c5f9089a71cecba95e17822f6da0e3

10 years agoMerge "Remove incorrect span in translation"
jenkins-bot [Wed, 9 Oct 2013 16:21:18 +0000 (16:21 +0000)]
Merge "Remove incorrect span in translation"

10 years agoRemove incorrect span in translation
Siebrand Mazeland [Tue, 8 Oct 2013 16:46:50 +0000 (18:46 +0200)]
Remove incorrect span in translation

Probably originates from a bugged machine translation API.

Change-Id: I39c7d154ffc085991f683de107deb05d730f065d

10 years agoRemove unused local variable
Siebrand Mazeland [Tue, 8 Oct 2013 16:08:00 +0000 (18:08 +0200)]
Remove unused local variable

Change-Id: I93ce25fe158f7a82ade102953d6a2453620b7e0e

10 years agoMerge "tests: remove date from @author docs statements"
jenkins-bot [Wed, 9 Oct 2013 15:38:53 +0000 (15:38 +0000)]
Merge "tests: remove date from @author docs statements"

10 years agoMerge "Make items in the StringUtilsTest data provider easier to identify by adding...
jenkins-bot [Wed, 9 Oct 2013 15:34:21 +0000 (15:34 +0000)]
Merge "Make items in the StringUtilsTest data provider easier to identify by adding names."

10 years agoMerge "Fix PHP CodeSniffer errors and warnings"
jenkins-bot [Wed, 9 Oct 2013 15:17:59 +0000 (15:17 +0000)]
Merge "Fix PHP CodeSniffer errors and warnings"

10 years agoMake items in the StringUtilsTest data provider easier to identify by adding names.
Jan Zerebecki [Thu, 23 May 2013 09:37:32 +0000 (11:37 +0200)]
Make items in the StringUtilsTest data provider easier to identify by adding names.

Change-Id: I026eff69236187ce3d2ff2fc261a5e1d9cd88b24

10 years agoUpdate formatting
Siebrand Mazeland [Tue, 8 Oct 2013 11:43:42 +0000 (13:43 +0200)]
Update formatting

With some manual corrections.

Change-Id: Icd947288c32fdb90a0f35388963ef5a17ffa58e7

10 years agoAdd some siteinfo to the repo info array
Mark Holmquist [Tue, 8 Oct 2013 07:01:54 +0000 (00:01 -0700)]
Add some siteinfo to the repo info array

Used for linking to user pages on remote repos in the
MultimediaViewer extension.

Change-Id: Ia703d63e8e02b1e8fbc90b7d7f90a748d9e177ec

10 years agoQuick refactor of the http logic in ForeignAPIRepo
Mark Holmquist [Tue, 8 Oct 2013 20:11:54 +0000 (13:11 -0700)]
Quick refactor of the http logic in ForeignAPIRepo

Automatic caching, will enable slightly smaller patches elsewhere.

Resetting after failing at a rebase.

Change-Id: I6849107a3af773687a31155b23a2d7b4d7a60645

10 years agoMerge "Fix revision table cleanup on delete"
jenkins-bot [Tue, 8 Oct 2013 20:36:45 +0000 (20:36 +0000)]
Merge "Fix revision table cleanup on delete"

10 years agomediawiki.action.edit.preview: Fix for LiquidThreads hack
Timo Tijhof [Tue, 8 Oct 2013 19:40:00 +0000 (21:40 +0200)]
mediawiki.action.edit.preview: Fix for LiquidThreads hack

LiquidThreads is loading this core module when rendering an
inline edit form. Because the form doesn't have the same ID
as the one in core, this broke after becd284.

It previously worked because the click event on the button (of
which LQT did duplicate the ID from core) bubbles up to the
document body and thus trigger this private handler of the
core edit preview module.

Change-Id: I9e35d0c48b86e1c9073b68313a8a330c6ea85b86

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Tue, 8 Oct 2013 19:18:47 +0000 (19:18 +0000)]
Merge "Localisation updates from translatewiki.net."

10 years agoMerge "Add file-link "parser" to mw.Title from commons"
jenkins-bot [Tue, 8 Oct 2013 19:09:15 +0000 (19:09 +0000)]
Merge "Add file-link "parser" to mw.Title from commons"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Tue, 8 Oct 2013 19:00:46 +0000 (19:00 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I331db0fe25638bdab35fbf54d00dd77f93488a7a

10 years agoAdd file-link "parser" to mw.Title from commons
Mark Holmquist [Fri, 4 Oct 2013 00:06:53 +0000 (17:06 -0700)]
Add file-link "parser" to mw.Title from commons

Rillke has been amazing and provided us with a first pass at a file URL
parser for MediaWiki:

https://commons.wikimedia.org/wiki/MediaWiki:Gadget-libUtil.js

Hoping to use this for Extension:MultimediaViewer and others in the near
future - potentially replacing patchset Ib69d1ffdfd3b58c2e8e3314940a2cad311b85533

Also tests.

Change-Id: Ie31e6df376bda087e92ec889d54df3374ba96b5e

10 years agoMerge "Allow $context->setTitle( null )"
jenkins-bot [Tue, 8 Oct 2013 18:30:02 +0000 (18:30 +0000)]
Merge "Allow $context->setTitle( null )"

10 years agoAdd doc comment to Status explaining use
Bryan Davis [Tue, 8 Oct 2013 17:51:32 +0000 (11:51 -0600)]
Add doc comment to Status explaining use

Tim posted a nice explanation of the recommended pattern for using the
Status object to wikitech-l. This change copies that explanation into
the phpdoc comment block of the Status class in an attempt to propagate
the meme.

Change-Id: Ia98543caaa829cad443abf0f0f5038b3de943ef8

10 years agoFix PHP CodeSniffer errors and warnings
Siebrand Mazeland [Tue, 8 Oct 2013 17:32:04 +0000 (19:32 +0200)]
Fix PHP CodeSniffer errors and warnings

Change-Id: I573d73b4cf1dcddfe14e9d565e4f170ad024ea31

10 years agoMerge "Fixup parameter type hints"
jenkins-bot [Tue, 8 Oct 2013 17:31:22 +0000 (17:31 +0000)]
Merge "Fixup parameter type hints"

10 years agoMerge "Add method parameter type documentation"
jenkins-bot [Tue, 8 Oct 2013 17:08:15 +0000 (17:08 +0000)]
Merge "Add method parameter type documentation"

10 years agoMerge "Move forceHTTPS check until after wgTitle is setup"
jenkins-bot [Tue, 8 Oct 2013 16:34:13 +0000 (16:34 +0000)]
Merge "Move forceHTTPS check until after wgTitle is setup"

10 years agoAdded $wgExtensionEntryPointListFiles for use with mergeMessageFileList.php
Reedy [Wed, 18 Sep 2013 23:00:47 +0000 (00:00 +0100)]
Added $wgExtensionEntryPointListFiles for use with mergeMessageFileList.php

Going to be used to change target file for labs vs production

Change-Id: Id4b16083435ef7f4fce31861c72889e664d07236

10 years agoAdd list=allfileusages
umherirrender [Thu, 2 May 2013 15:28:33 +0000 (17:28 +0200)]
Add list=allfileusages

This allows the client to enumerate through entries of the imagelinks
table.

This can be useful to find images from foreign repos used on the own
wiki.

Change-Id: I2ad0579e3521868d39f7d495ea9c83a2cd9731d6

10 years agoFix help string to avoid PHP notice
S Page [Tue, 8 Oct 2013 04:13:19 +0000 (21:13 -0700)]
Fix help string to avoid PHP notice

Escape a $ symbol in help message and rephrase slightly.  Without this,
`php maintenance/language/checkDupeMessages.php --help` prints
PHP Notice:  Undefined variable: dupeMessages in
        language/checkDupeMessages.php on line 56

Change-Id: Ie7c0f07e68cee1f7cd2758f71b09d34e339d4b7b

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Tue, 8 Oct 2013 00:59:50 +0000 (00:59 +0000)]
Merge "Localisation updates from translatewiki.net."

10 years agoRemoved RC query UNION
Aaron Schulz [Mon, 7 Oct 2013 16:38:25 +0000 (09:38 -0700)]
Removed RC query UNION

* MySQL is smart enough that this is no longer needed

Change-Id: If173cdc53599cd02068ce2480ab667c5f9e69b76

10 years agoMerge "mediawiki.action.edit.preview: Clean up and optimisation"
jenkins-bot [Tue, 8 Oct 2013 00:23:37 +0000 (00:23 +0000)]
Merge "mediawiki.action.edit.preview: Clean up and optimisation"

10 years agoMerge "Add script to purge changed pages from cache"
jenkins-bot [Tue, 8 Oct 2013 00:17:53 +0000 (00:17 +0000)]
Merge "Add script to purge changed pages from cache"

10 years agoMake .transition mixin take only 1 value and fix usage
Timo Tijhof [Mon, 7 Oct 2013 23:01:45 +0000 (01:01 +0200)]
Make .transition mixin take only 1 value and fix usage

Follows-up 99c92a87fc which turned
  transition: left 250ms;
  transition: margin-left 250ms, padding 250ms
into:
  transition: 'left 250ms';
  transition: margin-left 250ms padding 250ms
  > Invalid CSS property value: 'left 250ms'
  > Invalid CSS property value: margin-left 250ms padding 250ms

Removed quotes from 'left 250ms' which was producing invalid CSS.

The @arguments operator in Less joins a variadic list of
arguments by space. In the case of .transition this is a problem
because its values are supposed to be separated by a comma
(like background-image and font-family).

Changing the .transition definition to take only 1 argument
instead of multiple (...). There is no point in supporting
multiple arguments. All it does is it take away our ability to
spot these errors at parse time (Less would be able to throw an
error for passing a 2 arguments to a mixin that only takes 1).

Fixed the invocation with 2 arguments to instead pass 1 argument
that has a comma in it. Both "~'a,b'" and "a, b;" would work here
(doesn't matter) choosing ; here because for consistency with calls
that do use mutiple argments:
 foo(~'foo, bar', ~'baz, quux')
 foo(foo, bar; baz, quux)

Change-Id: I80786c726a412d6b9e04c384112849e9587990b4

10 years agoAdd script to purge changed pages from cache
Bryan Davis [Tue, 1 Oct 2013 17:29:56 +0000 (11:29 -0600)]
Add script to purge changed pages from cache

This maintenance script could be used to recover from large HTCP
listener outages and/or network partitions. It searches the database for
pages having revisions occurring within a specified time period,
converts them to full URLs and sends squid/varnish purge messages using
SquidUpdate. A command line option allows specifying a specific
IP:port combination for HTCP purge datagrams which can be used to
isolate the purge announcement to a particular varnish server or data
center.

Co-Authored by: Aaron Schulz <aschulz@wikimedia.org>
Bug: 54647
Change-Id: Id0e95290e83333545e6bb0378cc620c35c653bf9

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 7 Oct 2013 21:16:52 +0000 (21:16 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ib6cdd80506e78608d9d8af15088020528fdec256

10 years agoMerge "mediawiki.Title: Fix weird <h1> in constructor description"
jenkins-bot [Mon, 7 Oct 2013 21:13:38 +0000 (21:13 +0000)]
Merge "mediawiki.Title: Fix weird <h1> in constructor description"

10 years agoresourceloader: Support hashes as cache invalidation trigger
Timo Tijhof [Fri, 30 Aug 2013 00:31:37 +0000 (17:31 -0700)]
resourceloader: Support hashes as cache invalidation trigger

For now ResourceLoader will still internally deal with timestamps,
especially because they are easier to max() on the client side
(on the server we could make a hash of different hashes, on the
client that's a bit annoying).

However ResourceLoaderModule#getHashMtime will abstract the logic
we already use in ResourceLoaderLanguageDataModule and have
encouraged others to use, which is to put the timestamp and
hash in Memcached, and use that to observer the hash change and
update the timestamp when it does.

Updated ResourceLoaderLanguageDataModule to make use of this.

Change-Id: Ib051ef41ba239084671c30fd275b8d94099d5d52

10 years agoMove forceHTTPS check until after wgTitle is setup
csteipp [Mon, 7 Oct 2013 19:47:43 +0000 (12:47 -0700)]
Move forceHTTPS check until after wgTitle is setup

Since the forceHTTPS logic checks if the user is logged in, which calls
all sorts of hooks, some that assume that $wgTitle is setup (like
AbuseFilter for preventing autocreation of usernames), move the
logic down a few lines.

Bug: 55435
Bug: 53498
Change-Id: I53c82921595a9014b555e4ec468e5ba10454cd3a

10 years agomediawiki.Title: Fix weird <h1> in constructor description
Timo Tijhof [Mon, 7 Oct 2013 19:38:10 +0000 (21:38 +0200)]
mediawiki.Title: Fix weird <h1> in constructor description

The leading '#' was triggering a Markdown heading instead of a
jsduck reference. Working around by moving the line break.

Change-Id: I8bf2719938c3c4a092ce5499bae0c7b88f4544c1

10 years agoAllow $context->setTitle( null )
Brad Jorsch [Mon, 7 Oct 2013 18:58:27 +0000 (14:58 -0400)]
Allow $context->setTitle( null )

If something is messing around with $wgTitle before MediaWiki::main()
sets $wgTitle in the first place, it needs to be able to reset it back
to null to avoid a problem like bug 53498. And to do that properly, it
also needs to be able to clear the title in the RequestContext.

Bug: 55435
Change-Id: I6c763b70bbffa0762ca52e61acf7dc200da4075f

10 years agoFix "Unsupported operand types at thumb.php on line 429"
Reedy [Mon, 7 Oct 2013 18:46:02 +0000 (19:46 +0100)]
Fix "Unsupported operand types at thumb.php on line 429"

Return type of $handler->parseParamString() wasn't evaluated,
instead $handler value was compared again

Bug: 55437
Change-Id: Iedb940d9f1ad4d137b9732e7e624e55d05bc2c96

10 years agoMerge "Accessibility: Don't remove checkbox outline on focus"
jenkins-bot [Mon, 7 Oct 2013 18:23:53 +0000 (18:23 +0000)]
Merge "Accessibility: Don't remove checkbox outline on focus"

10 years agoAccessibility: Don't remove checkbox outline on focus
Derk-Jan Hartman [Sun, 25 Aug 2013 13:22:39 +0000 (15:22 +0200)]
Accessibility: Don't remove checkbox outline on focus

Native checkboxes and radiobuttons on Mac OS X are not fully
styleable. Don't remove the focus ring for those elements because it
makes them less accessible.

Also the outline was removed outside of the focus selector, which
isn't really needed.

Change-Id: I716c84b34b5adb26691f0d4ecd13739de7b8bdbf

10 years agoMove release note for meta=filerepoinfo into api section
umherirrender [Sat, 5 Oct 2013 08:25:11 +0000 (10:25 +0200)]
Move release note for meta=filerepoinfo into api section

Follow-Up: I1aaed0895d2a0bc224c82e93975ecf6afd8cb6b8
Change-Id: I83e393aca85ae215f515024322942acafa20462b

10 years agomediawiki.action.edit.preview: Clean up and optimisation
Timo Tijhof [Sun, 6 Oct 2013 21:27:37 +0000 (23:27 +0200)]
mediawiki.action.edit.preview: Clean up and optimisation

* Remove redundant inline 'position: absolute' on the spinner.
* Remove trailing white space in jquery.spinner.css.
* Cache #editform query result.
* Remove redundant removeSelectors.join(',') logic.
* White space.
* Move delegate click event listener down from body to #editform
  (the common ancestor of the #wpDiff and #wpPreview buttons).
* Remove minHeight (was needed because the spinner was positioned
  absolute), which gets rid of the weird white gap for #wikiPreview if
  you do live diff instead of live preview.

Change-Id: Icdf975f201947ecadb886057131f2531c68791fb

10 years agoMerge "Remove placeholder tests"
jenkins-bot [Mon, 7 Oct 2013 17:01:40 +0000 (17:01 +0000)]
Merge "Remove placeholder tests"

10 years agoSet 'tooltip-iwiki' as optional
Siebrand Mazeland [Mon, 7 Oct 2013 08:59:41 +0000 (10:59 +0200)]
Set 'tooltip-iwiki' as optional

Spotted by Beta16 in
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Tooltip-iwiki/en

Change-Id: Ib60dd6072728238684112865a5ee0b015d1f2f0c

10 years agoRemove redundant parentheses
Kunal Mehta [Sun, 6 Oct 2013 23:44:04 +0000 (16:44 -0700)]
Remove redundant parentheses

Change-Id: I848e6a055df748ac758082372fe3b86f6f323cc9

10 years agoFollow-up d94d29a920: Fix typo in release notes
Timo Tijhof [Sun, 6 Oct 2013 23:17:29 +0000 (01:17 +0200)]
Follow-up d94d29a920: Fix typo in release notes

Change-Id: Ic2cb19df45193b260d785fda5acf2ce956b51dde

10 years agopostEdit: Add documentation for hook so it shows up in the index
Timo Tijhof [Sun, 6 Oct 2013 22:25:15 +0000 (00:25 +0200)]
postEdit: Add documentation for hook so it shows up in the index

Follows-up 011ee683a.

Change-Id: I3ce89a91f6a299516dd8dfb93dd5cc5b784fa471

10 years agoSpecial:UserLogin UI improvements when user is logged in
MatmaRex [Sat, 24 Aug 2013 20:37:58 +0000 (22:37 +0200)]
Special:UserLogin UI improvements when user is logged in

* Show a warning about being already logged in above login form
* Show a button pointing to signup form with suitable explanation

Also changed some internal template stuff (s/createAnother/loggedin/).

Bug: 53306
Change-Id: I1672ee09330c231110c4db310a645d1382cc0b59

10 years agomediawiki.special.vforms: Information boxes' styles
MatmaRex [Fri, 30 Aug 2013 20:57:58 +0000 (22:57 +0200)]
mediawiki.special.vforms: Information boxes' styles

Only styles appropriate for errorbox were defined, but they were
applied to all boxes - contrary to the comment above, Vector doesn't
have styles for them (they are shared for all skins, and they are
awful), and they were anyway overriden by these due to selector
specificity.

Added styles for successbox and warningbox with composition on the
color wheel very similar to errorbox one, simply rotated and scaled.
Removed misleading comment.

Change-Id: I68d2c9b98a9166f5781fcded0318cca52ed6f2e6

10 years agoMerge "(bug 54980) Remove toolbox UserRights if anon user"
jenkins-bot [Sat, 5 Oct 2013 14:51:45 +0000 (14:51 +0000)]
Merge "(bug 54980) Remove toolbox UserRights if anon user"

10 years ago(bug 54980) Remove toolbox UserRights if anon user
addshore [Sat, 5 Oct 2013 14:20:52 +0000 (16:20 +0200)]
(bug 54980) Remove toolbox UserRights if anon user

Change-Id: Ie489ce327a56cf314c9dc525d6bd3eaa39739260

10 years agoMake the format of UDP-logged stats configurable
Ori Livneh [Tue, 1 Oct 2013 23:20:45 +0000 (16:20 -0700)]
Make the format of UDP-logged stats configurable

The format of datagrams generated by StatCounter and ProfilerSimpleUDP is not
described by any standard and appears to have been designed for compatibility
with the logging setup of the Wikimedia Foundation, which limits reusability.

This patch adds two configuration variables, $wgUDPProfilerFormatString and
$wgStatsFormatString, that can be used to specify the precise format that
MediaWiki will use. The default values for these variables causes MediaWiki to
generate the same output as before.

The secret evil plan is to change the defaults so that MediaWiki emits metrics
that are compatible with the popular StatsD format (see
<https://github.com/b/statsd_spec>). This would allow us to replace udpprofiler
with a generic StatsD instance instead.

Change-Id: Iaf00811d3f8d6b89c1c68e84fc1f2c93425d5a2d

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Fri, 4 Oct 2013 21:41:40 +0000 (21:41 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ic112ae52452378c970d37c0b3061433131f5f55d

10 years agoMerge "API: Add output of wgLogo to meta=siteinfo"
jenkins-bot [Fri, 4 Oct 2013 19:39:06 +0000 (19:39 +0000)]
Merge "API: Add output of wgLogo to meta=siteinfo"

10 years agoRemove placeholder tests
Chad Horohoe [Fri, 4 Oct 2013 19:33:58 +0000 (12:33 -0700)]
Remove placeholder tests

They give a false sense of test coverage and nobody's shown any
interest in implementing them.

Change-Id: Id15ddb555e059bb6a76c69ca57d09c91e96e91ce

10 years agoRemove use of deprecated LoadBalancer pickRandom
addshore [Fri, 4 Oct 2013 18:32:16 +0000 (20:32 +0200)]
Remove use of deprecated LoadBalancer pickRandom

Change-Id: If28b6dfe7d70827d1c7f7b3604cea2409b6ec483

10 years agoIntroduce .transition mixin
jrobson [Wed, 2 Oct 2013 01:02:56 +0000 (18:02 -0700)]
Introduce .transition mixin

Cleanup existing transition rules for readability

Change-Id: I2be09a7a8e7eeb42d8bf80cb033c81867da108a5

10 years agoTurn screen.css into screen.less
jrobson [Thu, 26 Sep 2013 18:43:00 +0000 (11:43 -0700)]
Turn screen.css into screen.less

* Separate external links into own less file to showcase how
many unnecessary css rules we have
* Introduce new mixins to allow embedding for list-style-image
* Replace use of /* embed */ with mediawiki mixins

Change-Id: If79d2d1f72579627597b291eec759441d6763c34

10 years agoMerge "Rewrite collapsibleNav as LESS file"
Brion VIBBER [Fri, 4 Oct 2013 18:07:30 +0000 (18:07 +0000)]
Merge "Rewrite collapsibleNav as LESS file"

10 years agoMerge "Strip excess newlines from formatting test"
jenkins-bot [Fri, 4 Oct 2013 18:01:53 +0000 (18:01 +0000)]
Merge "Strip excess newlines from formatting test"

10 years agoRewrite collapsibleNav as LESS file
jrobson [Mon, 30 Sep 2013 17:39:29 +0000 (10:39 -0700)]
Rewrite collapsibleNav as LESS file

* Rewrote css file as a LESS file for better maintainability
* Make use of core embed mixin
** Add .background-image-svg mixin for rendering svgs as background images

Change-Id: I72a66553d6ecee5018d4efaabfd0fa0df6c4135f

10 years agoMerge "LESS embeddable(): Use lessc::toBool"
Brion VIBBER [Fri, 4 Oct 2013 17:53:25 +0000 (17:53 +0000)]
Merge "LESS embeddable(): Use lessc::toBool"

10 years agoMerge "Mouseover explanations for interlanguage links in native language"
jenkins-bot [Fri, 4 Oct 2013 17:49:32 +0000 (17:49 +0000)]
Merge "Mouseover explanations for interlanguage links in native language"

10 years agoStrip excess newlines from formatting test
Chad Horohoe [Fri, 4 Oct 2013 17:44:26 +0000 (10:44 -0700)]
Strip excess newlines from formatting test

The result's basically the same either way, only difference is
things like

 "emptyObject": {

 },

Are now

 "emptyObject": {
 },

Results are still pretty, now passes in both Zend and HHVM

Change-Id: I6afa0fd49a7aef3f6b7ca1b4574f3de555521348

10 years agomw.Title: Add missing dependency on jquery.byteLength
Timo Tijhof [Fri, 4 Oct 2013 16:57:35 +0000 (18:57 +0200)]
mw.Title: Add missing dependency on jquery.byteLength

Follows-up 4894793ab.

Bug: 54977
Change-Id: If884324674198e26636785c0e95e5d61fd5c543e

10 years agoMerge "Fixed silly unlock bug in LocalFile"
jenkins-bot [Fri, 4 Oct 2013 16:19:33 +0000 (16:19 +0000)]
Merge "Fixed silly unlock bug in LocalFile"

10 years agoFixed silly unlock bug in LocalFile
Aaron Schulz [Fri, 4 Oct 2013 16:06:07 +0000 (09:06 -0700)]
Fixed silly unlock bug in LocalFile

* Removed the lock instead of just purging some cache data

bug: 54978
Change-Id: Ida007c28e07b0fe1803ab8ed027bc2ec4f55af19

10 years agoMerge "Allow appending text to redirects from moved pages"
jenkins-bot [Fri, 4 Oct 2013 14:57:57 +0000 (14:57 +0000)]
Merge "Allow appending text to redirects from moved pages"

10 years agoMouseover explanations for interlanguage links in native language
Pavel Selitskas [Thu, 29 Nov 2012 10:42:17 +0000 (13:42 +0300)]
Mouseover explanations for interlanguage links in native language

Adds a language name in User's language from CLDR
to an interwiki 'title' attribute. Believed to be
RTL-compilant.

New message added: tooltip-iwiki, added to $preloadedMessages

Bug: 5231
Change-Id: I3dcb00cdc28a10711b6703fa509b8b8d06e325a2

10 years agoAllow appending text to redirects from moved pages
Jackmcbarn [Thu, 3 Oct 2013 15:09:08 +0000 (11:09 -0400)]
Allow appending text to redirects from moved pages

Add message move-redirect-text, which is appended to redirects created by
page moves (empty by default). This could be used on enwiki to automatically
add {{R from move}} while still allowing non-admins to revert the move, for
example.

Change-Id: Ic2158897ce46177b695a7fb90c8ed3349df18bde

10 years agoRestrict <abbr> formatting to where a title attribute is present
Entlinkt [Sat, 28 Sep 2013 17:13:33 +0000 (19:13 +0200)]
Restrict <abbr> formatting to where a title attribute is present

Reasoning:

* It does not make sense to draw attention to an <abbr> element that
  doesn't have a title attribute because there is nothing special to
  see there.
* It matches Gecko's default stylesheet [1] and the HTML5 style [2].
* It does not negatively impact compatibility, as far as I know
  (IE 6 does not support the [title] selector, but does not support
  the <abbr> element either).
* <acronym> elements are currently not allowed and won't be because
  they are non-conforming in HTML5 (cf. bug 671, comment 37), so this
  part of the rule can be dropped.

[1] http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css
[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#phrasing-content-1

Bug: 54729
Change-Id: I1b00ddb7996911e9b477365e7a84458cefd5da90

10 years agoSupport GENDER for "contribsub2"
Siebrand Mazeland [Fri, 4 Oct 2013 00:29:58 +0000 (02:29 +0200)]
Support GENDER for "contribsub2"

Also remove BC code that was added in MediaWiki 1.9. Spotted by Protnet at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Blocklogentry/el/reply

Change-Id: I37eefd1de95d6ef3429403cd351db315bc3ab2bf

10 years agoFix revision table cleanup on delete
Tim Starling [Fri, 4 Oct 2013 04:35:13 +0000 (14:35 +1000)]
Fix revision table cleanup on delete

The ContentHandler branch inappropriately moved this essential
query to content-type-dependent code, despite the fact that revision
table cleanup needs to be done independently of content type. Before
r15707, the revision query was done immediately before the page query,
but it was moved down to allow it to be brought into the same
if (!$dbw->cascadingDeletes() ) block as the link updates. I have moved
it to immediately after the page delete, so that the rollback which has
since been added will not affect the expensive revision table query.

This should fix the database corruption we are seeing on some page
deletions (13 affected pages on enwiki, 14 on nlwiki, etc.)

Bug: 53687
Change-Id: I7a54c4416be07fb8cc7a5698e77927ccb24cbd6e

10 years agoMerge "mw.Title: Rewrite from scratch (porting logic from Title.php)"
jenkins-bot [Fri, 4 Oct 2013 03:23:58 +0000 (03:23 +0000)]
Merge "mw.Title: Rewrite from scratch (porting logic from Title.php)"

10 years agoLESS embeddable(): Use lessc::toBool
Ori Livneh [Fri, 4 Oct 2013 00:50:45 +0000 (17:50 -0700)]
LESS embeddable(): Use lessc::toBool

With Ib6bc76736 in place, we have access to lessphp's custom function helpers,
which provide some nice encapsulation for interpreter internals like boolean
nodes. This patch makes embeddable() call $less->toBool() rather than construct
its own AST nodes.

Change-Id: I0a015564dff19f5ced764af182558eb351e3d816

10 years agoMerge "Update lessphp to 261f1bd28"
jenkins-bot [Fri, 4 Oct 2013 00:26:48 +0000 (00:26 +0000)]
Merge "Update lessphp to 261f1bd28"

10 years agoUpdate lessphp to 261f1bd28
Ori Livneh [Sun, 29 Sep 2013 12:23:28 +0000 (05:23 -0700)]
Update lessphp to 261f1bd28

From https://github.com/leafo/lessphp/blob/261f1bd28f/lessc.inc.php

Changes, 6e8e724fc7..261f1bd28f:
261f1bd Merge pull request #480 from atdt/master
0f85200 Miscellaneous small touch-ups
5504066 Improve handling of /* comments */ when 'preserveComments' is set
667702c Make function helpers public

Bug: 54673
Change-Id: Ib6bc76736d460081dc8f48aee09ca32066dae296

10 years agoMerge "Added wiki ID to getCoalesceLocationInternal()"
jenkins-bot [Thu, 3 Oct 2013 23:59:13 +0000 (23:59 +0000)]
Merge "Added wiki ID to getCoalesceLocationInternal()"

10 years agoAdded wiki ID to getCoalesceLocationInternal()
Aaron Schulz [Thu, 3 Oct 2013 21:27:10 +0000 (14:27 -0700)]
Added wiki ID to getCoalesceLocationInternal()

Change-Id: Ia1ab1883808b669e3c3b442d860c1c562e984564

10 years agoMerge "Avoid extra HEADs for stash clearing"
jenkins-bot [Thu, 3 Oct 2013 21:06:48 +0000 (21:06 +0000)]
Merge "Avoid extra HEADs for stash clearing"

10 years agoMerge "Maintenance: detect missing parent::__construct()"
jenkins-bot [Thu, 3 Oct 2013 18:53:18 +0000 (18:53 +0000)]
Merge "Maintenance: detect missing parent::__construct()"

10 years agoMerge "Add missing default true value for 'vector-simplesearch' preference"
jenkins-bot [Thu, 3 Oct 2013 18:42:48 +0000 (18:42 +0000)]
Merge "Add missing default true value for 'vector-simplesearch' preference"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 3 Oct 2013 17:57:07 +0000 (17:57 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I7f8298c727621e51c73f689ea5287da44dea3af4