Commit graph

63 commits

Author SHA1 Message Date
Chad Horohoe
aa21e125a3 Remove obvious function-level profiling
Xhprof generates this data now. Custom profiling of various
sub-function units are kept.

Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.

Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
2015-01-07 11:14:24 -08:00
umherirrender
bfbc1c17f9 SpecialBlockList: Remove unused message 'infiniteblock' in formatValue()
Change-Id: I24bf357386366e1bbe3ec1e5463b7b6bba9df0e8
2014-12-15 02:58:31 +00:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
umherirrender
201702e20c Add mediawiki.userSuggest to Special:Block/Unblock/BlockList
This gives a suggestion list when typing a username

Bug: T50240
Change-Id: Ic76a3e5af22f8764023d005d76dfa563d35e5e4d
2014-11-24 20:34:04 +00:00
Prateek Saxena
279d4e2883 Special:BlockList: Use mw-ui-progressive for search button
Bug: 71144
Change-Id: I56969edb6651a26ff2579e1ed9f9da34a9536e46
2014-09-23 15:24:51 -07:00
Bartosz Dziewoński
dc4c88b24a Fix directions of some pagers
Follow-up to 6a637fb0. Turns out these are more confusing than
I originally suspected.

Bug: 70413
Change-Id: Ic4245d9ac14e4cd2f8f5aca0878edcd4dcf85521
2014-09-04 22:21:12 +02:00
Bartosz Dziewoński
6a637fb0bc IndexPager: Introduce constants for values of $mDefaultDirection
I've spent several hours looking at related code and I still can't
remember which direction is 'true' and which is 'false'.

Change-Id: I58694f7a0892c986e7215f59b56b014cece8d40d
2014-09-03 19:54:34 +02:00
Bartosz Dziewoński
1683741e71 TablePager: Modernize style loading
* Create a CSS module for pager styling (table and navigation),
  pulling in existing styles for shared.css. Load it on all pages
  where the pager itself is shown.
* Build a ParserOutput object encapsulating the return HTML and
  required modules, rather than only providing the HTML. Added some
  hacks for backwards-compatibility with old-style calls and
  soft-deprecated them (there are many usages in extensions).

Other cleanup:
* Remove styles in oldshared.css, they were all overwritten by
  shared.css or by styles for .mw-datatable.
* Remove inline styles where possible, explain them where impossible.
* On SpecialListFiles, display navigation bar above the table as well
  as below (this seems to be the convention for other pages).

Change-Id: Iae976f854b96b5c61691918787c4dff7db089c28
2014-08-31 00:48:43 +02:00
Bartosz Dziewoński
d473b6d343 Be consistent about 'TablePager' CSS class usage
* Do not use it when not actually using the TablePager
* Always use it when actually using the TablePager
* Use parent::getTableClass() rather than hardcoding it every time
* Place it before other classes to allow overriding

Change-Id: I042b65be64e2c2fa6c68a7bb972a7a2ea7f55b4e
2014-08-23 15:00:07 +02:00
Kunal Mehta
22906ba398 Turn HTMLBlockedUsersItemSelect into HTMLSelectLimitField
Makes it a "real" HTMLForm option that other code can re-use

Change-Id: If0fb7332daf991b790bbf87e825229dccb10b360
2014-07-13 22:44:39 +00:00
Siebrand Mazeland
ad957a706d Pass phpcs-strict on includes/specials/ (1/3)
Change-Id: Ib4522f22551ed5501e1ab7767b8f481fe6cd72d2
2014-05-09 21:33:58 +02:00
withoutaname
07382d63fe Fix typo for system message name
Change-Id: Ic23f71ab9f6018152f89f35a944c9daae9f94970
2014-05-06 08:53:25 -07:00
umherirrender
f971300427 Fixed some @params documentation (includes/[specialpage|specials])
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: Icf6f36bb53322b39cd5c89523dbd0e4ab10b9ec9
2014-04-19 10:16:52 +02:00
Kunal Mehta
bc798535fd Deprecate SpecialPage::getTitle
Callers should use SpecialPage::getPageTitle, which is
exactly identical.

This is so that in the future we can turn SpecialPage
into a ContextSource, which requires getTitle to return
getContext()->getTitle.

Change-Id: Icdcf5d5295ef5e7f08b1d403e0c123f78738fd40
2013-12-24 12:53:11 -08:00
Kunal Mehta
c3f2858668 Don't rely on array() == null
Just use === null instead.

Change-Id: I6adf066214ad5bf9ae508d190b4e3e3fd92e4736
2013-12-18 06:59:40 +00:00
Kunal Mehta
670117f43b Remove "@todo Do not release 1.19 with this."
It's a bit too late to do that

Change-Id: Ibe38b8179367d1a78472b3b967b3361f6563e7c1
2013-12-18 06:58:58 +00:00
Bartosz Dziewoński
2e68e7e8b8 Remove calls to deprecated HTMLForm#setTitle
Use DerivativeContext with modified title instead.

Most of those should be using FormSpecialPage…

Change-Id: Ia66f3b4b22866cc4ac4ac7b1f2fc2a4b1a9e73f6
2013-10-13 22:17:35 +01:00
Alexandre Emsenhuber
dda57e25bf Remove subpage from form target on Special:BlockList
This information is already in field from the form, so there is
no need to duplicate it.

Change-Id: Ie816cef7aa9864203eb160fd3f1be92d649ed0f0
2013-04-20 08:30:12 +00:00
Siebrand Mazeland
87ec7ad22e Update formatting
Change-Id: I0e334d910a311f067276215b6bff94cd814fc3b3
2013-04-20 10:02:19 +02:00
Alexandre Emsenhuber
09755f3946 Normalise user names passed to Special:BlockList
Special:BlockList now handles correctly user names with spaces when passed as subpage

bug: 47218
Change-Id: I3a52c454c64fdc599c7abcdca05b182e09640c59
2013-04-18 18:48:11 +02:00
Siebrand Mazeland
b84a680a32 Update/add documentation
Change-Id: I897d5833cdaf7dc2d3bca5bb5551958611f22bd9
2013-04-14 21:18:38 +02:00
Alexandre Emsenhuber
df5265e14d Fix case of some Title methods
Change-Id: I37ce7fe392f4941c500fa0a88007664501d7e338
2013-03-27 14:36:05 +01:00
Siebrand Mazeland
80f4ee1720 Update code formatting
Used PHPStorm's code formatting feature, with manual checks and updates.

Change-Id: I0496eba007056bc9c4b09163387f11d6cea2a55d
2013-03-27 13:03:33 +00:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
96a5486ed0 Add SpecialPage::getGroupName and use it
Having all group mapping for Special:SpecialPages in the global
$wgSpecialPageGroups is not a good OO style.
Created a method SpecialPage::getGroupName, which than can be overridden
by each subclasses to the featured group name.

Added also SpecialPage::getFinalGroupName to get the groupname on
Special:SpecialPages to handle the customization and
to keep $wgSpecialPageGroups for b/c

Change-Id: I1de3a186f0a59ec5ecb8996c5f805cf164e9637f
2013-03-07 21:15:54 +01:00
umherirrender
48cd72819e fix some spacing
Change-Id: Ia9650be8b791fd2f0ccbc099436918a9d12d9968
2013-02-04 20:04:26 +00:00
umherirrender
824fad9956 fix some spacing
Change-Id: I78a97ad87e0bfe724fc851daf6ffeeed81887800
2013-01-26 19:15:35 +01:00
umherirrender
b8049b6915 Show comment not as block in tables
Special:BlockList and Special:ListFiles showing comments inside a table
cell. In that case the parentheses not needed, because the table cell
splits it from the rest. Using the Linker method, which does not produce
the parentheses.

The file history of an file pages does this the same way.

Change-Id: I7fbb068bd2acd90f8117719706c32ca05b27b09f
2012-12-01 22:38:04 +01:00
umherirrender
85d8ee1f87 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
2012-10-10 20:14:40 +02:00
umherirrender
aff21af9ae Allow aliased field names with separated syntax
This introduce the syntax from aliased table names for aliased field
names into the abstract database layer:

array( 'alias' => 'field' ) gives 'field AS alias'

This patch also includes changes to query pages, api and some more
places to show, how the new syntax looks in "production".

This allow us to remove the "AS" for Non-PostgreSQL databases, if we
want that.

Change-Id: I5f0de1c2f29092c173aec3de93ffdef436799e8d
2012-08-15 15:16:09 +02:00
Alexandre Emsenhuber
c3f27467a0 * Use local context to get messages
* Use Language::userTimeAndDate() instead of Language::timeanddate()
2011-12-23 20:51:37 +00:00
Brion Vibber
598481687a Followup r104350, r104318: only allow custom limits through if they're valid positive ints. 2011-12-06 19:45:56 +00:00
Brion Vibber
1200ae7dae Revert r104353, r104354, r104356, r104358, r104383: changes to pagers breaking existing links as noted in CR. 2011-12-06 19:32:29 +00:00
John Du Hart
e91e4c5562 Followup r104353, fixing a regression in the BlockList 2011-11-27 18:28:13 +00:00
John Du Hart
54dd841a6f This is the rework I was talking about in r104318 for 1.19. Instead of having Pager subclasses build HTML forms by hand build HTMLForm into the Pager class. Much less painful, no?
This is simply a first pass, there's many more classes to convert.
2011-11-27 18:23:50 +00:00
John Du Hart
5c95e650b2 Followup r104318, sort the options in the limit dropdown 2011-11-27 17:31:14 +00:00
John Du Hart
296e843458 Bug 32603 - limit option is missing on Special:BlockList
Okay so essentially this is a workaround for a 1.18 release blocker, and is not a real solution. The real solution is to rework the Pager class to work with HTMLForm and then move the form for BlockList into the BlockListPager. I'll have that done before 1.19.
2011-11-26 22:15:36 +00:00
John Du Hart
29fa9ffa19 Bug 32665 - Special:BlockList/username is using given username, but does not show the username in the input field 2011-11-26 20:40:59 +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
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
e3c2823ecf Join ipb_by to user table to get the user name. If we can't find a user, fallback to ipb_by_text. This lets centralauth blocks have the blocking user be displayable again. 2011-10-19 18:50:34 +00:00
Raimond Spekking
cd8aa6f4de Fix stupid typo in r99082. Thanks to Niklas for CR 2011-10-06 20:19:23 +00:00
Happy-melon
8155c0c477 FU r83909: restore preprocessing stage to cache link existence using LinkBatch; otherwise a separate DB query is done on every link. Since the ipb_by_text field is no longer in use we still have to do a cross-cast to get the usernames from the ids stored in ipb_by, but we can do that with one query via a UserArray, so it's not significantly worse than before. 2011-10-06 13:25:56 +00:00
Raimond Spekking
ed09139f27 Fix a regression from 1.17: Show date/times in user preference timezone.
Ping r84258.
2011-10-06 09:52:34 +00:00
Aaron Schulz
3f8f920926 Restored ability to list out an autoblock via #NUMBER 2011-10-06 03:32:17 +00:00
Aaron Schulz
015d0c4861 Fixed broken ipb_deleted condition. Does not effect the special page since it is redundant for that use (the condition is added elsewhere). 2011-10-02 20:50:48 +00:00
Aaron Schulz
1ab9f9912a Don't show 'autoblock disabled' for IP blocks 2011-10-02 06:10:45 +00:00
Alexandre Emsenhuber
00b6d465f1 * Made IndexPager extend ContextSource
* Updated special pages using IndexPager or one if its subclasses to pass the context object and use it instead of global variables
* Call Linker methods statically
* Changed LogPager::getUser() to LogPager::getAuthor() to avoid conflict with ContextSource::getUser()
2011-09-20 20:00:05 +00:00
John Du Hart
dad0a24b7b (bug 30352) Add option to BlockList to filter out IP range blocks 2011-08-23 18:40:04 +00:00