Commit graph

20231 commits

Author SHA1 Message Date
Antoine Musso
8a3dcccbda Remove second parameters from wfEmptyMsg() calls
The second parameter was removed in r64178 and is now useless.
There is probably no need to backport this in 1.17.
2011-03-07 17:10:22 +00:00
Bryan Tong Minh
3d3f61a0ab (bug 27722) list=filearchive now supports revdel
* Adds a condition fa_deleted=0 if the user does not have the suppressrevision rights. This field is unindexed. This should however not be a big problem as files with fa_deleted are rare. Unfortunately this hides files that do not have DELETED_RESTRICTED, but I don't know how bad fa_deleted & DELETED_RESTRICTED = 0 is for performance
* Added deletedfile, deletedcomment, deleteduser and deletedrestricted to the output for what I think are appropriate fa_deleted fields, but it's hard to tell what's corrent without a single line of documentation or even comment in the code. Perhaps somebody can dig up a commit message where the purpose of the constants is explained?
2011-03-07 17:07:10 +00:00
Antoine Musso
ae7215c4ad Keep monospace as a fallback for HTML debugging
Per CR on r83336. We also keep this as inline style since it is only
needed by developers anyway.
2011-03-07 16:36:35 +00:00
Sam Reed
89656cc42c More documentation
Remove trailing whitespace
2011-03-07 14:59:41 +00:00
Sam Reed
0e38c2cdce Documentation and explicit variable definitions
Followup r80069, swap private to protected
2011-03-07 14:45:11 +00:00
Siebrand Mazeland
98d43919bd Rephrase 'config-using531' per suggestion of Krinkle: "Granted the bug is in PHP, but imho "PHP" isn't compatible with MediaWiki, it's the other way around."
Also removed the link to the PHP bug report. Not that relevant for the user installing MediaWiki.
2011-03-07 12:13:14 +00:00
Platonides
8f0a89efcb Reorder so that wfProfileOut() is the last sentence before the return. 2011-03-06 23:29:29 +00:00
Platonides
9ced2d5c60 Follow up r83140. Add a clear() method to ObjectCache so that it can be used by ForkController. 2011-03-06 23:07:36 +00:00
Bryan Tong Minh
29eaa85c82 Kill filtering by hash because the query is unindexed. We need a condition on fa_storage_group, but I'm not sure how index merging will work out. I don't have time to investigate this at the moment, so killing it in its entirety seems the safest option for now. 2011-03-06 22:16:34 +00:00
Bryan Tong Minh
9770ff88f5 Breaking change: remove faminsize/famaxsize because they lead to an unindexed query, which takes a very long time if there are only few rows that match the filter. Introduced in r66168, so luckily only live since 1.17. 2011-03-06 22:03:45 +00:00
Alexandre Emsenhuber
9e0c678ddf Only call ParserOptions::getNumberHeadings() when needed for the benefit of cache sharing when this is not used.
Also fixed a bug in ParserOutput when no option is used; otherwise getUsedOptions() will return false and throw warnings in ParserOptions::optionsHash().
2011-03-06 21:16:22 +00:00
Alexandre Emsenhuber
d9c46a0939 * Added UserGetLanguageObject hook to change the language used in $wgLang 2011-03-06 21:05:18 +00:00
Sam Reed
aea7a5a482 Followup r83390
If the user is allowed to view hidden users, put a missing property on all users.

For list=users, do the same, but we can't easily distinguish to other people the difference between "hidden", or "missing", so no reason to do it
2011-03-06 20:51:31 +00:00
Sam Reed
5ad9f48ef8 Fix where ipb_deleted from r83390 2011-03-06 20:38:00 +00:00
Sam Reed
2dc186a1d7 Followup r83399, add back base conversion 2011-03-06 20:20:24 +00:00
Chad Horohoe
5b352d1b3a (bug 17691) Support CC0 license in installer 2011-03-06 20:14:12 +00:00
Sam Reed
56aefb445f * (bug 27588) list=filearchive&faprop=sha1 returns empty attribute
Refactored code out, to be reused in ApiQueryFilearchive

Simplified too per Bryan on IRC
2011-03-06 20:05:41 +00:00
Chad Horohoe
755ca95e50 (bug 26690) Value of the 'Name of wiki' field is not retain after two subsequent click on 'Continue' button. This has been a complaint since the beginning, that the installer "forgets" $wgSitename.
The original intention, as I saw it, was to encourage people from choosing 'MediaWiki' as the name of their wiki. Just hardcode it, I don't think we're changing the name anytime soon.
2011-03-06 19:52:23 +00:00
Chad Horohoe
b19cf38ab1 i18n tweaks for r83395 2011-03-06 19:34:57 +00:00
Chad Horohoe
283e50de33 (bug 27903) Button text is actually continue, not next 2011-03-06 19:25:18 +00:00
Sam Reed
f483892c90 * (bug 27717) API's exturlusage module does not respect $wgMiserMode
Implement ApiQueryCategoryMembers style miser mode stuffs
2011-03-06 19:15:07 +00:00
Sam Reed
8c4f349a63 Fix leading whitespace before class ApiQueryUsers 2011-03-06 18:17:28 +00:00
Sam Reed
67d4ee1d26 Followup r83390, change cache modes 2011-03-06 18:16:44 +00:00
Chad Horohoe
84602bf3e1 (bug 27901) Missing php version in config-using531 msg 2011-03-06 18:12:30 +00:00
Sam Reed
c488abeeb8 * (bug 27897) list=allusers and list=users list hidden users
Refactored addition of block information, and also checked if user is allowed to view hidden user fields
2011-03-06 17:59:08 +00:00
Brian Wolff
8cc82f9954 (follow-up: r83371) Fix variable name typo. $this to $loginForm. 2011-03-06 09:14:04 +00:00
Brian Wolff
e6de99be92 (bug 27508) SVGMetadataExtractor takes too much resources on huge svg's. Change it so it only looks at begining of file.
Add a new config variable $wgSVGMetadataCutoff (currently set to 256kb, chosen rather arbitrarily)
and only read that much of the svg file when finding metadata. In general:
*Most (non-crazy huge map) svgs aren't that big, so there'd be no change in general
*Almost all files have any relevent metadata (well except for when we look for animation tags) is at the begining of the file
before actual image data.
*At the end of the day, even if this does miss metadata in some files (which I really doubt it would), I'd consider that a better
situation then the current situation where it can take 10 minutes or have OOM to parse the likes of [[:File:Puerto_Rico_ecosystems_map-fr.svg]]

Also has parts of/parts are based on Hartman's patch from bugzilla in it.

Also changes how it recurses into child elements looking for animation, to do so only when neccesary. 

Trims the results of reading values, because i was getting extra leading spaces when testing this.

Last of all, add a comment to the MediaHandler class about how the first parameter of MediaHandler::getMetadata is kind of useless.
(it confused me when I was doing this)
2011-03-06 08:15:49 +00:00
Jack D. Pond
eb811913b8 Fix and Enhance:
1. Fix - previously unresolved possible return value (ABORTED) added to switch
2. Allows a message to be returned when status "ABORTED" instead of just one of existing generic messages.
2011-03-06 05:39:41 +00:00
Brian Wolff
5220bd4fbb If $wgEnotifMinorEdits=false, the enotifminoredits pref does nothing, so put it in $wgHiddenPrefs.
Its confusing to have it as an option, if its disabled, especially since there is no indication to the
user that it is disabled.
2011-03-06 04:13:46 +00:00
Brian Wolff
65eaa9dae1 (bug 27854) Http::isValidURI is way to lax. This is a much simplified regex that accepts a subset of the previous
regex, but also accepts ftps because both cURL and php support it. It no longer accepts thing like 'foo http://bar bax'
which was my main concern

Note the previous regex kind of looks more restrictive, but is not since saying "anything not containing a space
optionally followed by anything not containing a bunch of characters including a space" is the same as saying anything
with no spaces. See also r83296. This obviously doesn't catch all cases, but I personally think its sufficient.
At the very least it is a very significant improvement over the previous version that caught almost nothing.
2011-03-06 02:43:24 +00:00
Antoine Musso
a8a47d6a12 Use 'Courier new' for $wgShowDebug HTML output
'Courier new' is rendered with a constant size in both monobook
and vector skins.  monospace is rendered too small under vector
with firefox/Linux.
Thus, this patch makes the font size consistent.
2011-03-05 22:26:09 +00:00
Alexandre Emsenhuber
2c6fdc8051 * NS_SPECIAL should not have any applicable restriction type
* Removed some trailing whitespaces
2011-03-05 19:49:24 +00:00
Jeroen De Dauw
26c161d8b8 keep checkbox state when adding cat/ns pages 2011-03-05 19:22:43 +00:00
Chad Horohoe
231819bdba Fixup to schema help, there's only one now 2011-03-05 18:32:37 +00:00
Alexandre Emsenhuber
a526d19f20 Follow-up r83240: seems people prefer returning false than the current version when no revision with given ID is found 2011-03-05 17:55:21 +00:00
Bryan Tong Minh
f9a36ee7bf (bug 27018) Added action=filerevert to revert files to an old version. Copied procedure from FileRevertForm, as most of the verification procedure is simple enough to not warrant the effort of writing a dedicated backend.
Further changes:
* Added Status::getErrorsByType() which returns the internal error array untouched
* Added ApiResult::convertStatusToArray() which converts a Status object to something useful for the Api
2011-03-05 17:23:35 +00:00
Sam Reed
d3732d3ad6 Normalise table column ordering against ImagePage 2011-03-05 17:13:13 +00:00
Happy-melon
968340d310 Follow-up r83280; looks like I accidentally deprecated a piece of legacy JS :D 2011-03-05 17:06:42 +00:00
Sam Reed
26a2544ebf Explicit variables, documentation, newlines, braces 2011-03-05 17:01:33 +00:00
Happy-melon
b61a470845 HTMLFormField class to build a select-dropdown-with-additional-text-field structure, with the select options maybe parsed from a system message as is done for the protect, block, delete, fileupload, etc, dialogues. Serves as a replacement vector for Xml::listDropDown(). 2011-03-05 16:51:13 +00:00
Happy-melon
0ebda6b3e4 Include MediaWiki:Noscript.css in <noscript></noscript> tags in the header, to allow wikis to load styles for users with JS disabled. 2011-03-05 16:01:25 +00:00
Bryan Tong Minh
2c145e77b0 Follow-up r83286: detabify description for mediatype 2011-03-05 15:14:49 +00:00
Bryan Tong Minh
51b0552b75 (bug 27587) list=filearchive now outputs full title info 2011-03-05 15:00:23 +00:00
Bryan Tong Minh
6b70a9f121 (bug 27590) prop=imageinfo now allows querying the media type 2011-03-05 14:56:49 +00:00
Bryan Tong Minh
4c043d581d Follow-up r83282: Re-add the lost $this->getNamespace() == NS_FILE, forgot to test the code for normal pages. 2011-03-05 14:47:11 +00:00
Bryan Tong Minh
3e44674229 Move the file related parts of Title::isValidMoveOperation to its own function, Title::validateFileMoveOperation 2011-03-05 14:44:28 +00:00
Happy-melon
1c866270b3 Follow-up r83183, r83202:
* Update SpecialCheckUser.php to new location of IP functions
* Spin out the 'hide-other-field-if-select-box-not-on-other' function as one which should apply to all such fields, especially those created via HTMLForm.  SpecialBlockip and SpecialGlobalBlock should ultimately be converted to use HTMLForm anyway.
2011-03-05 12:48:32 +00:00
Brian Wolff
b5c30abacb (bug 27862; follow-up r77714) Make emailuser api module not freak out when SpecialEmailUser returns a status object instead of true. 2011-03-05 03:35:49 +00:00
Platonides
97f843e93b If the unknown element is empty, there won't be a matching END_ELEMENT. There's nothing to peek inside. 2011-03-04 22:52:20 +00:00
Brian Wolff
6f7958499a trim the upload_by_url field from upload form, since if you have an extra space at the beggining like I
did when copying and pasting a url, gives a really misleading error message.
2011-03-04 22:21:48 +00:00