Commit graph

25 commits

Author SHA1 Message Date
yaron 38f8df0d3f Added support for new ContentHandler approach in MediaWiki 1.21
Change-Id: Id96a973dbd0b7fb5c49667ac1615d171dd724ade
2013-01-09 00:56:16 +03:00
Reedy 5ec5351d1a Add some braces, some profiling calls
Add hook documentation block

Change-Id: I8e8e22b3193f1cdad590dd9bcdccfc785c140321
2012-12-08 13:10:33 +00:00
Siebrand Mazeland 4eec59a457 Maintenance for ReplaceText extension.
* Now requires MediaWiki 1.18 or later.
* Use strict in JavaScript and update with JSHint/JSLint suggestions.
* Deglobalisation.
* Replace deprecated methods, remove pre 1.18 BC code.
* Update docs.
* Break long lines.
* Add FIXME where needed.

Change-Id: If9fe1e314937438227458cb07cda7f734043801f
2012-11-07 07:37:05 +00:00
Yaron Koren 45c3c814f0 Follow-up to r90098 - added '0' as second parameter for 'new Article()' 2011-06-15 13:13:54 +00:00
Yaron Koren bcd2f884cf Follow-up to r86041 and r89569 - re-added backwards compatibility with MW < 1.18 2011-06-14 23:24:08 +00:00
Yaron Koren 5bd0ef6414 Follow-up to r89547 - re-added compatibility with MW < 1.9 2011-06-06 15:15:43 +00:00
Krinkle 5c6d821000 Use tokens where needed for WatchAction (as of r89545)
* ./MultilingualLiquidThreads/LiquidThreads/classes/Thread.php
* ./extensions/LiquidThreads/classes/Thread.php
* ./extensions/MetavidWiki/includes/articlepages/MV_DataPage.php
** MV_DataPage.php: Per r86041 I replaced the second watch-call in MV_DataPage.php with an unwatch call.
* ./extensions/ReplaceText/ReplaceTextJob.php
2011-06-06 00:32:03 +00:00
Happy-melon ae37ea1164 Follow-up r 86041 per CR and IRC:
* Article constructor needs to be called with zero as second parameter
* Run stylize.php over new files
* Add Action::getLang() for consistency with other context accessors
* Fix declaration of FormAction::alterForm(), doesn't need to be passed by reference
* Fix inline use of Credits::getCredits() in SkinTemplate and SkinLegacy
2011-04-14 12:17:24 +00:00
Happy-melon 834a49ca93 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 5375d862f8 Revert r86001: Brion says it's too scary :D will recommit in pieces 2011-04-13 23:36:27 +00:00
Happy-melon d593e03b14 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
Raimond Spekking cd8601818d Partly revert r82210: Remove spurios character (BOM?) 2011-02-16 14:40:34 +00:00
Yaron Koren 74d7e56d84 Added handling for regular expressions 2011-02-16 03:04:27 +00:00
Jeroen De Dauw e6d87002d2 Stylized with Stylize.php to conform with MW's spacing conventions 2010-03-14 18:10:47 +00:00
Siebrand Mazeland 9db23c573b wfProfileOut in proper code part 2009-12-31 18:08:24 +00:00
Yaron Koren 2b19883967 Simplified addition 2009-08-14 17:21:55 +00:00
Siebrand Mazeland b3d2de76e2 If the replacements are made by a bot, the edits are flagged as such from the job. Suggested by Nachteule http://www.mediawiki.org/wiki/Extension_talk:Replace_Text#respect_bot_flag 2009-08-13 16:56:36 +00:00
Yaron Koren 22b2eb77a2 Minor formatting change 2009-05-19 15:22:27 +00:00
Yaron Koren ff0774ea4c Added handling of 'watch page' parameter 2009-04-27 18:30:39 +00:00
Siebrand Mazeland 889a5cb12e stylize.php and trailing whitespace removed 2009-04-27 09:02:48 +00:00
Yaron Koren 121c8a9453 Added handling for new 'create-redirect' parameter 2009-01-22 23:41:02 +00:00
Yaron Koren a544abbe88 Added handling of moving pages 2008-11-05 20:33:38 +00:00
Yaron Koren fdbbeea4d0 Bug fix so that text replacement doesn't override the global $wgUser variable 2008-08-06 16:11:56 +00:00
Yaron Koren c76f4da24b Changed edits to be minor edits 2008-05-27 15:45:51 +00:00
Yaron Koren c1d278baf2 New class to hold MediaWiki job that does actual replacement 2008-05-12 20:34:54 +00:00