lhc/web/wiklou.git
12 years agoMove the image files used in the media tests from includes/media to data/media as...
Brian Wolff [Wed, 17 Aug 2011 23:28:31 +0000 (23:28 +0000)]
Move the image files used in the media tests from includes/media to data/media as the includes/media
was starting to get crowded with supporting image files.

This changes the following things
*Moves the media files to a different directory
*Changes the references to the files to reference there new locations

2 semi-unrelated changes
*Modify the README file that was basically giving credit for the images where due to explain what the images are for.
*set svn:mime-type to image/svg+xml for the svg files.

12 years agoRe-add release note accidentally removed in r94691.
Robin Pepermans [Wed, 17 Aug 2011 23:21:33 +0000 (23:21 +0000)]
Re-add release note accidentally removed in r94691.

12 years agoFollow-up r94836: move RELEASE-NOTES from 1.19 to 1.18.
Siebrand Mazeland [Wed, 17 Aug 2011 22:45:28 +0000 (22:45 +0000)]
Follow-up r94836: move RELEASE-NOTES from 1.19 to 1.18.

12 years agoMore wikia upstreaming
Sam Reed [Wed, 17 Aug 2011 22:42:49 +0000 (22:42 +0000)]
More wikia upstreaming

12 years agoStylize
Sam Reed [Wed, 17 Aug 2011 22:38:36 +0000 (22:38 +0000)]
Stylize

+upstream Wikia changes

12 years agoFollow-up r94690: correct language name for 'qug' to Kichwa. Kichwa or Northern Quech...
Robin Pepermans [Wed, 17 Aug 2011 22:35:52 +0000 (22:35 +0000)]
Follow-up r94690: correct language name for 'qug' to Kichwa. Kichwa or Northern Quechua covers several language codes including "qug", which is used as a temporary code until they got an official ISO 639 code or IETF tag.

12 years agoFollow-up r94690: set fallback to 'qu'.
Siebrand Mazeland [Wed, 17 Aug 2011 22:33:01 +0000 (22:33 +0000)]
Follow-up r94690: set fallback to 'qu'.

12 years agoUpstream another minor Wikia change
Sam Reed [Wed, 17 Aug 2011 22:28:08 +0000 (22:28 +0000)]
Upstream another minor Wikia change

12 years agoBased on diff to wikia, set more functions consistently public rather than protected
Sam Reed [Wed, 17 Aug 2011 22:24:21 +0000 (22:24 +0000)]
Based on diff to wikia, set more functions consistently public rather than protected

12 years agoMake the testCleanSig work no matter what $wgCleanSignatures; is in LocalSettings...
Brian Wolff [Wed, 17 Aug 2011 22:09:57 +0000 (22:09 +0000)]
Make the testCleanSig work no matter what $wgCleanSignatures; is in LocalSettings.php . Also have a test for when sig cleaning is disabled.

12 years agofollow-up r91885 - address CR comments
Brian Wolff [Wed, 17 Aug 2011 21:53:45 +0000 (21:53 +0000)]
follow-up r91885 - address CR comments

* rename testTiffFile to something more descriptive
* unserialize the serialized results before comparing
Also follow-up r92635 - rm an extra wfDl that was outside any functions, and I'm assuming accidentally there (?)

12 years agolistFiles() returns false when empty. Special:UplaodStash now deals with that correctly
Ian Baker [Wed, 17 Aug 2011 21:38:18 +0000 (21:38 +0000)]
listFiles() returns false when empty.  Special:UplaodStash now deals with that correctly
fixes bug 30429

12 years agoLocalisation updates for core and extension messages from translatewiki.net
Raimond Spekking [Wed, 17 Aug 2011 20:43:00 +0000 (20:43 +0000)]
Localisation updates for core and extension messages from translatewiki.net

12 years agomore test cases for highlighter; all pass the test of course
Thomas Gries [Wed, 17 Aug 2011 20:00:44 +0000 (20:00 +0000)]
more test cases for highlighter; all pass the test of course

12 years agoDocumentation
Sam Reed [Wed, 17 Aug 2011 17:11:49 +0000 (17:11 +0000)]
Documentation

Trim trailing whitespace

12 years agoFollowup r94421 which, per CR, broke in non-English content languages because of...
Roan Kattouw [Wed, 17 Aug 2011 14:55:06 +0000 (14:55 +0000)]
Followup r94421 which, per CR, broke in non-English content languages because of key mismatches due to localized namespace names. Now ensuring all titles go through getPrefixedDBkey() before we compare them, so they're always normalized. This also ensures we don't get underscore vs. space confusion, which is something that the previous code did right by accident.

12 years agoFollowup r80248; Fix inverted message exists tests in ProtectionForm.
Daniel Friesen [Wed, 17 Aug 2011 14:10:41 +0000 (14:10 +0000)]
Followup r80248; Fix inverted message exists tests in ProtectionForm.

12 years ago(bug 30398) Expand any protocol-relative URLs to HTTP in RecentChange::getIRCLine...
Roan Kattouw [Wed, 17 Aug 2011 13:32:45 +0000 (13:32 +0000)]
(bug 30398) Expand any protocol-relative URLs to HTTP in RecentChange::getIRCLine(). This will prevent sending protocol-relative URLs to the IRC feed

12 years agoSelf-revert r79892: only got one opposition and apparently too hairy for anyone else...
Niklas Laxström [Wed, 17 Aug 2011 09:55:09 +0000 (09:55 +0000)]
Self-revert r79892: only got one opposition and apparently too hairy for anyone else to comment :)

12 years agoAmend the documention of search profile, fu r86714
Niklas Laxström [Wed, 17 Aug 2011 09:50:54 +0000 (09:50 +0000)]
Amend the documention of search profile, fu r86714

12 years agofollow-up r94601 - add unit tests for stripping the File: prefix from upload, and...
Brian Wolff [Wed, 17 Aug 2011 04:05:11 +0000 (04:05 +0000)]
follow-up r94601 - add unit tests for stripping the File: prefix from upload, and test handling illegal characters in upload title (thing that caused the issue in r94601)

(I have no idea if things like this (unit-tests) should be tagged 1.18, I assume no but am unsure)

12 years agoFollow-up r94680 - fix unit tests.
Brian Wolff [Wed, 17 Aug 2011 00:46:58 +0000 (00:46 +0000)]
Follow-up r94680 - fix unit tests.

The way the magic variable unit tests are run looks a little sketchy to me...

12 years agoFix some bad "Implements Special:*" comments in includes/specials/ files.
Daniel Friesen [Wed, 17 Aug 2011 00:41:17 +0000 (00:41 +0000)]
Fix some bad "Implements Special:*" comments in includes/specials/ files.

12 years agoLocalisation updates from http://translatewiki.net.
Siebrand Mazeland [Wed, 17 Aug 2011 00:08:51 +0000 (00:08 +0000)]
Localisation updates from translatewiki.net.

Full rebuild of file.

12 years agoFix a regression in search highlighting from r90092
Brion Vibber [Tue, 16 Aug 2011 22:42:57 +0000 (22:42 +0000)]
Fix a regression in search highlighting from r90092

Followup on r94609, r94681 test cases.
This fixes the test case with a period that was failing; problem was not the period, but the space before.
The changed regex in r90092 ended up including the preceding whitespace in the match, so the position of the match was coming up one character before the actual word -- thus offsetting the highlight by one char.

Changed from search to match, using the regex's index property (same as search returns) and adding in the length of the first match component which covers the space/whatever

12 years agoBreak lines at or before 80 and update punctuation.
Siebrand Mazeland [Tue, 16 Aug 2011 21:30:23 +0000 (21:30 +0000)]
Break lines at or before 80 and update punctuation.

12 years agoAdd new language Chimborazo Highland Quichua (qug).
Siebrand Mazeland [Tue, 16 Aug 2011 21:29:39 +0000 (21:29 +0000)]
Add new language Chimborazo Highland Quichua (qug).

12 years agoLocalisation updates from http://translatewiki.net.
Siebrand Mazeland [Tue, 16 Aug 2011 20:54:19 +0000 (20:54 +0000)]
Localisation updates from translatewiki.net.

12 years agoFollowup r94609: fix jquery.highlightText test cases on IE, simplify test case setup...
Brion Vibber [Tue, 16 Aug 2011 19:34:47 +0000 (19:34 +0000)]
Followup r94609: fix jquery.highlightText test cases on IE, simplify test case setup so new ones can be added more trivially, uncommented the failing test case.

These tests were failing on IE 6, 7, and 8 because the innerHTML rendering of the highlighted text came out in caps and without quotes, such that the string didn't match the provided one. By re-normalizing the expected HTML form this check now works on those browsers. Switching common code to a loop and an array makes it easier to add new test cases: less duplication of code, and no need to manually update the number of test cases.

Note that the third test case was previously commented out, but looks like a serious regression. No longer commented out, so this will fail!

12 years agoMagic words (time and number-formatting ones, plus DIRECTIONMARK, but not NAMESPACE...
Robin Pepermans [Tue, 16 Aug 2011 19:29:52 +0000 (19:29 +0000)]
Magic words (time and number-formatting ones, plus DIRECTIONMARK, but not NAMESPACE) now depend on the page content language instead of the site language. In theory this sets the right magic words in system messages, although they are not used there.
Useful for multilingual wikis like Incubator, and probably for extensions like Translate.

12 years agoFollowup r94678: remove some include and autoload entries. tests still passing
Chad Horohoe [Tue, 16 Aug 2011 19:25:26 +0000 (19:25 +0000)]
Followup r94678: remove some include and autoload entries. tests still passing

12 years agoRemove ParserHelpers. NewParserTest still needs some cleanup, but it doesn't rely...
Chad Horohoe [Tue, 16 Aug 2011 19:18:07 +0000 (19:18 +0000)]
Remove ParserHelpers. NewParserTest still needs some cleanup, but it doesn't rely on this. All tests still pass.

12 years agodifferent wording from r83554.
Antoine Musso [Tue, 16 Aug 2011 19:07:10 +0000 (19:07 +0000)]
different wording from r83554.

12 years agoenable colors in PHPUnit (redoing r89179).
Antoine Musso [Tue, 16 Aug 2011 18:23:13 +0000 (18:23 +0000)]
enable colors in PHPUnit (redoing r89179).

suite.xml now comes with colors=true. Under Windows, we override the
setting by forging a --no-colors. One can still force color usage
under windows by using --colors.

12 years agoCleaning up little things, updates to code clarity, documentation fixes per Catrope...
Ian Baker [Tue, 16 Aug 2011 17:57:32 +0000 (17:57 +0000)]
Cleaning up little things, updates to code clarity, documentation fixes per Catrope's suggestions.
followup to r94536, r94592, r94594

12 years agow/s changes
Mark A. Hershberger [Tue, 16 Aug 2011 16:03:29 +0000 (16:03 +0000)]
w/s changes

12 years agoFix some indentation and comments in mediawiki.Title, and make it depend on mediawiki...
Roan Kattouw [Tue, 16 Aug 2011 15:32:08 +0000 (15:32 +0000)]
Fix some indentation and comments in mediawiki.Title, and make it depend on mediawiki.util

12 years agoSome misc fixes to tests:
Alexandre Emsenhuber [Tue, 16 Aug 2011 15:17:35 +0000 (15:17 +0000)]
Some misc fixes to tests:
* Don't create a WebRequest instance to put in $wgRequest in test since it is meant for HTTP requests, not command line ones
* Force $wgAlwaysUseTidy to false in ExtraParserTest, having it to true breaks testBug8689() and testParse()

12 years agoTests for wfGetIP() follow up r89407
Antoine Musso [Tue, 16 Aug 2011 14:15:07 +0000 (14:15 +0000)]
Tests for wfGetIP() follow up r89407

* wfGetIP() now support resetting its internal static variable. Thanks to
Platonides which introduced this trick with r92960.
* Various tests for $_SERVER['REMOTE_ADDR'] and $wgCommandLineMode.

revert r94575:
 - reenable testGetFromServerRemoteAddr() which was not an issue

reintroduce r94558:
 - per CR on r94558 by Aaron use meaningful parameter to wfGetIP() when
   resetting the static variable ( 'reset' instead of true).
 - keep testLackOfRemoteAddrThrowAnException() test in the broken group
   with a comment for later fixing.

TODO:

- implements tests for XFF headers.

TEST PLAN:

$ ./phpunit.php --filter wfGetIP --testdox
PHPUnit 3.5.14 by Sebastian Bergmann.

wfGetIP
[x] Get loopback address when in command line
[x] Get from server remote addr
[x] Lack of remote addr throw an exception
$

12 years agoFollowup r89853, tweaks for jquery.qunit.completenessTest:
Roan Kattouw [Tue, 16 Aug 2011 13:33:22 +0000 (13:33 +0000)]
Followup r89853, tweaks for jquery.qunit.completenessTest:
* Don't assume $ as a global, but alias it to jQuery instead. The code is already wrapped in a closure so this is easy
* Remove unused constants TYPE_SIMPLEFUNC and TYPE_OBJCONSTRFUNC
* Fix spelling in comments, mostly brake->break
* Fix whitespace
* Kill useless return at the end of a void function
* Correct comment in hasTests() which claims the function does the opposite of what it really does

12 years agoFollowup r89545: add ,0 to Article constructor call
Roan Kattouw [Tue, 16 Aug 2011 12:48:05 +0000 (12:48 +0000)]
Followup r89545: add ,0 to Article constructor call

12 years agoFollowup r90041: keep naming of watch and unwatch calls consistent
Roan Kattouw [Tue, 16 Aug 2011 12:46:15 +0000 (12:46 +0000)]
Followup r90041: keep naming of watch and unwatch calls consistent

12 years agoPer Reedy, follow-up r93758: SpecialPage::capturePath() now has incorrect signature...
Alexandre Emsenhuber [Tue, 16 Aug 2011 11:05:19 +0000 (11:05 +0000)]
Per Reedy, follow-up r93758: SpecialPage::capturePath() now has incorrect signature. Removed the function rather than updating it, since it's not called at all and current behavior is incompatible with the old one.

12 years agocorrect number of tests fu r94609
Antoine Musso [Tue, 16 Aug 2011 10:29:29 +0000 (10:29 +0000)]
correct number of tests fu r94609

12 years agoforce QUnit charset to UTF-8
Antoine Musso [Tue, 16 Aug 2011 10:28:05 +0000 (10:28 +0000)]
force QUnit charset to UTF-8

12 years agotests for jquery.highlightText
Antoine Musso [Tue, 16 Aug 2011 08:04:34 +0000 (08:04 +0000)]
tests for jquery.highlightText

In r90092, wikinaut requested tests for our highlightText jQuery plugin.
Here is a basic framework than almost anyone can enhance :-)

12 years agofollow-up r88171 - fix fatal if suggested filename has illegal character in it.
Brian Wolff [Tue, 16 Aug 2011 05:37:18 +0000 (05:37 +0000)]
follow-up r88171 - fix fatal if suggested filename has illegal character in it.

Check to make sure the title object actual exists, before checking its namespace,
since alll the does this have illegal chars check is done after the does it
start with file: check.

For future note though, when using upload by url feature, the suggested
destination name when you put http://upload.wikimedia.org/wikipedia/commons/e/e0/Petrorhagia_prolifera_%281%29.JPG is illegal, which is probably not very user-friendly (filed as bug 30390)

12 years agoExplicitally define some member variables
Sam Reed [Tue, 16 Aug 2011 00:41:50 +0000 (00:41 +0000)]
Explicitally define some member variables

Fix/update/add to comments

Add some braces

12 years agoRemoved the ability to pass a key into stashFile(), which simplifies the stash row...
Ian Baker [Mon, 15 Aug 2011 23:58:40 +0000 (23:58 +0000)]
Removed the ability to pass a key into stashFile(), which simplifies the stash row creation a great deal.
Updated UploadFromUrlJob to properly use the database stash
followup to r92200

12 years agoRemoved complex replag handling, now just query master when record isn't present...
Ian Baker [Mon, 15 Aug 2011 23:40:57 +0000 (23:40 +0000)]
Removed complex replag handling, now just query master when record isn't present on slave.
followup to r92009

12 years agoback off r94558:
Antoine Musso [Mon, 15 Aug 2011 21:45:18 +0000 (21:45 +0000)]
back off r94558:
 - reverts ./includes/ProxyTools.php
 - marks tests broken

In our test suite, the first call to wfGetIP() set the static variable.
Hence the remaining of the code is only tested on the first call to it.
Resetting the static variable enlight a bug somewhere in our code where
we are calling wfGetIP() but can not reliably get an IP, somehow REMOTE_ADDR
does not exist and $wgCommandLineMode is disabled.
Will have to track this bug further when I got time.

12 years agoavoid playing with $_SERVER in test for now
Antoine Musso [Mon, 15 Aug 2011 21:18:23 +0000 (21:18 +0000)]
avoid playing with $_SERVER in test for now

fu r94558

12 years agoRevert r94041: PHP Notice: Undefined index: SERVER_PROTOCOL in /home/ci/cruisecontrol...
Brion Vibber [Mon, 15 Aug 2011 21:04:11 +0000 (21:04 +0000)]
Revert r94041: PHP Notice: Undefined index: SERVER_PROTOCOL in /home/ci/cruisecontrol-bin-2.8.3/projects/mw/source/includes/Exception.php on line 185

This code appears to be trying to output something like 'HTTP/1.1 500 MediaWiki Error', but using $_SERVER['SERVER_PROTOCOL']. And it seems to output it on things that run in phpunit tests.
Seems pretty broken?

12 years agoTests for wfGetIP() follow up r89407
Antoine Musso [Mon, 15 Aug 2011 20:16:15 +0000 (20:16 +0000)]
Tests for wfGetIP() follow up r89407

* wfGetIP() now support resetting its internal static variable. Thanks to
 Platonides which introduced this trick with r92960.
* Various tests for $_SERVER['REMOTE_ADDR'] and $wgCommandLineMode.

TODO:

- implements tests for XFF headers.

TEST PLAN:

$ ./phpunit.php --filter wfGetIP --testdox
PHPUnit 3.5.14 by Sebastian Bergmann.

wfGetIP
 [x] Get loopback address when in command line
 [x] Get from server remote addr
 [x] Lack of remote addr throw an exception
$

12 years agoPHPUnit test file must end with 'Test.php'
Antoine Musso [Mon, 15 Aug 2011 19:39:55 +0000 (19:39 +0000)]
PHPUnit test file must end with 'Test.php'

follow up r92045

12 years agoFollowup r92430 per CR, like r94448
Sam Reed [Mon, 15 Aug 2011 18:56:37 +0000 (18:56 +0000)]
Followup r92430 per CR, like r94448

12 years agoFollowup r94541 (reverts of r94289 undiscussed core schema change and followups)...
Brion Vibber [Mon, 15 Aug 2011 18:52:33 +0000 (18:52 +0000)]
Followup r94541 (reverts of r94289 undiscussed core schema change and followups), two more that got missed: reverts of r94290, r94364

12 years agoRestored r94370 changes PopulateRevisionLen, moving it to $postDatabaseUpdateMaintenance
Aaron Schulz [Mon, 15 Aug 2011 18:52:25 +0000 (18:52 +0000)]
Restored r94370 changes PopulateRevisionLen, moving it to $postDatabaseUpdateMaintenance

12 years agoPartial revert to r87584
Sam Reed [Mon, 15 Aug 2011 18:35:19 +0000 (18:35 +0000)]
Partial revert to r87584

To fix bug bug 30355 importImages.php Internal Error

12 years agoRevert r94289, r94290, r94294, r94333, r94345, r94362, r94370 -- core schema change...
Brion Vibber [Mon, 15 Aug 2011 18:24:38 +0000 (18:24 +0000)]
Revert r94289, r94290, r94294, r94333, r94345, r94362, r94370 -- core schema change with no discussion

12 years agochecking for existence of mLocalFile in stashFile() was inverted
Ian Baker [Mon, 15 Aug 2011 18:19:54 +0000 (18:19 +0000)]
checking for existence of mLocalFile in stashFile() was inverted
followup to r94536

12 years agocleaned up database query, doesn't have to be aware of column names anymore (thanks...
Ian Baker [Mon, 15 Aug 2011 18:17:51 +0000 (18:17 +0000)]
cleaned up database query, doesn't have to be aware of column names anymore (thanks Catrope!)
followup to r92009

12 years agoFixed incorrect usage of || operator, added test
Ian Baker [Mon, 15 Aug 2011 18:10:10 +0000 (18:10 +0000)]
Fixed incorrect usage of || operator, added test
removed spurious use of empty()
listFiles() was broken, now works
followup to r92009

12 years agoFix up NS_MAIN subpage tests
Antoine Musso [Mon, 15 Aug 2011 14:17:45 +0000 (14:17 +0000)]
Fix up NS_MAIN subpage tests

Per CR on r92234, this correctly test hasSubpages independently from your
local configuration.  Also test altering the global and having static
methods reacting accordingly.

12 years agoFollowup r94502: per CR, use two caching variables instead of an array indexed with...
Roan Kattouw [Mon, 15 Aug 2011 13:16:10 +0000 (13:16 +0000)]
Followup r94502: per CR, use two caching variables instead of an array indexed with true or false

12 years agoAdd parser test for r94502
Roan Kattouw [Mon, 15 Aug 2011 12:25:01 +0000 (12:25 +0000)]
Add parser test for r94502

12 years ago(bug 30269) Strings like foobar//barfoo are linked to become foobar[//barfoo]
Roan Kattouw [Mon, 15 Aug 2011 12:20:00 +0000 (12:20 +0000)]
(bug 30269) Strings like foobar//barfoo are linked to become foobar[//barfoo]

* Introduce a boolean parameter to wfUrlProtocols() which, if set to false, will cause '//' to be dropped from the returned regex so it doesn't match protocol-relative URLs
* Introduce wfUrlProtocolsWithoutProtRel() as a wrapper for wfUrlProtocols( false ). The latter should not be used directly because the former is much clearer
* Use this new function in Parser::doMagicLinks() to fix the original bug. Also use it in ApiFormatBase::formatHTML() and CodeCommentLinker::link(), which probably had similar bugs

12 years agoLocalization update for he.
Rotem Liss [Mon, 15 Aug 2011 10:31:23 +0000 (10:31 +0000)]
Localization update for he.

12 years agoFix space/tab indentation FU r94444
Antoine Musso [Mon, 15 Aug 2011 10:23:48 +0000 (10:23 +0000)]
Fix space/tab indentation FU r94444

12 years ago* Revert r94487 and r19889 to an extent -- ONLY check for the X-Forwarded-For header...
Ryan Schmidt [Mon, 15 Aug 2011 05:25:56 +0000 (05:25 +0000)]
* Revert r94487 and r19889 to an extent -- ONLY check for the X-Forwarded-For header when we are behind a proxy, as mostly every properly configured proxy software sets it, and attempting to support those that do not opens up the ability to spoof IP addresses by setting arbitrary headers.

12 years ago* Follow-up r92673: add documentation on how to use $wgDnsBlacklistUrls to DefaultSet...
Ryan Schmidt [Mon, 15 Aug 2011 05:12:56 +0000 (05:12 +0000)]
* Follow-up r92673: add documentation on how to use $wgDnsBlacklistUrls to DefaultSettings (lifted from the Manual page on mediawiki.org)

12 years agoWhen MediaWiki is being run behind a proxy, also check the X-Real-IP header to determ...
Ryan Schmidt [Mon, 15 Aug 2011 04:50:51 +0000 (04:50 +0000)]
When MediaWiki is being run behind a proxy, also check the X-Real-IP header to determine the client's actual IP address (some servers such as nginx might set this instead of X-Forwarded-For depending on configuration).

12 years ago* Follow-up to r91284: fix error in Action::exists by passing empty array as required...
Ryan Schmidt [Mon, 15 Aug 2011 04:02:08 +0000 (04:02 +0000)]
* Follow-up to r91284: fix error in Action::exists by passing empty array as required second parameter to Action::getClass

12 years agoAdded Parser::recursivePreprocess(); like preprocess() but doesn't call startParse...
Alexandre Emsenhuber [Sun, 14 Aug 2011 20:22:52 +0000 (20:22 +0000)]
Added Parser::recursivePreprocess(); like preprocess() but doesn't call startParse() so that it can be used inside a parse operation using the same context without having to mess with other functions

Simple use case (PHP 5.3+) that will work show the expand text passed to a <preprocess> tag:
$wgHooks['ParserFirstCallInit'][] = function( $parser ) {
$parser->setHook( 'preprocess', function( $text, $attr, $parser, $frame ) {
return $parser->recursivePreprocess( $text, $frame );
} );
return true;
};

12 years agoUse local context instead of global variables
Alexandre Emsenhuber [Sun, 14 Aug 2011 19:54:04 +0000 (19:54 +0000)]
Use local context instead of global variables

12 years agoFix fail from r94473
Sam Reed [Sun, 14 Aug 2011 19:50:08 +0000 (19:50 +0000)]
Fix fail from r94473

Append to the string, don't replace it

12 years agoAdd/update documentation
Sam Reed [Sun, 14 Aug 2011 19:49:07 +0000 (19:49 +0000)]
Add/update documentation

12 years agoMade Xml::buildTable() wrap header stuff in <thead></thead>
Sam Reed [Sun, 14 Aug 2011 19:47:44 +0000 (19:47 +0000)]
Made Xml::buildTable() wrap header stuff in <thead></thead>

12 years agoAdd code to the sanitizer to convert presontational attributes that were removed...
Daniel Friesen [Sun, 14 Aug 2011 16:41:53 +0000 (16:41 +0000)]
Add code to the sanitizer to convert presontational attributes that were removed in html5 into inline css. This allows wiki to keep using them in short loose WikiText but still output valid modern markup.
Note that there were some attributes excluded. Namely stuff on img and object, and the table cellspacing and cellpading which aren't easily converted into inline css.

12 years agoThis Sanitizer::EVIL_URI_PATTERN is completely inadequate for actual security as...
Daniel Friesen [Sun, 14 Aug 2011 14:59:26 +0000 (14:59 +0000)]
This Sanitizer::EVIL_URI_PATTERN is completely inadequate for actual security as there are numerious ways to bypass blacklisting.
Since it's only used right now for paranoia in cases you currently can't actually exploit a browser we let it slide.
However this thing needs a big fat warning message next to it to avoid someone thinking this is actually a good idea for security and ending up later on using it and opening up an XSS hole in core.

12 years agoFix r94429 : Left and right side are still nearly the same color for 7% of the popula...
Leo Koppelkamm [Sun, 14 Aug 2011 14:40:56 +0000 (14:40 +0000)]
Fix r94429 : Left and right side are still nearly the same color for 7% of the population. When I wrote to the list a while ago, no one argued for keeping the yellow scheme just because we're used to it. This makes it red/blue, also increases the highlight area ands adds a subtle border per Brandon Harris

12 years agoFollowup r94353; Use !== null since that's what we use in core.
Daniel Friesen [Sun, 14 Aug 2011 14:20:59 +0000 (14:20 +0000)]
Followup r94353; Use !== null since that's what we use in core.

12 years agoFollowup r94375; Use PROTO_RELATIVE so that when $wgServer is a protocol relative...
Daniel Friesen [Sun, 14 Aug 2011 14:07:12 +0000 (14:07 +0000)]
Followup r94375; Use PROTO_RELATIVE so that when $wgServer is a protocol relative url we don't potentially polute the cache if getFullURL is called by an extension that outputs to cache. getFullURL includes a #fragment so it's more likely that extensions outputting urls in situations that don't support protocol relative urls are using getLocalURL and expanding it.

12 years agoFollowup to r92580 and r93820: r92580 duplicated the call to wfExpandUrl(), and r9382...
Roan Kattouw [Sun, 14 Aug 2011 13:35:06 +0000 (13:35 +0000)]
Followup to r92580 and r93820: r92580 duplicated the call to wfExpandUrl(), and r93820 caused them to get out of sync.

12 years agoApiParamInfo: if no help URLs are available, return an empty array instead of array...
Max Semenik [Sun, 14 Aug 2011 09:37:23 +0000 (09:37 +0000)]
ApiParamInfo: if no help URLs are available, return an empty array instead of array with one empty element

12 years agoApiOpenSearch: make description a verb, just like the other modules
Max Semenik [Sun, 14 Aug 2011 09:19:54 +0000 (09:19 +0000)]
ApiOpenSearch: make description a verb, just like the other modules

12 years ago(bug 28273) Merge purgeList and purgeNamespace scripts
Antoine Musso [Sun, 14 Aug 2011 08:51:36 +0000 (08:51 +0000)]
(bug 28273) Merge purgeList and purgeNamespace scripts

Nothing fancy, just copy pasted from purgeNamespace into purgeList.
This need to be in 1.18 to avoid publishing purgeNamespace to everyone
and removing it in 1.19 =)

12 years agoAllow extensions to run their own backlink-based updates:
Victor Vasiliev [Sat, 13 Aug 2011 22:42:09 +0000 (22:42 +0000)]
Allow extensions to run their own backlink-based updates:
* Introduce new hooks which allow BacklinkCache to handle non-core tables
* Make table name a parameter to RefreshLinks2 job (instead of hardcoded templatelinks)

12 years ago(bug 26486) ResourceLoader modules with paths to nonexistent files cause PHP warnings...
Roan Kattouw [Sat, 13 Aug 2011 21:25:02 +0000 (21:25 +0000)]
(bug 26486) ResourceLoader modules with paths to nonexistent files cause PHP warnings/notices to be thrown. Worked around all of them using file_exists() checks, and introduced a safe wrapper around filemtime() that checks for file_exists(). The only warning I couldn't squash is "Warning: array_map(): An error occurred while invoking the map callback" but that's due to a bug in PHP, which I've reported at https://bugs.php.net/bug.php?id=55416

12 years agoBumped $wgCookieExpiration to 180 days, we were one of the sites with shortest cookie...
Max Semenik [Sat, 13 Aug 2011 21:13:14 +0000 (21:13 +0000)]
Bumped $wgCookieExpiration to 180 days, we were one of the sites with shortest cookie lifetime for too long. This was discussed at lengths about a year ago on wikitech-l, however nobody cared to implement the suggested alternative solutions. Probably because they were overcomplicated and solved only parts of the problem.

12 years ago(bug 11374) Red .diffchange text in the green 'added' area may be hard to read for...
Max Semenik [Sat, 13 Aug 2011 20:57:24 +0000 (20:57 +0000)]
(bug 11374) Red .diffchange text in the green 'added' area may be hard to read for colorblind users
This should REALLY REALLY be fixed with colors from French Wikipedia, but since some people think that we should preserve yellow/green colors, I've simply made change text black instead of red, and made its background different for better reading by people with other problems with vision.

12 years agoMove wfStreamFile() into a class, update all callers in core (only 3 extensions use...
Chad Horohoe [Sat, 13 Aug 2011 19:03:51 +0000 (19:03 +0000)]
Move wfStreamFile() into a class, update all callers in core (only 3 extensions use it afaict), leave wfStreamFile() as a b/c alias for now.
Yay less global functions, autoloading and less manual require()s.

12 years agoAdd RELEASE-NOTES for r93744
Roan Kattouw [Sat, 13 Aug 2011 19:02:45 +0000 (19:02 +0000)]
Add RELEASE-NOTES for r93744

12 years agoAdd RELEASE-NOTES for r93818 and r94155. Adding to the 1.18 file since they're tagged...
Roan Kattouw [Sat, 13 Aug 2011 18:33:00 +0000 (18:33 +0000)]
Add RELEASE-NOTES for r93818 and r94155. Adding to the 1.18 file since they're tagged for 1.18

12 years agoLocalisation update for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sat, 13 Aug 2011 18:19:15 +0000 (18:19 +0000)]
Localisation update for core and extension messages from translatewiki.net (2011-08-13 18:00:00)

12 years agoRemove mention of wfOut() in comment
Alexandre Emsenhuber [Sat, 13 Aug 2011 18:12:43 +0000 (18:12 +0000)]
Remove mention of wfOut() in comment

12 years agoAdd a RELEASE-NOTES note about protocol-relative URLs to the 1.18 RELEASE-NOTES....
Roan Kattouw [Sat, 13 Aug 2011 17:35:28 +0000 (17:35 +0000)]
Add a RELEASE-NOTES note about protocol-relative URLs to the 1.18 RELEASE-NOTES. Support for protocol-relative URLs is almost-there-but-not-quite at this point, so this is a little bit preliminary, but we will deploy this on WMF soon and merge all fixes to 1.18, so I figured it's better to put this in now before I forget.

12 years ago(bug 26283) Previewing user JS/CSS pages doesn't load other user JS/CSS pages
Roan Kattouw [Sat, 13 Aug 2011 17:27:35 +0000 (17:27 +0000)]
(bug 26283) Previewing user JS/CSS pages doesn't load other user JS/CSS pages

12 years ago* (bug 26885) Allow show/hide of account blocks, temporary blocks and single IP block...
Sam Reed [Sat, 13 Aug 2011 15:39:57 +0000 (15:39 +0000)]
* (bug 26885) Allow show/hide of account blocks, temporary blocks and single IP blocks for list=blocks

Patch by John DuHart

Minor extras:
* Minor style tweak
* Add new error to getPossibleErrors
* Reused $p for module prefix

12 years agoUse local context instead of global variables
Alexandre Emsenhuber [Sat, 13 Aug 2011 14:53:23 +0000 (14:53 +0000)]
Use local context instead of global variables