Commit graph

69 commits

Author SHA1 Message Date
robin
fef4226a36 Fix return doc and update whitespace in SpecialBlock.php
Fix return documentation for blockLogFlags() in SpecialBlock.php.

Make whitespace of if() and foreach() consistent per coding standards in SpecialBlock.php

Change-Id: I87ea271e71c45dcc3f7cdd0960eb8f60a13cfec6
2012-09-01 00:55:03 +02:00
csteipp
764716c641 (bug 35839) Check permisions for revdel blocks
If a block includes the "Hide username" to revdel the username, check
that the user has permission to 'hideuser' before showing the reason
for the block.

Other metadata about the block (expiration, limits) will still be visible
to admins.

Change-Id: I50a49ea6876b99a944d27f7c34910f0aa47556c3
2012-08-14 07:08:08 -07:00
Aaron Schulz
101866ac3c Merge "Introduce default expiry time for special:block (bug 32178)" 2012-08-03 19:09:50 +00:00
Waldir Pimenta
7800979a9f Introduce default expiry time for special:block (bug 32178)
Minor side change 1: fix preservation of infinite expiry time when reblocking:
the hardcoded value "indefinite" did not match with the default value
specified in ipboptions "infinite"

Minor side change 2: fix link in includes/Message.php's documentation

Change-Id: Icb1edabd8bb3dd1020c023b27b1270b9d2735b06
2012-07-31 18:12:01 +01:00
Brad Jorsch
2a60a33164 (bug 35893) Special:Block should load mediawiki.special.block.js
Special:Block is showing checkboxes that apply only to IP blocks when
blocking usernames, and vice versa. The code to hide these checkboxes
already exists in resources/mediawiki.special/mediawiki.special.block.js,
but it's not being loaded.

Change-Id: I875125b56e9f234dbff87bff3b045877fb1614be
2012-07-24 16:59:42 -04:00
Alexandre Emsenhuber
655d8cd9c9 Explicitely define $links as an array in SpecialBlock::postText().
I know this doesn't change anything, but that's with stuff like this
we do get E_NOTICEs when suddenly there're no more items in the array.

Change-Id: I633d04297e756cc1e1cc74cd0e65ebf1cb6dfdd1
2012-06-26 11:13:18 +02:00
umherirrender
f963ec0cea (bug 32604) Some messages needs escaping of wikitext inside username
Change-Id: I223a5fb8d110ceace122acb7045bc6a925bfda66
2012-05-04 19:15:11 +02:00
Aaron Schulz
8441c854aa (bug 32827) "[Regression] Block log for IP ranges not shown on Special:Block"
(imported from SVN)

Change-Id: I16485d84553256ff6ad4932de7d17540e90af779
2012-03-21 15:56:43 -07:00
Roan Kattouw
0fca9a7991 Revert r107309, r113601, r113704, r113742, r113792, r113838, r113859, r113893, r113894, r113952, r114047, r114252, r114256, r114257. This reverts the remaining 'new' revisions in core.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 00:16:50 +00:00
Aaron Schulz
024c31d490 (bug 32827) "[Regression] Block log for IP ranges not shown on Special:Block" 2012-03-14 01:42:14 +00:00
Sam Reed
09a78c1368 More return documentation 2012-02-09 21:36:14 +00:00
Sam Reed
121f9d2d25 Fixup some returns/return documentation 2012-01-03 15:36:46 +00:00
Alexandre Emsenhuber
bc4ba29f8d Use local context to get messages 2011-12-28 19:15:10 +00:00
Brian Wolff
1427dd0d42 (bug 33156) Special:block didn't let you confirm blocking yourself if using non-normalized name.
Was comparing the normalized name to the non-normalized name that gets inserted into the form, since
request variables from previous request override form defaults.
2011-12-20 10:15:18 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Sam Reed
62491fef13 Comments, braces, explicit member variables
Remove a couple of unused variables
2011-11-16 13:22:03 +00:00
John Du Hart
2609453ebc Convert SpecialBlock to subclass FormSpecialPage
Also fixes the problem introduced in r103115
2011-11-15 02:25:36 +00:00
John Du Hart
b39e54f407 Updated core SpecialPages to use new functions introduced in r103111 and r103095 2011-11-15 01:34:19 +00:00
Alexandre Emsenhuber
56508fdca6 Removed usage of $wgUser in block and unblock processing:
* Made HTMLFormField pass the HTMLForm object to the validation and filter callbacks (so that they can get a context)
* Added new parameter to SpecialBlock::checkUnblockSelf() to pass the user doing the request
* SpecialBlock::processForm() and SpecialUnblock::processUnblock() now require a context as second parameter; added SpecialBlock::processUIForm() and SpecialUnblock::processUIUnblock() as adaptators from HTMLForm as second parameter to context
2011-11-13 07:25:56 +00:00
Alexandre Emsenhuber
b212bace90 Per Nikerabbit's comment on r100621:
* Removed OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() and make OutputPage::setPageTitle() and OutputPage::setHTMLTitle() accept a Message object
* Updated core calls (including some that I missed last time because of non-matching case)
* Added Message::setContext() and use it in RequestContext so that I don't need to duplicate the call in OutputPage
* Yes, I'm calling $this->msg() on places and then setting the context one more time in OutputPage::setPageTitle() or OutputPage::setHTMLTitle(), but at least I won't be confused about which objects $
2011-10-27 20:23:16 +00:00
Alexandre Emsenhuber
ae45908c59 Added OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() as modified versions of OutputPage::setPageTitle() and OutputPage::setHTMLTitle() that take an message name and its parameters; updated all calls in core that can use the two new functions 2011-10-24 17:24:38 +00:00
Aaron Schulz
7ecebdc787 Don't add 'autoblock disabled' flag for IP range blocks 2011-10-06 22:57:32 +00:00
Aaron Schulz
94ea6f3551 Fixed:
Undefined index: IPV6 in D:\www\MW_trunk\phase\includes\specials\SpecialBlock.php on line 516
2011-10-05 02:36:40 +00:00
Aaron Schulz
1f86d2f45f Fixed bogus addModules() call which broke the JS on the block form (didn't load) 2011-10-01 05:55:12 +00:00
Aaron Schulz
b01296220f (bug 31206) "Altering blocks doesn't appear to be working". Don't compare string to User objects :) 2011-09-28 01:28:29 +00:00
Alexandre Emsenhuber
85cfb00304 Allow LogEventsList::showLogExtract() to get a Title object instead of having to do Title -> string -> Title conversion 2011-09-24 17:52:53 +00:00
Alexandre Emsenhuber
2ca3123672 Added missing calls to SpecialPage::setHeaders() and SpecialPage::outputHeader() 2011-09-21 08:54:14 +00:00
Alexandre Emsenhuber
772a3a62d1 * Use local context instead of global variables (where possible)
* Made getFormFields() non-static since the only call to it is in that file
2011-09-12 08:49:14 +00:00
Siebrand Mazeland
6a0ac807a4 Add some full message keys as they originate from these locations. 2011-09-01 14:40:56 +00:00
Siebrand Mazeland
c0d9e6dab6 w/s 2011-09-01 13:59:38 +00:00
Roan Kattouw
ef16b329b7 Followup r85025, r85166, r93233: use strict comparison per CR comment, because "0" != "00" is false 2011-08-11 10:33:22 +00:00
Happy-melon
361c35629b * Fix double-escaping from r85025
* Allow admins to modify blocks placed (probably accidentally) on themselves *by* themselves, whether or not they have the 'unblockself' permission.
2011-07-26 19:04:48 +00:00
Aryeh Gregor
2423be67b0 Fix inaccurate return type in comment 2011-07-20 02:34:17 +00:00
Alexandre Emsenhuber
1e253f81c6 * Use standard method to check user permissions
* Directly throw an ReadOnlyError instead of calling OutputPage::readOnlyPage()
* In Special:Block: don't let user think the error is temporary if he doesn't have right and the database is locked, instead check permissions first and then the database lock
2011-07-16 19:31:18 +00:00
Sam Reed
bdc31bb9bc Change usages of $wgUser->getSkin() in special pages to use $this->getSkin()
Fix trailing whitespace
2011-07-01 02:25:19 +00:00
Aaron Schulz
4eb5827a1f Code style cleanups, use strict comparison with $data['PreviousTarget'] per CR 2011-06-24 07:49:50 +00:00
Matěj Grabovský
c8c3159a85 Follow-up r90371, per comment by ^demon
Escape wikitext in username before passing it to certain messages; also remove <nowiki>s in those as they're superfluous.
2011-06-20 19:45:35 +00:00
Mark A. Hershberger
a6722cc9aa w/s changes. 2011-06-02 19:32:45 +00:00
Antoine Musso
477a394e5f PreviousTarget is now optional when blocking a user
The API does not seem to give a PreviousTarget field all the time.
This patch also fix the an assertion for ApiBlockTest::testMakeNormalBlock
2011-05-29 07:00:52 +00:00
Alexandre Emsenhuber
9536c97c00 DB_READ -> DB_SLAVE, the former is obsolete 2011-05-18 19:29:50 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Happy-melon
085148f1ae Follow-up r83795: fix E_NOTICE due to undefined array member. 2011-05-02 18:31:42 +00:00
Happy-melon
58caa451fa Look mum, no globals! Implement a RequestContext for HTMLForm, passed in the constructor. Currently this is optional with B/C; at a later date it should be made compulsory. Doing this removes the need to call $form->setTitle() on every single use; only when you want to set the title to something other than the page context title. Implemented the new syntax in a sample of forms. Also fix a few minor errors in HTMLForm.php that my IDE complained about. 2011-04-13 16:51:22 +00:00
Happy-melon
ff194ef5b4 Follow-up r85025: fix the you're-trying-to-block-yourself-you-twit warning, and make it an actual checkbox confirmation. Also use said confirmation for reblocks, and HideUser (bug 18678). Mark a static function from HTMLForm which is called from SpecialBlock as explicitly public. 2011-04-01 23:13:15 +00:00
Happy-melon
2a099b1fe9 Follow-up r85025 - use strict comparison 2011-03-30 20:05:17 +00:00
Happy-melon
fea912acf2 (bug 23408) give admins a warning before letting them block themselves. Also tweak the logic so that loading the interface for one already-blocked user, then actually submitting a block on a different user, shows the confirmation again if the second user is already blocked. 2011-03-30 18:00:11 +00:00
Happy-melon
e467c6a913 Fix "$1 is already blocked" parameter-not-passed-to-message error 2011-03-22 17:26:32 +00:00
Aaron Schulz
f6e0bc9324 Fixed daft error in r84523 so "angry" autoblocks work again 2011-03-22 11:51:09 +00:00
Aaron Schulz
bc6ec5e2ff Relate block log entries to block table rows (useful for bug 25763) 2011-03-22 11:22:15 +00:00
Happy-melon
7a9fc69573 Follow-up r84475: fix notices. 2011-03-22 11:14:11 +00:00