Commit graph

71 commits

Author SHA1 Message Date
Sam Reed
8e80b8c3c1 Tidy up some unused variables and such 2011-04-23 21:40:52 +00:00
Happy-melon
8779f4b55f r86001, now with less scariness :P I took out the delete action and did purge instead, which is a much more self-contained action-with-a-form. Also implement a few changes suggested by Brion on IRC last night. 2011-04-14 10:38:29 +00:00
Happy-melon
bc4a096805 Revert r86001: Brion says it's too scary :D will recommit in pieces 2011-04-13 23:36:27 +00:00
Happy-melon
6dc8136d12 New infrastructure for actions, as discussed on wikitech-l. Fairly huge commit.
* Actions come in two flavours: the show-a-form-then-do-something-with-the-result (delete, protect, edit, etc) and the just-do-something (watch, rollback, patrol, etc).  Create abstract base classes Action and FormlessAction to support these two cases.  HTMLForm is an integral part of the form-based structure.
* Look mum, no globals!  :D  Fully context-based.
* Implement watch/unwatch, credits and delete actions in the new system as proof-of-concept.  This also gives the delete frontend a much-needed overhaul.
* Stub out the newly-deprecated functions from Article.php.  This already reduces its linecount by about 15%, and there are plenty more actions still to do.
* Centralising actions like this is going to render a lot of hooks type-incompatible.  There's simply nowhere you can put the ArticleConfirmDelete hook, for instance, where it can be passed an OutputPage as the second parameter.  On the other hand, we can implement new hooks like ActionModifyFormFields and ActionBeforeFormDisplay, which can do much prettier stuff to the forms, like adding extra fields the 'right' way.  Update LiquidThreads to use these new hooks where appropriate.
2011-04-13 23:04:07 +00:00
Ryan Lane
308203304d Moving deletion hooks into doArticleDelete so that other code can sanely delete articles. Fixed other core code that was wrapping the calls with hook calls. 2011-03-23 21:54:59 +00:00
Sam Reed
604ae0ca1c Update deprecated method calls
Remove some unused stuff
2010-10-31 16:20:48 +00:00
Chad Horohoe
cc6a650bf8 Refactor GAID_FOR_UPDATE into Title::GAID_FOR_UPDATE. Yay less file-scope code (extensions will follow) 2010-09-30 19:13:25 +00:00
Platonides
5f4494499b Follow up r32776.
$log->addEntry got added an extra indentation, which was wrong.
Functionality was right. It goes *outside* the if
2010-08-29 19:11:23 +00:00
Sam Reed
88403ed2c5 More unused.... 2010-08-19 11:42:06 +00:00
Max Semenik
7b690a17b1 Uncommented line from r63018 2010-02-26 20:18:48 +00:00
Max Semenik
ae7912737c (bug 17560) Half-broken deletion moved image files to deletion archive without updating DB 2010-02-26 20:14:28 +00:00
Alexandre Emsenhuber
1d0d879be0 * Document a bit
* Fix some doxygen warnings
2010-01-13 21:25:03 +00:00
Raimond Spekking
7b014c2c17 Fix a Fatal: Call to a member function isLoggedIn() on a non-object in /var/www/w/includes/FileDeleteForm.php on line 115 2009-11-27 17:46:35 +00:00
Matěj Grabovský
4a099928f7 (bug 21455) Fixed "Watch this page" checkbox appearing on some special pages even to non-logged in users 2009-11-14 11:07:46 +00:00
Raimond Spekking
ce47c67697 i18n tweak: Use 'colon-separator' instead of hardcoded colon 2009-11-02 19:06:16 +00:00
Raimond Spekking
90091addcb Partly revert r57148. The search&replace was a bit too wide. It catches a message key too. Instead of right keys only.
Needs syncing with WMF because it shows <deletedhistory> on the live site.
2009-11-02 17:12:37 +00:00
Aaron Schulz
ea1a0e5860 Bolden suppression check label as it is for non-image pages 2009-10-15 10:36:29 +00:00
Aaron Schulz
c2f7ea4d7b * Renamed deletedcontent to deletedtext
* Removed deletedrevision and used deletedhistory/deletedtext instead
2009-09-30 19:50:35 +00:00
Siebrand Mazeland
5adb6cb276 Follow-up to r51559 per CR: initialise $q to prevent PHP notice. 2009-06-07 10:34:02 +00:00
Siebrand Mazeland
88d789e939 * replace some use of deprecated makeKnownLinkObj() by link() in core
* use array type parameter instead of string to escapeLocalUrl(), getFullURL() and getFullUrl() for readability
2009-06-06 22:42:48 +00:00
Alexandre Emsenhuber
8e2e5d473e Fix for r51493, r51084 and realted: use Title::makeTitle() rather than Title::newFromText() 2009-06-05 13:12:15 +00:00
Siebrand Mazeland
e17b75e76a Follow-up to r51084:
* address case sensitivity issue raised by Splarka on CR
* also change to edit link on Special:Block
2009-06-05 07:33:57 +00:00
Siebrand Mazeland
f8f8dd2cb2 Fix a usability issue on protect and [file ]delete forms. "Edit ... reasons" link now contains action=edit to save a click. 2009-05-27 20:35:16 +00:00
Andrew Garrett
0fcc017391 Fix broken calls to ArticleDelete hook. 2009-01-29 01:04:00 +00:00
Raimond Spekking
3fd4899655 Replaced some hardcoded colons with the colon-separator message 2009-01-07 22:49:54 +00:00
Raimond Spekking
f50ac863a2 Fix PHP fatal error in /usr/local/apache/common-local/php-1.5/includes/FileDeleteForm.php line 116:
Regression from r45159
2009-01-01 13:15:29 +00:00
Aaron Schulz
3bfd03128a * (bug 16209) Deleted images are not watched
* Add watchlist check to filedelete form
* Fix XHTML on filedelete form
2008-12-29 18:49:50 +00:00
Siebrand Mazeland
0a9af4a884 Consistent casing for addHTML() 2008-11-06 22:20:29 +00:00
Raimond Spekking
8b83a7cdae * Fix sequence of tabindex
* Use existing CSS classes for label and input
* Break long lines
2008-10-06 16:14:50 +00:00
Chad Horohoe
a7f4aa9152 Add id to file delete confirmation form. 2008-09-18 02:54:27 +00:00
Aaron Schulz
12d279ff91 * Make sure we have the right article ID, not slave lagged. (bug 8072)
* Make FileDeleteForm use hook properly
2008-09-16 17:08:08 +00:00
Aaron Schulz
399956f420 * Remove unneeded code
* Whitespace
2008-09-16 12:47:44 +00:00
Aaron Schulz
79bf4c24ed Rename 'hiderevision' to 'suppressrevision' 2008-05-25 00:31:28 +00:00
Aaron Schulz
03d743a250 Extra sanity check 2008-05-24 23:56:07 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Aaron Schulz
c682e06086 Make suppression require hiderevision 2008-04-26 23:33:27 +00:00
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