Commit graph

41478 commits

Author SHA1 Message Date
Aaron Schulz
783f7f0bd3 [FileBackend] Made doOperations() Status handling align with documentation as well as what FileRepo is essentially expecting when using the 'force' option (it assumes fatals are for total batch failures, not just partial ones). The relevant documentation was also improved. 2012-03-08 22:31:04 +00:00
Marcin Cieślak
94633ff448 PostgreSQL: Improve SQL error handling
After a query error, PostgreSQL transaction is aborted
until it's terminated or the query is closed. 

All further queries result in:

  ERROR: current transaction is aborted, commands ignored 
  until end of transaction block

Those subsequent errors are ignored by double fault handling in
DatabaseBase::reportQueryError but they cause all localization
of error messages to fail (unable to issue queries to message
tables) and errors lke


This resulted in a broken MediaWiki screen with

  <databaseerror>
  <dberrortext>

instead of localized error message.

We need to fully reset database connection because after
pg_connection_reset() various session parameters need to
be set again (like "search_path"), otherwise tables will not be
found.

   ERROR: relation "msg_resource" does not exist
   ERROR:  relation "l10n_cache" does not exist
2012-03-08 21:44:03 +00:00
Alexandre Emsenhuber
d8ef87afbf * (bug 35019) Fix for rr99942: edit summaries are no longer transformed in notification e-mails 2012-03-08 21:39:13 +00:00
Robin Pepermans
9184dc83d6 Update core usage of getLanguageName[s]. 2012-03-08 20:56:26 +00:00
Raimond Spekking
b6ffd105fa Localisation updates for core and extension messages from translatewiki.net 2012-03-08 20:35:25 +00:00
Alexandre Emsenhuber
71836d6643 * (bug 35014) Fix for r100529: including a special page no longer sets the page's title to the included page 2012-03-08 20:06:49 +00:00
Robin Pepermans
b539f7a98e Follow-up r112479
* Add @since, fix indentation.
* Change default from 'all' to 'mw' as it's the most used (so default fetchLanguageNames() is equivalent to default getLanguageNames()).
* Add the include parameter also to fetchLanguageName() as it's needed in Parser: interlanguage links should only take into account mediawiki names. (Doesn't make a difference with how the functions are now, but could have been later.)
2012-03-08 19:30:30 +00:00
Krinkle
ff2cc27e16 [ObjectCache.php] typo from r112985 2012-03-08 03:19:51 +00:00
Tim Starling
4565aac9f0 (bug 34929) Show the correct diff when a section edit is rejected by the spam filter. Use EditPage::showDiff() so that the same kind of diff is shown as when you click the "show changes" button. I considered changing the source text to be the original section text, but if you do that, the line numbers are wrong and section=new doesn't show you the headline which may have matched the spam filter. 2012-03-08 00:49:50 +00:00
Ryan Kaldari
71bdf4a745 better error message and comment 2012-03-08 00:34:42 +00:00
Ryan Kaldari
c404d5b5c7 typo fix 2012-03-07 23:51:05 +00:00
Ryan Kaldari
08a646f757 adding note for new API functionality 2012-03-07 23:48:45 +00:00
Tim Starling
86ec766e19 Fix for r113312: explain the bug without the use of commented-out code 2012-03-07 23:00:42 +00:00
Aaron Schulz
cb93e4c51d [FileRepo]
* Made upload() explicitly check $status->successCount rather than isOk() as FileRepo::publish() gives fatal statuses where it used to only give warnings. This way, failed uploads still displace the current image DB row to oldimage rather than do nothing and have the same image row point to a new file (which can cause mismatched metadata).
* Disabled exception about invalid oi_archive_name. This makes things more broken in that when people get this an error on upload (which happens when the FS has no current file but the DB does), the new file is added as the current version in the FS but the DB is unchanged. Thus, the metadata can be mismatched.
2012-03-07 22:46:47 +00:00
Benny Situ
69dffda7f9 followup to -r112918 - display old title in SpecialNews page when namespace or title text has been changed 2012-03-07 21:45:38 +00:00
Raimond Spekking
90df5d8ffc Localisation updates for core and extension messages from translatewiki.net 2012-03-07 21:06:01 +00:00
Krinkle
c92e27e515 Follow-up r113277: release-notes 2012-03-07 20:45:31 +00:00
Roan Kattouw
beb7ab0f36 (bug 35036) Wikipage-based ResourceLoader modules were not automatically purged as they should be when one of their messages changed. In practice, this only affected WikiLove.
Also adding a documentation comment in ResourceLoaderModule to clarify that it is the subclass's responsibility to make sure message blob timestamps are taken into account
2012-03-07 19:33:37 +00:00
Krinkle
1e5689852b [Html::namespaceSelector] Remove default id/name attributes
* Remove default id/name attributes
* Remove now redundant tests introduced in r110274
* Add tests to make sure label has no 'for' attribute when label isn't null but name/id are unset
* Update tests to not include id="" and name="" when calling with no arguments
* Updating calls to add name/id if needed, and while at it remove useless 'null' params


* Context:
-- Introduced in r109990, r111376, r111315
-- No callers exist that assume these defaults. Forcing an ID that should be unique is annoying and redundant. The name used in the query when submitting a form should be mentioned in the same file where it is used from the submission, never assume what name="" is from unrelated code
-- Same for ID, this is often used in CSS or JavaScript, shouldn't be assumed. (It should be simple to but two simple namespace selectors on a page without getting DOM conflicts)
2012-03-07 19:14:20 +00:00
Jeroen De Dauw
1b0a666ed4 Follow up to r113142; fix incorrect conversion to array (value can be array already) 2012-03-07 19:07:40 +00:00
Krinkle
ec83dd438f Follows-up r113214: span ternary operator over multiple lines for readability 2012-03-07 19:00:38 +00:00
Niklas Laxström
455d6dae19 My proposed fix to bug 34987: gender not working in many special pages.
I haven't checked if there are other places whereh context is set to Message class, but if there are they might need a fix too.
2012-03-07 10:13:58 +00:00
Antoine Musso
731b8aa809 warn that dumpBackup does not actually backup the wiki!
The user table is not dumped by that tool. The warning notice makes it clear
and will avoid someone having some trouble recovering his precious private
data.
2012-03-07 10:07:32 +00:00
Antoine Musso
160a471957 (bug 34302) Add CSS classes to email fields in user preferences
Patch by Nischay Nahata whom I have mentored earlier this week.
2012-03-07 09:56:24 +00:00
Krinkle
ddc937b930 [mw.util.tooltipAccessKeyPrefix] alt-shift for Chrome on Windows
* Fixes:
-- (bug 29753) mw.util.tooltipAccessKeyPrefix should be alt-shift for Chrome on Windows
2012-03-07 02:58:11 +00:00
Krinkle
db0cc46edb [jquery.textSelection.test] disable caretTest per bug 34820
* Right now it's causing testswarm clients to have to this test 3 times, and if until bug 34820 is fixed there is no point in clogging up testswarm with it, making all IE columns uselessly red and making it harder to detect an actual regression
2012-03-07 02:43:46 +00:00
Roan Kattouw
14b9e780c2 It seems that parseMsg() sometimes receives strings, probably from bad dieUsageMsg() callers or badly formatter error arrays. I don't want to have to track this down, so I'm making it fail gracefully and just cast any strings to arrays 2012-03-07 02:09:22 +00:00
Aaron Schulz
3e3da50e8a r109469: ported r113208 by bumping max file size from 1GB to 4GiB. 2012-03-07 02:00:55 +00:00
Sam Reed
6b1c5279b3 Fix mixed/messed up whitespace 2012-03-07 01:09:35 +00:00
Krinkle
b2a6d93385 MTT: r113196 2012-03-06 23:03:42 +00:00
Aaron Schulz
302cc62a77 Fixed FileOp::attemptBatch() behavior when unexpected failures occur with the 'force' option. It can't continue on since the ops assumed that $predicates was correct, which it won't be. It now simply halts operations. 2012-03-06 22:59:59 +00:00
Raimond Spekking
ee8ea4d04e Localisation updates for core and extension messages from translatewiki.net 2012-03-06 21:18:30 +00:00
Alexandre Emsenhuber
e8e7042403 Use local context to get messages 2012-03-06 20:55:19 +00:00
Alexandre Emsenhuber
21ac31f144 No need to do a database query when passing an IP address to User::idFromName() 2012-03-06 20:52:42 +00:00
Aaron Schulz
48b4c56b8f r110955: also truncate rc_comment for log entries. This adds the code in save() to proof RecentChange a bit against such problems. 2012-03-06 19:38:17 +00:00
Sam Reed
3a8e088540 Minor followup to r111795, make doSha1LegacyUpdates return it's count value so it can be added to the count of archive rows
Don't return true in doSha1Updates(), return 0 if table is empty
2012-03-06 19:21:07 +00:00
Jeroen De Dauw
018294d1ec get rid of deperacted method usage 2012-03-06 15:54:23 +00:00
Jeroen De Dauw
ecb50ed3c9 follow up to r113113, get rid of code ducpliation and fix docs to reflect actual behaviour 2012-03-06 15:36:08 +00:00
Tim Starling
f6083ebd09 Partial revert of r97849: the wgUserVariant variable is useful and used even on special pages, removing it breaks b/c 2012-03-06 11:11:01 +00:00
Antoine Musso
59ba30f5b6 revert r113117 per CR 2012-03-06 10:19:27 +00:00
Antoine Musso
13b1e66dab rv table sorting of IP and fraction
I am reverting, for now, two recent additions made to the table sorting:
 - r111884 fractions
 - r111829 IP addresses

Both need to be polished a bit more before landing in trunk. Please reapply
in a branch then once reviewed we can merge it in trunk, that will avoid
us a lot of "spam".
2012-03-06 10:17:46 +00:00
Niklas Laxström
e833f5c21c No point doing it the hard way, ping r112591 2012-03-06 07:20:14 +00:00
Jeroen De Dauw
97e6c8f250 follow up to r113115, rem not needed args 2012-03-06 01:16:56 +00:00
Jeroen De Dauw
08f1f588ae get rid of deprecated method usage making people on education program test wiki go mad 2012-03-06 00:53:48 +00:00
Jeroen De Dauw
630ea0195f fix support for passing args to help-message(s), which was documented to be there but actually missing 2012-03-06 00:32:48 +00:00
Sam Reed
5f230a3a19 Can someone standardi[sz]e SQL already!?
Might aswell change mysql to same format as the sqlite one is becoming

Ping r113110
2012-03-06 00:26:48 +00:00
Sam Reed
699580ab51 And fix the . from r113110 2012-03-06 00:10:36 +00:00
Sam Reed
921c862c97 Followup r113109, forward port the rest of r25267 for Bug 10788 - Filter page histories by user, or contributions by title 2012-03-06 00:09:18 +00:00
Sam Reed
64ac200ca3 Pull patch-revision-user-page-index.sql from r25267 2012-03-06 00:05:48 +00:00
Trevor Parscal
01d35d78e9 Added unit test for changes in r113105 related to bug #34924 (adding Rekonq to known browsers list) 2012-03-05 23:39:25 +00:00