lhc/web/wiklou.git
13 years agoRevert r89374, r88936 backports.
Mark A. Hershberger [Wed, 8 Jun 2011 20:04:45 +0000 (20:04 +0000)]
Revert r89374, r88936 backports.

13 years ago* fixed regex to work
Alexandre Emsenhuber [Wed, 8 Jun 2011 17:43:25 +0000 (17:43 +0000)]
* fixed regex to work
* added missing directories

13 years agoLocalization update for he.
Rotem Liss [Wed, 8 Jun 2011 13:25:24 +0000 (13:25 +0000)]
Localization update for he.

13 years agoRevert r87145, bug 28752: Xcache doesn't work in cli mode. As pointed out on CR,...
Chad Horohoe [Wed, 8 Jun 2011 00:53:56 +0000 (00:53 +0000)]
Revert r87145, bug 28752: Xcache doesn't work in cli mode. As pointed out on CR, this didn't fix it, it just hid the issue.

13 years agoRevert r87173: adds 'wrap: break-word' which seems opposite to what pre blocks are...
Brion Vibber [Tue, 7 Jun 2011 23:55:10 +0000 (23:55 +0000)]
Revert r87173: adds 'wrap: break-word' which seems opposite to what pre blocks are meant to do.

13 years agoFollow up r89707. No need for the explicit concatenations.
Platonides [Tue, 7 Jun 2011 22:33:41 +0000 (22:33 +0000)]
Follow up r89707. No need for the explicit concatenations.

13 years agoquick fix for bug28983 . Do not use $path in the loop. Even the remaining $e is dange...
Thomas Gries [Tue, 7 Jun 2011 22:30:06 +0000 (22:30 +0000)]
quick fix for bug28983 . Do not use $path in the loop. Even the remaining $e is dangerous subject to change from the require-once-loaded extensions. This is NOT A FINAL fix, just a small improvement

13 years agoReinstate r79122 (fix for bug 14404), reverting r83868. The real bug seem to have...
Platonides [Tue, 7 Jun 2011 22:28:57 +0000 (22:28 +0000)]
Reinstate r79122 (fix for bug 14404), reverting r83868. The real bug seem to have been r86131, fixed in r88902 (1.17) and  r88902 (1.18).
This is not merged with the r86131 change to Article::getParserOptions() since I don't see the point for the new function yet.
Reenabled its test ArticleTablesTest which was disabled in r85618

13 years agoFix (bug 29307) Line-height in <pre> is too narrow, edges overlap in some environments
Krinkle [Tue, 7 Jun 2011 21:39:48 +0000 (21:39 +0000)]
Fix (bug 29307) Line-height in <pre> is too narrow, edges overlap in some environments

13 years agoKill the extra indenting, and fix trailing whitespace
Sam Reed [Tue, 7 Jun 2011 21:30:02 +0000 (21:30 +0000)]
Kill the extra indenting, and fix trailing whitespace

13 years agoRevert r87292
Sam Reed [Tue, 7 Jun 2011 21:28:47 +0000 (21:28 +0000)]
Revert r87292

13 years agoFollow up r85410 & r89688. Try to make clearer that this is a message key.
Platonides [Tue, 7 Jun 2011 21:20:07 +0000 (21:20 +0000)]
Follow up r85410 & r89688. Try to make clearer that this is a message key.

13 years agoDoc fix for r85410
Chad Horohoe [Tue, 7 Jun 2011 20:56:21 +0000 (20:56 +0000)]
Doc fix for r85410

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Tue, 7 Jun 2011 20:55:30 +0000 (20:55 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-07 20:35:00 UTC)

13 years agoFollowup to r86061: add parser test case to confirm that '&apos' in wikitext doesn...
Brion Vibber [Tue, 7 Jun 2011 20:11:24 +0000 (20:11 +0000)]
Followup to r86061: add parser test case to confirm that '&apos' in wikitext doesn't make it to output.

'&apos;' is not defined in HTML 4, and some browsers (for instance IE at least through 8) do not support it.
It is however part of XML 1 (and thus XHTML 1), and is also defined in HTML 5 provisional, so it's fine to accept it.

Normalization seems to already handle turning the &apos; named char reference into &#39; so we don't have any compatibility worries.

Also added a comment on the def in Sanitizer that it shouldn't be used in output.

13 years agoremove useless type hint (fu r85004)
Antoine Musso [Tue, 7 Jun 2011 19:58:10 +0000 (19:58 +0000)]
remove useless type hint (fu r85004)

13 years agoForgot to press save on the comment
Chad Horohoe [Tue, 7 Jun 2011 18:51:03 +0000 (18:51 +0000)]
Forgot to press save on the comment

13 years agoFollowup r87347, bug 22227, use makeTitleSafe.
Chad Horohoe [Tue, 7 Jun 2011 18:50:21 +0000 (18:50 +0000)]
Followup r87347, bug 22227, use makeTitleSafe.

13 years agoFix (Api)BlockTest for Sqlite. getRangeStart()/getRangeEnd() were returning null...
Chad Horohoe [Tue, 7 Jun 2011 18:13:21 +0000 (18:13 +0000)]
Fix (Api)BlockTest for Sqlite. getRangeStart()/getRangeEnd() were returning null for user blocks, which was then happily inserted into a NOT NULL column. The IGNORE was just masking the real error. Thanks Brion and MaxSem. Oh, and ping r84475

13 years agoAdded phpunit test cases for r87497, r88076: ResourceLoader module name prefix collapsing
Brion Vibber [Tue, 7 Jun 2011 17:56:40 +0000 (17:56 +0000)]
Added phpunit test cases for r87497, r88076: ResourceLoader module name prefix collapsing

13 years agoProvisional revert of r89648: "Another try at fixing bug 93 "tilde signatures inside...
Brion Vibber [Tue, 7 Jun 2011 17:34:20 +0000 (17:34 +0000)]
Provisional revert of r89648: "Another try at fixing bug 93 "tilde signatures inside nowiki tags sometimes get expanded (<includeonly><nowiki>~~~~</nowiki></includeonly>)""

This seems to disable PST for <includeonly>...</includeonly> in addition to the <includeonly><nowiki>...</nowiki></includeonly> that the bug is about.
This was caught by a parser test case, but the test case was changed to match... seems like the wrong change?

Also failed to update Preprocessor_HipHop.hphp to match the other two preprocessor classes.

13 years agoGet rid of addNewExtension()/getNewExtensions() method of adding new extensions ...
Chad Horohoe [Tue, 7 Jun 2011 17:33:34 +0000 (17:33 +0000)]
Get rid of addNewExtension()/getNewExtensions() method of adding new extensions (added in r81266). Since r85021, this isn't necessary because we run old updates like we should. Fix the 3 extensions using it. Reverts most of r81266, all of r84868, tiny part of r86741. Also ping r89653 which is what caused me to look at this again.

13 years agoFix r85021: extension tables weren't created in some cases
Max Semenik [Tue, 7 Jun 2011 15:52:38 +0000 (15:52 +0000)]
Fix r85021: extension tables weren't created in some cases

13 years agoAnother try at fixing bug 93 "tilde signatures inside nowiki tags sometimes get expan...
Paul Copperman [Tue, 7 Jun 2011 15:12:26 +0000 (15:12 +0000)]
Another try at fixing bug 93 "tilde signatures inside nowiki tags sometimes get expanded (<includeonly><nowiki>~~~~</nowiki></includeonly>)"

* Change the preprocessor to insert strip items for <ignore> nodes during pre-save-transform, just like <comment> nodes are handled already. This effectively disables all pre-save-transform steps inside <includeonly> tags.
* Adapt parser tests to the new behavior.

13 years agoFix broken r89643.
Siebrand Mazeland [Tue, 7 Jun 2011 12:42:28 +0000 (12:42 +0000)]
Fix broken r89643.

13 years agoAdd GENDER support for 'lockedbyandtime'. Suggested by Purodha Blissenbach.
Siebrand Mazeland [Tue, 7 Jun 2011 12:12:13 +0000 (12:12 +0000)]
Add GENDER support for 'lockedbyandtime'. Suggested by Purodha Blissenbach.

13 years agoFix error noticed in r88174, wasn't actually validating sha1base36 hash
Sam Reed [Tue, 7 Jun 2011 09:13:09 +0000 (09:13 +0000)]
Fix error noticed in r88174, wasn't actually validating sha1base36 hash

13 years ago* Fix for r89624: fixed logo HTML escaping
Tim Starling [Tue, 7 Jun 2011 05:22:50 +0000 (05:22 +0000)]
* Fix for r89624: fixed logo HTML escaping

13 years ago* Restored the page shown when LocalSettings.php is missing to how it was before...
Tim Starling [Tue, 7 Jun 2011 05:11:50 +0000 (05:11 +0000)]
* Restored the page shown when LocalSettings.php is missing to how it was before r85918. That template is a welcome page, not a "catastrophic error".
* Fixed attempted remote loading of the logo image in index.php's wfDie(). Use the distributed mediawiki.png instead, that's what it's there for.

13 years ago* fixed table duplication for unit tests
Jure Kajzer [Tue, 7 Jun 2011 05:09:32 +0000 (05:09 +0000)]
* fixed table duplication for unit tests
* fixed sequence handling when using DB prefix
* deferring constraints on transaction, switching back to immediate on commit/rollback
* hardcoded NLS_NUMERIC_CHARACTERS as it breaks using floats in sql if connection is in a non-US-like NLS_LANG (all vars are bound as chars)

13 years agoWhen detecting $wgServer, do not fall back to $_SERVER['HTTP_HOST']. It's unlikely...
Tim Starling [Tue, 7 Jun 2011 03:31:09 +0000 (03:31 +0000)]
When detecting $wgServer, do not fall back to $_SERVER['HTTP_HOST']. It's unlikely that this is used by anything, since SERVER_NAME takes precedence, and SERVER_NAME is required by CGI 1.1 and appears to always be set by the major web servers. If it were ever used, it would open up a cache-poisoning vulnerability. Partially reverts r8010.

13 years agoPartial revert of r85022. Removing added auto-margin that changed behaviour.
Krinkle [Tue, 7 Jun 2011 00:08:56 +0000 (00:08 +0000)]
Partial revert of r85022. Removing added auto-margin that changed behaviour.

13 years ago(bug 25124) Resource loader should respect $wgStyleDirectory
Krinkle [Mon, 6 Jun 2011 22:08:52 +0000 (22:08 +0000)]
(bug 25124) Resource loader should respect $wgStyleDirectory
* Yay, one down, one resourceloader 1.0 blocker to go

13 years agoAlright, IE7 is fixed by r89613. IE6 stays problematic, for some reason it contains...
Krinkle [Mon, 6 Jun 2011 21:51:18 +0000 (21:51 +0000)]
Alright, IE7 is fixed by r89613. IE6 stays problematic, for some reason it contains non-nodes as well (presumably whitespace/textnodes). This oughta fix it forever (poke r89605)

13 years agoRedo r89605 in a better way.
Krinkle [Mon, 6 Jun 2011 21:43:03 +0000 (21:43 +0000)]
Redo r89605 in a better way.

13 years agoFollow up r89585. Clean up after the test, expand inContentLanguage() comment.
Platonides [Mon, 6 Jun 2011 21:24:23 +0000 (21:24 +0000)]
Follow up r89585. Clean up after the test, expand inContentLanguage() comment.

13 years agoFix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE8/IE9. Some value...
Krinkle [Mon, 6 Jun 2011 21:10:42 +0000 (21:10 +0000)]
Fix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE8/IE9. Some values default to a "unknown" string.

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Mon, 6 Jun 2011 20:57:48 +0000 (20:57 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-06 20:43:00 UTC)

13 years agoFix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE6/IE7 (Thanks...
Krinkle [Mon, 6 Jun 2011 20:57:28 +0000 (20:57 +0000)]
Fix bug that brakes the 'jquery.tabIndex > firstTabIndex' test in IE6/IE7 (Thanks TestSwarm).

13 years agoRelease notes for bug 27655 (r89545 and related revs)
Krinkle [Mon, 6 Jun 2011 20:52:33 +0000 (20:52 +0000)]
Release notes for bug 27655 (r89545 and related revs)

13 years agojquery.client.js JSPERF+Unit test suite
Krinkle [Mon, 6 Jun 2011 20:51:27 +0000 (20:51 +0000)]
jquery.client.js JSPERF+Unit test suite
- Using one closure function instead of two
- Comparing to undefined instead it's type (faster, [[mw:JSPERF]])
- Adding basic test suite

13 years agotest thead / tfooter contains th elements
Antoine Musso [Mon, 6 Jun 2011 20:10:51 +0000 (20:10 +0000)]
test thead / tfooter contains th elements

Implemented by r85922. Cover r85943.

TEST PLAN:

$ php parserTests.php --regex 'Table have th inside t'
This is MediaWiki version 1.19alpha (r89594).

Reading tests from "tests/parser/parserTests.txt"...
Running test Table have th inside tfoot... PASSED
Running test Table have th inside thead... PASSED

Reading tests from "tests/parser/extraParserTests.txt"...

Reading tests from "../mwexts/LabeledSectionTransclusion/lstParserTests.txt"...

Passed 2 of 2 tests (100%)... ALL TESTS PASSED!
$

13 years agoadd credits to bluehairedlawyer for thead/tbody
Antoine Musso [Mon, 6 Jun 2011 20:09:21 +0000 (20:09 +0000)]
add credits to bluehairedlawyer for thead/tbody

(bug 4740, r85922)

13 years ago;
Chad Horohoe [Mon, 6 Jun 2011 20:01:48 +0000 (20:01 +0000)]
;

13 years agoRevert r89537 till we decide a sane way to have it on/off as API bools suck
Sam Reed [Mon, 6 Jun 2011 19:26:58 +0000 (19:26 +0000)]
Revert r89537 till we decide a sane way to have it on/off as API bools suck

13 years agoFollow-up r89586: actually delete the file
Max Semenik [Mon, 6 Jun 2011 19:23:36 +0000 (19:23 +0000)]
Follow-up r89586: actually delete the file

13 years agoRevert r89263, r89297, r89347: unclear whether this is needed; DatabaseUpdater action...
Brion Vibber [Mon, 6 Jun 2011 18:35:28 +0000 (18:35 +0000)]
Revert r89263, r89297, r89347: unclear whether this is needed; DatabaseUpdater actions list is already extensible and it might just need some rearrangement?

13 years agoFix for bug 29274 - Message class ignores $wgForceUIMsgAsContentMsg
Niklas Laxström [Mon, 6 Jun 2011 17:55:19 +0000 (17:55 +0000)]
Fix for bug 29274 - Message class ignores $wgForceUIMsgAsContentMsg
Also added tests, which pass

13 years ago* (bug 27716) Make a method to do checking of 0 or 1 of the parameters existence...
Sam Reed [Mon, 6 Jun 2011 16:45:40 +0000 (16:45 +0000)]
* (bug 27716) Make a method to do checking of 0 or 1 of the parameters existence (like requireOnlyOneParameter), but without needing one of the parameters

13 years agoFollowup r89542, validate hashes
Sam Reed [Mon, 6 Jun 2011 16:06:59 +0000 (16:06 +0000)]
Followup r89542, validate hashes

13 years agoFix fixme on r89549
Sam Reed [Mon, 6 Jun 2011 15:58:55 +0000 (15:58 +0000)]
Fix fixme on r89549

13 years agoFollowup r89564
Sam Reed [Mon, 6 Jun 2011 15:34:14 +0000 (15:34 +0000)]
Followup r89564

showsizediff is disabled in miser mode, make the api check and die as appropriate

13 years agoRefactoring to r89566
Sam Reed [Mon, 6 Jun 2011 15:07:23 +0000 (15:07 +0000)]
Refactoring to r89566

Refactor out duplicate code to SpecialPage

13 years agoMinor refactoring
Sam Reed [Mon, 6 Jun 2011 15:01:27 +0000 (15:01 +0000)]
Minor refactoring

Comment updates

13 years agoFollowup r89564
Sam Reed [Mon, 6 Jun 2011 14:56:47 +0000 (14:56 +0000)]
Followup r89564

Strip out the ?feed= functionality, update urls to point at the API!

13 years ago* (bug 26763) Make RSS/Atom of user contributions more visible
Sam Reed [Mon, 6 Jun 2011 14:50:34 +0000 (14:50 +0000)]
* (bug 26763) Make RSS/Atom of user contributions more visible

Add ApiFeedContributions module

Somewhat duplicated against Special:Contributions?feed=atom

Going to strip out that functionality

13 years agoMake ApiFeedWatchlist obey $wgFeed, and also die with an error if an invalid feed...
Sam Reed [Mon, 6 Jun 2011 14:06:37 +0000 (14:06 +0000)]
Make ApiFeedWatchlist obey $wgFeed, and also die with an error if an invalid feed formatter is given

13 years agoTest filename updates for r89558.
Tim Starling [Mon, 6 Jun 2011 12:00:57 +0000 (12:00 +0000)]
Test filename updates for r89558.

13 years ago* Added a REQUEST_URI check to the bug 28235 handling.
Tim Starling [Mon, 6 Jun 2011 11:59:20 +0000 (11:59 +0000)]
* Added a REQUEST_URI check to the bug 28235 handling.
* Moved most of the bug 28235 code out to a separate library class, since I was running out of distinct function names.
* Merged the QUERY_STRING and PATH_INFO security checks, since they are dealing with the exact same problem. Removed WebRequest::isQueryStringBad().
* Deal with img_auth.php by having it specify what extension it expects to be streaming out. This extension can then be compared with the extension that IE might detect.

13 years agoFix the non-PEAR alternative for Services_JSON_Error to be less useless. bug 29278...
Roan Kattouw [Mon, 6 Jun 2011 09:41:33 +0000 (09:41 +0000)]
Fix the non-PEAR alternative for Services_JSON_Error to be less useless. bug 29278 shows an error related to this class not being stringifiable

13 years agoFollowup r89550, add new error message to getPossibleErrors
Sam Reed [Mon, 6 Jun 2011 09:40:45 +0000 (09:40 +0000)]
Followup r89550, add new error message to getPossibleErrors

13 years agoFollowup r89515, swapped messages around so css => css and js => javascript
Sam Reed [Mon, 6 Jun 2011 09:39:00 +0000 (09:39 +0000)]
Followup r89515, swapped messages around so css => css and js => javascript

13 years agoApiComparePages: Throw an error if getDiffBody returns false, instead of blank output
Matthew Britton [Mon, 6 Jun 2011 09:22:52 +0000 (09:22 +0000)]
ApiComparePages: Throw an error if getDiffBody returns false, instead of blank output

This lets the client distinguish a legitimately blank diff (identical revisions) from one that does not exist or which they do not have permission to view.

getDiffBody doesn't tell the caller why it failed, so there may be a better way to do this.

13 years agofollow up r89513: avoid internal error when only invalid revids/pageids are passed
Matthew Britton [Mon, 6 Jun 2011 08:45:54 +0000 (08:45 +0000)]
follow up r89513: avoid internal error when only invalid revids/pageids are passed

13 years agoFix syntax error (Follow-up r89545)
Krinkle [Mon, 6 Jun 2011 00:12:45 +0000 (00:12 +0000)]
Fix syntax error (Follow-up r89545)

13 years agoWatchAction requires token (BREAKING CHANGE)
Krinkle [Mon, 6 Jun 2011 00:09:03 +0000 (00:09 +0000)]
WatchAction requires token (BREAKING CHANGE)
* (bug 27655) Require token for watching/unwatching pages
* Previously done for API (bug 29070) in r88522
* As with markpatrolled, the tokens are not compatible and made that way on purpose. The API requires the POST method and uses a universal token per-session. Since the front-end is all GET based (also per convention like in markpatrolled and rollback) they are stronger salted (title / action specific)
* ajax.watch used the API already and was switched in r88554.
* The actual watching/unwatching code was moved from WatchAction->onView to WatchAction::doWatch. This was done to allow the API to do the action without needing to generate a token like the front-end needs (or having to duplicate code). It is now similar to RecentChange::markPatrolled (in that it  also a "central" function that does not care about tokens, it's called after the token-handling)
* JavaScript / Gadgets that utilize action=watch in their scripts:
** Effects should be minimal as they should be using the API (see r88522 and wikitech-l)
** If they use index.php and scrap the link from the page, they can continue to do so.

* There are links to the watch action all over the place. I've tried to catch most of them, but there may be some I miss. Migration in most cases is just a matter of adding an array item to the $query for:
 'token' => WatchAction::getWatchToken( $title, $user [, $action] )
or changing:
 Action::factory( 'watch', $article )->execute();
to:
 WatchAction::doWatch( $title, $user );

While replacing the usages in some cases an instance of Article() no longer had to be created, in others $wgUser had to be retrieved from global (which was implied before but needs to be given directly now)

Other notes:
* Article->unwatch() and Article->watch(), which were deprecated as of 1.18 and are no longer used in core, may be broken in scenarios where the Request does not have a 'token' but is making a call to $article->watch()
* Some extensions need to be fixed, I'm currently running a grep search and will fix them a.s.a.p

[1] http://www.mediawiki.org/wiki/ResourceLoader/Default_modules?mw.user#tokens

13 years ago* (bug 27595) sha1 search of list=filearchive does not work
Sam Reed [Sun, 5 Jun 2011 23:48:39 +0000 (23:48 +0000)]
* (bug 27595) sha1 search of list=filearchive does not work

Still disabled in misermode, but switched for LIKE rather than =

13 years agoFixup error message
Sam Reed [Sun, 5 Jun 2011 23:44:37 +0000 (23:44 +0000)]
Fixup error message

Remove {} (documentation tweaks)

Remove whitespace

13 years ago* (bug 21346) Make deleted images searchable by hash (disabled in Miser Mode)
Sam Reed [Sun, 5 Jun 2011 23:40:57 +0000 (23:40 +0000)]
* (bug 21346) Make deleted images searchable by hash (disabled in Miser Mode)

Effectively reverts r83411, but with the addition of it only works in !$wgMiserMode

13 years agoFix typo from r89539
Sam Reed [Sun, 5 Jun 2011 23:28:59 +0000 (23:28 +0000)]
Fix typo from r89539

13 years ago* (bug 28392) mark action=undelete&timestamps as type "timestamp"
Sam Reed [Sun, 5 Jun 2011 23:18:22 +0000 (23:18 +0000)]
* (bug 28392) mark action=undelete&timestamps as type "timestamp"

Allow multiple timestamps

13 years ago* (bug 29237) add interwiki target url attribute to api/query/interwiki
Sam Reed [Sun, 5 Jun 2011 22:51:58 +0000 (22:51 +0000)]
* (bug 29237) add interwiki target url attribute to api/query/interwiki

13 years agoFix 2 usages of 'bool' when 'boolean' is used elsewhere
Sam Reed [Sun, 5 Jun 2011 21:56:27 +0000 (21:56 +0000)]
Fix 2 usages of 'bool' when 'boolean' is used elsewhere

13 years ago* (bug 26597) Allow toggling of persistent cookies ("remember me") in API
Sam Reed [Sun, 5 Jun 2011 21:50:49 +0000 (21:50 +0000)]
* (bug 26597) Allow toggling of persistent cookies ("remember me") in API
  action=login

13 years agoFix copypaste error (Not a special page), follow-up (ancient) r10453
Krinkle [Sun, 5 Jun 2011 21:09:24 +0000 (21:09 +0000)]
Fix copypaste error (Not a special page), follow-up (ancient) r10453

13 years agoDocumentation updates and additions
Sam Reed [Sun, 5 Jun 2011 21:04:48 +0000 (21:04 +0000)]
Documentation updates and additions

13 years agoFollowup r89529
Sam Reed [Sun, 5 Jun 2011 21:03:39 +0000 (21:03 +0000)]
Followup r89529

Fix non static caller of getExistingLocalSettings

13 years agoFollowup r89528, don't use $wgRequest use $this->getMain()->getRequest()->response...
Sam Reed [Sun, 5 Jun 2011 20:29:47 +0000 (20:29 +0000)]
Followup r89528, don't use $wgRequest use $this->getMain()->getRequest()->response()/$this->getRequest()->response() (the latter when we're already in main!)

Also fix up a couple of calls to getMain() when we're already in a main class!?

13 years agoFollow-up r89254 and r89481: re-did loading extension updates properly, now upgrading...
Max Semenik [Sun, 5 Jun 2011 19:52:03 +0000 (19:52 +0000)]
Follow-up r89254 and r89481: re-did loading extension updates properly, now upgrading extension tables from web interface really works, and without notices

13 years ago* (bug 22179) Internal use of API (FauxRequest) results in HTTP headers being set
Sam Reed [Sun, 5 Jun 2011 19:51:31 +0000 (19:51 +0000)]
* (bug 22179) Internal use of API (FauxRequest) results in HTTP headers being set

Per Chad, switch API to use WebResponse::header() wrapper

Add $http_response_code to WebResponse::header()

Fix some code spacing/whitespace issues

13 years agoFolow-up r89526: tabs and eol-style :(
Max Semenik [Sun, 5 Jun 2011 19:46:08 +0000 (19:46 +0000)]
Folow-up r89526: tabs and eol-style :(

13 years agoSQLite: sync a couple of indexes with MySQL
Max Semenik [Sun, 5 Jun 2011 19:39:28 +0000 (19:39 +0000)]
SQLite: sync a couple of indexes with MySQL

13 years agoReplace the text directly instead of using the StripState object since it will be...
Alexandre Emsenhuber [Sun, 5 Jun 2011 19:37:08 +0000 (19:37 +0000)]
Replace the text directly instead of using the StripState object since it will be unstripped just after the call replaceTransparentTags(), but left the call unstripGeneral() for the benefit of Poem extension that use it to escape the <br /> tag

13 years ago* (bug 28002) Internal error in ApiFormatRaw::getMimeType
Sam Reed [Sun, 5 Jun 2011 19:22:49 +0000 (19:22 +0000)]
* (bug 28002) Internal error in ApiFormatRaw::getMimeType

If we just return when no titles, we don't format anything, and everything breaks

Might aswell just unconditionally export, as even with no titles, we still get all the siteinfo and such

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sun, 5 Jun 2011 19:21:51 +0000 (19:21 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-05 19:19:00 UTC)

13 years agoFix unit tests for r89515
Sam Reed [Sun, 5 Jun 2011 18:42:50 +0000 (18:42 +0000)]
Fix unit tests for r89515

13 years agoFollowup r89515, fix double spacing in API Error message
Sam Reed [Sun, 5 Jun 2011 18:34:26 +0000 (18:34 +0000)]
Followup r89515, fix double spacing in API Error message

Add both customcssprotected and customjsprotected to the possible errors output for editpage

13 years ago* (bug 21107) Split error "customcssjsprotected" into separate messages for JS and CSS
Sam Reed [Sun, 5 Jun 2011 18:29:43 +0000 (18:29 +0000)]
* (bug 21107) Split error "customcssjsprotected" into separate messages for JS and CSS

13 years agoFollowup r89512
Sam Reed [Sun, 5 Jun 2011 18:01:30 +0000 (18:01 +0000)]
Followup r89512

Apply the same positive integer validation to pageids (as the same behaviour can occur)

Refactor out common code, and reorganise initFromPageIds code to be similar to that of initFromRevIDs

13 years ago* (bug 25734) API: possible issue with revids validation
Sam Reed [Sun, 5 Jun 2011 17:49:00 +0000 (17:49 +0000)]
* (bug 25734) API: possible issue with revids validation

It seems, on databases with loads of revision rows (ie enwiki, not testwiki), although the EXPLAIN is sane, it's doing something stupid (table scan? I've nfi). So, as any revision id's less than 0 aren't valid, just prefilter them from the database SQL query

mysql> DESCRIBE SELECT /* ApiPageSet::initFromRevIDs  */  rev_id,rev_page  FROM `revision`,`page`  WHERE rev_id IN ('10','20','30','40','-50','60') AND (rev_page = page_id);
+----+-------------+----------+-------+-------------------------------+---------+---------+-----------------------+-------+--------------------------+
| id | select_type | table    | type  | possible_keys                 | key     | key_len | ref                   | rows  | Extra                    |
+----+-------------+----------+-------+-------------------------------+---------+---------+-----------------------+-------+--------------------------+
|  1 | SIMPLE      | page     | index | PRIMARY                       | PRIMARY | 4       | NULL                  | 22982 | Using index              |
|  1 | SIMPLE      | revision | ref   | PRIMARY,rev_id,page_timestamp | PRIMARY | 4       | testwiki.page.page_id |     1 | Using where; Using index |
+----+-------------+----------+-------+-------------------------------+---------+---------+-----------------------+-------+--------------------------+

13 years ago* (bug 28897) rvparse doesn’t seem to work with rvsection
Sam Reed [Sun, 5 Jun 2011 16:34:09 +0000 (16:34 +0000)]
* (bug 28897) rvparse doesn’t seem to work with rvsection

13 years agoAdd missing word to r89505
Sam Reed [Sun, 5 Jun 2011 15:12:38 +0000 (15:12 +0000)]
Add missing word to r89505

13 years ago* (bug 29265) Mediawiki API documentation incomplete
Sam Reed [Sun, 5 Jun 2011 15:10:11 +0000 (15:10 +0000)]
* (bug 29265) Mediawiki API documentation incomplete

Add text about erroneous requests when sent to the api

Remove extra //, and add some documentation

13 years agoAdding method documentation
Sam Reed [Sun, 5 Jun 2011 14:46:55 +0000 (14:46 +0000)]
Adding method documentation

Add a couple of explicit variable definitions

Add some braces

Add one false; to return under case self::AS_NO_CREATE_PERMISSION:

13 years agocode documentation for $wgPreprocessorCacheThreshold
Antoine Musso [Sun, 5 Jun 2011 09:25:42 +0000 (09:25 +0000)]
code documentation for $wgPreprocessorCacheThreshold

follow up r80180

13 years agoSQLite-specific dropTable(): works a bit faster because it doesn't need a separate...
Max Semenik [Sat, 4 Jun 2011 22:07:57 +0000 (22:07 +0000)]
SQLite-specific dropTable(): works a bit faster because it doesn't need a separate table existence check and does not rely on subtly broken tableExists() which I will fix a bit later

13 years agoRevert r89254:
Max Semenik [Sat, 4 Jun 2011 21:56:44 +0000 (21:56 +0000)]
Revert r89254:
* It breaks if any extension uses any global except $IP, $wgHooks or $wgAutoloadClasses. Some unit tests that try updating a virtual database are already affected.
* If we have LocalSettings.php, we already have it loaded - are there code paths that don't have it?
* Parsing PHP with regexes is fragile and scary

13 years agopear -> port
Chad Horohoe [Sat, 4 Jun 2011 21:34:07 +0000 (21:34 +0000)]
pear -> port

13 years agoAlso support macports
Chad Horohoe [Sat, 4 Jun 2011 21:32:51 +0000 (21:32 +0000)]
Also support macports

13 years agoFollow up r60599. Make normalizeUnicode() work even if $wgContLang is still not set,
Platonides [Sat, 4 Jun 2011 21:19:07 +0000 (21:19 +0000)]
Follow up r60599. Make normalizeUnicode() work even if $wgContLang is still not set,
just as it did before (eg. getGPCVal() check). This allows for early calls before
MediaWiki is completely initialised.