lhc/web/wiklou.git
13 years agoYet more additions of wfProfileOut()
Platonides [Thu, 10 Feb 2011 16:39:53 +0000 (16:39 +0000)]
Yet more additions of wfProfileOut()

13 years agoAdd a context to SpecialPage, so that subclasses don't need globals anymore. Introduc...
Bryan Tong Minh [Thu, 10 Feb 2011 16:14:56 +0000 (16:14 +0000)]
Add a context to SpecialPage, so that subclasses don't need globals anymore. Introduces $mRequest, $mOutput and $mFullTitle, which can be used instead of $wgRequest, $wgOut and $wgTitle. Introduces msg(), which is a wrapper around wfMessage()->title().

13 years agoAdding more wfProfileOut()
Platonides [Thu, 10 Feb 2011 16:11:34 +0000 (16:11 +0000)]
Adding more wfProfileOut()

13 years agoFix profiling
Niklas Laxström [Thu, 10 Feb 2011 16:08:44 +0000 (16:08 +0000)]
Fix profiling

13 years agoMore wfProfileOut()ing
Platonides [Thu, 10 Feb 2011 16:04:19 +0000 (16:04 +0000)]
More wfProfileOut()ing

13 years agoClose wfProfileIn()s
Platonides [Thu, 10 Feb 2011 15:53:54 +0000 (15:53 +0000)]
Close wfProfileIn()s

13 years agoAdd missing wfProfileOut
Platonides [Thu, 10 Feb 2011 15:47:43 +0000 (15:47 +0000)]
Add missing wfProfileOut

13 years agoRefactor userLinks into it's own method
Niklas Laxström [Thu, 10 Feb 2011 15:29:54 +0000 (15:29 +0000)]
Refactor userLinks into it's own method

13 years ago(bug 25832) query=allimages now outputs ns/title as well
Bryan Tong Minh [Thu, 10 Feb 2011 15:20:47 +0000 (15:20 +0000)]
(bug 25832) query=allimages now outputs ns/title as well

13 years ago* (bug 15905) Nostalgia skin could become more usable by including a Talk:link at...
Sam Reed [Thu, 10 Feb 2011 14:00:51 +0000 (14:00 +0000)]
* (bug 15905) Nostalgia skin could become more usable by including a Talk:link at the top of the page

Shows next to Edit this page "Discuss this page"

13 years agoRELEASE-NOTES for r81868
Sam Reed [Thu, 10 Feb 2011 12:48:43 +0000 (12:48 +0000)]
RELEASE-NOTES for r81868

13 years agoFix for r80992. Remove posix extension requisite. Made to work in non-Unix systems.
Platonides [Thu, 10 Feb 2011 10:48:02 +0000 (10:48 +0000)]
Fix for r80992. Remove posix extension requisite. Made to work in non-Unix systems.
Replaced fseek+fwrite with ftruncate()

13 years agoTests for r81878
Niklas Laxström [Thu, 10 Feb 2011 10:10:44 +0000 (10:10 +0000)]
Tests for r81878

13 years agoFix the completely broken r81880
Platonides [Thu, 10 Feb 2011 10:03:38 +0000 (10:03 +0000)]
Fix the completely broken r81880

13 years agoAdd support of assertEmpty (used since r81596) for phpunit < 3.5.0
Platonides [Thu, 10 Feb 2011 09:51:31 +0000 (09:51 +0000)]
Add support of assertEmpty (used since r81596) for phpunit < 3.5.0

13 years agoFixed two bugs in message parameter handling:
Niklas Laxström [Thu, 10 Feb 2011 09:10:47 +0000 (09:10 +0000)]
Fixed two bugs in message parameter handling:
* missing check for is_array caused $foo["raw"] to return true when $foo is string: bug 27298
* Some parameters could be replaced twice or more: r80764

13 years ago*(bug 27159) make email confirmation code expiration time configurable
Sam Reed [Thu, 10 Feb 2011 02:32:34 +0000 (02:32 +0000)]
*(bug 27159) make email confirmation code expiration time configurable

Added "$wgUserEmailConfirmationTokenExpiry"

13 years agoExplicitally define $fld_rights on all code paths
Sam Reed [Wed, 9 Feb 2011 22:42:26 +0000 (22:42 +0000)]
Explicitally define $fld_rights on all code paths

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Wed, 9 Feb 2011 21:04:24 +0000 (21:04 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-09 20:45:00 UTC)

13 years agoRebuild raw sql
Sam Reed [Wed, 9 Feb 2011 20:09:22 +0000 (20:09 +0000)]
Rebuild raw sql

Remove old method_exists

Add braces

13 years agoExplicitally define $i = 0;
Sam Reed [Wed, 9 Feb 2011 19:54:23 +0000 (19:54 +0000)]
Explicitally define $i = 0;

13 years agoFixup fixme on r81030, which should actually have been a fixme on r81657
Sam Reed [Wed, 9 Feb 2011 18:57:25 +0000 (18:57 +0000)]
Fixup fixme on r81030, which should actually have been a fixme on r81657

13 years agoFollow up to r81829. Poison var_dump, so that debug statements like r81671 can be...
Platonides [Wed, 9 Feb 2011 17:36:25 +0000 (17:36 +0000)]
Follow up to r81829. Poison var_dump, so that debug statements like r81671 can be easily detected.
The three 'right' usages are
* includes/Import.php
* includes/api/ApiFormatDump.php
* tests/parser/parserTestsParserHook.php

13 years agoDon't use ob_start/ob_get_contents/ob_end_clean just to var_dump() a string. Cleaning...
Platonides [Wed, 9 Feb 2011 17:21:39 +0000 (17:21 +0000)]
Don't use ob_start/ob_get_contents/ob_end_clean just to var_dump() a string. Cleaning var_dump() usage.

13 years agoFollow-up r81604: Prefix new classes with 'mw-' per [[Manual:Coding conventions]]
Raimond Spekking [Wed, 9 Feb 2011 17:06:41 +0000 (17:06 +0000)]
Follow-up r81604: Prefix new classes with 'mw-' per [[Manual:Coding conventions]]

13 years agoFix for r81675: Skin::getTitle() will return null when $wgTitle is null and $wgOut...
Alexandre Emsenhuber [Wed, 9 Feb 2011 17:05:52 +0000 (17:05 +0000)]
Fix for r81675: Skin::getTitle() will return null when $wgTitle is null and $wgOut->setTitle() not called, resulting in the following when passing a non-null parameter to User::getSkin():
Catchable fatal error: Argument 1 passed to Title::equals() must be an instance of Title, null given, called in includes/User.php on line 2255 and defined in includes/Title.php on line 3689

13 years ago1 to true in boolean parameter
Platonides [Wed, 9 Feb 2011 17:05:25 +0000 (17:05 +0000)]
1 to true in boolean parameter

13 years ago* Add a amtitle param to meta=allmessages
Alexandre Emsenhuber [Wed, 9 Feb 2011 15:19:45 +0000 (15:19 +0000)]
* Add a amtitle param to meta=allmessages

Only used used when amenableparser is passed; the user can now define the page used for {{PAGENAME}} and related stuff instead of being hardcoded to "API"

13 years agoFollowup r81812: per CR, this could be 0
Chad Horohoe [Wed, 9 Feb 2011 14:59:44 +0000 (14:59 +0000)]
Followup r81812: per CR, this could be 0

13 years agopreg_match() yells about undefined offsets when $wgInvalidUsernameCharacters is empty...
Chad Horohoe [Wed, 9 Feb 2011 13:42:02 +0000 (13:42 +0000)]
preg_match() yells about undefined offsets when $wgInvalidUsernameCharacters is empty. Noticed by wolog on IRC

13 years agorm unused class variable
Chad Horohoe [Wed, 9 Feb 2011 06:00:52 +0000 (06:00 +0000)]
rm unused class variable

13 years ago* bug 27263: importDump.php now finally has --help text, also shown when stdin is...
Brion Vibber [Tue, 8 Feb 2011 23:45:16 +0000 (23:45 +0000)]
* bug 27263: importDump.php now finally has --help text, also shown when stdin is a tty and no file given

13 years agoMore return type documentation
Sam Reed [Tue, 8 Feb 2011 23:18:13 +0000 (23:18 +0000)]
More return type documentation

13 years agoMinor documentation tweaks/improvements
Sam Reed [Tue, 8 Feb 2011 23:09:22 +0000 (23:09 +0000)]
Minor documentation tweaks/improvements

13 years agoRemove unused $wgContLang globals after refactoring at r81456 and r81456
Platonides [Tue, 8 Feb 2011 22:40:07 +0000 (22:40 +0000)]
Remove unused $wgContLang globals after refactoring at r81456 and r81456

13 years agoFollow up r81562
Platonides [Tue, 8 Feb 2011 22:33:57 +0000 (22:33 +0000)]
Follow up r81562

13 years agoUnused globals
Platonides [Tue, 8 Feb 2011 22:10:34 +0000 (22:10 +0000)]
Unused globals

13 years agoUse of undefined constant h in line 250. Follow up to r81558
Platonides [Tue, 8 Feb 2011 22:08:58 +0000 (22:08 +0000)]
Use of undefined constant h in line 250. Follow up to r81558

13 years ago$IP marked as global again in line 1208, function includeExtensions
Platonides [Tue, 8 Feb 2011 22:03:01 +0000 (22:03 +0000)]
$IP marked as global again in line 1208, function includeExtensions
Unused global $wgHooks in function includeExtensions line 1208

13 years agoAdd missing wfProfileOut( __METHOD__ );
Sam Reed [Tue, 8 Feb 2011 22:01:34 +0000 (22:01 +0000)]
Add missing wfProfileOut( __METHOD__ );

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Tue, 8 Feb 2011 21:22:11 +0000 (21:22 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-08 20:05:00 UTC)

13 years agoHack to shortcut it to zero until User::getStubThreshold() produces a call to optionU...
Platonides [Tue, 8 Feb 2011 17:58:53 +0000 (17:58 +0000)]
Hack to shortcut it to zero until User::getStubThreshold() produces a call to optionUsed()

13 years agoRevert r81738. Extensions calling clearState() with no mOptions fixed.
Platonides [Tue, 8 Feb 2011 16:32:30 +0000 (16:32 +0000)]
Revert r81738. Extensions calling clearState() with no mOptions fixed.

13 years agoFollowup to r81657, you do need a space between the table name and the alias
OverlordQ [Tue, 8 Feb 2011 15:34:28 +0000 (15:34 +0000)]
Followup to r81657, you do need a space between the table name and the alias

13 years agoWe have OutputPage::showPermissionsErrorPage() for that
Alexandre Emsenhuber [Tue, 8 Feb 2011 15:19:49 +0000 (15:19 +0000)]
We have OutputPage::showPermissionsErrorPage() for that

13 years agoTweak for r79018: fatal errors due to something calling parser clearState when mOptio...
Brion Vibber [Tue, 8 Feb 2011 13:31:30 +0000 (13:31 +0000)]
Tweak for r79018: fatal errors due to something calling parser clearState when mOptions wasn't defined

13 years agoRemove $wgServer prepending from remote JS/CSS paths. It's not needed and breaks...
Roan Kattouw [Tue, 8 Feb 2011 12:34:08 +0000 (12:34 +0000)]
Remove $wgServer prepending from remote JS/CSS paths. It's not needed and breaks other-domain $wgStylePath / $wgExtensionAssetsPath settings

13 years agoMake SVGMetadataExtractor less noisy when it reads SVGs from Adobe Illustrator.
Tim Starling [Tue, 8 Feb 2011 12:25:39 +0000 (12:25 +0000)]
Make SVGMetadataExtractor less noisy when it reads SVGs from Adobe Illustrator.

13 years agoMerge r81725 from 1.17wmf1: add parent constructor call so $IP is set properly
Roan Kattouw [Tue, 8 Feb 2011 12:19:59 +0000 (12:19 +0000)]
Merge r81725 from 1.17wmf1: add parent constructor call so $IP is set properly

13 years agoFix double commas from r81721. This time I actually ran it through php -l before...
Roan Kattouw [Tue, 8 Feb 2011 12:14:35 +0000 (12:14 +0000)]
Fix double commas from r81721. This time I actually ran it through php -l before committing *shame*

13 years agoFix r81719: trailing commas
Roan Kattouw [Tue, 8 Feb 2011 12:13:31 +0000 (12:13 +0000)]
Fix r81719: trailing commas

13 years agoMerge r81718 from 1.17wmf1
Tim Starling [Tue, 8 Feb 2011 12:08:21 +0000 (12:08 +0000)]
Merge r81718 from 1.17wmf1

13 years agoQuick fix to make debug mode work with non-standard $wgStylePath. This strips the...
Roan Kattouw [Tue, 8 Feb 2011 12:06:32 +0000 (12:06 +0000)]
Quick fix to make debug mode work with non-standard $wgStylePath. This strips the leading skins/ from each file path and sets $wgStylePath as the remote base path. $IP/skins is needed as a local base path to make stuff work, but I guess that could be changed $wgSkinDirectory

13 years agoDon't throw JS error when AJAX license selection is on but there's no license selecto...
Brion Vibber [Tue, 8 Feb 2011 11:12:26 +0000 (11:12 +0000)]
Don't throw JS error when AJAX license selection is on but there's no license selector because this is a re-upload.

13 years agoAdd : to file-deleted-duplicate to force inline link display, as the file can exist...
Bryan Tong Minh [Tue, 8 Feb 2011 10:43:09 +0000 (10:43 +0000)]
Add : to file-deleted-duplicate to force inline link display, as the file can exist on the shared repo.

13 years agoReimplement r80900, was lost when code was moved around
Roan Kattouw [Tue, 8 Feb 2011 10:26:30 +0000 (10:26 +0000)]
Reimplement r80900, was lost when code was moved around

13 years agoFixes for ResourceLoaderWikiModule r72776. No serious bugs found, do not merge before...
Tim Starling [Tue, 8 Feb 2011 06:34:38 +0000 (06:34 +0000)]
Fixes for ResourceLoaderWikiModule r72776. No serious bugs found, do not merge before deployment.
* Specify page titles as strings instead of split NS/DBK, as suggested by Roan on CR. It seemed sensible to me.
* Pass a Title object to getContent() instead of a string, to avoid unnecessary object construction overhead
* "*" and "/" are valid title characters. Check module input for JS comment end tokens.
* Fixed inappropriate conversion to boolean, when checking result of getContent(). Presumably the idea was to omit empty sections and errors, so that's what I did. Maybe an informative error message would be better in the error case.
* Use LinkBatch for selecting multiple page rows instead of Database::makeWhereFrom2d().
* Fixed assignment expression.

13 years agoFix bug from r73645: setMsgBlobMtime() requires its timestamp parameter to be a UNIX...
Tim Starling [Tue, 8 Feb 2011 05:33:17 +0000 (05:33 +0000)]
Fix bug from r73645: setMsgBlobMtime() requires its timestamp parameter to be a UNIX timestamp, which $row->mr_timestamp isn't. This was causing incorrect versions in the client-side module list, resulting in requests for URLs with "version=NaNNaNNaNTNaNNaNNaNZ", which Michael has been occasionally complaining about.

13 years ago* (bug 27230) Alignment fix for Vector watch tab icon spinner in IE 7
Brion Vibber [Tue, 8 Feb 2011 02:02:16 +0000 (02:02 +0000)]
* (bug 27230) Alignment fix for Vector watch tab icon spinner in IE 7

The CSS for the loading tab had:
background-position: center 60%;

The 'center' apparently worked for other browsers, but in IE7 it was getting a bit off, and threw the image over a few pixels.
'center' keyword here is allegedly equivalent to 50% which I also tried, but with the same results.

Instead, using the same fixed position that we specify for the regular rest-state icon works:

background-position: 5px 60%;

Resulting looks ok for me in:
* IE 6 / XP
* IE 7 / XP (fixes regression)
* IE 8 / XP
* Firefox 4b10 / Linux

Shouldn't hurt anything else.

13 years agoFollowup r81583, break some of the long lines and centralize the regex.
Daniel Friesen [Tue, 8 Feb 2011 01:31:21 +0000 (01:31 +0000)]
Followup r81583, break some of the long lines and centralize the regex.

13 years agoFix bug slightly caused by moving legacy code out of the Skin class. The Article...
Daniel Friesen [Tue, 8 Feb 2011 01:15:50 +0000 (01:15 +0000)]
Fix bug slightly caused by moving legacy code out of the Skin class. The Article class was calling the legacy Skin::historyLink in a very ugly way (ie: having it's own mTitle, but relying on whatever title just happened to be set on the skin that it grabbed).

13 years agoCleanup to r70900, r72481: don't construct new skin objects just because the Title...
Chad Horohoe [Tue, 8 Feb 2011 01:08:06 +0000 (01:08 +0000)]
Cleanup to r70900, r72481: don't construct new skin objects just because the Title is passed. Use the skin object we already have if the titles are the same

13 years agoFollow-up r81660.
Krinkle [Tue, 8 Feb 2011 00:22:03 +0000 (00:22 +0000)]
Follow-up r81660.
(Renaming new jQuery.jsMessage plugin to jQuery.mesageBox() )

13 years agoRenaming new jQuery.jsMessage plugin to jQuery.mesageBox(). Name was too generic...
Krinkle [Tue, 8 Feb 2011 00:20:41 +0000 (00:20 +0000)]
Renaming new jQuery.jsMessage plugin to jQuery.mesageBox(). Name was too generic and could be confusing with localization messages.
. Next commit will deal with the contents of the messageBox .js/css files

13 years agoPer fixme on r77597, change to $this->addQuotes() instead of hardcoded quote type
Sam Reed [Mon, 7 Feb 2011 23:21:53 +0000 (23:21 +0000)]
Per fixme on r77597, change to $this->addQuotes() instead of hardcoded quote type

13 years agoFix whitespace from r80978
Tim Starling [Mon, 7 Feb 2011 22:11:27 +0000 (22:11 +0000)]
Fix whitespace from r80978

13 years agoFollowup r81491: use $.client correctly
Roan Kattouw [Mon, 7 Feb 2011 21:55:11 +0000 (21:55 +0000)]
Followup r81491: use $.client correctly

13 years agoFix for renamed stuff that broke jquery.textSelection.js: $.os.name -> $.client.platform
Brion Vibber [Mon, 7 Feb 2011 21:45:19 +0000 (21:45 +0000)]
Fix for renamed stuff that broke jquery.textSelection.js: $.os.name -> $.client.platform

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Mon, 7 Feb 2011 21:06:29 +0000 (21:06 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-07 20:45:00 UTC)

13 years agoFollow-up r81401: fix callback, apparently it was the other way around than I thought.
Bryan Tong Minh [Mon, 7 Feb 2011 18:13:19 +0000 (18:13 +0000)]
Follow-up r81401: fix callback, apparently it was the other way around than I thought.

13 years agoWe have OutputPage::wrapWikiMsg() and OutputPage::addWikiMsg(), so use them
Alexandre Emsenhuber [Mon, 7 Feb 2011 16:42:41 +0000 (16:42 +0000)]
We have OutputPage::wrapWikiMsg() and OutputPage::addWikiMsg(), so use them

13 years agoSimplify a bit by passing directly the value returned by doUnblock() to showForm...
Alexandre Emsenhuber [Mon, 7 Feb 2011 16:17:50 +0000 (16:17 +0000)]
Simplify a bit by passing directly the value returned by doUnblock() to showForm() in case of error

13 years agoBreak lines at 80 chars
Alexandre Emsenhuber [Mon, 7 Feb 2011 15:59:58 +0000 (15:59 +0000)]
Break lines at 80 chars

13 years agoUse the content language to set the skin direction, instead of the user language...
Tim Starling [Mon, 7 Feb 2011 12:39:10 +0000 (12:39 +0000)]
Use the content language to set the skin direction, instead of the user language. This makes the content readable and the UI messed up, instead of vice versa.

It's not ideal, but at least it's no worse than it was in 1.16. It's preferable because the content area is more likely to have bidirectional text than the UI area. The UI is split up into short strings, generally in a consistent language, so there is less chance of the UBA moving fragments of text around.

Ideally, the direction of each div would be set according to the language of the text it contains.

13 years agoFollow-up r81619: Add new message key to maintenance file
Raimond Spekking [Mon, 7 Feb 2011 07:32:06 +0000 (07:32 +0000)]
Follow-up r81619: Add new message key to maintenance file

13 years agoFollowup to r69185, putting the "dir" attribute back on the HTML root element
Rob Lanphier [Mon, 7 Feb 2011 03:18:12 +0000 (03:18 +0000)]
Followup to r69185, putting the "dir" attribute back on the HTML root element

13 years ago* (bug 18011) Special:FileDuplicateSearch UI fixes and remote file repo support
Brion Vibber [Mon, 7 Feb 2011 02:35:35 +0000 (02:35 +0000)]
* (bug 18011) Special:FileDuplicateSearch UI fixes and remote file repo support

Fixes:
- now accepts file titles with or without File: prefix instead of demanding you must remove it
- moved result summary line from bottom to top
- added a line telling you no file was found if it wasn't found
- now pulls the reference file's SHA-1 via FileRepo, so can give it a remote file (eg from Commons)
- now pulls duplicate files via the main RepoGroup instead of querying image table manually, so turns up remote duplicates
- dropped the QueryPage standard paging header/footer; file dupe lists are usually very short and it's not worth copying the infrastructure

To make this work, I switched the special page class from using the standard QueryPage paths to doing the query and list itself; QueryPage is currently very tightly tied in to database queries, and doesn't provide a very clean way to drop in an alternative way of looking stuff up (say an API query or just getting a big array you've gotten from somewhere). If that gets improved, this page should be cleaned up to use more of the QueryPage infrastructure again so it's pretty and doesn't scare people coming in to maintain it.

Localization changes:
- added fileduplicatesearch-noresults message
- changed fileduplicatesearch-summary in English master to remove the supplementary line about taking out the 'File:' prefix

13 years agoFollowup r81600, put bug fix incorrect BUG FIX section, rather than the API section...
Sam Reed [Mon, 7 Feb 2011 00:00:44 +0000 (00:00 +0000)]
Followup r81600, put bug fix incorrect BUG FIX section, rather than the API section, which is wrong

13 years ago* (bug 27205) aiprop=metadata and aiprop=parsedcomment need help text
Sam Reed [Sun, 6 Feb 2011 23:59:03 +0000 (23:59 +0000)]
* (bug 27205) aiprop=metadata and aiprop=parsedcomment need help text

Refactored code out to reduce duplication (and hence, mismatches like this)

13 years agoFollow-up r81612, disable $wgAllowAsyncCopyUploads
Bryan Tong Minh [Sun, 6 Feb 2011 22:53:07 +0000 (22:53 +0000)]
Follow-up r81612, disable $wgAllowAsyncCopyUploads

13 years agoCleanup MimeMagic: Add public identifier to functions; kill error operator; Cleanup...
Bryan Tong Minh [Sun, 6 Feb 2011 22:47:10 +0000 (22:47 +0000)]
Cleanup MimeMagic: Add public identifier to functions; kill error operator; Cleanup function documentation; Manual stylize

13 years agoPer CR r66438 and IRC, revert User::leaveNewMessage for now. Copied the function...
Bryan Tong Minh [Sun, 6 Feb 2011 22:44:01 +0000 (22:44 +0000)]
Per CR r66438 and IRC, revert User::leaveNewMessage for now. Copied the function and stripped it down for use in NewUserMessage. Could probably need some cleanup.

13 years agoRevert r66977 (removing $wgTitle from edit.php). This doesn't break core, but could...
Chad Horohoe [Sun, 6 Feb 2011 22:36:33 +0000 (22:36 +0000)]
Revert r66977 (removing $wgTitle from edit.php). This doesn't break core, but could quite possibly break extensions that expect $wgTitle to be set during editing. I hate $wgTitle :(

13 years agoIgnore code coverage for compatibility and shell functions
Antoine Musso [Sun, 6 Feb 2011 22:14:32 +0000 (22:14 +0000)]
Ignore code coverage for compatibility and shell functions

The compatibility functions in GlobalFunctions are just wrapper for
their equivalent in the Fallback class.  We should test the implementation
and we can safely ignore those wrappers.

Shell functions ignored make use of sleep() which is evil. They also
do some outputs to the console which is probably hard to test properly.
Given they are not critical, I just ignore their code coverage, we can
still test them though :)

13 years agoComplete coverage of Xml::DateMenu()
Antoine Musso [Sun, 6 Feb 2011 22:10:48 +0000 (22:10 +0000)]
Complete coverage of Xml::DateMenu()

r81605 was not hitting all possible conditional tests. Verified with:

php phpunit.php --configuration suite.xml \
  --coverage-html /tmp/datecover \
   --filter DateMenu

Tests:
PHPUnit 3.5.10 by Sebastian Bergmann.
.
Time: 3 seconds, Memory: 27.50Mb
OK (1 test, 5 assertions)

13 years agoFixed an incorrect doc comment bit on Database::sourceStream, then added some more...
Brion Vibber [Sun, 6 Feb 2011 21:47:58 +0000 (21:47 +0000)]
Fixed an incorrect doc comment bit on Database::sourceStream, then added some more doc comments around the file just cause

13 years agoMove some providers in new MediaWikiProvide class
Antoine Musso [Sun, 6 Feb 2011 21:28:57 +0000 (21:28 +0000)]
Move some providers in new MediaWikiProvide class

The MediaWikiProvide class would host providing methods reused in different
tests classes.  To use it, just use the Class::function syntax.

Example:
  /** @dataProvider MediaWikiProvide::Months */

Made a svn copy of phpunit/includes/parser/MagicVariableTest.php
to save the history.

13 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sun, 6 Feb 2011 21:25:59 +0000 (21:25 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-02-06 21:10:00 UTC)

13 years agoTests for Xml::DateMenu()
Antoine Musso [Sun, 6 Feb 2011 21:23:12 +0000 (21:23 +0000)]
Tests for Xml::DateMenu()

13 years ago(bug 23315) Add new body classes to allow easier styling of special pages.
Ilmari Karonen [Sun, 6 Feb 2011 21:08:48 +0000 (21:08 +0000)]
(bug 23315) Add new body classes to allow easier styling of special pages.
Also eliminate some duplicate code introduced into SpecialPage::headElement() in r61071 by calling Skin::getPageClasses() instead, and use $sk parameter instead of $wgUser->getSkin() to get skin name.

13 years agoReduce range of IPv6 tested by testValidIPs
Antoine Musso [Sun, 6 Feb 2011 20:24:53 +0000 (20:24 +0000)]
Reduce range of IPv6 tested by testValidIPs

By using steps of 0xF, the number of assertions is reduced from 70k
to 5k revisions. It is not that useful to test all of them.

Follow up r76569

13 years agoFiles with a mime type that does not match the extension are now properly thumbnailed...
Bryan Tong Minh [Sun, 6 Feb 2011 19:20:57 +0000 (19:20 +0000)]
Files with a mime type that does not match the extension are now properly thumbnailed. Partial bug fix to bug 26661.
MediaHandler::getThumbType now checks if the extension and the mime type match. If they do not, a new extension is generated for the mime type. The rest of the thumbnailing code should then magically work.
Bonus: this also works with file names without extension, so might be a step closer to extension-less files.

13 years ago(bug 27201) fix duplicate IDs in recursive whatlinkshere output
Ilmari Karonen [Sun, 6 Feb 2011 18:25:08 +0000 (18:25 +0000)]
(bug 27201) fix duplicate IDs in recursive whatlinkshere output

13 years agowfShorthandToInteger() PHPUnit code coverage
Antoine Musso [Sun, 6 Feb 2011 18:02:47 +0000 (18:02 +0000)]
wfShorthandToInteger() PHPUnit code coverage

Some easy assertions.

$ php phpunit.php --configuration suite.xml --filter Shorthand
PHPUnit 3.5.10 by Sebastian Bergmann.
...........................
Time: 2 seconds, Memory: 22.00Mb
OK (27 tests, 27 assertions)

13 years agobugfix for wfBCP47 and code coverage
Antoine Musso [Sun, 6 Feb 2011 14:47:35 +0000 (14:47 +0000)]
bugfix for wfBCP47 and code coverage

Language code are case insensitive. The BCP 47 recommands nice
formatting nonetheless. This patch enhance our formatting:
- tags preceded by the private tag 'x' are now lower case
- 4 letters tags are now lower case with first letter uper cased

Please note the RFC seems to have a bug for az-Arab-x-AZE-derbend
which should be az-Arab-x-aze-derbend .  I have changed our test
to reflect this and added a comment for later reference.

13 years agoImprove PHPUnit code coverage
Antoine Musso [Sun, 6 Feb 2011 13:59:06 +0000 (13:59 +0000)]
Improve PHPUnit code coverage

XmlJs:
 - simple class == simple test

GlobalFunctions:
 - wfArrayDiff2: simple test, please add more

XmlSelectTest:
 - test for constructor
 - tests for setDefault. Found a potential bug when setting a default after
   options have been added. The default option will not get marked as selected!
   We should change our code to generates HTML for options at rendering time
   or throw an exception that default can not be used if an option is present.

MediaWiki:
 - basic placeholder generated by PHPUnit
 - tests for setVal() / getVal()

13 years agoI don't think we need a complete parse operation to just add "<hr />"
Alexandre Emsenhuber [Sun, 6 Feb 2011 13:41:32 +0000 (13:41 +0000)]
I don't think we need a complete parse operation to just add "<hr />"

13 years agoEasier to just use addWikiMsg()
Alexandre Emsenhuber [Sun, 6 Feb 2011 13:38:29 +0000 (13:38 +0000)]
Easier to just use addWikiMsg()

13 years ago* Changed all calls to wfMsgWikiHtml() in core
Alexandre Emsenhuber [Sun, 6 Feb 2011 12:38:33 +0000 (12:38 +0000)]
* Changed all calls to wfMsgWikiHtml() in core
* Now replacing parameter before parsing where possible
* Used 'parseinline' for 'nosuchuser' message in Special:Userlogin for consistency with other error messages

13 years agoLocalization update for he.
Rotem Liss [Sun, 6 Feb 2011 11:54:30 +0000 (11:54 +0000)]
Localization update for he.