lhc/web/wiklou.git
12 years agorevert r108367 : breaks tests
Antoine Musso [Mon, 9 Jan 2012 08:41:25 +0000 (08:41 +0000)]
revert r108367 : breaks tests

When doing a change that break tests, update the tests in the same
commit. That makes the change more obvious and let us merge in
another branch easily.

12 years ago[mediawiki.action.history.js] Provide cleaner handling of action=historysubmit hack.
Krinkle [Mon, 9 Jan 2012 02:08:35 +0000 (02:08 +0000)]
[mediawiki.action.history.js] Provide cleaner handling of action=historysubmit hack.
* Follows-up r108341, r108370
* Doesn't remove it, server will still handle them properly (as provided by r57415) when JavaScript is off. This commit adds a progressive enhancement when possible so that submit will go to either of these:
* title= & diff= & oldid=
* action=revisiondelete & ids[..]=
instead of one of these
* action=historysubmit & title= & diff= & oldid= & ids[..]=
* action=historysubmit & revisiondelete=1 & ids[..]= diff= & oldid=
(removing redundant parameters and parameters from the other submission-type that don't belong in that url)
* Also re-adding support for action= revisiondelete in the query, as it was originally. Due to this hack it appears that support for the original action name (which is still returned as "revisiondelete" from MediaWiki::getAction() ) was removed or never existed in that place of the code at all. Fixed now.

12 years ago* r107986: Added readOnly checks to prepare(), secure(), and clean() in FileBackendBase.
Aaron Schulz [Mon, 9 Jan 2012 00:20:28 +0000 (00:20 +0000)]
* r107986: Added readOnly checks to prepare(), secure(), and clean() in FileBackendBase.
* Added some prepare()/clean() tests.

12 years agoFix double-escaping in 108312
Krinkle [Mon, 9 Jan 2012 00:15:38 +0000 (00:15 +0000)]
Fix double-escaping in 108312

12 years agoFixup documentation
Sam Reed [Sun, 8 Jan 2012 22:38:08 +0000 (22:38 +0000)]
Fixup documentation

Swap require for require_once

Wrap long line

12 years ago[mediawiki.action.history.js] Clean up
Krinkle [Sun, 8 Jan 2012 22:36:13 +0000 (22:36 +0000)]
[mediawiki.action.history.js] Clean up
* Using named variables instead of eq(0) and eq(1), also future proof by checking name="" instead of depending on their respective position in the DOM.

12 years ago[HistoryAction] Clean up
Krinkle [Sun, 8 Jan 2012 22:32:11 +0000 (22:32 +0000)]
[HistoryAction] Clean up
* Don't build $s as well as $this->buttons for re-use later in getEndBody(), simply use it in both cases.
* Adding a css class for compareselectedversions button just like there is for the revisiondelete button

12 years ago[HistoryAction] Revert r108341 as this breaks revision delete.
Krinkle [Sun, 8 Jan 2012 22:15:23 +0000 (22:15 +0000)]
[HistoryAction] Revert r108341 as this breaks revision delete.

This construction never looked cool, but looks like this fix is not the right way, so reverting it.

This form is used for two purposes:
-- Submitting diff/oldid to (implied) action=view
-- Submitting ids-array to action=revisiondelete

That makes it complicated. Also for IE6/IE7 compatibility, there is no way to do this from the HTML itself (i.e. using <input type="submit" name="action" value="revisiondelete"> would work but leaves no option to have a custom i18n label. and <button type="submit"  name="action" value="revisiondelete">I18N LABEL</button> works but IE7 submits "I18N LABEL" as value for "action" instead of "revision delete".

Will re-fix bug 33587  in a few minutes with a "progressive-enhancement" solution from the front-end instead.

12 years ago* Fixed 'success' value of doOperations() Status to match documentation.
Aaron Schulz [Sun, 8 Jan 2012 22:10:53 +0000 (22:10 +0000)]
* Fixed 'success' value of doOperations() Status to match documentation.
* Made 'success', 'successCount', and 'failCount' fields reflect the overall operation in FileBackendMultiWrite::doOperationsInternal(). This makes it match up with single-write backends.
* Made FileBackend::clearCache() part of the public API.

12 years ago* Improved error message for LockServerDaemon when parameters are missing and bumped...
Aaron Schulz [Sun, 8 Jan 2012 21:52:32 +0000 (21:52 +0000)]
* Improved error message for LockServerDaemon when parameters are missing and bumped default 'maxClients' value.

12 years agoFix the regression pointed out by Robin in r105855.
Amir E. Aharoni [Sun, 8 Jan 2012 21:07:27 +0000 (21:07 +0000)]
Fix the regression pointed out by Robin in r105855.

12 years agoFix str_replace parameter order fail from r108364
Sam Reed [Sun, 8 Jan 2012 20:44:23 +0000 (20:44 +0000)]
Fix str_replace parameter order fail from r108364

12 years ago* Use WikiPage instead of Article to call doEdit()
Alexandre Emsenhuber [Sun, 8 Jan 2012 20:42:22 +0000 (20:42 +0000)]
* Use WikiPage instead of Article to call doEdit()
* Pass the User doing the edit to doEdit()
* Check for invalid title before fecthing content and doing the edit

12 years agoFollowup r108363 for bug 33571
Sam Reed [Sun, 8 Jan 2012 20:40:13 +0000 (20:40 +0000)]
Followup r108363 for bug 33571

Refactor out duplicate code

12 years ago* bug 33571: fix yottabits/s in Language::formatBitrate
Brion Vibber [Sun, 8 Jan 2012 20:15:08 +0000 (20:15 +0000)]
* bug 33571: fix yottabits/s in Language::formatBitrate

Problem was caused by inexact floating-point comparisons with values returned from
log10(); worked around by simply duplicating the very similar code in the function
immediately below, which does the same thing with 1024 instead of 1000 unit sizes,
uses only simple division, and passes the test cases.

12 years agoFix method name in comment: Article::followRedirect() -> WikiPage::getRedirectTarget()
Alexandre Emsenhuber [Sun, 8 Jan 2012 17:34:28 +0000 (17:34 +0000)]
Fix method name in comment: Article::followRedirect() -> WikiPage::getRedirectTarget()

12 years agoFollowup r108358, bring back DelayedParserTest
Chad Horohoe [Sun, 8 Jan 2012 17:32:39 +0000 (17:32 +0000)]
Followup r108358, bring back DelayedParserTest

12 years agor92975 caused wikitable in MediaWiki:Recentchangestext (eg. enwiki)
Platonides [Sun, 8 Jan 2012 17:29:20 +0000 (17:29 +0000)]
r92975 caused wikitable in MediaWiki:Recentchangestext (eg. enwiki)
as it was no longer beginning a new line.

12 years ago* Drop old parserTests.php way of running parser tests. You can run parser tests...
Chad Horohoe [Sun, 8 Jan 2012 17:28:13 +0000 (17:28 +0000)]
* Drop old parserTests.php way of running parser tests. You can run parser tests via --group Parser or specifying
  the includes/parser/MediaWikiParserTest.php test case
* Drop now unused various test recorder options -- phpunit outputs its data in lots of machine-readable formats, use those if you need to work with
  test data
* There's still a lot of duplication between NewParserTest::setUp() and MediaWikiTestCase, but hey one step at a time ;-)
* All tests pass for me (make phpunit && make parser)

12 years agoAnother @group Broken
Chad Horohoe [Sun, 8 Jan 2012 16:40:05 +0000 (16:40 +0000)]
Another @group Broken

12 years ago@group Broken rather than marking incomplete
Chad Horohoe [Sun, 8 Jan 2012 16:38:59 +0000 (16:38 +0000)]
@group Broken rather than marking incomplete

12 years ago* Follow-up r107170: Moved FileBackend::concatenate() outside of doOperations() as...
Aaron Schulz [Sun, 8 Jan 2012 09:25:15 +0000 (09:25 +0000)]
* Follow-up r107170: Moved FileBackend::concatenate() outside of doOperations() as it's own separate operation. It does not mutate storage files like the others and having it in doOperations() broke FileBackendMultiWrite. This change also makes overriding doOperationsInternal() easier (suching as using a custom batch operation storage API).
* Added sanity check to FileBackendMultiWrite constructor.
* Moved FileBackend::create() function up a bit.

12 years agoIn FileBackend:
Aaron Schulz [Sun, 8 Jan 2012 08:40:00 +0000 (08:40 +0000)]
In FileBackend:
* Added getFileSize()/getFileStat() functions. Refactored some functions to use the stat function for better reuse and caching/consistency.
* Refactored streamFile() to allow for subclasses to avoid local file copying with less duplication. Also make last-modified check actually work since we always get the timestamp of the original file.
* Renamed 'ignoreErrors' parameter to 'force'.
In FileBackendMultiWrite:
* Simplified how read ops are done (use 'master' backend for consistency).
* Added consistency check to doOperationsInternal() to check if the files are synced.
* Various fixes after testing.
In StreamFile:
* Split out prepareForStream() function from stream() in StreamFile for code reuse.
In FileBackendTest:
* Properly cover FileBackendMultiWrite in tests.
* Various test improvements.

12 years agoFix typo from r108342.
Krinkle [Sun, 8 Jan 2012 02:49:33 +0000 (02:49 +0000)]
Fix typo from r108342.

12 years ago[Skin] Add CSS hook for action ("action-.." class on body)
Krinkle [Sun, 8 Jan 2012 01:49:06 +0000 (01:49 +0000)]
[Skin] Add CSS hook for action ("action-.." class on body)
* Fixes bug 4438
* Depends on r108342. See also r108343 which did a similar thing for mw.config wgAction

Previously attempted in r91871, which was reverted in r94131.

Added in OutputPage instead of Skin::getPageClasses, as this is not directly page nor skin related. It also ensures independency from skins, this CSS class should be always available so that it can be relied on by the front-end.

12 years agorelease notes for r108343
Krinkle [Sun, 8 Jan 2012 01:41:21 +0000 (01:41 +0000)]
release notes for r108343

12 years ago[mw.config] wgAction shouldn't use direct URL values
Krinkle [Sun, 8 Jan 2012 01:34:59 +0000 (01:34 +0000)]
[mw.config] wgAction shouldn't use direct URL values
* Fixes bug 25800
* Depends on r108342

12 years agoImplement MediaWiki::getPerformedAction()
Krinkle [Sun, 8 Jan 2012 01:31:56 +0000 (01:31 +0000)]
Implement MediaWiki::getPerformedAction()
* Fixes:
-- Bug 27930 - Ablity to get current action (The Right Way)

12 years agoRemove action=history from submit on HistoryAction
Krinkle [Sun, 8 Jan 2012 00:52:50 +0000 (00:52 +0000)]
Remove action=history from submit on HistoryAction
* Not needed, and not used. Is internally converted to "view" as much as possible.
* Fixes bug 33587
* See also https://bugzilla.wikimedia.org/show_bug.cgi?id=25800#c6
* Other diff links from MediaWiki don't do this either

12 years agoRe-applying change to code from r106516
Krinkle [Sun, 8 Jan 2012 00:24:25 +0000 (00:24 +0000)]
Re-applying change to code from r106516
* Diff in r106516 didn't show that these changes where made due to new file creation, fixed now.
* Follows-up r108339

12 years agoRe-do svn copy from r106516 preserving history
Krinkle [Sun, 8 Jan 2012 00:22:44 +0000 (00:22 +0000)]
Re-do svn copy from r106516 preserving history

12 years agoUpdating stat in the README
John Du Hart [Sat, 7 Jan 2012 23:51:48 +0000 (23:51 +0000)]
Updating stat in the README

12 years agoNo need of $wgDBmwschema after r108060
Platonides [Sat, 7 Jan 2012 23:29:48 +0000 (23:29 +0000)]
No need of $wgDBmwschema after r108060

12 years agoCalls to editToken() that r103294 missed.
Platonides [Sat, 7 Jan 2012 23:26:35 +0000 (23:26 +0000)]
Calls to editToken() that r103294 missed.

12 years agoProfile all returns (r107319 follow-up)
Platonides [Sat, 7 Jan 2012 23:23:29 +0000 (23:23 +0000)]
Profile all returns (r107319 follow-up)

12 years agoFixed name of $wgLockManagers var in DefaultSettings.php
Aaron Schulz [Sat, 7 Jan 2012 23:05:59 +0000 (23:05 +0000)]
Fixed name of $wgLockManagers var in DefaultSettings.php

12 years agoRemove empty statement added in r108193
Platonides [Sat, 7 Jan 2012 22:49:46 +0000 (22:49 +0000)]
Remove empty statement added in r108193

12 years agor102411 fixup. Close register globals vuln, and document
Platonides [Sat, 7 Jan 2012 22:42:05 +0000 (22:42 +0000)]
r102411 fixup. Close register globals vuln, and document
why is there that require_once.

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Sat, 7 Jan 2012 21:50:32 +0000 (21:50 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoSimplify the check to make it more understandable
Alexandre Emsenhuber [Sat, 7 Jan 2012 16:58:56 +0000 (16:58 +0000)]
Simplify the check to make it more understandable

12 years agoCleanup in WikiPage::getRedirectURL():
Alexandre Emsenhuber [Sat, 7 Jan 2012 15:48:42 +0000 (15:48 +0000)]
Cleanup in WikiPage::getRedirectURL():
* Call Title::isValidRedirectTarget() in case of special page instead of checking only for Special:Userlogout
* Refactor the code a bit to be more readable and remove unneeded nested conditions

12 years ago(follow-up r108145) Mark test as needing a database, and fix bug number in comment.
Brian Wolff [Sat, 7 Jan 2012 15:43:21 +0000 (15:43 +0000)]
(follow-up r108145) Mark test as needing a database, and fix bug number in comment.

12 years ago* Use WikiPage instead of Article
Alexandre Emsenhuber [Sat, 7 Jan 2012 15:43:05 +0000 (15:43 +0000)]
* Use WikiPage instead of Article
* Use getRedirectTarget() instead of followRedirect(); the latter may return a string, which is not wanted here
* No need to call updateRedirectOn(); getRedirectTarget() already populates the redirect table if needed

12 years ago* Don't select (even twice for PHPUnit tests) "FOR UPDATE", but use the master databa...
Alexandre Emsenhuber [Sat, 7 Jan 2012 12:19:10 +0000 (12:19 +0000)]
* Don't select (even twice for PHPUnit tests) "FOR UPDATE", but use the master database directly instead
* Also pass the line number
* Removed useless usage of $title when throwing the exception about invalid since that variable is always null
* Added $ignoreDuplicate parameter to ParserTest::addArticle()

12 years agoDon't expand templates in html <title>. This seems to have regressed some time ago.
Niklas Laxström [Sat, 7 Jan 2012 09:56:14 +0000 (09:56 +0000)]
Don't expand templates in html <title>. This seems to have regressed some time ago.

12 years agor108300: updated parserTest.inc tests and re-enabled testBug29408()
Aaron Schulz [Sat, 7 Jan 2012 09:26:11 +0000 (09:26 +0000)]
r108300: updated parserTest.inc tests and re-enabled testBug29408()

12 years agoDependency inject the repo/backend for proper testing rather than relying on the...
Aaron Schulz [Sat, 7 Jan 2012 06:13:01 +0000 (06:13 +0000)]
Dependency inject the repo/backend for proper testing rather than relying on the wiki config

12 years agor108300: also destroy the repo/backend singletons for upload test
Aaron Schulz [Sat, 7 Jan 2012 04:30:23 +0000 (04:30 +0000)]
r108300: also destroy the repo/backend singletons for upload test

12 years ago* Fixed bogus dollar signs left in $tmpGlobals array keys in r108300.
Aaron Schulz [Sat, 7 Jan 2012 03:46:54 +0000 (03:46 +0000)]
* Fixed bogus dollar signs left in $tmpGlobals array keys in r108300.
* Various documentation cleanups.

12 years agoPartially reverted bits from r108300. Not allowing underscores is too restrictive...
Aaron Schulz [Sat, 7 Jan 2012 03:17:17 +0000 (03:17 +0000)]
Partially reverted bits from r108300. Not allowing underscores is too restrictive and breaks on default DB name value suggested by installer. Azure can use resolveContainerName() to enforce its extra restrictions. A new resolveWikiId() function was added to allow for it to mangle the wiki ID by translating underscores. Also restored previous size limit in isValidContainerName() since it makes sense to either go all the way lowest-common-denominator or not here (in this case not). Preserved "first char is a alphanumeric" check since it's pretty weird to have anything else.

12 years agoIn FileBackend/FileOp:
Aaron Schulz [Sat, 7 Jan 2012 01:33:23 +0000 (01:33 +0000)]
In FileBackend/FileOp:
* Replaced 'media' portion of container names with the repo name. This makes it easy for multiple repos to use the same backend without 'wikiId' hacks. Full container names are now like <wiki>-<repo>-<zone> (or <repo>-<zone> if 'wikiId' is set to an empty string).
* Restricted isValidContainerName() more in light of Azure portability and shorted shard suffix.
* Bumped $maxCacheSize to 75 storage paths.
* Code comment cleanups and additions.
Unit tests:
* Updated related tests and marked testBug29408() as broken (I can't find the problem).
* Reduced leakage in UploadFromUrlTestSuite a bit.

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Fri, 6 Jan 2012 23:05:19 +0000 (23:05 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoRegister the 2 new access message keys from r108262 for meintenance files
Raimond Spekking [Fri, 6 Jan 2012 22:58:23 +0000 (22:58 +0000)]
Register the 2 new access message keys from r108262 for meintenance files

12 years agoIgnore the 2 new access message keys from r108262 for translation
Raimond Spekking [Fri, 6 Jan 2012 22:26:57 +0000 (22:26 +0000)]
Ignore the 2 new access message keys from r108262 for translation

12 years agorv r108284 since PHP has different behaviors
Antoine Musso [Fri, 6 Jan 2012 22:18:46 +0000 (22:18 +0000)]
rv r108284 since PHP has different behaviors

should fix jenkins

12 years agoFix formatBitrate behavior on Mac OS X
Antoine Musso [Fri, 6 Jan 2012 21:49:55 +0000 (21:49 +0000)]
Fix formatBitrate behavior on Mac OS X

Language::formatBitrate() uses log10() to makes a long number human readeable.
There is a nasty rounding error on Mac OS X for log10():

 log10(pow(10,15)) => gives 15

 floor( log10(pow(10,15)) ) => gives 14 (should be 15)

The end result is that pow(10,15) is formatted as 1,000Tbps instead of 1Pbps

log( $foo, 10) does not suffer from this:

 php -r 'print floor(log(pow(10,15),10)) ."\n";'

PHP Version used:

 $ php -v
 PHP 5.3.6 with Suhosin-Patch (cli) (built: Sep  8 2011 19:34:00)
 Copyright (c) 1997-2011 The PHP Group
 Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
     with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
 $

TEST PLAN:

BEFORE
======

$ php phpunit.php ./languages/LanguageTest.php
PHPUnit 3.6.3 by Sebastian Bergmann.

...............................................................  63 / 170 ( 37%)
............................................................... 126 / 170 ( 74%)
.......................................F....

Time: 2 seconds, Memory: 32.25Mb

There was 1 failure:

1) LanguageTest::testFormatBitrate with data set #5 (1000000000000000, '1Pbps', '1 petabit per second')
formatBitrate('1000000000000000'): 1 petabit per second
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'1Pbps'
+'1,000Tbps'

FAILURES!
Tests: 170, Assertions: 174, Failures: 1.

AFTER
=====

PHPUnit 3.6.3 by Sebastian Bergmann.

...............................................................  63 / 170 ( 37%)
............................................................... 126 / 170 ( 74%)
............................................

Time: 1 second, Memory: 32.25Mb

OK (170 tests, 174 assertions)

12 years agominor w/s + move $title instantiation above Enotif
Mark A. Hershberger [Fri, 6 Jan 2012 21:25:09 +0000 (21:25 +0000)]
minor w/s + move $title instantiation above Enotif

12 years agow/s, remove unused vars per note in bug #33537
Mark A. Hershberger [Fri, 6 Jan 2012 20:54:24 +0000 (20:54 +0000)]
w/s, remove unused vars per note in bug #33537

12 years agoRevert r105790 and move back view counter back to WikiPage with two modifications:
Alexandre Emsenhuber [Fri, 6 Jan 2012 20:26:53 +0000 (20:26 +0000)]
Revert r105790 and move back view counter back to WikiPage with two modifications:
* WikiPage::$mCounter is now marked as protected
* Call WikiPage::loadPageData() from WikiPage::getCount() if the count is not set intead of loading the page_counter field only

12 years ago* Added WikiPage to RequestContext and related so that it can be shared to avoid...
Alexandre Emsenhuber [Fri, 6 Jan 2012 20:00:04 +0000 (20:00 +0000)]
* Added WikiPage to RequestContext and related so that it can be shared to avoid creating a new object each time and thus avoiding database queries to load the state of the object
* Added Article::getPage() as accessor to the WikiPage object so that it can be set in the context from MediaWiki::initializeArticle()
* Use it WikiPage::main() to call doViewUpdates()

I'm doing to this now so that I can revert r105790 and use the WikiPage object before the 1.19 release

12 years agoCouple of fname -> __method__
Chad Horohoe [Fri, 6 Jan 2012 18:30:11 +0000 (18:30 +0000)]
Couple of fname -> __method__

12 years agowl edit tooltip messages from r108262
Antoine Musso [Fri, 6 Jan 2012 18:27:56 +0000 (18:27 +0000)]
wl edit tooltip messages from r108262

12 years ago(bug 32787) Add DB name to debug output. Based on patch by Solitarius
Chad Horohoe [Fri, 6 Jan 2012 18:23:52 +0000 (18:23 +0000)]
(bug 32787) Add DB name to debug output. Based on patch by Solitarius

12 years agoAdd tooltip/accesskey to EditWatchlist
Krinkle [Fri, 6 Jan 2012 18:15:42 +0000 (18:15 +0000)]
Add tooltip/accesskey to EditWatchlist
* Fixes bug 33565

12 years agorelease-notes: remove notes for r108203; adding new ones for r108230
Krinkle [Fri, 6 Jan 2012 17:35:11 +0000 (17:35 +0000)]
release-notes: remove notes for r108203; adding new ones for r108230

12 years agoFollow up r108248, r108141: use wfUnpack() so we don't duplicate logic. Could also...
Chad Horohoe [Fri, 6 Jan 2012 16:58:38 +0000 (16:58 +0000)]
Follow up r108248, r108141: use wfUnpack() so we don't duplicate logic. Could also pass $length for sanity, but someone else can do that

12 years agoMade UnwatchArticle, UnwatchArticleComplete, WatchArticle and WatchArticleComplete...
Alexandre Emsenhuber [Fri, 6 Jan 2012 16:28:11 +0000 (16:28 +0000)]
Made UnwatchArticle, UnwatchArticleComplete, WatchArticle and WatchArticleComplete pass a WikiPage object instead of Article.
There are two extensions (InterwikiIntegration and Syslog) that use these hooks and they don't Article-only methods so they won't break by this change.

12 years agoXCF: suppress warning on unpack + early exit on error
Antoine Musso [Fri, 6 Jan 2012 16:17:04 +0000 (16:17 +0000)]
XCF: suppress warning on unpack + early exit on error

follow r108141

12 years ago(bug 29309) allow CSS class per tooltip (tipsy)
Antoine Musso [Fri, 6 Jan 2012 16:02:05 +0000 (16:02 +0000)]
(bug 29309) allow CSS class per tooltip (tipsy)

Let us use the new "className" upstream option to add a class per tooltip.

Partial merges of upstreams changes:
 - 602f2fe5 Per-tooltip classes
 - f5563566 Helper function for call or return idiom

12 years agoAdd a few @since entries
Sam Reed [Fri, 6 Jan 2012 15:36:17 +0000 (15:36 +0000)]
Add a few @since entries

12 years agoFollowup r108231, remove useless _this
Roan Kattouw [Fri, 6 Jan 2012 15:14:04 +0000 (15:14 +0000)]
Followup r108231, remove useless _this

12 years agoFollowup r108184: fix loading in Opera. Before, Opera would only begin to render...
Roan Kattouw [Fri, 6 Jan 2012 15:06:39 +0000 (15:06 +0000)]
Followup r108184: fix loading in Opera. Before, Opera would only begin to render the document after all async scripts were loaded, now it's the other way around (scripts load after the document is ready). This is not an improvement compared to the current situation, but it's not a regression either.

12 years ago* Added callback to send notices from WikiImporter and use it in ImportReporter so...
Alexandre Emsenhuber [Fri, 6 Jan 2012 14:21:16 +0000 (14:21 +0000)]
* Added callback to send notices from WikiImporter and use it in ImportReporter so that it can use the context to get messages and send them to OutputPage (also removes on usage of $wgCommandLineMode)
* Early abort on invalid title in ImportReporter::reportPage() since a notice has already been sent
* Localised message saying the title is invalid

12 years agoFix broken oldParser call in r108230
Roan Kattouw [Fri, 6 Jan 2012 14:17:03 +0000 (14:17 +0000)]
Fix broken oldParser call in r108230

12 years agoFix up r108203: just loading mw.jqueryMsg in the bottom queue, then assuming its...
Roan Kattouw [Fri, 6 Jan 2012 14:11:34 +0000 (14:11 +0000)]
Fix up r108203: just loading mw.jqueryMsg in the bottom queue, then assuming its presence in mw.Message doesn't work, see CR comments.

* Moved message parsing (including $1 replacement) to Message.prototype.parser(), and let jqueryMsg override that when loaded
** Make the Message constructor public to make this possible
** Moved logic for skipping jqueryMsg when the message is simple from mw.Message to mw.jqueryMsg, where it belongs
* Remove mw.jqueryMsg from the default modules list in OutputPage. Modules that require PLURAL/GENDER should depend on mw.jqueryMsg
* TODOs
** The jqueryMsg parser is recreated for every mw.msg() call. It should probably be cached, but the only way I can think of is to add it as a member of the Map object, which is kind of weird
** Because jqueryMsg doesn't support a 'text' mode that expands PLURAL/GENDER but doesn't output HTML (leaves e.g. links alone), mw.Message.plain() and mw.Message.parse() currently behave identically. This is wrong and should be fixed, but that needs support in jqueryMsg too

12 years ago* Don't allow to import a page in the Media: namespace, this didn't work just because...
Alexandre Emsenhuber [Fri, 6 Jan 2012 12:06:13 +0000 (12:06 +0000)]
* Don't allow to import a page in the Media: namespace, this didn't work just because WikiPage::factory() throws an exception when a Title in NS_MEDIA is passed
* Added localised message when trying to import a page with an interwiki prefix

12 years agoSet position => 'top' for wikibits, required to support legacy gadgets. Spotted by...
Roan Kattouw [Fri, 6 Jan 2012 12:03:06 +0000 (12:03 +0000)]
Set position => 'top' for wikibits, required to support legacy gadgets. Spotted by Niklas on TranslateWiki. Ping r107327.

12 years agoRemove unneeded dependency from wikibits, and move the showtoc and hidetoc messages...
Roan Kattouw [Fri, 6 Jan 2012 11:44:41 +0000 (11:44 +0000)]
Remove unneeded dependency from wikibits, and move the showtoc and hidetoc messages to mw.util where they're used

12 years agoPrevent #firstHeading overriding the language specific h1 height.
Santhosh Thottingal [Fri, 6 Jan 2012 11:24:57 +0000 (11:24 +0000)]
Prevent #firstHeading overriding the language specific h1 height.
Ref Bug 30809

12 years agoUse mw.jqueryMsg parser for message parsing to support PLURAL and GENDER
Santhosh Thottingal [Fri, 6 Jan 2012 09:14:45 +0000 (09:14 +0000)]
Use mw.jqueryMsg parser for message parsing to support PLURAL and GENDER
Follow up r107556 and based on the discussions on wikitech-l about this.
mediawiki.jqueryMsg is now loaded always. mw.msg uses the parser if required.
Add qunit test cases.

12 years agoFix grammar in r108154.
Raimond Spekking [Fri, 6 Jan 2012 08:06:05 +0000 (08:06 +0000)]
Fix grammar in r108154.
Spotted by kgh https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Perfcached/en

12 years agoCorrection in the test comment, followup r107824
Santhosh Thottingal [Fri, 6 Jan 2012 06:56:01 +0000 (06:56 +0000)]
Correction in the test comment, followup r107824

12 years agor108192: Explicitly set flags for RecursiveDirectoryIterator constructor
Aaron Schulz [Fri, 6 Jan 2012 06:35:54 +0000 (06:35 +0000)]
r108192: Explicitly set flags for RecursiveDirectoryIterator constructor

12 years ago* Cleanup for r108175: made if easier for extensions to interact with each other...
Aaron Schulz [Fri, 6 Jan 2012 06:16:05 +0000 (06:16 +0000)]
* Cleanup for r108175: made if easier for extensions to interact with each other in TitleReadWhitelist hook. A handler can set $whitelisted to true to whitelist the page or it can set it to false and return false (most restrictive wins).
* Added some hook doc comments.

12 years agoFixes for r106752:
Aaron Schulz [Fri, 6 Jan 2012 05:15:51 +0000 (05:15 +0000)]
Fixes for r106752:
* Make sure FSFileIterator::current() directly returns the string path and that it is relative to the directory being searched.
* Fixed silly bug in testGetFileList that masked any bugs.
* Added a few code comments.

12 years agoFix a race condition in classic edit toolbar setup
Brion Vibber [Fri, 6 Jan 2012 01:38:26 +0000 (01:38 +0000)]
Fix a race condition in classic edit toolbar setup

mediawiki.action.edit used to call mw.toolbar.init on its own during DOMReady -- this required that the module already be loaded *before* DOMReady, *and* that it be fully loaded before the immedate-execution code that sets up the default toolbar items (output from EditPage.php).
This failed since we've gone fully async in the bottom-loading items, and could result in failed calls to mw.toolbar.addButton.

Wrapped those immediate calls in a mediawiki.loader.using call to ensure they're run after the module is loaded, and moved the mw.toolbar.init call into that section so we guarantee it gets run first.

12 years agoPartially reverted r108111: we can't assume subclasses put thumbnails in the...thumbn...
Aaron Schulz [Thu, 5 Jan 2012 23:35:38 +0000 (23:35 +0000)]
Partially reverted r108111: we can't assume subclasses put thumbnails in the...thumbnails zone. They might override the thumbnail path functions.

12 years agoResourceLoader: Add an experimental option to move the main module loading queue...
Roan Kattouw [Thu, 5 Jan 2012 23:32:41 +0000 (23:32 +0000)]
ResourceLoader: Add an experimental option to move the main module loading queue (the bottom queue) from the bottom of the <body> up into the <head> , while still being loaded asynchronously. This makes them load earlier, which should make the page load faster. This is the product of a long discussion on bug 27488

* Added a "blocking" state to mw.loader . When loading scripts while the document is not ready, the loader will use document.write() if blocking is true, and append to the <body> or the <head> if blocking is false. If the document is ready, the loader will always append to the <body>
* Enable blocking mode while loading the top queue, and disable it after. This ensures that modules in the top queue are still loaded in a blocking way as they were before
* If $wgResourceLoaderExperimentalAsyncLoading is true, the bottom queue is also loaded in the head, but with blocking mode disabled. Otherwise, it's loaded at the bottom of the <body> as before
* scripts-only and messages-only requests need special treatment:
** in the top queue, they can continue to use <script src="..."> tags because they are blocking
** if the bottom queue is at the bottom of the <body> (experimental async loading disabled), they can continue to use <script src="..."> tags as before
** if the bottom queue is in the <head> (experimental async loading enabled), they cannot use <script src="..."> tags, because those would block. Instead, call mw.loader.load() on the load.php URL

12 years agoMake sure that if we fail to read the App13 (iptc) block of a JPG file, that that...
Brian Wolff [Thu, 5 Jan 2012 23:25:39 +0000 (23:25 +0000)]
Make sure that if we fail to read the App13 (iptc) block of a JPG file, that that doesn't block other metadata from being read. Also makes sure if more then one app13 block is in the file, they are all read, not just the last one that appears in the file (This required some changes to tests since before the intermediate value was just one value, now its an array of all such blocks)

12 years agoXCF: remove var_dump() statement
Antoine Musso [Thu, 5 Jan 2012 23:01:24 +0000 (23:01 +0000)]
XCF: remove var_dump() statement

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Thu, 5 Jan 2012 21:31:37 +0000 (21:31 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agoPer request of Aaron Schulz, follow-up r102187: added new 'TitleReadWhitelist' hook...
Alexandre Emsenhuber [Thu, 5 Jan 2012 20:29:53 +0000 (20:29 +0000)]
Per request of Aaron Schulz, follow-up r102187: added new 'TitleReadWhitelist' hook to allow extensions to bypass core (and other extensions) checks to allow an user to read the page

12 years agoPer Nikerabbit, fix for r107637: added @since
Alexandre Emsenhuber [Thu, 5 Jan 2012 19:05:02 +0000 (19:05 +0000)]
Per Nikerabbit, fix for r107637: added @since

12 years agoFollowup r107932
Sam Reed [Thu, 5 Jan 2012 18:49:19 +0000 (18:49 +0000)]
Followup r107932

Check random class to be isntantiated is a subclass of DatabaseBase

12 years agoFollow-up r108137: @since
Max Semenik [Thu, 5 Jan 2012 18:05:54 +0000 (18:05 +0000)]
Follow-up r108137: @since

12 years agoFollow-up r108147. PLURAL in message.
Brian Wolff [Thu, 5 Jan 2012 17:56:51 +0000 (17:56 +0000)]
Follow-up r108147. PLURAL in message.

12 years agoFor new 'export all' feature, cleanup whitepspace, remove redundant check, add docume...
Greg Sabino Mullane [Thu, 5 Jan 2012 17:10:07 +0000 (17:10 +0000)]
For new 'export all' feature, cleanup whitepspace, remove redundant check, add documentation. Bug 10574y

12 years agoadd basic XCF pictures for testing purpose
Antoine Musso [Thu, 5 Jan 2012 16:33:52 +0000 (16:33 +0000)]
add basic XCF pictures for testing purpose

12 years ago(bug 33456) show $wgQueryCacheLimit on cached query pages, so users know that the...
Brian Wolff [Thu, 5 Jan 2012 16:14:52 +0000 (16:14 +0000)]
(bug 33456) show $wgQueryCacheLimit on cached query pages, so users know that the results are artificially cut off, and its not just that there is only 1000 wanted files (or whatever else) on the wiki.

12 years ago(bug 33321. Sort of) Adding a line to MediaWiki:Sidebar that contains a pipe, but...
Brian Wolff [Thu, 5 Jan 2012 15:34:26 +0000 (15:34 +0000)]
(bug 33321. Sort of) Adding a line to MediaWiki:Sidebar that contains a pipe, but doesn't
have any pipes after being transformed by MessageCache, causes exception on
all pages.

This can happen with lines like:
**{{#if:yes|Something}}

Thank you to liangent for figuring out how to escape a | without {{!}} existing and &#124; not working.