Alexandre Emsenhuber [Thu, 23 Jun 2011 18:42:51 +0000 (18:42 +0000)]
Fix for r86722: pass the message 'dberrortext' unescaped to the output since it contains. I really don't like to pass unescaped messages to the output *sigh*
Derk-Jan Hartman [Thu, 23 Jun 2011 17:20:54 +0000 (17:20 +0000)]
Set window.wgMonthNamesShort before we start the tests, to be able to pass added-globals detection.
Follow up to r90655
Derk-Jan Hartman [Thu, 23 Jun 2011 17:12:36 +0000 (17:12 +0000)]
Fix global var leaking that was making collationsort fail on Safari 5
Followup to r86088.
Matěj Grabovský [Thu, 23 Jun 2011 15:25:07 +0000 (15:25 +0000)]
wfArrayToCGI() and wfCgiToArray() now handle nested and associative arrays almost correctly
The only problem is that all the indexes have to be set, thus "key[]=value" won't get parsed correctly and array( 'key' => array( 'value' ) ) will transform to "key[0]=value".
Related bug 28928 and bug 22989.
Sam Reed [Thu, 23 Jun 2011 09:26:48 +0000 (09:26 +0000)]
Followup r85596, recursiveTagParse returns a string, not a parser output object
Leo Koppelkamm [Thu, 23 Jun 2011 08:31:00 +0000 (08:31 +0000)]
Adding rowspan tests to tablesorting & make it more stable
Leo Koppelkamm [Thu, 23 Jun 2011 07:39:56 +0000 (07:39 +0000)]
Adding a collation test to tablesorter, fixing var ref from r90630
Brian Wolff [Thu, 23 Jun 2011 04:57:14 +0000 (04:57 +0000)]
Someone on irc had a very screwed up DB, and he reported that the updater gave a fatal error
when trying to update (appearently did not have a recentchanges table, and one of the db
functions returned false, which the updater did not expect). Add check for that since I figure
an exception is much better than a fatal error.
The relavent error this potentially stops is:
Fatal error: Call to a member function isMultipleKey() on a non-object in /../includes/installer/MysqlUpdater.php on line 249"
Not sure if the updater should do something better than an exception, but it seems like
a much better situation than the fatal.
In practise, I think it is rare that this situation would arise.
Tim Starling [Thu, 23 Jun 2011 03:14:11 +0000 (03:14 +0000)]
General database-related code cleanup:
* Merged the 4 simulated implementations of Database*::replace(). I took diffs, they were nearly identical. I made one based on the IBM DB2 version, since it used insert() which looked like a nice touch.
* Provided the non-simulated implementation of Database*::replace() via a protected member function, and made DatabaseMysql::replace() and DatabaseSqlite::replace() into a wrapper for it.
* Moved the MySQL-specific functionality from masterPosWait(), getSlavePos() and getMasterPos() from DatabaseBase to DatabaseMysql.
* Renamed getStatus() to getMysqlStatus() and moved it to DatabaseMysql. Removed "unimplemented" errors from two other subclasses. Really there's no way another DBMS could or should implement this function.
* Split the LoadMonitor class into a no-op class and a MySQL-specific class, to avoid fatal errors due to the getMysqlStatus() call if other DBMSs tried to use LoadBalancer with multiple servers. Of course there are lots of other reasons it won't work, I'm just fixing the architecture issue here.
And while I have a replicated test setup handy:
* On MySQL 4.1.9 and later, use SHOW SLAVE STATUS to get the lag instead of SHOW PROCESSLIST. This has the advantage of reading zero when there are no events for a while.
Brion Vibber [Thu, 23 Jun 2011 00:37:23 +0000 (00:37 +0000)]
Followup r86088: test cases and a correction for bug 17141 (IPv4 address sorting)
Test lists 8 randomly generated IPv4 addresses and attempts to sort them both forward and back.
Turned up a bug where single-digit octets (eg a .1 or .9) were not expanded in the sort key, causing them to mis-sort.
Brion Vibber [Wed, 22 Jun 2011 23:47:29 +0000 (23:47 +0000)]
Followup r90595, r90626: remove async magic from table sorter tests now that the setTimeout has been removed from the sorting click handler. Keeps things a little simpler and more reliable. :)
Leo Koppelkamm [Wed, 22 Jun 2011 23:22:12 +0000 (23:22 +0000)]
Revert accidental change from r90630
Brion Vibber [Wed, 22 Jun 2011 23:19:00 +0000 (23:19 +0000)]
Followup r86088, r87244, r90612: fix jquery.tablesorter for null collation table on IE
Attempt to build a regex from an empty list failed when calling new RegEx('[]', 'ig') on IE 6/7/8.
Now allowing null for the object, and also not trying to create the regex even if we have an empty object just in case.
Leo Koppelkamm [Wed, 22 Jun 2011 23:03:12 +0000 (23:03 +0000)]
Tablesorter: Remove not really necessary setTimeout.
Brion Vibber [Wed, 22 Jun 2011 22:24:49 +0000 (22:24 +0000)]
Followup r87243: qunit test cases for bug 28775 (German-style date sorting)
Leo Koppelkamm [Wed, 22 Jun 2011 22:21:57 +0000 (22:21 +0000)]
Hopefully fix IE6 regex tablesorter issue
Sam Reed [Wed, 22 Jun 2011 22:13:53 +0000 (22:13 +0000)]
require_once( dirname( dirname( __FILE__ ) ) . '/includes/upload/UploadFromUrlTest.php' );
Followup r90607
Sam Reed [Wed, 22 Jun 2011 22:11:31 +0000 (22:11 +0000)]
require_once dirname( dirname( __FILE__ ) ) . '/api/ApiSetup.php';
Followup r90607
Krinkle [Wed, 22 Jun 2011 22:04:00 +0000 (22:04 +0000)]
Fix dependancy order (before instead of after the main module).
Brion Vibber [Wed, 22 Jun 2011 21:56:18 +0000 (21:56 +0000)]
Followup r90595: Tweak tablesorter tests so they run on r86088 version of jquery.tablesorter.js -- which actually passes these tests. The key regressions appear to have come in in r86337.
Leo Koppelkamm [Wed, 22 Jun 2011 21:54:18 +0000 (21:54 +0000)]
Fix tablesorting bug that caused weird interferences between two tables; Make regex more strict to avoid mismatches. All QUnit tests pass now
Chad Horohoe [Wed, 22 Jun 2011 21:48:46 +0000 (21:48 +0000)]
Make Maintenance::error() more useful in dying situations by turning the second parameter into an int to allow dying errors to specify an exit code. Bool t/f will still work for b/c
Sam Reed [Wed, 22 Jun 2011 21:38:02 +0000 (21:38 +0000)]
Fix code style
Platonides [Wed, 22 Jun 2011 21:36:42 +0000 (21:36 +0000)]
Remove unused global $wgContLang
Sam Reed [Wed, 22 Jun 2011 21:34:18 +0000 (21:34 +0000)]
Move upload tests to upload folder
Sam Reed [Wed, 22 Jun 2011 21:32:42 +0000 (21:32 +0000)]
Kill var_dump from r90603
Krinkle [Wed, 22 Jun 2011 21:27:12 +0000 (21:27 +0000)]
New mediawiki.page modules
First step towards cleaning up mw.util.init and removing bugus dependancies on mediawiki.util which are just added there in order to load them on every page and do something on-load.
Introducing mediawiki.page.startup (in the head) and mediawiki.page.ready (on the bottom)
Moved the following to them:
* document.ready from jquery.cient
-- Shouldn't have been in the plugin itself in the first place
* jquery.placeholder
* jquery.makeCollapsible
* mediawiki.action.view.tablesorting
* jquery.checkboxShiftClick
(This also solves part of bug 26799)
Platonides [Wed, 22 Jun 2011 21:07:48 +0000 (21:07 +0000)]
Follow up r86623. Remember to add the proper wfProfileOut when you add a new path to exit a profiled function.
Platonides [Wed, 22 Jun 2011 21:02:07 +0000 (21:02 +0000)]
Readd r90538, this time with the missing global $wgHooks;
Derk-Jan Hartman [Wed, 22 Jun 2011 20:40:00 +0000 (20:40 +0000)]
Fix global var leaks in jquery.tablersorter.js
Raimond Spekking [Wed, 22 Jun 2011 20:28:03 +0000 (20:28 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-22 20:10:00 UTC)
Brion Vibber [Wed, 22 Jun 2011 19:30:31 +0000 (19:30 +0000)]
Add initial QUnit JS test cases for jquery.tablesorter -- NOTE THERE ARE IN FACT REGRESSIONS FROM 1.17 VISIBLE HERE!
The numeric sorting doesn't work correctly, and the alphabetic sorting sometimes returns wrong results.
Alexandre Emsenhuber [Wed, 22 Jun 2011 18:24:58 +0000 (18:24 +0000)]
Updated calls to Linker to call them statically and removed useless parameter to OutputPage::getSkin()
Alexandre Emsenhuber [Wed, 22 Jun 2011 18:02:28 +0000 (18:02 +0000)]
Removed usage of error suppression operator
Alexandre Emsenhuber [Wed, 22 Jun 2011 17:45:31 +0000 (17:45 +0000)]
Removed hidden usage of $wgTitle in parser and the workarround in ExtraParserTest.php
Matěj Grabovský [Wed, 22 Jun 2011 14:59:05 +0000 (14:59 +0000)]
Follow-up r90482: escape some more wikitext
Matěj Grabovský [Wed, 22 Jun 2011 14:51:25 +0000 (14:51 +0000)]
Follow-up r90359: modify code per Krinkle's comments
Jure Kajzer [Wed, 22 Jun 2011 14:10:55 +0000 (14:10 +0000)]
* removed DEFAULT '' NOT NULL constraints as '' is internaly converted to NULL in Oracle and throws an error
* fixed tableName handling doSchemaUpgrade17 (must be careful to avoid multiple tableName calls as names don't get taged in DDL mode)
* exit/reenter DDL mode on updatelog inserts
Matěj Grabovský [Wed, 22 Jun 2011 13:35:24 +0000 (13:35 +0000)]
Follow-up r90369: Add third parameter to filetype-unwanted-type (for PLURAL)
Also use params() insted of numParams() on an ocassion, as it's not really needed there
Robin Pepermans [Wed, 22 Jun 2011 13:10:46 +0000 (13:10 +0000)]
Directionality improvements as part of bug 6100 (under $wgBetterDirectionality) for the File namespace:
* exclude File namespace from div with lang & dir attributes, since most information on file pages is in the user language
* add <div id="mw-imagepage-content"> around the actual wikitext that is in the content language
Sam Reed [Wed, 22 Jun 2011 00:37:34 +0000 (00:37 +0000)]
Fix comment formatting
Chad Horohoe [Wed, 22 Jun 2011 00:01:15 +0000 (00:01 +0000)]
Provisional revert of r90538. I can't replicate the failures, but CI's been complaining since this commit
Sam Reed [Tue, 21 Jun 2011 23:28:50 +0000 (23:28 +0000)]
Followup r90261
Restore returning old value
Chad Horohoe [Tue, 21 Jun 2011 21:38:29 +0000 (21:38 +0000)]
*grumble grumble* stupid fime on r90192
Chad Horohoe [Tue, 21 Jun 2011 21:14:26 +0000 (21:14 +0000)]
Followup r90020: use startid for consistency, and document endid
Raimond Spekking [Tue, 21 Jun 2011 20:39:02 +0000 (20:39 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-21 20:15:00 UTC)
Alexandre Emsenhuber [Tue, 21 Jun 2011 20:05:00 +0000 (20:05 +0000)]
Simplify checks by using wfMessage() instead of wfEmptyMsg()
Platonides [Tue, 21 Jun 2011 17:41:25 +0000 (17:41 +0000)]
UploadTest::testTitleValidation accessed the database to fetch the interwikis.
phase3/includes/upload/UploadBase.php:620
phase3/tests/phpunit/includes/UploadTest.php:120
phase3/tests/phpunit/includes/UploadTest.php:55
phase3/tests/phpunit/includes/UploadTest.php:35
$wgContLang not needed, TitlePermissionTest.php changes the language, inheriting from MediaWikiLangTestCase
Platonides [Tue, 21 Jun 2011 15:13:03 +0000 (15:13 +0000)]
Follow up with the problem noted in r90530.
You can't pass the result of a function to reset(), since it expects a reference.
Those random errors show now as UploadStashFileException: error storing file in
'tests/phpunit/includes/upload/bug29408.': fileexistserror images/temp/0/02/
20110621151405!bug29408.
because it gets run twice in the same second.
Platonides [Tue, 21 Jun 2011 15:06:59 +0000 (15:06 +0000)]
Revert r90483, if tesla has problems, it should get proper permissions to the affected folders (or change the test to use a temp folder)
The test was not consistent, since first time it would use the svn file, which renames it... and on next run it would be missing!
I added the '.' to the unlik() step so it properly cleans up. Opened bug 29512 for the strange UploadStash behavior.
However, although it passes now most of the times, it sometimes fails with the strange exception:
Only variables should be passed by reference
phase3/includes/upload/UploadStash.php:143
phase3/tests/phpunit/includes/upload/UploadStashTest.php:22
phase3/tests/phpunit/MediaWikiTestCase.php:64
phase3/tests/phpunit/MediaWikiPHPUnitCommand.php:20
phase3/tests/phpunit/phpunit.php:60
Rotem Liss [Tue, 21 Jun 2011 14:12:15 +0000 (14:12 +0000)]
Localization update for he.
Robin Pepermans [Tue, 21 Jun 2011 12:16:01 +0000 (12:16 +0000)]
Fix r90500: move release note from API to bug fixes section
Robin Pepermans [Tue, 21 Jun 2011 10:14:34 +0000 (10:14 +0000)]
* Improvements as part of bug 6100: Use wfUILang() instead of $wgContLang where appropriate
* Remove $wgContLang in SpecialVersion per r90302
Robin Pepermans [Tue, 21 Jun 2011 09:45:06 +0000 (09:45 +0000)]
Per comment by Platonides on r90337: use wfGetLangObj() instead of Language::factory() and this->mPageLanguage is not needed
Alexandre Emsenhuber [Tue, 21 Jun 2011 07:43:27 +0000 (07:43 +0000)]
* Made $useDB parameter of wfMsgGetKey() optional as in wfMsgReal() and removed it where possible
* Removed it from the call to wfMsgReal() in wfMsg() too
Neil Kandalgaonkar [Tue, 21 Jun 2011 03:40:53 +0000 (03:40 +0000)]
create images with orientation (had to use exiv2 hack, imagemagick not helpful)
Chad Horohoe [Tue, 21 Jun 2011 01:13:45 +0000 (01:13 +0000)]
(bug 29492) Long-running steps in the installer (such as Upgrade and Install) can sometimes timeout
Brian Wolff [Mon, 20 Jun 2011 23:59:38 +0000 (23:59 +0000)]
(bug 29507) Change 'image link' to 'file link' in Special:Whatlinkshere
aka change english translation of 'isimage' message to file link.
Aaron Schulz [Mon, 20 Jun 2011 23:21:24 +0000 (23:21 +0000)]
* Cleaned up tableNamesWithUseIndexOrJOIN() and removed some duplicated code
* Avoid @ operator in selectSQLText()
* Use array typecasting instead of manual checks
Sam Reed [Mon, 20 Jun 2011 22:32:08 +0000 (22:32 +0000)]
* (bug 29278) server error 500 when attempting to add text to a page via redirect (redirect points to the page and page is edited)
Needs 1.17 and 1.18 backporting, so release notes will go in 1.17
Sam Reed [Mon, 20 Jun 2011 22:18:11 +0000 (22:18 +0000)]
Revert r90488, rename variable from r90487
Sam Reed [Mon, 20 Jun 2011 22:16:22 +0000 (22:16 +0000)]
Followup r90487, kill $result=null in middle
Sam Reed [Mon, 20 Jun 2011 22:13:45 +0000 (22:13 +0000)]
Define a local variable for $result
Aaron Schulz [Mon, 20 Jun 2011 21:13:33 +0000 (21:13 +0000)]
Code cleanups to ListFiles including r85548
Chad Horohoe [Mon, 20 Jun 2011 20:24:53 +0000 (20:24 +0000)]
Mark test incomplete for a legitimate reason like trying to serialize a PDO object--rather than imaginary ones such as blaming memory_limit being too low when the test was being stupid and lowering it for us.
Matěj Grabovský [Mon, 20 Jun 2011 19:45:35 +0000 (19:45 +0000)]
Follow-up r90371, per comment by ^demon
Escape wikitext in username before passing it to certain messages; also remove <nowiki>s in those as they're superfluous.
Raimond Spekking [Mon, 20 Jun 2011 18:56:46 +0000 (18:56 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-20 18:39:00 UTC)
Alexandre Emsenhuber [Mon, 20 Jun 2011 18:55:17 +0000 (18:55 +0000)]
Moved action=info to an Action subclass; also changed display to use a table (a bit like Special:Statistics) with a column for the page and one for the talk page
Sam Reed [Mon, 20 Jun 2011 13:57:22 +0000 (13:57 +0000)]
Expand return documentation for r84357
Tim Starling [Mon, 20 Jun 2011 12:09:22 +0000 (12:09 +0000)]
Followup r90429:
* Reverted the public -> protected changes from r90429, except for doQuery() after a review of usage:
** resultObject() is used by lots of things in core and extensions.
** makeSelectOptions() is used by SMW, and if that's going to be public, the other two probably should be too, for consistency.
** doQuery() was used by several things, but mostly by mistake. It's been marked private since r21359 which is before almost all of them. I updated the callers to use query().
* Added "protected" to doQuery() declarations in other database classes.
Niklas Laxström [Mon, 20 Jun 2011 10:19:52 +0000 (10:19 +0000)]
Fu r90453. Updates comments
Niklas Laxström [Mon, 20 Jun 2011 10:04:55 +0000 (10:04 +0000)]
Proposed fix for bug 29450. Don't use the current user's gender for invalid users.
Any ideas how to write tests for this?
Niklas Laxström [Mon, 20 Jun 2011 09:35:44 +0000 (09:35 +0000)]
Partial revert of r86734: restore mPrefix - I still don't know what it does
Alexandre Emsenhuber [Mon, 20 Jun 2011 08:07:50 +0000 (08:07 +0000)]
Fix for r90406: giving an OutputPage object instead of an User object is not really a good idea
Alexandre Emsenhuber [Mon, 20 Jun 2011 07:45:19 +0000 (07:45 +0000)]
Fix for r90429: removed call to protected method
Tim Starling [Mon, 20 Jun 2011 07:40:07 +0000 (07:40 +0000)]
Revert the dbname -> dbName part of r90430. dbname actually dates back to r32578 and is referenced in the documentation for $wgDBservers, so it can't be easily changed. We can still kill tablename though, it's not too late.
Alexandre Emsenhuber [Mon, 20 Jun 2011 07:26:14 +0000 (07:26 +0000)]
Removed deprecated functions wfMsgNoDB(), wfMsgNoDBForContent() and wfMsgWeirdKey(); no remaining use in core or extensions.
Tim Starling [Mon, 20 Jun 2011 07:19:20 +0000 (07:19 +0000)]
Fix for fatal error in r90429: you can't have a protected function in an interface.
Tim Starling [Mon, 20 Jun 2011 07:16:09 +0000 (07:16 +0000)]
Fix for r72150: rename getSchema() to getSchemaPath(). This terminology creates an unfortunate and potentially confusing conflict with the PostgreSQL usage of the term. At some point in the future I'd like to have a getSchema() that gives you the PostgreSQL schema name ($wgDBmwschema). Strictly speaking, tables.sql is not a schema, it's an SQL file that creates a schema.
Tim Starling [Mon, 20 Jun 2011 07:00:50 +0000 (07:00 +0000)]
Fixes for r80864 for 1.18 backport:
* Use camel case in tableName and dbName, dontrunallyourwordstogetherlikethis
* Call the function factory() instead of newFromType(), for consistency with the rest of MediaWiki
Tim Starling [Mon, 20 Jun 2011 06:52:44 +0000 (06:52 +0000)]
In Database.php:
* Improved function documentation and doxygen output. Wrote extensive documentation for DatabaseBase::select().
* Broke some long lines.
* Made doQuery(), makeSelectOptions(), makeInsertOptions(), makeUpdateOptions() and resultObject() protected instead of public. Fixed a caller of doQuery(), the only one I could find in core and extensions.
* In Database::query(), removed some commented-out code, and made the comment style consistent within the function.
Bryan Tong Minh [Sun, 19 Jun 2011 21:38:58 +0000 (21:38 +0000)]
(bug 29471) Exception thrown for files with invalid date in metadata
MediaWiki doesn't handle BC dates nicely, so check for that.
Platonides [Sun, 19 Jun 2011 21:05:26 +0000 (21:05 +0000)]
Use [] instead of { } for accessing string characters
Raimond Spekking [Sun, 19 Jun 2011 20:15:33 +0000 (20:15 +0000)]
Localisation updates for core and extension messages from translatewiki.net (2011-06-19 20:06:00 UTC)
Platonides [Sun, 19 Jun 2011 19:39:54 +0000 (19:39 +0000)]
HTTP name
Platonides [Sun, 19 Jun 2011 18:53:55 +0000 (18:53 +0000)]
Follow up r90334.
Removes the space after the class name in $wgBetterDirectionality = false,
I think it is clearer to have the variable to hold the classes, instead of the *additional* classes.
Renamed to be clearer and be camelCase.
Added redundant htmlspecialchars() and spaces.
Raimond Spekking [Sun, 19 Jun 2011 18:50:58 +0000 (18:50 +0000)]
Followup r90385: Add new message key here too
Chad Horohoe [Sun, 19 Jun 2011 18:46:03 +0000 (18:46 +0000)]
Remove another empty test, courtesy of r65504.
Philip Tzou [Sun, 19 Jun 2011 18:10:24 +0000 (18:10 +0000)]
Update Chinese conversion tables.
Matěj Grabovský [Sun, 19 Jun 2011 18:07:13 +0000 (18:07 +0000)]
(bug 29342) Patrol preferences shouldn't be visible to users who don't have patrol permissions
Also show 'minordefault' only to those who can 'minoredit'
Chad Horohoe [Sun, 19 Jun 2011 17:38:02 +0000 (17:38 +0000)]
Fix up a couple of uses of context->object instead of context->getObject(). Fixes bug 29491
Robin Pepermans [Sun, 19 Jun 2011 14:27:55 +0000 (14:27 +0000)]
Change $wgContLang->getDirMark() to wfUILang()->getDirMark() (improvement when $wgBetterDirectionality is enabled)
Siebrand Mazeland [Sun, 19 Jun 2011 13:44:48 +0000 (13:44 +0000)]
Align text right to ensure that the icons are pushed to the margin, and do not line left with the beginning of text as observed in translatewiki.net.
Alexandre Emsenhuber [Sun, 19 Jun 2011 12:57:31 +0000 (12:57 +0000)]
Moved wfIsLocallyBlockedProxy() to User::isLocallyBlockedProxy() to put it near other proxy checks. No other call to that function in core or extension.
Also added a check to not execute a part of User::getBlockedStatus() if $ip is null.
Aaron Schulz [Sun, 19 Jun 2011 09:27:08 +0000 (09:27 +0000)]
Added back some rounding code lost in r90385
Aaron Schulz [Sun, 19 Jun 2011 08:32:19 +0000 (08:32 +0000)]
More doc typos from r90385...coding at 4AM :)
Aaron Schulz [Sun, 19 Jun 2011 07:28:37 +0000 (07:28 +0000)]
Fixed doc typo in r90385
Aaron Schulz [Sun, 19 Jun 2011 07:25:55 +0000 (07:25 +0000)]
* Added (and use) $format param to formatTimePeriod() to make output less verbose for ValidationStatistics_body.php
* Small w/s changes to FlaggedRevsStats.php
Brian Wolff [Sun, 19 Jun 2011 05:45:40 +0000 (05:45 +0000)]
(bug 29485) For rss feed of the RC, it groups consecutive edits by same user, but then links
to the diff of only one edit, instead of all of the grouped edits (but displays the combined diff directly in feed)
Also well I'm here, make it not group new page creation with subsequent edit, because that doesn't really work right.
Matěj Grabovský [Sat, 18 Jun 2011 21:57:40 +0000 (21:57 +0000)]
(bug 29437) Multiple apostrophes in deleted article title cause odd rendering
Fixed by wrapping the username in corresponding messages in <nowiki>