Commit graph

129 commits

Author SHA1 Message Date
mwalker
b5b55ec026 Fixing bug where end limit would not be calculated
In the pager object, if the query was constructed
such that the index was a fully qualified field then
the 'past the end' index reference would not get
computed.

This is because $mIndexField stores the FQ field name
but $mPastTheEndRow is indexed on the non FQ name.
Therefore a warning would be generated due to a non
existent array key.

Change-Id: I52e1cbc8f7dad07de1ba5ba3bdfa2d107dfb4d93
2012-09-26 05:04:36 +00:00
Siebrand Mazeland
8886399d83 Add missing unit of measure in inline CSS.
Change-Id: I0baceb98302d1af58270d13713b4366eda7c6dc3
2012-08-16 11:07:34 +02:00
Brian Wolff
d033fe3a5d (bug 33037) Special:newfiles treat its subpage parameter as a limit
This restores the older behaviour of Special:newfiles. This allows
people to easily include variable sized galleries via
{{Special:newfiles/12}} syntax (people could of course previously do
{{special:newfiles|limit=12}} but less people know that.

Also makes IndexPager::setLimit validate the limit in the same way
it validates the limit coming from a url, and makes it so that
calling setLimit takes precedence over its built in determine the limit
code.

p.s. This is my first commit in our great glourious git future, so
let me know if i did anything wrong

Change-Id: I7fc148e56e43b7c453a1a9559ef74b8b3119c6fe
2012-08-07 11:54:53 -07:00
Alexandre Emsenhuber
1578780002 (bug 25095) Special:Categories should also include the first relevant item when "from" is filled
Second attempt after that the first one was reverted in I119160d59c4fca0d069adef60151b30d53b582a1.

Change-Id: If301c7cac3fafbcdd6f3ff8e0e822b0db29f09a2
2012-08-02 10:10:19 +02:00
Aaron
84ce626df6 Moved getDatabase() from contribs pager to Pager class.
Change-Id: I9443ecd18cdaca614aa446b5457c837a039dafe3
2012-07-13 11:47:01 -07:00
Antoine Musso
aab43dd495 escape tags and entity in doxygen comments
When inserting XML elements inline <such as this one>, doxygen chokes
about it not being known. Simply enclosing the tag in double quotes
prevents doxygen from emitting a warning.

Also enclosed a few invalid functions calls such as \. and double quoted
the HTML entities such as &foobar;

Change-Id: I4019637145e683c2bec3d17b2fd98b0c50a932f1
2012-07-10 17:08:32 +02:00
Alexandre Emsenhuber
c0ea2e70fc No need to wrap the result of DatabaseBase::select() in a ResultWrapper object.
Change-Id: I2cceb363b4573a850a7a63c93d2ca9899e477a7f
DatabaseBase::select() already returns a ResultWrapper object, so its useless to wrap it again.
2012-07-04 10:57:57 +02:00
mlitn
c8e0ec3f4b Introduce a new hook that allows extensions to add to My Contributions
Meanwhile also:
- refactored reallyDoQuery in Pager.php, to make outside intervention possible
- extend reallyDoQuery in SpecialContributions.php, adding in the hook and composing the final results array based on the combined results of all queries added through the hook

Change-Id: Ifd63cdf1950f914a3fba1757a905385aca311eda
2012-07-03 10:48:29 -07:00
Aaron Schulz
604148f1be Revert "Introduce a new hook that allows extensions to add to My Contributions".
In formatRow(): the hook change breaks FlaggedRevs, and also $ret may not
always be defined. The patch could use some extra work.

This reverts commit 0944502d4c

This reverts commit d0131e8a19.

Change-Id: I05d980e19d99e1c461199705b04de9e307daa907
2012-06-27 21:27:32 -07:00
mlitn
0944502d4c Introduce a new hook that allows extensions to add to My Contributions
Meanwhile also:
- refactored reallyDoQuery in Pager.php, to make outside intervention possible
- extend reallyDoQuery in SpecialContributions.php, adding in the hook and composing the final results array based on the combined results of all queries added through the hook
- remain backwards compatible on method-level
- fix FakeResultWrapper::fetchRow, which (contrary to ResultWrapper::fetchRow) didn't always return an array

Change-Id: I74c3784d6d93b992d72f2db24cc29f30e458c1e3
2012-06-23 01:37:18 +02:00
Alexandre Emsenhuber
0274a2839a Use local context to get messages
Change-Id: I0cde09a0339fd05c0eb8df9b2abfbfea973f61fe
2012-06-06 22:21:49 +02:00
umherirrender
41988661e4 GROUP BY and ORDER BY supports arrays in Database class
Change-Id: Ib431b07ffa2ce6843e21536de2ff19c648e0a595
2012-05-13 00:06:48 +02:00
Alexandre Emsenhuber
d1f8640a3b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
2012-05-11 10:34:29 +02:00
jeroendedauw
190952379e code style tweaks
Change-Id: I992459cd740678d0eb0b2dd70de6c092d7dba67e
2012-04-05 20:29:30 +02:00
Antoine Musso
e58513eb9c (bug 34736) empty limit on special pages causes navigation issues
On special pages, the older link showed a limit='' query parameter which
made the page show nothing ('' is evalued to a limit of 0 articles).

The cause is r105809 which changed the way we interprets parameters in
wfArrayToCGI() and wfCGIToArray(). Previously, An empty string value would skip
the key, after r105809, we need to use null.
2012-02-27 10:17:01 +00:00
Siebrand Mazeland
ec4bb05069 (bug 34702) Localised parentheses are now used in more special pages. 2012-02-26 13:08:41 +00:00
Siebrand Mazeland
fa53862b3f Wow. Messy. Follow-up r112426, r112424: Fix incorrect calls. Should have been escaped() instead of escape(). 2012-02-26 12:11:35 +00:00
Siebrand Mazeland
7e7079374f Follow-up r112424: Per IAlex on IRC: Use escape() instead of plain() for improved security. 2012-02-26 12:07:21 +00:00
Siebrand Mazeland
fbe974a6f8 Follow-up r112410, r112412: Cheaper processing using plain(). 2012-02-26 11:49:01 +00:00
Siebrand Mazeland
68643f5079 (bug 34702) Use localised parentheses in Special:Contributions. 2012-02-25 20:42:08 +00:00
Jeroen De Dauw
8054075513 fix doc, this is not an array 2012-02-23 22:58:11 +00:00
Jeroen De Dauw
b996890e4e docs++ 2012-02-23 22:26:38 +00:00
Sam Reed
85bbb0b080 Fixing some of the "@return true" or "@return false", need to be "@return bool" and then the metadata can say true if foo, false if bar
Other documentation improvements
2012-02-09 18:01:10 +00:00
Jeroen De Dauw
780b62663e spacing fix 2012-01-24 00:25:00 +00:00
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +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
d8dd0c6507 Followup r104353, updating Special:ProtectedTitles
Adds HTML form fields for namespaces and restriction levels
Adds getVal() to HTMLForm
2011-11-28 00:31:05 +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
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
Aaron Schulz
c8575ffd7a FU r101629, made Pager only call doBatchLookups() if there are rows 2011-11-02 17:33:00 +00:00
Aaron Schulz
dab142d5f0 Moved contribs rev parent ID batch query into doBatchLookups() 2011-10-20 02:26:59 +00:00
Aaron Schulz
ddaa5d800e * Added a proper Pager::doBatchLookups() function
* Made HistoryPager use a link batch via Pager::doBatchLookups()
2011-10-20 00:43:43 +00:00
Happy-melon
a73791be74 Documentation and type hinting. 2011-10-06 13:22:53 +00:00
Daniel Friesen
8ca8e37db7 More RequestContext -> IContextSource. 2011-10-02 17:42:21 +00:00
Daniel Friesen
aa6573c7ab Merge r98679 from the pageoutput branch into trunk. 2011-10-02 16:37:32 +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
Aaron Schulz
4ab31fc35b FU r97022: Fallback to empty array for getExtraSortFields() result in __construct() if no value is set for the sort order/type. 2011-09-14 17:42:28 +00:00
Aaron Schulz
d2d59e246c Possible fix for issue reported in r83762. I had a hard time confirming the problem/fix with profiling. Committing this now to get more attention. 2011-09-13 23:24:34 +00:00
Krinkle
f98a0ec075 Split up TablePager css class, introduce .mw-datatable
* All tables generated with the TablePager PHP class use this css class for their styling. This visual look has since inspired several templates and other tables on the wikis and in extensions to present data with row-highlighting functionality. To make it easier to do that, separating the generic styling into a new css class "mw-datatable" and use it in the TablePager PHP class.
* Kept pager-specific "min-width" rule under .TablePager
* Other CSS classes for TablePager are also untouched
* Changed table-heading color slightly to not be exactly the same as the hover-style (design/usability)
2011-09-01 10:38:19 +00:00
Robin Pepermans
7c624542f0 (bug 6100; follow-up to r91315) Being bold and removing $wgBetterDirectionality (and dependent wfUILang) in core, as most or all work is finished.
Also:
* Introduce classes mw-float-end, mw-float-start so we don't have to use inline css depending on wfUILang()/$wgLang (see HistoryPage and SpecialFileDuplicateSearch)
* Add direction mark to protection log
* Remove specialpageattributes as it is obsoleted by this commit (also fixes bug 28572)
* Add two direction marks in wfSpecialList, which makes ltr links on rtl wiki (and vice versa) display nicely as well (only on those special pages however)
* Revert r91340 partially: use mw-content-ltr/rtl class anyway in shared.css. Both ways have their [dis]advantages...
* Set the direction of input fields by default to the content language direction (except buttons etc.) in shared.css
2011-07-06 02:26:06 +00:00
Sam Reed
77b42e01ff Followup r89617, r91428 call $pager->doQuery explicitally so we get a set result object, from which, we can then get a row count
Expliticly marking doQuery() in pager as public
2011-07-05 00:09:09 +00:00
Robin Pepermans
9b9dc2fdfd Simpler code 2011-06-30 15:20:57 +00:00
Robin Pepermans
9077baef30 Follow-up to r90265: directionality improvements as part of bug 6100 (under $wgBetterDirectionality):
* Correct directionality when viewing diffs
* Correct arrows for Pager
* CSS/JS pages always 'en' (LTR)
* Messages on Special:Allmessages have lang and dir attributes based on the selected language
2011-06-18 13:12:52 +00:00
Sam Reed
50d5b074d0 And some more parameter documentation!! 2011-05-28 16:31:00 +00:00
Alexandre Emsenhuber
3bc50f6984 Use WebRequest::getQueryValues() to get all query strings parameters instead of $_GET 2011-05-26 16:18:35 +00:00
Leo Koppelkamm
9aa24fcb9f Switching arrows in Special:FileList to match the usual behaviour in MW. Bug 18962 2011-05-02 19:56:28 +00:00
Happy-melon
229b5aa755 (bug 19942) remove deprecated HTML attributes (cellpadding, align, valign) from TablePager. 2011-03-30 17:37:25 +00:00
Happy-melon
f050fabd6b Complete the trinity of blocking frontend interfaces by rewriting SpecialIpblocklist:
* Move and rename to SpecialBlockList
* Use an HTMLForm in GET mode for the options form
* Use TablePager to organise the results more nicely
* Standardise the filtration for IPs and IP ranges, so looking at blocks for a range will now also show rangeblocks which contain the range
* General tidy up
2011-03-14 16:09:44 +00:00
Raimond Spekking
5e74a2007c Follow-up r82391 per Nikerabbit's CR: Fix it in a better way 2011-02-18 15:14:08 +00:00