lhc/web/wiklou.git
12 years agoSet envelope sender to the same as the From: address when PEAR mail is used. This...
Mark A. Hershberger [Thu, 7 Jul 2011 18:03:46 +0000 (18:03 +0000)]
Set envelope sender to the same as the From: address when PEAR mail is used.  This is so that mail “bounces” to the expected place.

Note that this only works when $wgSMTP is set and (as a result) the PEAR mailer is used.

When $wgSMTP is not set, the envelope sender is set using $wgAdditionalMailParams set to something like “-f from@example.com”.  Someone should create some Envelope sender sanity in how the envelope sender is set.

Suggestion: if $wgAdditionalMailParams is not set, then use $wgEmergencyContact to create “-f $wgEmergencyContact” for php mailer and to set the Return-Path header for PEAR mailer.  I used “From:” for Return-Path here because it seemed most sensible.

See also: http://pear.php.net/bugs/bug.php?id=5017

12 years agoRemoving calls to deprecated functionality in favor of the new versions. Old version...
Krinkle [Thu, 7 Jul 2011 17:52:55 +0000 (17:52 +0000)]
Removing calls to deprecated functionality in favor of the new versions. Old version worked fine but shouldn't be used.

Follows-up:
* r75275: Introduced the updateTooltipAccessKeys function in the new library but didn't call it on document ready and left the deprecated one in the onloadhook-run in wikibits.js untouched
* r75287: Introduced jquery.checkboxShiftClick and called on-load but left the load call for the legacy version untouched. Depending on the load order at any given time it may not have been used.

Also reordering the if-else case in mw.util.updateTooltipAccessKeys to allow a call without arguments ("undefined instanceof Foo" throws exception)

12 years agow/s fixup before patch
Mark A. Hershberger [Thu, 7 Jul 2011 17:43:31 +0000 (17:43 +0000)]
w/s fixup before patch

12 years ago* Don't use isset() to check only for null
Alexandre Emsenhuber [Thu, 7 Jul 2011 17:42:19 +0000 (17:42 +0000)]
* Don't use isset() to check only for null
* Also pass the Title object in RequestContext::msg()

12 years agoOverride IndexPager::getTitle() in ImageListPager, this is the only class subclassing...
Alexandre Emsenhuber [Thu, 7 Jul 2011 17:34:15 +0000 (17:34 +0000)]
Override IndexPager::getTitle() in ImageListPager, this is the only class subclassing TablePager that don't do that in core

12 years agoRemoved usage of error suppression operator
Alexandre Emsenhuber [Thu, 7 Jul 2011 17:25:35 +0000 (17:25 +0000)]
Removed usage of error suppression operator

12 years agoPartial (?) fix for bug 29753 -- wrong Firefox version comparison for non-Mac Firefox...
Brion Vibber [Thu, 7 Jul 2011 17:17:06 +0000 (17:17 +0000)]
Partial (?) fix for bug 29753 -- wrong Firefox version comparison for non-Mac Firefox 2+ accesskey tooltip. However, this code IS NOT YET USED which is very suspicious. An earlier version of this code is wikibits.js is still being used for some reason, which indicates a maintenance problem.

12 years ago(bug 27410) The tag filter on a history page should be within a <label> element....
Chad Horohoe [Thu, 7 Jul 2011 16:59:25 +0000 (16:59 +0000)]
(bug 27410) The tag filter on a history page should be within a <label> element. Patch by The Evil IP Address.

Also remove inclusion protection for the 800th time: if a file only has classes, you don't need to do this :)

12 years agoReduce some duplication
Chad Horohoe [Thu, 7 Jul 2011 16:52:47 +0000 (16:52 +0000)]
Reduce some duplication

12 years ago(Update for r91646) Use mw-content-ltr/rtl so bullet list shows properly where user...
Robin Pepermans [Thu, 7 Jul 2011 16:15:27 +0000 (16:15 +0000)]
(Update for r91646) Use mw-content-ltr/rtl so bullet list shows properly where user direction != site direction. Also add lang & dir attribute, and fix typo in shared.css.

12 years agoRephrasing msg clearyourcache per Bug 27550 : Adding Chrome, moving up IE, making...
Leo Koppelkamm [Thu, 7 Jul 2011 15:59:42 +0000 (15:59 +0000)]
Rephrasing msg clearyourcache per Bug 27550 : Adding Chrome, moving up IE, making it a bulltetd list. Thanks Amir E. Aharoni

12 years agoBug #29755: Apply patch from Vitaliy Filippov so that MW's HTTP client
Mark A. Hershberger [Thu, 7 Jul 2011 14:56:18 +0000 (14:56 +0000)]
Bug #29755: Apply patch from Vitaliy Filippov so that MW's HTTP client
respects no_proxy env setting

12 years agoPartial revert of r90833, capitalisation change was not intented
Niklas Laxström [Thu, 7 Jul 2011 08:55:42 +0000 (08:55 +0000)]
Partial revert of r90833, capitalisation change was not intented

12 years agoReplace bullet-icon.png with an 8-bit version (became 24-bit due to r78011 which...
Krinkle [Wed, 6 Jul 2011 23:02:29 +0000 (23:02 +0000)]
Replace bullet-icon.png with an 8-bit version (became 24-bit due to r78011 which removed the color palette)
* Fixes (bug 19514) Unordered list list-style-image should be IE6-compatible (8-bit)

12 years agoFollowup r91609, helps to actually remove the @
Chad Horohoe [Wed, 6 Jul 2011 22:07:05 +0000 (22:07 +0000)]
Followup r91609, helps to actually remove the @

12 years agoBunch of error suppression operator fixes (bug
Chad Horohoe [Wed, 6 Jul 2011 21:57:44 +0000 (21:57 +0000)]
Bunch of error suppression operator fixes (bug

12 years ago* (bug 28626) Validate JavaScript files and pages loaded via ResourceLoader before...
Brion Vibber [Wed, 6 Jul 2011 21:48:09 +0000 (21:48 +0000)]
* (bug 28626) Validate JavaScript files and pages loaded via ResourceLoader before minification, protecting separate modules from interference

This is possibly not perfect but seems to serve for a start; follows up on r91591 that adds JSMin+ to use it in some unit tests. May want to adjust some related bits.

- $wgResourceLoaderValidateJs on by default (can be disabled)
- when loading a JS file through ResourceLoaderFileModule or ResourceLoaderWikiModule, parse it using JSMinPlus's JSParser class. If the parser throws an exception, the JS code of the offending file will be replaced by a JS exception throw listing the file or page name, line number (in original form), and description of the error from the parser.
- parsing results are cached based on md5 of content to avoid re-parsing identical text
- for JS pages loaded via direct load.php request, the parse error is thrown and visible in the JS console/error log

Issues:
- the primary use case for this is when a single load.php request implements multiple modules via mw.loader.implement() -- the loader catches the exception and skips on to the next module (good) but doesn't re-throw the exception for the JS console. It does log to console if present, but it'll only show up as a regular debug message, not an error. This can suppress visibility of errors in a module that's loaded together with other modules (such as a gadget).
- have not done performance testing on the JSParser
- have not done thorough unit testing with the JSParser

12 years agoFollowup r91602, forgot svn add
Chad Horohoe [Wed, 6 Jul 2011 21:05:29 +0000 (21:05 +0000)]
Followup r91602, forgot svn add

12 years agoClean up the mess that is wfDie (resolves r85918). wfDie() doesn't exist anymore...
Chad Horohoe [Wed, 6 Jul 2011 21:01:12 +0000 (21:01 +0000)]
Clean up the mess that is wfDie (resolves r85918). wfDie() doesn't exist anymore, so don't use it.

The only two usages left since r91590 are php version checks for index/load/api.php, and $wgAPIEnabled check in api.php. Consolidate all of the "bailing for invalid version" into PHPVersionError.php. Leaving $wgAPIEnabled as the only user was silly, so just echo and die like wfDie() would've done

12 years agoCorrect the documentation of srprop.
Derk-Jan Hartman [Wed, 6 Jul 2011 20:47:26 +0000 (20:47 +0000)]
Correct the documentation of srprop.

12 years agoActually return the title of the section, instead of the pagetitle when requesting...
Derk-Jan Hartman [Wed, 6 Jul 2011 20:41:12 +0000 (20:41 +0000)]
Actually return the title of the section, instead of the pagetitle when requesting srprop=sectiontitle from API search.

Fixes bug 29746

12 years ago* (bug 29745) Fatal error in API search
Sam Reed [Wed, 6 Jul 2011 20:18:22 +0000 (20:18 +0000)]
* (bug 29745) Fatal error in API search

Properly name objects being used

12 years agoRemove 'upload-wasdeleted' message. Its no longer used.
Brian Wolff [Wed, 6 Jul 2011 20:07:10 +0000 (20:07 +0000)]
Remove 'upload-wasdeleted' message. Its no longer used.

Original feature was (accidently?) removed/broken in r57868 and then re-created
using the message 'upload-recreate-warning' in r65339.

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Wed, 6 Jul 2011 20:03:01 +0000 (20:03 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-06 19:40:00 UTC)

12 years agoFollowup r83885: add JSMin+ 1.3 to use its parser to verify output of JavaScriptMinif...
Brion Vibber [Wed, 6 Jul 2011 20:02:10 +0000 (20:02 +0000)]
Followup r83885: add JSMin+ 1.3 to use its parser to verify output of JavaScriptMinifierTest unit test cases. Had to change some of the test cases because they were not valid JavaScript programs -- one of the quoting tests was incorrectly quoted in the PHP sources, and several tests around return, continue, and break keywords failed due to not using them in the contexts that they require.

http://crisp.tweakblogs.net/blog/1856/jsmin+-version-13.html
JSMin+ under MPL 1.1/ GPL 2.0 / LGPL 2.1 license.

12 years agoRemove last wfDie()s from maintenance
Chad Horohoe [Wed, 6 Jul 2011 19:57:52 +0000 (19:57 +0000)]
Remove last wfDie()s from maintenance

12 years agoPartial revert of r91106: followup to r91127.
Brion Vibber [Wed, 6 Jul 2011 18:47:35 +0000 (18:47 +0000)]
Partial revert of r91106: followup to r91127.

Suppressing all warning output from unserialize() in ExifBitmap::formatMetadata will hide actual errors; we're now checking explicitly for the bad-metadata and no-metadata markers so the case this was added for should not happen.

12 years agoMove wfShowingResultsNum() back into SpecialSearch where it belongs. No need for...
Chad Horohoe [Wed, 6 Jul 2011 18:13:06 +0000 (18:13 +0000)]
Move wfShowingResultsNum() back into SpecialSearch where it belongs. No need for a global function for something thats only used once in core or extensions

12 years agorefixing bug 27338 with all parser test fixes, reverts r91557
Ryan Kaldari [Wed, 6 Jul 2011 18:07:31 +0000 (18:07 +0000)]
refixing bug 27338 with all parser test fixes, reverts r91557

12 years agoCall parent::setUp() and allow it to do lang setup stuff
Chad Horohoe [Wed, 6 Jul 2011 17:58:29 +0000 (17:58 +0000)]
Call parent::setUp() and allow it to do lang setup stuff

12 years agoDeclared some member fields
Aaron Schulz [Wed, 6 Jul 2011 17:55:44 +0000 (17:55 +0000)]
Declared some member fields

12 years agoRemove notes about being destructive. We work properly on cloned tables now
Chad Horohoe [Wed, 6 Jul 2011 17:52:27 +0000 (17:52 +0000)]
Remove notes about being destructive. We work properly on cloned tables now

12 years agosetFileVersion (r91435) was missing default $val
Aaron Schulz [Wed, 6 Jul 2011 17:27:33 +0000 (17:27 +0000)]
setFileVersion (r91435) was missing default $val

12 years ago(follow-up r57868) Check if there exists a deleted page if we have a filename to...
Brian Wolff [Wed, 6 Jul 2011 17:27:14 +0000 (17:27 +0000)]
(follow-up r57868) Check if there exists a deleted page if we have a filename to check, not if we don't have a filename.

Also the showDeletionLog function was removed way back and folded into a different function in special:upload, so remove the call to that.

12 years agopublic static
Chad Horohoe [Wed, 6 Jul 2011 17:15:04 +0000 (17:15 +0000)]
public static

12 years agoFollowup r91270: didn't need to be so paranoid about $_SESSION, and actually was...
Chad Horohoe [Wed, 6 Jul 2011 16:56:26 +0000 (16:56 +0000)]
Followup r91270: didn't need to be so paranoid about $_SESSION, and actually was causing more issues than it solved.

12 years ago(Bug 19725) Do not include suppressed edits in the "View X deleted edits" message...
Brian Wolff [Wed, 6 Jul 2011 16:47:29 +0000 (16:47 +0000)]
(Bug 19725) Do not include suppressed edits in the "View X deleted edits" message, and when doing prefix search of special:undelete.

I'm not 100% sure this is the right thing to do, see the bug for the details. But basically this doesn't include an edit in the count if its text is hidden and its hidden from admins. (Not sure if it should not be included only if everything is hidden). Its also weird to show people different things depending if they have suppress rights, without really indicating that.

Minor db note: This causes the query to no longer use a covering index. I don't think that matters but just thought i'd mention.

p.s. The upload page show deleted edits link is broken right now, (from before) I'll fix in a follow-up.

12 years ago* Pass the WebRequest object to User::newFromSession() and use it instead of $wgReque...
Alexandre Emsenhuber [Wed, 6 Jul 2011 16:42:16 +0000 (16:42 +0000)]
* Pass the WebRequest object to User::newFromSession() and use it instead of $wgRequest (will still fall back to $wgRequest if not passed or another method to get an User object)
* Always call User::newFromSession(), not only when not in CLI mode
* Removed User::$mSkin, unused and not set

12 years agoRemoved usage of error suppression operator
Alexandre Emsenhuber [Wed, 6 Jul 2011 16:29:27 +0000 (16:29 +0000)]
Removed usage of error suppression operator

12 years agoRevert r91426 and followups r91427, r91430: Breaks Gallery-related parser tests
Chad Horohoe [Wed, 6 Jul 2011 16:23:20 +0000 (16:23 +0000)]
Revert r91426 and followups r91427, r91430: Breaks Gallery-related parser tests

12 years agoChanged all dynamic calls to Linker methods into static ones in ImagePage.php.
Alexandre Emsenhuber [Wed, 6 Jul 2011 14:45:19 +0000 (14:45 +0000)]
Changed all dynamic calls to Linker methods into static ones in ImagePage.php.
ImageHistoryList is not used in extension, so I also removed ImageHistoryList::getSkin().

12 years agoOverride Pager::getTitle() in core subclasses of ReverseChronologicalPager that don...
Alexandre Emsenhuber [Wed, 6 Jul 2011 14:10:24 +0000 (14:10 +0000)]
Override Pager::getTitle() in core subclasses of ReverseChronologicalPager that don't have it

12 years agoRedoing r87173 with scrollbars instead of word-wrap per CR
Leo Koppelkamm [Wed, 6 Jul 2011 12:39:42 +0000 (12:39 +0000)]
Redoing r87173 with scrollbars instead of word-wrap per CR

12 years agoRevert r86047 for now per CR.
Leo Koppelkamm [Wed, 6 Jul 2011 12:29:56 +0000 (12:29 +0000)]
Revert r86047 for now per CR.

12 years ago(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionality ...
Robin Pepermans [Wed, 6 Jul 2011 02:26:06 +0000 (02:26 +0000)]
(bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionality (and dependent wfUILang) in core, as most or all work is finished.
Also:
* Introduce classes mw-float-end, mw-float-start so we don't have to use inline css depending on wfUILang()/$wgLang (see HistoryPage and SpecialFileDuplicateSearch)
* Add direction mark to protection log
* Remove specialpageattributes as it is obsoleted by this commit (also fixes bug 28572)
* Add two direction marks in wfSpecialList, which makes ltr links on rtl wiki (and vice versa) display nicely as well (only on those special pages however)
* Revert r91340 partially: use mw-content-ltr/rtl class anyway in shared.css. Both ways have their [dis]advantages...
* Set the direction of input fields by default to the content language direction (except buttons etc.) in shared.css

12 years ago(bug 29680, bug 22911) Add GetDeaultSortkey hook in order to override default sortkey...
Brian Wolff [Wed, 6 Jul 2011 00:38:40 +0000 (00:38 +0000)]
(bug 29680, bug 22911) Add GetDeaultSortkey hook in order to override default sortkey used on pages (default is {{PAGENAME}})

Some people want it to default to subpage or to fullpagename this hook would let
them do what they want :)

12 years ago(Follow-up r91414) Also take the page name in account when considering how much of...
Brian Wolff [Wed, 6 Jul 2011 00:24:59 +0000 (00:24 +0000)]
(Follow-up r91414) Also take the page name in account when considering how much of page to put in auto-summary.

Move limit from 200 bytes to 250 bytes - 5 left over just cause (+4 bytes for the $1 and $2). The other auto-summary still uses 200 as the limit (I suppose they don't want it too big or soemthing?).

12 years agocode readability is everything
Jack Phoenix [Wed, 6 Jul 2011 00:01:43 +0000 (00:01 +0000)]
code readability is everything

12 years agoDivision by zero
Aaron Schulz [Tue, 5 Jul 2011 22:47:21 +0000 (22:47 +0000)]
Division by zero

12 years agomw.util.wikiGetlink default to wgPageName
Krinkle [Tue, 5 Jul 2011 22:10:08 +0000 (22:10 +0000)]
mw.util.wikiGetlink default to wgPageName
* (bug 29723) mw.util.wikiGetlink() should default to wgPageName
* Solution by mybugs.mail

* Adding unit tests

12 years agoanother fix for old jQuery UI on live
Ryan Kaldari [Tue, 5 Jul 2011 22:03:38 +0000 (22:03 +0000)]
another fix for old jQuery UI on live

12 years agomw.util optimalizations:
Krinkle [Tue, 5 Jul 2011 21:59:38 +0000 (21:59 +0000)]
mw.util optimalizations:
* Remove redundant mw>mediaWiki passing through IIFE
* Using local alias to global mw.util

12 years agoReverted part of r91246, fixes: Fatal error: Call to undefined method RawPage::getSki...
Aaron Schulz [Tue, 5 Jul 2011 21:28:27 +0000 (21:28 +0000)]
Reverted part of r91246, fixes: Fatal error: Call to undefined method RawPage::getSkin() in C:\wamp\www\MW_trunk\includes\RawPage.php on line 156

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Tue, 5 Jul 2011 21:05:02 +0000 (21:05 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-05 21:00:00 UTC)

12 years agoPer Brion, fix for r91460: make this a bit more robust
Alexandre Emsenhuber [Tue, 5 Jul 2011 16:40:12 +0000 (16:40 +0000)]
Per Brion, fix for r91460: make this a bit more robust

12 years agoOverride IndexPager::getTitle() in AlphabeticPager instance of core to not rely on...
Alexandre Emsenhuber [Tue, 5 Jul 2011 16:18:30 +0000 (16:18 +0000)]
Override IndexPager::getTitle() in AlphabeticPager instance of core to not rely on $wgTitle

12 years ago* Don't create a WebRequest obhject in CLI mode but a FauxRequest; avoids some useles...
Alexandre Emsenhuber [Tue, 5 Jul 2011 15:05:14 +0000 (15:05 +0000)]
* Don't create a WebRequest obhject in CLI mode but a FauxRequest; avoids some useless notices about headers already sent (I know this is more a PHP silliness, but anyway)
* Added HTTP response code parsing (sending a "HTTP/1.x code" header was throwing a NOTICE about undefined index on the result of the explode() call) and storage; added FauxResponse::getStatusCode() to retrieve it

12 years agoHashar seems to have missed one occurence of OutputPage::getStatusMessage() in r91425
Alexandre Emsenhuber [Tue, 5 Jul 2011 14:37:22 +0000 (14:37 +0000)]
Hashar seems to have missed one occurence of OutputPage::getStatusMessage() in r91425

12 years ago(bug 5800) Added $formCallback as a parameter to the hook EditPage::showEditForm...
Chad Horohoe [Tue, 5 Jul 2011 12:48:46 +0000 (12:48 +0000)]
(bug 5800) Added $formCallback as a parameter to the hook EditPage::showEditForm:initial

12 years agoRemoved usage of error suppression operator
Alexandre Emsenhuber [Tue, 5 Jul 2011 11:08:05 +0000 (11:08 +0000)]
Removed usage of error suppression operator

12 years agoRemoved CategoryViewer::getSkin() and replaced by static calls to Linker; no use...
Alexandre Emsenhuber [Tue, 5 Jul 2011 10:45:03 +0000 (10:45 +0000)]
Removed CategoryViewer::getSkin() and replaced by static calls to Linker; no use in extensions.

12 years agoAdded percentages to ProfilerSimpleText
Aaron Schulz [Tue, 5 Jul 2011 06:39:07 +0000 (06:39 +0000)]
Added percentages to ProfilerSimpleText

12 years ago(follow-up r91436) add new hook to hooks.txt
Brian Wolff [Tue, 5 Jul 2011 05:33:54 +0000 (05:33 +0000)]
(follow-up r91436) add new hook to hooks.txt

I totally updated the doc file, and then committed my other changes without the doc file.

12 years ago(Follow-up r90759 per CR) Use a hook to register new Collations instead of just takin...
Brian Wolff [Tue, 5 Jul 2011 05:30:04 +0000 (05:30 +0000)]
(Follow-up r90759 per CR) Use a hook to register new Collations instead of just taking the collation name as a class name

12 years ago* Added getFileVersion()/setFileVersion() functions to OutputPage
Aaron Schulz [Tue, 5 Jul 2011 05:23:26 +0000 (05:23 +0000)]
* Added getFileVersion()/setFileVersion() functions to OutputPage
* Removed getDisplayedFile() from FlaggedPage and simplified getFile()
* Cleaned up getIncludeParams() to just do formatting
* Made template/file IDs mandatory for RevisionReviewFormUI

12 years agoFollow-up r91432: I always forget release notes..
Robin Pepermans [Tue, 5 Jul 2011 01:51:12 +0000 (01:51 +0000)]
Follow-up r91432: I always forget release notes..

12 years ago(see bug 29712) Removing the defaultUserOptionOverrides in MessagesXx.php because...
Robin Pepermans [Tue, 5 Jul 2011 01:26:49 +0000 (01:26 +0000)]
(see bug 29712) Removing the defaultUserOptionOverrides in MessagesXx.php because it is broken (and has been for a long time) and secondly, it is only used for things that can be done otherwise:
* 'editfont' => 'sans-serif'; -> trivial (can be set in CSS)
* 'underline' => 0; by languages written in scripts that are hard to read with underlines -> now set in shared.css, which makes it work also when they are used as interface language (note that [lang="xx"] is not yet present on wikitext content by default but will be soon as part of my work on RTL improvements)
* 'quickbar' => 2; by RTL languages. For this, I introduced a new option (5) that sets left/right according to the directionality of your interface language (and automatic is better than setting it in MessagesXx files!). Note that the broken feature was in this case "corrected" by CSS flipping, causing preferences to say "left" while it was actually "right". This commit fixes that bug as well.
Third, it actually would have made more sense to have it them load for wgLang instead of wgContLang, but that's not possible because wgLang is itself dependent on preferences

12 years agoFollowup r89617, r91428 call $pager->doQuery explicitally so we get a set result...
Sam Reed [Tue, 5 Jul 2011 00:09:09 +0000 (00:09 +0000)]
Followup r89617, r91428 call $pager->doQuery explicitally so we get a set result object, from which, we can then get a row count

Expliticly marking doQuery() in pager as public

12 years agousing proper margin heights: 14 + 68 * 2 = 150
Ryan Kaldari [Mon, 4 Jul 2011 23:43:23 +0000 (23:43 +0000)]
using proper margin heights: 14 + 68 * 2 = 150

12 years agoRevert r90678 per CR
Krinkle [Mon, 4 Jul 2011 23:36:54 +0000 (23:36 +0000)]
Revert r90678 per CR

12 years agobetter fix for bug 27338 - doesnt rely on line-height
Ryan Kaldari [Mon, 4 Jul 2011 21:30:09 +0000 (21:30 +0000)]
better fix for bug 27338 - doesnt rely on line-height

12 years agofixing rounding problem, per comment at r82309
Ryan Kaldari [Mon, 4 Jul 2011 21:05:27 +0000 (21:05 +0000)]
fixing rounding problem, per comment at r82309

12 years agoHTTP status messages move: OutputPage -> HttpStatus
Antoine Musso [Mon, 4 Jul 2011 21:01:19 +0000 (21:01 +0000)]
HTTP status messages move: OutputPage -> HttpStatus

OutputPage::getStatusMessage() is a method to convert a numeric HTTP status
code to an english message.  It does not really belong to the OutputPage were
it was for historical reason.
This patch move the basic function to a non MediaWiki dependant class in our
directory includes/libs.  We could potentially enhances it, but I do not see
any use cases for us yet.
I have renamed the method to the shorter 'getMessage' since the word 'status'
is now in the class name.

Summary of changes:
* OutputPage::getStatusMessage becomes HttpStatus::getMessage
* Method moved to the new includes/libs/HttpStatus.php
* Autoloader updated
* History kept by using 'svn copy'
* No functional changes
* No input/output format changes
* Old occurences modified in phase3
* OutputPage::getStatusMessages() marked as deprecated

PHPUnit test suite is fine.
Tested manually using a redirection

12 years agomediawiki.util.test.js: TestSwarm reports breakage in Chrome4-Linux
Krinkle [Mon, 4 Jul 2011 20:11:55 +0000 (20:11 +0000)]
mediawiki.util.test.js: TestSwarm reports breakage in Chrome4-Linux
- It only appears on Linux not in Mac OS X with the same Chrome version
- Adding extra checks and stops() in attempt to get a more useful report than then sudden stop at:
http://toolserver.org/~krinkle/testswarm/?state=runresults&run_id=1258&client_id=3092#

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Mon, 4 Jul 2011 20:11:46 +0000 (20:11 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-04 19:53:00 UTC)

12 years agotests for Html::testExpandAttributes()
Antoine Musso [Mon, 4 Jul 2011 19:51:35 +0000 (19:51 +0000)]
tests for Html::testExpandAttributes()

FIXME: seems a code duplication of Xml::expandAttributes()

follow up r81571 (skip attributes with null value)

12 years agoRemoved doPurge() from ImagePage.php, already moved to WikiFilePage
Aaron Schulz [Mon, 4 Jul 2011 19:19:36 +0000 (19:19 +0000)]
Removed doPurge() from ImagePage.php, already moved to WikiFilePage

12 years agoRevert old page navigation back to a subtitle
Antoine Musso [Mon, 4 Jul 2011 19:17:36 +0000 (19:17 +0000)]
Revert old page navigation back to a subtitle

Please reapply to trunk for inclusion in 1.19.

reverts r85322 & r90883

12 years agojquery.client unit testing
Krinkle [Mon, 4 Jul 2011 19:11:08 +0000 (19:11 +0000)]
jquery.client unit testing
- More elaborate caching in the plugin in order for the code to be testable
- Added support for passing custom user agents (although the default behavior remains unchanged)
- Added support for passing custom profile-objects to $.client.test
- Added test case for all supported browsers according to http://www.mediawiki.org/wiki/Compatibility#Browser
- Replaced userAgent.toLowerCase() with userAgent since this string was already converted to lower case a few lines up

This will likely prevent bugs like bug 27652 and bug 29446.

12 years ago(bug 29109) Allow the automatic edit summary for redirect creation
Brian Wolff [Mon, 4 Jul 2011 17:03:09 +0000 (17:03 +0000)]
(bug 29109) Allow the automatic edit summary for redirect creation
show the first bit of the new redirect page.

Adds $2 to the autoredircomment (not used by default) that contains the first 150-ish characters of the newly created redirect page.

Meant so that the Wikipedian's can see their {{R from foo}} templates.

12 years ago* Removed usage of error suppression operator in includes/db
Alexandre Emsenhuber [Mon, 4 Jul 2011 15:00:30 +0000 (15:00 +0000)]
* Removed usage of error suppression operator in includes/db
* Changed an usage of $_REQUEST to $wgRequest

12 years agoUse WebRequest::getValues() instead of raw $_REQUEST
Alexandre Emsenhuber [Mon, 4 Jul 2011 14:40:17 +0000 (14:40 +0000)]
Use WebRequest::getValues() instead of raw $_REQUEST

12 years agoAllow SqlBagOStuff data to be split over many tables, to avoid lock contention perfor...
Tim Starling [Mon, 4 Jul 2011 12:01:10 +0000 (12:01 +0000)]
Allow SqlBagOStuff data to be split over many tables, to avoid lock contention performance issues on servers with a high write load. See bugs.mysql.com/bug.php?id=61735 and http://bugs.mysql.com/bug.php?id=61736 .

12 years agoFix for r90337 and r90743: Use $this->title instead of $wgTitle, also groupped global...
Alexandre Emsenhuber [Mon, 4 Jul 2011 08:40:41 +0000 (08:40 +0000)]
Fix for r90337 and r90743: Use $this->title instead of $wgTitle, also groupped global declarations at the top

12 years agoChanged calls to Linker::tooltipAndAccesskeyAttribs() to be static and fixed casing...
Alexandre Emsenhuber [Mon, 4 Jul 2011 08:28:27 +0000 (08:28 +0000)]
Changed calls to Linker::tooltipAndAccesskeyAttribs() to be static and fixed casing in method's name

12 years agoFix for the broken tests introduced in r91387.
Krinkle [Sun, 3 Jul 2011 23:24:51 +0000 (23:24 +0000)]
Fix for the broken tests introduced in r91387.

Check input before assuming there are no arguments and the values object is expected.

12 years agoAdding tests for expected reponse when passing invalid values to Map.get
Krinkle [Sun, 3 Jul 2011 23:22:50 +0000 (23:22 +0000)]
Adding tests for expected reponse when passing invalid values to Map.get
* These are currently @broken
* Map.get should (as documented) handle an object for multiple or a string for a single selection and return the value(s). Right now, however, the function returns the values object if the first two if-cases are not matched. It needs an additional check to verify that there are indeed no arguments passed.
* Adding comments in the test suite

12 years agoMinor optimalizations and jsperfs in mediawiki.js
Krinkle [Sun, 3 Jul 2011 23:13:11 +0000 (23:13 +0000)]
Minor optimalizations and jsperfs in mediawiki.js
* Use strict comparison to undefined where possible (arguments and object/array members)
* Make sure $ is not implied global (using jQuery.isFunction at the bottom instead of creating another 1-line closure)

12 years agoUse Linker::linkKnown per Siebrand on r91377.
Robin Pepermans [Sun, 3 Jul 2011 20:37:57 +0000 (20:37 +0000)]
Use Linker::linkKnown per Siebrand on r91377.

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sun, 3 Jul 2011 20:01:47 +0000 (20:01 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-03 19:50:00 UTC)

12 years agoenhance tests name (for --testdox option)
Antoine Musso [Sun, 3 Jul 2011 18:09:30 +0000 (18:09 +0000)]
enhance tests name (for --testdox option)

12 years agoChanging back to $wgUser in SpecialImport.php. Importing pages returned "call to...
Robin Pepermans [Sun, 3 Jul 2011 17:56:59 +0000 (17:56 +0000)]
Changing back to $wgUser in SpecialImport.php. Importing pages returned "call to undefined method ImportReporter::getSkin()" due to r91246.

12 years agosplit tests for ArticleTest
Antoine Musso [Sun, 3 Jul 2011 17:51:11 +0000 (17:51 +0000)]
split tests for ArticleTest

12 years agoLocalisation updates for core and extension messages from translatewiki.net (2011...
Raimond Spekking [Sat, 2 Jul 2011 20:52:25 +0000 (20:52 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-07-02 20:44:00 UTC)

12 years agoMoved doCascadeProtectionUpdates() to WikiPage.php
Aaron Schulz [Sat, 2 Jul 2011 17:45:32 +0000 (17:45 +0000)]
Moved doCascadeProtectionUpdates() to WikiPage.php

12 years agoFix for r91344: removed straggling instances of $this->special in item classes
Aaron Schulz [Sat, 2 Jul 2011 17:27:48 +0000 (17:27 +0000)]
Fix for r91344: removed straggling instances of $this->special in item classes

12 years agoBug #29699: Minor adjustments to Vector search button
Mark A. Hershberger [Sat, 2 Jul 2011 16:12:07 +0000 (16:12 +0000)]
Bug #29699: Minor adjustments to Vector search button

Patch from Erwin Dokter as an alternative(?) to r73427.

Applying here so that it can be tested and compared.

12 years agoThe User object parameter of WikiPage::doRollback() and WikiPage::commitRollback...
Alexandre Emsenhuber [Sat, 2 Jul 2011 15:10:39 +0000 (15:10 +0000)]
The User object parameter of WikiPage::doRollback() and WikiPage::commitRollback() was not passed by the Article implementation because it was not present.
While I'm a it, WikiPage::doRollback() and WikiPage::commitRollback() now require that parameter, moved the check to Article.

12 years agoRemoved one hidden usage of $wgUser
Alexandre Emsenhuber [Sat, 2 Jul 2011 14:53:01 +0000 (14:53 +0000)]
Removed one hidden usage of $wgUser

12 years agoMoved action=rollback to an Action subclass
Alexandre Emsenhuber [Sat, 2 Jul 2011 13:46:56 +0000 (13:46 +0000)]
Moved action=rollback to an Action subclass