Added spaces after/before parenthesis
Removed unneeded parenthesis around some statements
Broke a long line
Change-Id: I7fbe129f7bbf524dd0598ece2a9708643f08453b
IndexPager currently assumes that if an offset is supplied, then it is
not at the first entry. This is trivially false in many cases, e.g. if
the offset is an older-than date and that date is in the future.
The only way to really determine whether we're at the first entry when
an offset is supplied is to query for 1 row in the opposite direction.
This patch does just that.
Bug: 47950
Change-Id: I05fec226abb609b78a62f2a23f35d5b52a48ab1a
Added TablePager::getLimitSelectList() to get the list of values to
show for the drop-down so that it can be used to generate a custom
<select> or to be used on a form generated with HTMLForm.
Also changed HTML generation to use XmlSelect class.
Change-Id: I13ac9f17c95445b04f3cf6feec6ae36f0b9cb03d
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
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
Added/removed spaces around logical/arithmetic operator
Reduced multiple empty lines to one empty line
Removed wrong tabs before comments at end of line
Removed too many spaces in assigments
Change-Id: I2bba4e72f9b5f88c53324d7b70e6042f1aad8f6b
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
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
Second attempt after that the first one was reverted in I119160d59c4fca0d069adef60151b30d53b582a1.
Change-Id: If301c7cac3fafbcdd6f3ff8e0e822b0db29f09a2
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
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
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
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
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.
* 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()