Commit graph

146 commits

Author SHA1 Message Date
Happy-melon
0a8a3b452c Further massive rewrite of the blocking frontend: spin out unblocking into a new SpecialUnblock.php. This leaves IPBlockList as, astonishingly enough, a list of blocks... :D 2011-03-13 21:33:52 +00:00
Happy-melon
995d7bb5ea Follow-up r83827: a Block object will never be internally of TYPE_ID. 2011-03-13 15:44:49 +00:00
Happy-melon
bb6644de69 Follow-up r83825: fix Block::parseTarget to recognise autoblocks separately, and change Block::getRedactedName() to run the string through a system message for localisation 2011-03-13 15:14:33 +00:00
Happy-melon
f64f960d9a Some refactoring in Block.php and SpecialBlock.php: move backend stuff into Block.php, and expand the parseTargetAndType() functions to recognise blocks referenced by their block id. 2011-03-13 14:47:34 +00:00
Happy-melon
7805997608 Divert a river through the Augean Stables that is SpecialBlockip.php.
* Move to SpecialBlock.php, and rename class appropriately
* Complete refactor
* Use HTMLForm in block form.  This changes most of the ids and field names on the form, but allows proper validation, nicer formatting, clears up several fixmes, and is generally Better(TM).
* Spin various parts out into static functions, several of which properly belong in the backend (but Block.php is a worse mess still)
* Invert some of the block options so that every checkbox makes the block more severe (so "check to disable email" is fine, but "check to allow usertalk edit" (default true) is inverted to "check to disable usertalk edit" (default false). 
* revert r40359 (move doMassUserBlock() to core).  No one seems to be using this function, which has nothing to do with the frontend UI in SpecialBlock (it might perhaps belong in Block.php); it is pretty bespoke for CheckUser, doesn't seem to have very much utility elsewhere.
2011-03-12 21:54:35 +00:00
Chad Horohoe
b61756cdea Followup r73348, r70608: move 'infinity' stuff to DB classes 2011-01-05 13:43:13 +00:00
Brian Wolff
2b1a4c92d4 (Bug 26425) Due to r71751, wfTimestamp stopped accepting '' to mean get
current timestamp. This caused Block::__construct to put all sort of 
messages in the debug log about invalid timestamp. So change Block to use
timestamp of 0 instead of '' if unspecified.
2010-12-26 04:38:41 +00:00
Aaron Schulz
8648b3cdca Fixed r76560: one more caller of now-private toUnsigned6 2010-12-08 22:18:43 +00:00
Roan Kattouw
11c67c2d6d Fix indentation in Block::infinity() 2010-11-25 15:12:04 +00:00
Sam Reed
a2589ff8c6 Assignment in loop conditions suck
while ( $row = $dbw->fetchObject( $res ) ) { to foreach ( $res as $row ) in includes

Add some braces
2010-10-13 23:11:40 +00:00
Chad Horohoe
7d3bd14822 Followup r70608, don't use master connection just for type check, and use getType() instead of instanceof 2010-09-19 23:25:57 +00:00
Ryan Bies
070122e8b9 DatabaseMssql class and related changes 2010-08-06 23:44:00 +00:00
Alexandre Emsenhuber
4b507edd85 removed PHP4-ism 2010-07-11 18:13:23 +00:00
Alexandre Emsenhuber
fa537d2d3f Fixed some doxygen warnings 2010-06-15 20:09:19 +00:00
Siebrand Mazeland
d279df340e Ran stylize.php, removed trailing whitespace, updated indentation and code formatting. 2010-05-30 14:48:30 +00:00
Platonides
2eea87df8a Stylize. 2010-04-17 21:16:06 +00:00
Platonides
839001c7cc Add yet another parameter for Block construction, so this doesn't show runJobs.php blocking anyone when run from the job queue :)
Follow up r65184.
2010-04-17 21:06:21 +00:00
Platonides
38e64983a2 Follow up r64982. Autoblocks aren't automatically set just by storing ipb_enable_autoblock, we need to look for them.
So do this properly and use Block class to insert the block.
2010-04-17 20:59:05 +00:00
Max Semenik
5d543aeae8 Fix bug that prevented non-hidden users from appearing on Special:BlockList on SQLite 2010-03-12 19:18:14 +00:00
Alexandre Emsenhuber
a5ebe1f736 * (bugs 22665 and 22667) User '0' can now be unblocked and have its block settings changed 2010-02-27 16:15:41 +00:00
Siebrand Mazeland
f8b1c4cfb7 Random indentation and code formatting updates. No functional changes. 2010-02-14 22:07:30 +00:00
Jure Kajzer
785ad24aa7 Changed sequence names to a standard <table>_<field>_seq form.
Updated all nextSequenceValue calls with new sequence names.
OverlordQ stated he'll handle changes to Postgres scripts.
Need someone to change DB2 scripts.
2009-10-28 16:17:16 +00:00
Max Semenik
ae57ab1eec (bug 20275) Fixed LIKE queries on SQLite backend
* All manually built LIKE queries in the core are replaced with a wrapper function Database::buildLike()
* This function automatically performs all escaping, so Database::escapeLike() is now almost never used
2009-10-21 19:53:03 +00:00
Jack Phoenix
092597b8e3 coding style tweaks 2009-10-19 11:15:51 +00:00
Siebrand Mazeland
5a40128656 (bug 17093) Separate date and time in Special:BlockList 2009-05-25 18:02:58 +00:00
Niklas Laxström
d3b61fea7c Escaping fixes 2009-05-22 09:35:48 +00:00
Alex Z
d6ba719217 (bug 18860) Allow non-anon-only blocks of IPs to block email 2009-05-21 20:32:28 +00:00
Niklas Laxström
6b05fb6133 * Allow changing block reason 2009-02-21 10:15:10 +00:00
Alex Z
6779a2cc13 adding newline to end of wfDebug calls where it was missing. 2009-01-13 20:28:54 +00:00
Andrew Garrett
abde25fc39 Do initialiseRange into Block::insert.
Fix related fatal in Abuse Filter.
2008-12-15 12:10:41 +00:00
Alexandre Emsenhuber
7b3b006f94 fix doxygen warnings 2008-12-09 19:54:30 +00:00
Aaron Schulz
1ead2ea8b6 *Remove unused functions
*Mark visibility
2008-11-30 13:09:19 +00:00
Aaron Schulz
1176cd5ad0 * I didn't even notice the extra reblock check; merged this into submit button with hidden input.
* Break long line
* (bug 16436) Don't log if nothing changed
2008-11-23 09:52:29 +00:00
Alex Z
ddfab2390f (bug 15789) Autoblocks now have the same setting for editing user talk as the original block. 2008-09-30 19:57:00 +00:00
Matt Johnston
08e561abb9 (bug 8440) Allow preventing blocked users from editing their talk pages
* Adds database field to ipblocks table, ipb_allow_usertalk, storing whether or not the user can edit their own talk page. Defaults to 0 to coincide with the default value of $wgBlockAllowsUTEdit.
* Recommended to update all current blocks to have a allow_usertalk value of whatever the current setting is
* Retasks $wgBlockAllowsUTEdit to be the default value of the field in the blocking screen - unless a sysop changes the checkbox, will use whatever that variable is set to.
2008-09-25 11:45:26 +00:00
Tim Starling
6f6d09b0e4 Fix docs for r41150, remove commented-out code, remove superfluous brackets in "new" expressions. 2008-09-24 08:46:18 +00:00
Aaron Schulz
926cf89eb1 Add comment 2008-09-22 13:33:06 +00:00
Aaron Schulz
9f5955b76b Apply account creation blocks to users (bug 13611) 2008-09-22 13:21:53 +00:00
Tim Starling
654ec70c23 * Fix some documentation
* Fix K&R style braces, since demon started, we may as well finish. This was one of the last files I wrote before I was converted to Brion-style braces.
* Renamed a variable
2008-09-22 04:52:51 +00:00
Alexandre Emsenhuber
c8113ad020 Fatal error: Call to undefined function wfMemc() in includes/Block.php on line 550 2008-09-21 20:25:21 +00:00
Chad Horohoe
29b0c85cb2 More block updates:
* Improve docs (formatExpiry() is fine, abstracting wouldn't do anything, as it would just become a wrapper for $wgLang->timeanddate())
* Abstract out some param validation from insert()
* Add an update() method to make modification of existing blocks a bit nicer.
2008-09-21 15:16:32 +00:00
Chad Horohoe
561baaedc7 Helps to actually _put_ the info into $wgMemc... 2008-09-21 14:25:46 +00:00
Chad Horohoe
5d66ee3650 * Lots and lots of docs
* Cache the autoblock whitelist in $wgMemc
* Remove old commented out code from when 'infinity' wasn't really 'infinity' but just really far in the future
2008-09-21 14:22:23 +00:00
Andrew Garrett
7106853462 Refactor out Block::isWhitelistedFromAutoblocks 2008-08-08 05:56:43 +00:00
Andrew Garrett
f788268ce2 Don't be lazy: Initialise autoblock objects with both the blocker ID and their name 2008-06-27 09:22:12 +00:00
Andrew Garrett
171c47e0a2 Core changes for AbuseFilter extension.
In particular:
Xml.php
* Add textarea method to Xml class.
* Make submit button optional for Xml::buildForm
* Right-align labels in buildForm.

Article.php:
* Make ArticleDelete hook display a real error

EditPage.php:
* Split off getBaseRevision()

Title.php:
* Allow errors to be ignored to be sent to getUserPermissionsErrors.
* Allow AbortMove hook to display a real error.

Block.php:
* Add 'mAngryAutoblock' option, for blocks by software, which does retroactive autoblocks on the last 5 IPs used in the last 7 days.
2008-06-27 06:24:42 +00:00
Brion Vibber
7b0abe4335 drop redundant wfTimestamp() call... we already got it formatted in TS_MW from decodeExpiry() 2008-05-23 20:31:41 +00:00
Andrew Garrett
bc23aede55 Core changes for GlobalBlocking and TorBlock extensions, plus some core refactoring work:
* Instead of saying 'do that' in a permissions error, actually list what the action is (drawn from the right-$1 messages). This isn't perfect - it says you don't have permission to edit pages when 
you can't edit a single page, but it's better than 'do that'.
* Refactor out some code from various block files into Block::formatExpiry and Block::parseExpiryInput.
* Don't display 'you cannot edit special pages' when you're trying to execute, or create an account, or something like that.
* New AbortAutoblock hook (for use in TorBlock extension), which allows extensions to cancel autoblocks.
2008-05-23 10:34:11 +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
e34a925007 * Move affectedRows count up
* Shouldn't need to pass db object here
* Some code style tweaks
2008-04-16 21:07:39 +00:00