Commit graph

35 commits

Author SHA1 Message Date
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Bryan Tong Minh
0c8c6a4936 Show a normal permissionsErrorPage when the user does not have permissions to delete. Statify isValidOldSpec and haveDeletable file to be used by the API 2008-04-04 13:59:04 +00:00
Bryan Tong Minh
a3aeb20e0f Moved file deletion code to a more abstract FileDeleteForm::doDelete 2008-04-04 12:16:50 +00:00
Robert Stojnić
b4dff52409 Suboptimal solution for one of the issues behind bug 12049 (i.e. that
don't get deleted from search index) :
* hooks ArticleDelete[Complete] are now called from FileDeleteForm as well, 
  this seems to be the expected behavior by most extensions (OAI, TitleKey, 
  Rsync, ...).
* delete via API however still misses these hooks

Other possible solutions:
* move hooks into backend - bad since we want a clean backend
* create FileDelete hook (per bug 11276) - seems to me as unnecessary
  duplication of code logic since article might or might not be 
  deleted during file deletion
* make a new Article function and wrap calls - will pollute clean Article
  doDelete and doDeleteArticle calls
2008-04-03 15:09:56 +00:00
Aaron Schulz
441068209b Add showLogExtract() and remove use of FauxRequest hacks 2008-04-02 20:20:47 +00:00
Aaron Schulz
1f60b024de More rev_deleted merging
*Add suppress option to file delete form. Sprinkle in argument where needed.
*Restrict content at sp:undelete
*FileRepo can deal with images in the 'deleted' FS group (corresponds to a setting of oi_deleted)
2008-03-15 00:27:57 +00:00
Raimond Spekking
a7e84474ba * (bug 13274) Change links for messages to ucfirst (relevant for case-sensitive wikis) 2008-03-06 16:52:10 +00:00
Raimond Spekking
8b663c901e * Add links to page and file deletion forms to edit predefined delete reasons
This makes the forms a bit more consistent to special:blockip
2008-03-06 14:59:28 +00:00
Bryan Tong Minh
29248e7a4f Fix description for UploadComplete hook. New hooks: FileDeleteComplete, FileUndeleteComplete 2008-03-01 13:35:01 +00:00
Brion Vibber
8e476b31cc * (bug 12935, 12981) Fully-qualify archive URLs in delete, revert messages
Replaced a bunch of instances of 'if-this-is-not-fully-qualified-prepend-$wgServer' with a function, wfExpandUrl()
2008-02-13 05:59:14 +00:00
Brion Vibber
225250e451 * (bug 12935) Fully-qualify archive URLs correctly in deletion message 2008-02-13 02:31:12 +00:00
Raimond Spekking
067f145b15 * (bug 12919) Use 'deletedrevision' message as content when deleting an old file version
Patch by Alexandre Emsenhuber
2008-02-06 06:01:58 +00:00
Huji
6e604c3e45 (bug 12892) Poor tab indexing on "delete file" form 2008-02-04 17:57:38 +00:00
Brion Vibber
0b01bd4f57 fix html regression: missing id attribute on wpReason input box on deletion forms 2008-01-30 05:36:09 +00:00
Brion Vibber
d214372ecf Cleanup -- fix broken XHTML in deletion forms 2008-01-29 20:23:40 +00:00
Raimond Spekking
4d4f91c3e8 Fix double escaping. Thanks to Nikerabbit :) 2008-01-29 09:17:24 +00:00
Raimond Spekking
b713caf2da * Prettify input form for RTL wikis
* Consistent usage of Xml::functions, code cleanup
* Add a comment to ensure grep will find all used message names
2008-01-29 06:10:12 +00:00
Brion Vibber
1b72addea7 Cleanup for r30216:
* Don't triple-escape HTML in drop-down lists :)
* Don't include empty attributes for missing optional parameters
* Use content language, not UI language, for loading predefined reasons
2008-01-28 20:27:15 +00:00
Huji
da4897cf6d * Renaming Xml::reasonDropDown to Xml::listDropDown to make sure it doesn't imply a special usage.
* Adding support for custom name and id, custom class, and custom tabindex to Xml::listDropDown
* Changing the order of parameters Xml::listDropDown accepts.
* Updating ipblock, file deletion and page deletion forms so they all use this new Xml element rather than holding three copies of similar code.
* Removing variables which are no more used in the three above forms.
* Renaming a few variables to follow the coding style of MediaWiki.
2008-01-28 12:57:02 +00:00
Tim Starling
b0e06a3a46 Fixed broken HTML 2008-01-25 10:15:46 +00:00
Huji
9fe8271672 (bug 12214) Add a predefined list of delete reasons to the file deletion form 2008-01-24 15:35:44 +00:00
Raimond Spekking
a0cb7db00e * Set proper page title for successful file deletion 2007-12-11 16:45:28 +00:00
Brion Vibber
9be2c3676a Revert r26281 for the moment. Big patch, changes several existing practices. Will want some public testing and more review before taking it to trunk. 2007-10-01 19:50:25 +00:00
Aaron Schulz
4febfc77c2 *Clean up deletion of revisions and remove some gaps
*Allow blocking of users to hide names
*Implement revision deletion for images/deleted files/deleted revs
*Log deletion set off for now
*Add 'hidden' file dir
*Dissallow merging via undelete (which was inefficient and hard to reverse)
*Use restore points and diffs to special:undelete
*Add a special page to merge pages
*Get changeslist to use tables to avoid ugly formatting
*Add logs into RC for rebuildrecentchanges.php
*Add private logs
*List private logs at specialpages
*Tweak/add some deletion and merge messages
2007-10-01 19:38:28 +00:00
Rob Church
0d590d699f (bug 11478) Fix undefined method call in file deletion interface 2007-09-28 00:49:44 +00:00
Raimond Spekking
5ed8862823 * Add name/id to submit button, per request of de.wp
* kill whitespaces
2007-09-13 08:51:13 +00:00
Brion Vibber
d03e2e31d7 * (bug 11179) Include image version deletion comment in public log
Append comment, if present, to the deletedrevision text. This matches undeletion behavior.
To pretty that up, removed the final period from the default deletedrevision message; it didn't look good with the following colon, and even when alone it's inconsistent with other usage, we usually don't have a period there.
2007-09-10 19:38:44 +00:00
Rob Church
44331b16a8 Show relevant deletion log lines 2007-08-27 15:55:02 +00:00
Rob Church
e71d81d778 (bug 11079) Use 'wpReason' as the comment field name and pre-fill the comment field from the request when building the form 2007-08-27 13:52:51 +00:00
Rob Church
905cd34f43 Add links back to the image in deletion and reversion forms 2007-08-22 05:35:40 +00:00
Nick Jenkins
786e93fb37 Static code analysis housekeeping time... things that could be double-checked are marked with "[Note: some-comment]" :
if-if-else without curly braces [api/ApiQuerySiteinfo.php] --> adding
Unused global declaration:  $wgGroupPermissions --> removing 
Unused global declaration:  $wgEmailConfirmToEdit (line 301) --> removing 
Variable $id appears only once (line 1021)  --> removing 
Variable $m was used before it was defined (line 805) --> defining.
Variable $retval was used before it was defined (line 2346) --> renaming to $result
Variable $rcid appears only once (line 244 of RecentChange.php)  --> using this instead of $change [Note: was left over from r24607 refactoring, revert if wrong please]
Unused global declaration:  $wgCommandLineMode (line 11) --> removing
Variable $k appears only once (line 132 of ImagePage.php) --> removing.
Variable $info appears only once (line 311 of ImagePage.php)  --> removing.
Unused global declaration:  $wgTitle (line 569 of ImagePage.php) -> removing.
Variable $handlerParams was used before it was defined (line 616 of Linker.php) --> resolved by Raymond in r24966
Variable $match was used before it was defined (line 1031 of Linker.php) --> defining.
Unused global declaration:  $wgEnotifWatchlist (line 253 of UserMailer.php) --> removing 
Unused global declaration:  $wgShowUpdatedMarker (line 253 of UserMailer.php) --> removing 
Variable $img appears only once (line 446 of SpecialUpload.php) --> added definition, defined as null, flagged with @todo  [Note: should $img be defined in this context, or is it intended to be null? And should the return value after the hook be checked in some way?]
Unused global declaration:  $wgEnableAPI (line 739 of SpecialUpload.php) --> removing.
Unused global declaration:  $wgNamespaceProtection (line 1030 of OutputPage.php) --> removing.
Unused global declaration:  $wgContLang (line 18 of SpecialWatchlist.php) --> removing.
Unused global declaration:  $wgRawHtml (line 269 of SpecialMovepage.php) --> removing.
The value of variable $page was never used (line 331 of SpecialUndelete.php) --> removing line, as $page gets redefined a few lines down.
Variable $synIndex appears only once (line 521 of MagicWord.php) --> commenting out.
Variable $case appears only once (line 539 of MagicWord.php) --> removing from foreach index key usage.
Variable $wgUser appears only once (line 1039 of Title.php) --> adding line to declare as a global, would be null otherwise.
Variable $m was used before it was defined (line 285 of Title.php) --> defining.
Variable $id appears only once (line 1150 of Title.php) --> removing from foreach index key usage.
Variable $subpage appears only once (line 1297 of Title.php) --> commenting out.
Variable $restrictions appears only once (line 1399 of Title.php) --> commenting out.
Variable $mime appears only once (line 210 of filerepo/OldLocalFile.php) --> removing.
Variable $deprefixedName appears only once (line 213 of filerepo/LocalFile.php) --> removing.
Variable $m appears only once (line 541 of filerepo/LocalFile.php) --> removing.
Variable $where appears only once (line 1245 of filerepo/LocalFile.php) --> removing.
Variable $info appears only once (line 1427 of filerepo/LocalFile.php) --> removing.
Variable $rel appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $zone appears only once (line 138 of filerepo/RepoGroup.php) --> commenting out.
Variable $nbytes appears only once (line 208 of media/Generic.php) --> added a return line that uses $nbytes. [Note: I'm assuming that this was the intent]
Variable $offset appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $limit appears only once (line 201 of SpecialListusers.php) --> removing.
Variable $groupTarget appears only once (line 203 of SpecialListusers.php) --> removing.
Unused global declaration:  $wgLang (line 74 of SpecialWantedpages.php) --> removing.
Variable $block appears only once (line 244 of SpecialProtectedpages.php) --> removing.
Variable $offset appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Variable $limit appears only once (line 281 of SpecialProtectedpages.php) --> removing.
Unused global declaration:  $wgLang (line 30 of FileDeleteForm.php) --> removing.
Unused global declaration:  $wgServer (line 30 of FileDeleteForm.php) --> removing.
2007-08-21 03:57:54 +00:00
Rob Church
8f6287bf44 More robust existence/sanity checking 2007-08-20 14:49:07 +00:00
Rob Church
e37befec0a As r24950, but for FileDeleteForm 2007-08-20 14:35:59 +00:00
Rob Church
491b223b30 Remove some declarations for unused globals... 2007-08-17 21:08:17 +00:00
Rob Church
65d74391fd * Confirmation is now required when deleting old versions of files
* Users can now enter comments when deleting old versions of files
2007-08-17 20:53:17 +00:00