lhc/web/wiklou.git
10 years agobug 23839: "Refreshing links table" -> "Refreshing links tables"
Brion Vibber [Wed, 25 Sep 2013 16:14:27 +0000 (09:14 -0700)]
bug 23839: "Refreshing links table" -> "Refreshing links tables"

There's not a single links table; there are several tables. :)

Change-Id: Ie2a76da3d047a41d102442be1919796bcd7bf2d2

10 years agoMerge "API: Check for nosuchsection in all code paths"
jenkins-bot [Tue, 24 Sep 2013 22:46:01 +0000 (22:46 +0000)]
Merge "API: Check for nosuchsection in all code paths"

10 years agoUpdate lessphp to upstream head (785ad53840)
Ori Livneh [Tue, 24 Sep 2013 19:31:17 +0000 (12:31 -0700)]
Update lessphp to upstream head (785ad53840)

This patch updates lessc.inc.php to 785ad53840:
<https://github.com/leafo/lessphp/commit/785ad53840b1777ef2120a10dcb2a5d5e6699f36>.

Differences from our version:

- Updated year in copyright notice
- Added support for 'precision' parameter to round().

Change-Id: If22afea96741c6d8fedefc05c49b24ae6e7809b0

10 years agoMerge "MysqlInstaller: use default character set of utf8"
jenkins-bot [Tue, 24 Sep 2013 16:22:48 +0000 (16:22 +0000)]
Merge "MysqlInstaller: use default character set of utf8"

10 years agoMerge "Improve wfEscapeWikiText, part 2"
jenkins-bot [Tue, 24 Sep 2013 15:55:36 +0000 (15:55 +0000)]
Merge "Improve wfEscapeWikiText, part 2"

10 years agoMysqlInstaller: use default character set of utf8
Karun Dambiec [Fri, 7 Jun 2013 13:53:12 +0000 (15:53 +0200)]
MysqlInstaller: use default character set of utf8

Bug: 14931
Change-Id: Ied512a75d17b401206b6439f289fe36c01536cec

10 years agoRemove LanguageEo::checkTitleEncoding()
Kevin Israel [Sat, 21 Sep 2013 06:55:16 +0000 (02:55 -0400)]
Remove LanguageEo::checkTitleEncoding()

In 2005, the code to perform the conversion from the Esperanto
x-system to Unicode was recognized as problematic and commented
out (bug 1512, r10997). Hence this function has done nothing
useful in the last eight years.

Change-Id: I9f4351c638645024b17a828144bba8575db14195

10 years agoMerge "Implement LESS image embedding"
Brion VIBBER [Mon, 23 Sep 2013 20:02:52 +0000 (20:02 +0000)]
Merge "Implement LESS image embedding"

10 years agoMerge "Support LESS stylesheets in ResourceLoader"
Brion VIBBER [Mon, 23 Sep 2013 19:59:49 +0000 (19:59 +0000)]
Merge "Support LESS stylesheets in ResourceLoader"

10 years agoImplement LESS image embedding
Ori Livneh [Thu, 19 Sep 2013 23:43:46 +0000 (16:43 -0700)]
Implement LESS image embedding

This patch adds two custom LESS functions: embeddable() and embed(). Both
functions take a single image file reference as their sole argument.

- embeddable() is a predicate function (= returns a LESS boolean value) that
  checks whether an image is suitable for embedding. An image is suitable if it
  exists, has an appropriate MIME type, and is not too large.
- embed() generates a CSS url() value that contains the reference image encoded
  as a data URI.

The existence of the predicate function allows embeddable() to be used as a
mixin guard. This provides an elegant means of generating a single rule when
the image is not embeddable and multiple rules (the data URI & fallback) when
it is. This technique is used to implement a .background-image mixin, included
in this patch.

Change-Id: I3e06b6d6e8630b7923fa42b3daf1ced3e656bbe7

10 years agoSupport LESS stylesheets in ResourceLoader
Ori Livneh [Sun, 11 Aug 2013 16:40:20 +0000 (00:40 +0800)]
Support LESS stylesheets in ResourceLoader

This patch adds support for the LESS stylesheet language to ResourceLoader.
LESS is a stylesheet language that compiles into CSS. The patch includes
lessphp, a LESS compiler implemented in PHP. The rationale for choosing LESS is
explained in a MediaWiki RFC which accompanies this patch, available at
<https://www.mediawiki.org/wiki/Requests_for_comment/LESS>.

LESS support is provided for ResourceLoader file modules. It is triggered by
the presence of the '.less' extension in stylesheet filenames. LESS files are
compiled by lessc, and the resultant CSS is subjected to the standard set of
transformations (CSSJanus & CSSMin). The immediate result of LESS compilation
is encoded as an array, which includes the list of LESS files that were
compiled and their mtimes. This array is cached. Cache invalidation is
performed by comparing the cached mtimes with the mtimes of the files on disk.
If the compiler itself throws an exception, ResourceLoader constructs a
compilation result which consists of the error message encoded as a CSS
comment. Failed compilation results are cached too, but with an expiration time
of five minutes. The expiration time is required because the full list of
referenced files is not known.

Three configuration variables configure the global environment for LESS
modules: $wgResourceLoaderLESSVars, $wgResourceLoaderLESSFunctions, and
$wgResourceLoaderLESSImportPaths. $wgResourceLoaderLESSVars maps variable names
to CSS values, specified as strings. Variables declared in this array are
available in all LESS files. $wgResourceLoaderLESSFunctions is similar, except
it maps custom function names to PHP callables. These functions can be called
from within LESS to transform values. Read more about custom functions at
<http://leafo.net/lessphp/docs/#custom_functions>. Finally,
$wgResourceLoaderLESSImportPaths specifies file system paths in addition to the
current module's path where the LESS compiler should look up files referenced
in @import statements.

The issue of handling of /* @embed */ and /* @noflip */ annotations is left
unresolved. Earlier versions of this patch included an @embed analog
implemented as a LESS custom function, but there was enough ambiguity about
whether the strategy it took was optimal to merit discussing it in a separate,
follow-up patch.

Bug: 40964
Change-Id: Id052a04dd2f76a1f4aef39fbd454bd67f5fd282f

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Mon, 23 Sep 2013 19:52:34 +0000 (19:52 +0000)]
Merge "Localisation updates from translatewiki.net."

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Mon, 23 Sep 2013 19:49:50 +0000 (19:49 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I80c44c7678b86b6890e1afda2924b986c39d52a0

10 years agoMerge "libxml_disable_entity_loader() just in case..."
jenkins-bot [Mon, 23 Sep 2013 19:44:22 +0000 (19:44 +0000)]
Merge "libxml_disable_entity_loader() just in case..."

10 years agolibxml_disable_entity_loader() just in case...
Max Semenik [Mon, 23 Sep 2013 19:17:34 +0000 (23:17 +0400)]
libxml_disable_entity_loader() just in case...

Change-Id: I5c6394f811f9cd14dc549d005b4583d7575e85aa

10 years agoFix missing wfProfileOut call in HtmlFormatter
Brion Vibber [Mon, 23 Sep 2013 19:14:45 +0000 (12:14 -0700)]
Fix missing wfProfileOut call in HtmlFormatter

Followup to missing call in Ic276e1604c5718e8568e120ddfb9a8fc13a682fc

Change-Id: I69623d565826aacaa884c1c0a3ffec46ca1fb465

10 years agoFix doc for HtmlFormatter
Brion Vibber [Mon, 23 Sep 2013 17:43:31 +0000 (10:43 -0700)]
Fix doc for HtmlFormatter

Bug: 54473
Change-Id: I96d76eb2d372fb3997c432196e7c4cc4e2984bfb

10 years agoMerge "Move HtmlFormatter from MobileFrontend"
jenkins-bot [Mon, 23 Sep 2013 16:59:47 +0000 (16:59 +0000)]
Merge "Move HtmlFormatter from MobileFrontend"

10 years agoMerge "Changing default copyright notice per WMF Legal's suggestion."
jenkins-bot [Mon, 23 Sep 2013 13:36:58 +0000 (13:36 +0000)]
Merge "Changing default copyright notice per WMF Legal's suggestion."

10 years agoMerge "Replace single to double-quotation marks"
jenkins-bot [Mon, 23 Sep 2013 13:06:17 +0000 (13:06 +0000)]
Merge "Replace single to double-quotation marks"

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sun, 22 Sep 2013 19:57:23 +0000 (19:57 +0000)]
Localisation updates from translatewiki.net.

Change-Id: If490bc68434b06359037fac93ec613d0e7265f44

10 years agoReplace single to double-quotation marks
shirayuki [Sun, 22 Sep 2013 02:33:50 +0000 (11:33 +0900)]
Replace single to double-quotation marks

Give grep a chance to find the usages

Change-Id: I95431f8e5cc684c322fdd7cda041388120b7c49b

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Sat, 21 Sep 2013 19:29:18 +0000 (19:29 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I82effb99c8a9b2f7bedc874008835e29f1d9ae4d

10 years agoMerge "Deprecate assertException in MediaWikiTestCase as it adds no value"
jenkins-bot [Sat, 21 Sep 2013 19:00:49 +0000 (19:00 +0000)]
Merge "Deprecate assertException in MediaWikiTestCase as it adds no value"

10 years agoMerge "SearchEngine::userHighlightPrefs needs no user"
jenkins-bot [Sat, 21 Sep 2013 18:56:18 +0000 (18:56 +0000)]
Merge "SearchEngine::userHighlightPrefs needs no user"

10 years agoMerge "Simplified some code and broke lines in thumb.php"
jenkins-bot [Sat, 21 Sep 2013 16:08:06 +0000 (16:08 +0000)]
Merge "Simplified some code and broke lines in thumb.php"

10 years agoupdate.php clears caches twice
umherirrender [Fri, 13 Sep 2013 17:55:36 +0000 (19:55 +0200)]
update.php clears caches twice

There was a bad rebase on I96b4cfd4c02e9cbf46cc6a0499b87fb3b89020a0,
because it partically reverts Ice42a31dee1e6b41da4aa0a47e8786579382aff1

Bug: 44690
Change-Id: Iff2c8d3cb1a10da7cd0ab18ee189454761d7db6f

10 years agoAdded {{REVISIONSIZE}} variable to get the current size of a revision.
umherirrender [Wed, 4 Sep 2013 19:09:36 +0000 (21:09 +0200)]
Added {{REVISIONSIZE}} variable to get the current size of a revision.

This avoids giving the own page name to {{PAGESIZE:}} and allows
PAGESIZE on subst: to give the size before save.

Viewing a oldid page will give the corresponding size to that revision.
(Like REVISIONUSER or REVISIONTIMESTAMP)

This partially reverts Idfac13de37d05317f65e4131534543e66cf74873
because there is no need to let PAGESIZE handle extra, when the given
title is the own page.

Change-Id: If9e608d54904c21ac6b095e91ff6e0a15da0fb4c

10 years agodrop unused fields rc_moved_to_ns/rc_moved_to_title
Jesús Martínez Novo [Sun, 1 Sep 2013 11:05:10 +0000 (13:05 +0200)]
drop unused fields rc_moved_to_ns/rc_moved_to_title

Follow-up I68e8c0bb23f185c0f996a8905f6d437db3080aa1

Deleting those fields also from tables.sql definition
for mssql, oracle and postgres

Bug: 34960
Change-Id: I1867536c9161abed0b23428d3c840d16a05cba56

10 years agoTidy up log deletion rows which didn't get subpages
Alex Monk [Sun, 6 Jan 2013 13:06:44 +0000 (13:06 +0000)]
Tidy up log deletion rows which didn't get subpages

Bug: 37714

Change-Id: I904988c864d777d039b2aae956aef7b19092cf83

10 years agoCleanup Preprocessor_DOM::preprocessToObj wfProfileOut()s
Platonides [Wed, 5 Jun 2013 01:07:42 +0000 (03:07 +0200)]
Cleanup Preprocessor_DOM::preprocessToObj wfProfileOut()s

Simplify the multiple if levels used for profiling out.

Change-Id: Id0530207f99daca49a6a76ce256476b677a4108f

10 years agoAdd a way to redact certain function parameters from exception stack traces
Alex Monk [Fri, 17 May 2013 20:27:18 +0000 (21:27 +0100)]
Add a way to redact certain function parameters from exception stack traces

Bug: 30714
Change-Id: I0a9e92448f8d9009dd594cb4d7f5dc6fdd4bcc86

10 years agoRemove reduntant regex from calls to StringUtils::isUtf8()
lwelling [Fri, 3 May 2013 20:29:03 +0000 (16:29 -0400)]
Remove reduntant regex from calls to StringUtils::isUtf8()

I've cautiously moved the regex out of the most used code path.
There is no string that will match that regex check that will not also be
passed by mb_check_encoding.  I think the regex was intended as a shortcut
evaluation, but it is no faster than mb_check_encoding which will often
need to be run anyway.

I think it could just be deleted, but I have limited motivation to
risk introducing a bug to improve performance on old PHP vesions and
unusual configurations, so I've moved it to the fallback code path.

Change-Id: Ie9425cc23ba032e5aff42beeb44cbb1146050452

10 years agooptipng -o7 "$png" && advpng -z -4 "$png" && advdef -z -4 "$png"
Max Semenik [Sun, 1 Sep 2013 10:26:02 +0000 (14:26 +0400)]
optipng -o7 "$png" && advpng -z -4 "$png" && advdef -z -4 "$png"

Change-Id: I2b267d23da582e4daf95c6898e3c687ad63d6e6b

10 years agoChanging default copyright notice per WMF Legal's suggestion.
kaldari [Fri, 20 Sep 2013 18:35:58 +0000 (11:35 -0700)]
Changing default copyright notice per WMF Legal's suggestion.

Changing from "Content is available under $1." to...
"Content is available under $1 unless otherwise noted."

This is especially relavent to wikis that use InstantCommons.

Change-Id: I878372de6c42bcb7660b111911d0e12bb351d2c5

10 years agoNote about removing portal-url, currentevents-url and helppage from default Sidebar
Quim Gil [Fri, 20 Sep 2013 22:26:12 +0000 (15:26 -0700)]
Note about removing portal-url, currentevents-url and helppage from default Sidebar

A note about the removal of portal-url, currentevents-url and helppage from
the default Sidebar as requested at the related bug report.
Follows up: Icb0e1b91e40bd682629f8a6f7291dbf8588b586

Bug: 53862
Change-Id: If7a624cd3a62c31af84a711f79ea396b53868fd2

10 years agoDeprecate assertException in MediaWikiTestCase as it adds no value
jeroendedauw [Sat, 18 May 2013 17:38:24 +0000 (19:38 +0200)]
Deprecate assertException in MediaWikiTestCase as it adds no value

setExpectedException, provided by PHPUnit itself, can and should be used instead

Change-Id: I06833eeeb492d2cc4e66b14aaebd5b2061a29e3a

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Fri, 20 Sep 2013 19:28:49 +0000 (19:28 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I4d3fce0836a6e2bd2c7c79159fb74411a02b40b6

10 years agoSearchEngine::userHighlightPrefs needs no user
umherirrender [Fri, 20 Sep 2013 18:54:19 +0000 (20:54 +0200)]
SearchEngine::userHighlightPrefs needs no user

Was removed with r87215 from the function,
but not from the function call

Change-Id: Iacb247d5962fe77db5a29084ece941261bf306ec

10 years agoMove HtmlFormatter from MobileFrontend
Max Semenik [Mon, 16 Sep 2013 16:54:32 +0000 (09:54 -0700)]
Move HtmlFormatter from MobileFrontend

This class is needed by CirrusSearch, another application will be API
prop=extracts which doesn't really belong to MobileFrontend and will also
be integrated into core soon.

Change-Id: Ic276e1604c5718e8568e120ddfb9a8fc13a682fc

10 years agoSimplified some code and broke lines in thumb.php
Aaron Schulz [Thu, 29 Aug 2013 20:31:12 +0000 (13:31 -0700)]
Simplified some code and broke lines in thumb.php

Change-Id: I99fc63ab473a3f2fe33e0227e5e283e0c195f01b

10 years agoImprove wfEscapeWikiText, part 2
Brad Jorsch [Fri, 20 Sep 2013 16:40:17 +0000 (12:40 -0400)]
Improve wfEscapeWikiText, part 2

The following are now correctly escaped:
* Blank lines (including those with only tabs)
* ---- at the start of a line

Bug: 53658
Change-Id: I300e15a22c93ca542913135c9c83913c18c99faf

10 years agoPass user to Title::userCan in ApiFeedContributions
umherirrender [Fri, 20 Sep 2013 15:33:07 +0000 (17:33 +0200)]
Pass user to Title::userCan in ApiFeedContributions

Change-Id: I15b95f4e4bf4a07b55b98baa360078411c0f42cc

10 years agoMerge "Collect stats about RL cache hit rate"
jenkins-bot [Thu, 19 Sep 2013 23:08:21 +0000 (23:08 +0000)]
Merge "Collect stats about RL cache hit rate"

10 years agoCollect stats about RL cache hit rate
Max Semenik [Thu, 19 Sep 2013 23:02:59 +0000 (16:02 -0700)]
Collect stats about RL cache hit rate

Change-Id: I7cf2f2248f60b0e686e90faf9cb9989b723c88d1

10 years agoPass context to Action::factory
aude [Thu, 19 Sep 2013 19:06:10 +0000 (19:06 +0000)]
Pass context to Action::factory

Fixes a PHP Notice that was introduced on every page (follows-up 01d81d88)

Bug: 54344
Change-Id: I24f01c7244089e73b0cf2e0af37c365f9dd051b2

10 years agoReduce use of FORCE INDEX in LogPager
Aaron Schulz [Thu, 19 Sep 2013 19:51:16 +0000 (12:51 -0700)]
Reduce use of FORCE INDEX in LogPager

* This currently hurts some change tag queries by orders of mangitude.
  MySQL/Maria query planning is also a fair bit smarter than it used to
  be. Lastly, WMF table statistics are better maintained now.

Change-Id: I4d0ac7a35c9cec6b47771aae718b44bfc03bdfbe

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Thu, 19 Sep 2013 19:25:04 +0000 (19:25 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ifc090ee9782be50af70146738908549ca31b6f96

10 years agoMerge "Reduce complexity of SiteSQLStore saveSites method"
jenkins-bot [Thu, 19 Sep 2013 17:39:02 +0000 (17:39 +0000)]
Merge "Reduce complexity of SiteSQLStore saveSites method"

10 years agoAllow RedisConnectionPool to be used with HHVM's Redis library
Ori Livneh [Thu, 19 Sep 2013 17:11:38 +0000 (10:11 -0700)]
Allow RedisConnectionPool to be used with HHVM's Redis library

As of commit 2811e9d, HHVM includes a pure-PHP Redis client library with
method-for-method compatibility with phpredis: <http://git.io/ylDAyQ>.
RedisConnectionPool appears to work well with it save for the
extension_loaded() check. Practically a freebie!

Bug: 54158
Change-Id: I3ac12293a51a45e8f6a61a35bff7a3c063e16964

10 years agodoc: Fix grammar in GitInfo documentation comment
Timo Tijhof [Thu, 19 Sep 2013 16:39:34 +0000 (18:39 +0200)]
doc: Fix grammar in GitInfo documentation comment

Change-Id: I67da49398f1281b83700884475d364f6b30c05c8

10 years agoMerge "Adapt StringUtils::isUtf8 to the top of Unicode at U+10FFFF"
jenkins-bot [Thu, 19 Sep 2013 16:12:39 +0000 (16:12 +0000)]
Merge "Adapt StringUtils::isUtf8 to the top of Unicode at U+10FFFF"

10 years agoFix initialization of Context in Action class.
daniel [Thu, 19 Sep 2013 10:56:42 +0000 (12:56 +0200)]
Fix initialization of Context in Action class.

When Action::getActionName calls Action::factory, $context
must be passed explicitly, since WikiPage does not have a getContext()
method (only Article does).

As a failsafe in Article::getContext(), use $this->page->getContext()
only if $this->page is an Article. If $this->context is null and $this->page
is not an article, fall back to RequestContext::getMain()

Change-Id: I6d8db29dfd1aaa68f3de4f8f418841205c2379af

10 years agojquery.suggestions: Fix up trailing comments from 2f5125e8
Timo Tijhof [Thu, 19 Sep 2013 08:12:56 +0000 (10:12 +0200)]
jquery.suggestions: Fix up trailing comments from 2f5125e8

Change-Id: I8f2f8a9f1e0da3e460928003b56a2c99668473da

10 years agoFactor out ChangeTags::tagUsageStatistics() from SpecialTags
MatmaRex [Tue, 27 Aug 2013 13:26:06 +0000 (15:26 +0200)]
Factor out ChangeTags::tagUsageStatistics() from SpecialTags

It's prettier if we keep all explicit DB queries to those tables
in one place.

Change-Id: I85b6854e26ffc656b990079d463a085ba39556df

10 years agoCSSMin: factor out image encoding into encodeImageAsDataURI method
Ori Livneh [Wed, 18 Sep 2013 09:09:11 +0000 (02:09 -0700)]
CSSMin: factor out image encoding into encodeImageAsDataURI method

The code for encoding suitable images as base64 data URIs was previously part
of the remap method of CSSMin, which greps CSS files for /* @embed */
annotations. This patch moves it into its own method, encodeImageAsDataURI.

Change-Id: I6f57116c6a6c18ff9d4e28760dd484ea2c8fc493

10 years agoAdapt StringUtils::isUtf8 to the top of Unicode at U+10FFFF
Kevin Israel [Mon, 16 Sep 2013 03:29:04 +0000 (23:29 -0400)]
Adapt StringUtils::isUtf8 to the top of Unicode at U+10FFFF

RFC 3629 defines the legal range of characters as U+0000..U+10FFFF
and forbids overlong forms (encodings of a character that use more
bytes than necessary). Let's make StringUtils::isUtf8() match the
specification.

* Changed the maximum value in the pure PHP code path and added a
  check for overlong forms.
* Added another check, specific to PHP 5.3's mbstring extension,
  for values above U+10FFFF.
* Fixed the mbstring test errors in PHP 5.4 using changes to
  StringUtilsTest by Platonides <platonides@gmail.com>.
* Uncommented some other tests that could fail because of the
  missing check for overlong forms.
* Added additional tests for extra continuation bytes, overlong
  sequences/forms, and values in the UTF-16 surrogate range.

The changes to the function were so extensive that I might as
well say I rewrote it.

Bug: 43679
Change-Id: I56ae496d17ffc3747550e06a72dacab3ac55da61

10 years agoMerge "Separate RevDel logic from UI"
jenkins-bot [Wed, 18 Sep 2013 21:20:19 +0000 (21:20 +0000)]
Merge "Separate RevDel logic from UI"

10 years agoReduce complexity of SiteSQLStore saveSites method
aude [Wed, 18 Sep 2013 20:28:14 +0000 (22:28 +0200)]
Reduce complexity of SiteSQLStore saveSites method

split code that generates an ORMRow from a Site object

Change-Id: Ie1f7ed834a33befb43536355ad2b9b98a13d4c79

10 years agoMerge "Add gzdecode fallback to GlobalFunctions"
jenkins-bot [Wed, 18 Sep 2013 20:02:06 +0000 (20:02 +0000)]
Merge "Add gzdecode fallback to GlobalFunctions"

10 years agoMerge "Localisation updates from http://translatewiki.net."
Translation updater bot [Wed, 18 Sep 2013 19:23:17 +0000 (19:23 +0000)]
Merge "Localisation updates from translatewiki.net."

10 years agoMerge "Changed tableName so it returns uppercased table names (+prefix) Changed table...
jenkins-bot [Wed, 18 Sep 2013 19:11:04 +0000 (19:11 +0000)]
Merge "Changed tableName so it returns uppercased table names (+prefix) Changed tableExists so it returns boolean (and closes resource when it's done in case it fails)"

10 years agoMerge "Changed quoting function for oracleDB."
jenkins-bot [Wed, 18 Sep 2013 19:10:52 +0000 (19:10 +0000)]
Merge "Changed quoting function for oracleDB."

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Wed, 18 Sep 2013 18:59:56 +0000 (18:59 +0000)]
Localisation updates from translatewiki.net.

Change-Id: Ia363d8fc374b04d948cb0b6599269f9c0e1c4117

10 years agoFixed check of BagOStuff set() return value in mctest
Aaron Schulz [Tue, 17 Sep 2013 22:23:44 +0000 (15:23 -0700)]
Fixed check of BagOStuff set() return value in mctest

Change-Id: I6e69cdc24b9b40132641205cb40f64bb5db45f70

10 years agoSeparate RevDel logic from UI
Brad Jorsch [Wed, 26 Jun 2013 20:48:53 +0000 (16:48 -0400)]
Separate RevDel logic from UI

Move functions implementing the actual revision deletion out of
SpecialRevisiondelete, so they can be used from elsewhere (e.g.
ApiRevisiondelete).

Change-Id: Id0f6b1c8dab474bdfd802c07b211885d398c94e5

10 years agoMerge "Use wfResetOutputBuffers in ResourceLoader"
jenkins-bot [Wed, 18 Sep 2013 17:01:20 +0000 (17:01 +0000)]
Merge "Use wfResetOutputBuffers in ResourceLoader"

10 years agoMerge "Fully log exceptions within ResourceLoader (including traces)"
jenkins-bot [Wed, 18 Sep 2013 16:54:21 +0000 (16:54 +0000)]
Merge "Fully log exceptions within ResourceLoader (including traces)"

10 years agoMerge "RefreshLinksJob: Replace use of empty() with explicit check"
jenkins-bot [Wed, 18 Sep 2013 16:52:35 +0000 (16:52 +0000)]
Merge "RefreshLinksJob: Replace use of empty() with explicit check"

10 years agoMerge "mediawiki.api: Simplify done/fail calls by chaining"
jenkins-bot [Wed, 18 Sep 2013 16:45:46 +0000 (16:45 +0000)]
Merge "mediawiki.api: Simplify done/fail calls by chaining"

10 years agomediawiki.api: Simplify done/fail calls by chaining
Timo Tijhof [Wed, 18 Sep 2013 16:37:06 +0000 (18:37 +0200)]
mediawiki.api: Simplify done/fail calls by chaining

Change-Id: Ic0c1928708612d31abcd6c5c7184f68b2e7c1a76

10 years agoFully log exceptions within ResourceLoader (including traces)
Aaron Schulz [Fri, 6 Sep 2013 18:52:34 +0000 (11:52 -0700)]
Fully log exceptions within ResourceLoader (including traces)

Change-Id: Icb479c76cd855244429fe65b29667783dcca8f53

10 years agolegacy upload.js: Clean up and remove from jshintignore
Timo Tijhof [Fri, 2 Aug 2013 02:03:11 +0000 (04:03 +0200)]
legacy upload.js: Clean up and remove from jshintignore

* Coding style:
  - Braces
  - Single quotes
  - Dot instead of bracket access for properties
* Fixed various implied global/static variables, most significantly
  the for-loop variable 'cached' etc.
* Changed == '' to ! since === '' will require it to be a string
  and == '' returns true for almost anything that is falsy, no
  good way to choose a strict alternative.
* Changed setAttribute('disabled', ..) to using .property instead.
* Using setTimeout as a global instead of as a window property.
* Using other globals from wikibits.js through window property,
  as they are defined.
* Use a closure instead of string eval() in setTimeout().
* Made local equivalents for some global variables for access
  inside the closure.
* Don't create functions in a loop. Moved the onchange function
  outside the loop and re-used it for each one (safe in this case,
  and more efficient).
* Call setTimeout/clearTimeout as global, no need for the window
  object as host.

Change-Id: I9df912ee48d30c189394bf07f5e49014220f36a3

10 years agoUse wfResetOutputBuffers in ResourceLoader
Marius Hoch [Fri, 19 Jul 2013 01:21:38 +0000 (03:21 +0200)]
Use wfResetOutputBuffers in ResourceLoader

No need to replicate its logic there.

Bug: 46836
Change-Id: I0c6ad90c327e39b9bc35fc3a9ecab39487a1d8b5

10 years agoMerge "jquery.makeCollapsible: Use promise().done instead of when().then"
jenkins-bot [Wed, 18 Sep 2013 12:01:57 +0000 (12:01 +0000)]
Merge "jquery.makeCollapsible: Use promise().done instead of when().then"

10 years agoMerge "doc: Clean up documentation for StringUtils classes"
jenkins-bot [Wed, 18 Sep 2013 11:52:37 +0000 (11:52 +0000)]
Merge "doc: Clean up documentation for StringUtils classes"

10 years agodoc: Clean up documentation for StringUtils classes
Timo Tijhof [Tue, 17 Sep 2013 07:48:05 +0000 (09:48 +0200)]
doc: Clean up documentation for StringUtils classes

Change-Id: Ie016c1d1686c9dce7944864e77e6c3bdf001d8c3

10 years agojquery.makeCollapsible: Use promise().done instead of when().then
Timo Tijhof [Wed, 18 Sep 2013 04:47:11 +0000 (06:47 +0200)]
jquery.makeCollapsible: Use promise().done instead of when().then

Follows up b340bd4f6b.

They both work, but in this case there is no need to use $.when
since there is only 1 promise. And there is no need for the
filtering proxy of Promise#then either, a straight done is enough.

 $.when( $foo ).then( callback )
 $.when( $foo ).done( callback )
 $foo.promise().done( callback )

Change-Id: I4df755a32c124481ca690078191a735d2e2b511a

10 years agoSanitizer: Remove redundant @private tags
Timo Tijhof [Wed, 18 Sep 2013 04:38:36 +0000 (06:38 +0200)]
Sanitizer: Remove redundant @private tags

Follows-up 64dcaf4e8a.

Change-Id: Ib6f406e4881e7c7ba39cdb132ffb95f4c1a19209

10 years agoRefreshLinksJob: Replace use of empty() with explicit check
Timo Tijhof [Wed, 18 Sep 2013 04:34:32 +0000 (06:34 +0200)]
RefreshLinksJob: Replace use of empty() with explicit check

Using empty() is a maintenance nightmare as it completely removes
any meaning of what the author intends to check for (whether the
variable exists at all, it being set to an empty array, 0, '0' etc.)

Follows-up I445e10da122e5f24e589 which changed it from isset()
to !empty() with commit message of checking for false.

Change-Id: I561f03b0526685f51138d723f9eb7196725e0b93

10 years agoMerge "Make CSSMin::getMimeType public rather than protected"
jenkins-bot [Wed, 18 Sep 2013 04:14:44 +0000 (04:14 +0000)]
Merge "Make CSSMin::getMimeType public rather than protected"

10 years agoMake CSSMin::getMimeType public rather than protected
Ori Livneh [Wed, 18 Sep 2013 03:58:39 +0000 (20:58 -0700)]
Make CSSMin::getMimeType public rather than protected

There's no reason why it should be protected. People sometimes use
'protected' to mean 'ancillary to the main purpose of the class', but
'protected' comes with the added cost of making the class API less
flexible. I intend to call this method in a future revision of Id052a04dd2,
but I think it should be public regardless.

Change-Id: I56365df3152df1180ce73de98202e3a91def1485

10 years agoMerge "Store boolean values as integers with SQLite"
jenkins-bot [Wed, 18 Sep 2013 00:07:57 +0000 (00:07 +0000)]
Merge "Store boolean values as integers with SQLite"

10 years agoStore boolean values as integers with SQLite
Jackmcbarn [Tue, 17 Sep 2013 22:54:59 +0000 (18:54 -0400)]
Store boolean values as integers with SQLite

Since SQLite doesn't have a boolean type, and doesn't enforce types, make
sure booleans get stored as integers, to prevent undesirable behavior,
such as false values being stored as empty strings.

Change-Id: I2a96065826412fa25f98ec298d806e73ebe155ba

10 years agoAdd gzdecode fallback to GlobalFunctions
Timo Tijhof [Tue, 17 Sep 2013 10:26:12 +0000 (12:26 +0200)]
Add gzdecode fallback to GlobalFunctions

* Follows-up I6383e933b.
* Replaced existing usage of `gzinflate( substr( $data, 10, -8 ) );`
  with `gzdecode( $data )`.

Change-Id: Ie2916584f92ff72c7d7ddca73acf1c94dda38cca

10 years agoMerge "Clean up legacy protect.js & remove from .jshintignore"
jenkins-bot [Tue, 17 Sep 2013 20:48:59 +0000 (20:48 +0000)]
Merge "Clean up legacy protect.js & remove from .jshintignore"

10 years agoClean up legacy protect.js & remove from .jshintignore
Ori Livneh [Thu, 29 Aug 2013 17:11:56 +0000 (10:11 -0700)]
Clean up legacy protect.js & remove from .jshintignore

- Declare all variables w/single var statement.
- Un-quote property names.
- Braces / whitespace / quoting / strict equality checks.

Change-Id: Iaabd3bbaeb10a661adf53dc9ad39813b14661f77

10 years agoLocalisation updates from http://translatewiki.net.
Translation updater bot [Tue, 17 Sep 2013 19:37:18 +0000 (19:37 +0000)]
Localisation updates from translatewiki.net.

Change-Id: I87722e0db8d910030b237290b78e7f8e4e7c59dc

10 years agoMerge "Protect against non-arrays when fetching headers"
jenkins-bot [Tue, 17 Sep 2013 17:48:06 +0000 (17:48 +0000)]
Merge "Protect against non-arrays when fetching headers"

10 years agoProtect against non-arrays when fetching headers
Chad Horohoe [Tue, 17 Sep 2013 01:10:47 +0000 (18:10 -0700)]
Protect against non-arrays when fetching headers

PHP documentation says this can theoretically return false on failure.

HHVM actually returns null when running from the command line, so
this does protect against that.

Change-Id: I0d75b8ed209128a9667ce1e7189597ae9ebc8af6

10 years agoMerge "Guard against non-object returns from File::getHander()"
jenkins-bot [Tue, 17 Sep 2013 17:22:44 +0000 (17:22 +0000)]
Merge "Guard against non-object returns from File::getHander()"

10 years agoMerge "Show the revision ID on error message when content is missing on difference...
jenkins-bot [Tue, 17 Sep 2013 17:20:22 +0000 (17:20 +0000)]
Merge "Show the revision ID on error message when content is missing on difference page"

10 years agoMerge "Removed unneeded else branches in DifferenceEngine"
jenkins-bot [Tue, 17 Sep 2013 17:16:23 +0000 (17:16 +0000)]
Merge "Removed unneeded else branches in DifferenceEngine"

10 years agoMerge "mediawiki.user: Clean up documentation and minor optimisation"
jenkins-bot [Tue, 17 Sep 2013 17:14:26 +0000 (17:14 +0000)]
Merge "mediawiki.user: Clean up documentation and minor optimisation"

10 years agomediawiki.user: Clean up documentation and minor optimisation
Timo Tijhof [Mon, 15 Jul 2013 09:56:37 +0000 (11:56 +0200)]
mediawiki.user: Clean up documentation and minor optimisation

* Optimise mw.user#id implementation.
* Make documentation more consistent (describe the intent instead
  of the exhibited behaviour, e.g. "Get foo" instead of "Gets foo",
  like most other JS documentation does already).

Change-Id: If9e5dcb7cfed27785c4a15bc3492868f083517f3

10 years agoMerge "Add TitleMove hook"
jenkins-bot [Tue, 17 Sep 2013 15:52:27 +0000 (15:52 +0000)]
Merge "Add TitleMove hook"

10 years agoAdd TitleMove hook
Jan Gerber [Thu, 12 Sep 2013 10:13:21 +0000 (10:13 +0000)]
Add TitleMove hook

some things need access to the old file before its moved,
adding hook to allow extensions to do something before
file is moved.

Change-Id: Ic5e659abc79c41e3331d42074e7f21eec9b9ba7c

10 years agoShow the revision ID on error message when content is missing on difference page
Alexandre Emsenhuber [Thu, 25 Jul 2013 15:34:20 +0000 (17:34 +0200)]
Show the revision ID on error message when content is missing on difference page

Currently if the revision exists but its content is not found, it will make
loadText() return false; which in turn will make a call to showMissingRevision()
from showDiff(). However since the revision exists; it will not match the
condition in showMissingRevision() and thus an error message will appear without
any revision ID.

Change-Id: Idd8a5f20a3c082a3b02bd77557e0f4dc4c66e876

10 years agoRemoved unneeded else branches in DifferenceEngine
Alexandre Emsenhuber [Sun, 25 Aug 2013 07:26:20 +0000 (09:26 +0200)]
Removed unneeded else branches in DifferenceEngine

The "if" always exit, so there is no need to use else branches;
also added blank lines for better readability.

Change-Id: I7d8321652a90fbba99e53fa0c1fe018492883b8a

10 years agoGuard against non-object returns from File::getHander()
Bryan Davis [Thu, 5 Sep 2013 20:46:38 +0000 (14:46 -0600)]
Guard against non-object returns from File::getHander()

MediaHandler::getHandler() can return false when a handler cannot be
determined for the given file's derived mime type. This change adds
guards to invocations that I could find that did not properly check for
this potential return result.

Bug: 53820
Change-Id: I8c0165311cc75f9920ac30ce2b38ccd207439198