dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Load previous tags in ChangeTags::addTags() from DB_MASTER"
[lhc/web/wiklou.git]
/
includes
/
Pager.php
diff --git
a/includes/Pager.php
b/includes/Pager.php
index
747d2c1
..
5f05460
100644
(file)
--- a/
includes/Pager.php
+++ b/
includes/Pager.php
@@
-244,7
+244,7
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Set the offset from an other source than the request
*
/**
* Set the offset from an other source than the request
*
- * @param
$offset Int|String
+ * @param
int|string $offset
*/
function setOffset( $offset ) {
$this->mOffset = $offset;
*/
function setOffset( $offset ) {
$this->mOffset = $offset;
@@
-255,7
+255,7
@@
abstract class IndexPager extends ContextSource implements Pager {
*
* Verifies limit is between 1 and 5000
*
*
* Verifies limit is between 1 and 5000
*
- * @param
$limit Int|String
+ * @param
int|string $limit
*/
function setLimit( $limit ) {
$limit = (int)$limit;
*/
function setLimit( $limit ) {
$limit = (int)$limit;
@@
-282,7
+282,7
@@
abstract class IndexPager extends ContextSource implements Pager {
* in the result or not. By default this is not the case, but when the
* offset is user-supplied this might be wanted.
*
* in the result or not. By default this is not the case, but when the
* offset is user-supplied this might be wanted.
*
- * @param
$include bool
+ * @param
bool $include
*/
public function setIncludeOffset( $include ) {
$this->mIncludeOffset = $include;
*/
public function setIncludeOffset( $include ) {
$this->mIncludeOffset = $include;
@@
-292,10
+292,10
@@
abstract class IndexPager extends ContextSource implements Pager {
* Extract some useful data from the result object for use by
* the navigation bar, put it into $this
*
* Extract some useful data from the result object for use by
* the navigation bar, put it into $this
*
- * @param
$isFirst bool:
False if there are rows before those fetched (i.e.
+ * @param
bool $isFirst
False if there are rows before those fetched (i.e.
* if a "previous" link would make sense)
* if a "previous" link would make sense)
- * @param
$limit Integer: e
xact query limit
- * @param
$res ResultWrapper
+ * @param
int $limit E
xact query limit
+ * @param
ResultWrapper $res
*/
function extractResultInfo( $isFirst, $limit, ResultWrapper $res ) {
$numRows = $res->numRows();
*/
function extractResultInfo( $isFirst, $limit, ResultWrapper $res ) {
$numRows = $res->numRows();
@@
-349,7
+349,7
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Get some text to go in brackets in the "function name" part of the SQL comment
*
/**
* Get some text to go in brackets in the "function name" part of the SQL comment
*
- * @return
S
tring
+ * @return
s
tring
*/
function getSqlComment() {
return get_class( $this );
*/
function getSqlComment() {
return get_class( $this );
@@
-359,22
+359,24
@@
abstract class IndexPager extends ContextSource implements Pager {
* Do a query with specified parameters, rather than using the object
* context
*
* Do a query with specified parameters, rather than using the object
* context
*
- * @param string $offset
i
ndex offset, inclusive
- * @param
$limit Integer: e
xact query limit
- * @param
$descending Boolean: q
uery direction, false for ascending, true for descending
+ * @param string $offset
I
ndex offset, inclusive
+ * @param
int $limit E
xact query limit
+ * @param
bool $descending Q
uery direction, false for ascending, true for descending
* @return ResultWrapper
*/
public function reallyDoQuery( $offset, $limit, $descending ) {
* @return ResultWrapper
*/
public function reallyDoQuery( $offset, $limit, $descending ) {
- list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $descending );
+ list( $tables, $fields, $conds, $fname, $options, $join_conds ) =
+ $this->buildQueryInfo( $offset, $limit, $descending );
+
return $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
}
/**
* Build variables to use by the database wrapper.
*
return $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
}
/**
* Build variables to use by the database wrapper.
*
- * @param string $offset
i
ndex offset, inclusive
- * @param
$limit Integer: e
xact query limit
- * @param
$descending Boolean: q
uery direction, false for ascending, true for descending
+ * @param string $offset
I
ndex offset, inclusive
+ * @param
int $limit E
xact query limit
+ * @param
bool $descending Q
uery direction, false for ascending, true for descending
* @return array
*/
protected function buildQueryInfo( $offset, $limit, $descending ) {
* @return array
*/
protected function buildQueryInfo( $offset, $limit, $descending ) {
@@
-407,15
+409,16
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Pre-process results; useful for performing batch existence checks, etc.
*
/**
* Pre-process results; useful for performing batch existence checks, etc.
*
- * @param
$result ResultWrapper
+ * @param
ResultWrapper $result
*/
*/
- protected function preprocessResults( $result ) {}
+ protected function preprocessResults( $result ) {
+ }
/**
* Get the formatted result list. Calls getStartBody(), formatRow() and
* getEndBody(), concatenates the results and returns them.
*
/**
* Get the formatted result list. Calls getStartBody(), formatRow() and
* getEndBody(), concatenates the results and returns them.
*
- * @return
S
tring
+ * @return
s
tring
*/
public function getBody() {
if ( !$this->mQueryDone ) {
*/
public function getBody() {
if ( !$this->mQueryDone ) {
@@
-455,11
+458,11
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Make a self-link
*
/**
* Make a self-link
*
- * @param string $text
t
ext displayed on the link
- * @param array $query
a
ssociative array of parameter to be in the query string
- * @param string $type
v
alue of the "rel" attribute
+ * @param string $text
T
ext displayed on the link
+ * @param array $query
A
ssociative array of parameter to be in the query string
+ * @param string $type
V
alue of the "rel" attribute
*
*
- * @return
String:
HTML fragment
+ * @return
string
HTML fragment
*/
function makeLink( $text, array $query = null, $type = null ) {
if ( $query === null ) {
*/
function makeLink( $text, array $query = null, $type = null ) {
if ( $query === null ) {
@@
-491,13
+494,14
@@
abstract class IndexPager extends ContextSource implements Pager {
*
* @return void
*/
*
* @return void
*/
- protected function doBatchLookups() {}
+ protected function doBatchLookups() {
+ }
/**
* Hook into getBody(), allows text to be inserted at the start. This
* will be called even if there are no rows in the result set.
*
/**
* Hook into getBody(), allows text to be inserted at the start. This
* will be called even if there are no rows in the result set.
*
- * @return
S
tring
+ * @return
s
tring
*/
protected function getStartBody() {
return '';
*/
protected function getStartBody() {
return '';
@@
-506,7
+510,7
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Hook into getBody() for the end of the list
*
/**
* Hook into getBody() for the end of the list
*
- * @return
S
tring
+ * @return
s
tring
*/
protected function getEndBody() {
return '';
*/
protected function getEndBody() {
return '';
@@
-516,7
+520,7
@@
abstract class IndexPager extends ContextSource implements Pager {
* Hook into getBody(), for the bit between the start and the
* end when there are no rows
*
* Hook into getBody(), for the bit between the start and the
* end when there are no rows
*
- * @return
S
tring
+ * @return
s
tring
*/
protected function getEmptyBody() {
return '';
*/
protected function getEmptyBody() {
return '';
@@
-546,7
+550,7
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Get the number of rows in the result set
*
/**
* Get the number of rows in the result set
*
- * @return
Integer
+ * @return
int
*/
function getNumRows() {
if ( !$this->mQueryDone ) {
*/
function getNumRows() {
if ( !$this->mQueryDone ) {
@@
-558,7
+562,7
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Get a URL query array for the prev, next, first and last links.
*
/**
* Get a URL query array for the prev, next, first and last links.
*
- * @return
A
rray
+ * @return
a
rray
*/
function getPagingQueries() {
if ( !$this->mQueryDone ) {
*/
function getPagingQueries() {
if ( !$this->mQueryDone ) {
@@
-597,7
+601,7
@@
abstract class IndexPager extends ContextSource implements Pager {
/**
* Returns whether to show the "navigation bar"
*
/**
* Returns whether to show the "navigation bar"
*
- * @return
Boolean
+ * @return
bool
*/
function isNavigationBarShown() {
if ( !$this->mQueryDone ) {
*/
function isNavigationBarShown() {
if ( !$this->mQueryDone ) {
@@
-613,9
+617,9
@@
abstract class IndexPager extends ContextSource implements Pager {
* $linkTexts will be used. Both $linkTexts and $disabledTexts are arrays
* of HTML.
*
* $linkTexts will be used. Both $linkTexts and $disabledTexts are arrays
* of HTML.
*
- * @param
$linkTexts Array
- * @param
$disabledTexts Array
- * @return
A
rray
+ * @param
array $linkTexts
+ * @param
array $disabledTexts
+ * @return
a
rray
*/
function getPagingLinks( $linkTexts, $disabledTexts = array() ) {
$queries = $this->getPagingQueries();
*/
function getPagingLinks( $linkTexts, $disabledTexts = array() ) {
$queries = $this->getPagingQueries();
@@
-675,7
+679,7
@@
abstract class IndexPager extends ContextSource implements Pager {
* options => option array
* join_conds => JOIN conditions
*
* options => option array
* join_conds => JOIN conditions
*
- * @return
A
rray
+ * @return
a
rray
*/
abstract function getQueryInfo();
*/
abstract function getQueryInfo();
@@
-689,7
+693,7
@@
abstract class IndexPager extends ContextSource implements Pager {
* Needless to say, it's really not a good idea to use a non-unique index
* for this! That won't page right.
*
* Needless to say, it's really not a good idea to use a non-unique index
* for this! That won't page right.
*
- * @return string|
A
rray
+ * @return string|
a
rray
*/
abstract function getIndexField();
*/
abstract function getIndexField();
@@
-707,7
+711,7
@@
abstract class IndexPager extends ContextSource implements Pager {
* page_len,page_id avoids temp tables (given a page_len index). This would
* also work if page_id was non-unique but we had a page_len,page_id index.
*
* page_len,page_id avoids temp tables (given a page_len index). This would
* also work if page_id was non-unique but we had a page_len,page_id index.
*
- * @return
A
rray
+ * @return
a
rray
*/
protected function getExtraSortFields() {
return array();
*/
protected function getExtraSortFields() {
return array();
@@
-730,7
+734,7
@@
abstract class IndexPager extends ContextSource implements Pager {
* particular instantiation, which is a single value. This is the set of
* all defaults for the class.
*
* particular instantiation, which is a single value. This is the set of
* all defaults for the class.
*
- * @return
Boolean
+ * @return
bool
*/
protected function getDefaultDirections() {
return false;
*/
protected function getDefaultDirections() {
return false;
@@
-747,7
+751,7
@@
abstract class AlphabeticPager extends IndexPager {
* Shamelessly stolen bits from ReverseChronologicalPager,
* didn't want to do class magic as may be still revamped
*
* Shamelessly stolen bits from ReverseChronologicalPager,
* didn't want to do class magic as may be still revamped
*
- * @return
S
tring HTML
+ * @return
s
tring HTML
*/
function getNavigationBar() {
if ( !$this->isNavigationBarShown() ) {
*/
function getNavigationBar() {
if ( !$this->isNavigationBarShown() ) {
@@
-816,7
+820,7
@@
abstract class AlphabeticPager extends IndexPager {
* array whose keys must exactly match the keys of the array returned
* by getIndexField(), and whose values are message keys.
*
* array whose keys must exactly match the keys of the array returned
* by getIndexField(), and whose values are message keys.
*
- * @return
A
rray
+ * @return
a
rray
*/
protected function getOrderTypeMessages() {
return null;
*/
protected function getOrderTypeMessages() {
return null;
@@
-924,8
+928,9
@@
abstract class ReverseChronologicalPager extends IndexPager {
* @ingroup Pager
*/
abstract class TablePager extends IndexPager {
* @ingroup Pager
*/
abstract class TablePager extends IndexPager {
- var $mSort;
- var $mCurrentRow;
+ protected $mSort;
+
+ protected $mCurrentRow;
public function __construct( IContextSource $context = null ) {
if ( $context ) {
public function __construct( IContextSource $context = null ) {
if ( $context ) {
@@
-995,7
+1000,10
@@
abstract class TablePager extends IndexPager {
}
$tableClass = $this->getTableClass();
}
$tableClass = $this->getTableClass();
- $ret = Html::openElement( 'table', array( 'style' => 'border:1px;', 'class' => "mw-datatable $tableClass" ) );
+ $ret = Html::openElement( 'table', array(
+ 'style' => 'border:1px;',
+ 'class' => "mw-datatable $tableClass" )
+ );
$ret .= Html::rawElement( 'thead', array(), Html::rawElement( 'tr', array(), "\n" . $s . "\n" ) );
$ret .= Html::openElement( 'tbody' ) . "\n";
$ret .= Html::rawElement( 'thead', array(), Html::rawElement( 'tr', array(), "\n" . $s . "\n" ) );
$ret .= Html::openElement( 'tbody' ) . "\n";
@@
-1024,7
+1032,7
@@
abstract class TablePager extends IndexPager {
/**
* @protected
* @param stdClass $row
/**
* @protected
* @param stdClass $row
- * @return
S
tring HTML
+ * @return
s
tring HTML
*/
function formatRow( $row ) {
$this->mCurrentRow = $row; // In case formatValue etc need to know
*/
function formatRow( $row ) {
$this->mCurrentRow = $row; // In case formatValue etc need to know
@@
-1052,8
+1060,8
@@
abstract class TablePager extends IndexPager {
*
* @protected
*
*
* @protected
*
- * @param
$row Object: t
he database result row
- * @return
S
tring
+ * @param
object $row T
he database result row
+ * @return
s
tring
*/
function getRowClass( $row ) {
return '';
*/
function getRowClass( $row ) {
return '';
@@
-1064,8
+1072,8
@@
abstract class TablePager extends IndexPager {
*
* @protected
*
*
* @protected
*
- * @param
$row Object: t
he database result row
- * @return Array of attribute => value
+ * @param
object $row T
he database result row
+ * @return
array
Array of attribute => value
*/
function getRowAttrs( $row ) {
$class = $this->getRowClass( $row );
*/
function getRowAttrs( $row ) {
$class = $this->getRowClass( $row );
@@
-1086,7
+1094,7
@@
abstract class TablePager extends IndexPager {
*
* @param string $field The column
* @param string $value The cell contents
*
* @param string $field The column
* @param string $value The cell contents
- * @return Array of attr => value
+ * @return
array
Array of attr => value
*/
function getCellAttrs( $field, $value ) {
return array( 'class' => 'TablePager_col_' . $field );
*/
function getCellAttrs( $field, $value ) {
return array( 'class' => 'TablePager_col_' . $field );
@@
-1126,7
+1134,7
@@
abstract class TablePager extends IndexPager {
/**
* A navigation bar with images
/**
* A navigation bar with images
- * @return
S
tring HTML
+ * @return
s
tring HTML
*/
public function getNavigationBar() {
global $wgStylePath;
*/
public function getNavigationBar() {
global $wgStylePath;
@@
-1184,8
+1192,8
@@
abstract class TablePager extends IndexPager {
/**
* Get a "<select>" element which has options for each of the allowed limits
*
/**
* Get a "<select>" element which has options for each of the allowed limits
*
- * @param
$attribs String:
Extra attributes to set
- * @return
String:
HTML fragment
+ * @param
string $attribs
Extra attributes to set
+ * @return
string
HTML fragment
*/
public function getLimitSelect( $attribs = array() ) {
$select = new XmlSelect( 'limit', false, $this->mLimit );
*/
public function getLimitSelect( $attribs = array() ) {
$select = new XmlSelect( 'limit', false, $this->mLimit );
@@
-1232,8
+1240,8
@@
abstract class TablePager extends IndexPager {
* Resubmits all defined elements of the query string, except for a
* blacklist, passed in the $blacklist parameter.
*
* Resubmits all defined elements of the query string, except for a
* blacklist, passed in the $blacklist parameter.
*
- * @param array $blacklist
p
arameters from the request query which should not be resubmitted
- * @return
String:
HTML fragment
+ * @param array $blacklist
P
arameters from the request query which should not be resubmitted
+ * @return
string
HTML fragment
*/
function getHiddenFields( $blacklist = array() ) {
$blacklist = (array)$blacklist;
*/
function getHiddenFields( $blacklist = array() ) {
$blacklist = (array)$blacklist;
@@
-1251,7
+1259,7
@@
abstract class TablePager extends IndexPager {
/**
* Get a form containing a limit selection dropdown
*
/**
* Get a form containing a limit selection dropdown
*
- * @return
String:
HTML fragment
+ * @return
string
HTML fragment
*/
function getLimitForm() {
global $wgScript;
*/
function getLimitForm() {
global $wgScript;
@@
-1285,7
+1293,7
@@
abstract class TablePager extends IndexPager {
* Return true if the named field should be sortable by the UI, false
* otherwise
*
* Return true if the named field should be sortable by the UI, false
* otherwise
*
- * @param
$field String
+ * @param
string $field
*/
abstract function isFieldSortable( $field );
*/
abstract function isFieldSortable( $field );
@@
-1298,8
+1306,8
@@
abstract class TablePager extends IndexPager {
*
* @protected
*
*
* @protected
*
- * @param string $name
t
he database field name
- * @param string $value
t
he value retrieved from the database
+ * @param string $name
T
he database field name
+ * @param string $value
T
he value retrieved from the database
*/
abstract function formatValue( $name, $value );
*/
abstract function formatValue( $name, $value );
@@
-1317,7
+1325,7
@@
abstract class TablePager extends IndexPager {
* field name, for use in the table header. The description should be plain
* text, it will be HTML-escaped later.
*
* field name, for use in the table header. The description should be plain
* text, it will be HTML-escaped later.
*
- * @return
A
rray
+ * @return
a
rray
*/
abstract function getFieldNames();
}
*/
abstract function getFieldNames();
}