MediaWiki  1.23.1
Pager.php
Go to the documentation of this file.
1 <?php
32 interface Pager {
33  function getNavigationBar();
34  function getBody();
35 }
36 
79 abstract class IndexPager extends ContextSource implements Pager {
80  public $mRequest;
81  public $mLimitsShown = array( 20, 50, 100, 250, 500 );
82  public $mDefaultLimit = 50;
83  public $mOffset, $mLimit;
84  public $mQueryDone = false;
85  public $mDb;
87 
92  protected $mIndexField;
97  protected $mExtraSortFields;
100  protected $mOrderType;
114 
116  public $mIsFirst;
117  public $mIsLast;
118 
120 
124  protected $mIncludeOffset = false;
125 
131  public $mResult;
132 
133  public function __construct( IContextSource $context = null ) {
134  if ( $context ) {
135  $this->setContext( $context );
136  }
137 
138  $this->mRequest = $this->getRequest();
139 
140  # NB: the offset is quoted, not validated. It is treated as an
141  # arbitrary string to support the widest variety of index types. Be
142  # careful outputting it into HTML!
143  $this->mOffset = $this->mRequest->getText( 'offset' );
144 
145  # Use consistent behavior for the limit options
146  $this->mDefaultLimit = $this->getUser()->getIntOption( 'rclimit' );
147  if ( !$this->mLimit ) {
148  // Don't override if a subclass calls $this->setLimit() in its constructor.
149  list( $this->mLimit, /* $offset */ ) = $this->mRequest->getLimitOffset();
150  }
151 
152  $this->mIsBackwards = ( $this->mRequest->getVal( 'dir' ) == 'prev' );
153  # Let the subclass set the DB here; otherwise use a slave DB for the current wiki
154  $this->mDb = $this->mDb ?: wfGetDB( DB_SLAVE );
155 
156  $index = $this->getIndexField(); // column to sort on
157  $extraSort = $this->getExtraSortFields(); // extra columns to sort on for query planning
158  $order = $this->mRequest->getVal( 'order' );
159  if ( is_array( $index ) && isset( $index[$order] ) ) {
160  $this->mOrderType = $order;
161  $this->mIndexField = $index[$order];
162  $this->mExtraSortFields = isset( $extraSort[$order] )
163  ? (array)$extraSort[$order]
164  : array();
165  } elseif ( is_array( $index ) ) {
166  # First element is the default
167  reset( $index );
168  list( $this->mOrderType, $this->mIndexField ) = each( $index );
169  $this->mExtraSortFields = isset( $extraSort[$this->mOrderType] )
170  ? (array)$extraSort[$this->mOrderType]
171  : array();
172  } else {
173  # $index is not an array
174  $this->mOrderType = null;
175  $this->mIndexField = $index;
176  $this->mExtraSortFields = (array)$extraSort;
177  }
178 
179  if ( !isset( $this->mDefaultDirection ) ) {
180  $dir = $this->getDefaultDirections();
181  $this->mDefaultDirection = is_array( $dir )
183  : $dir;
184  }
185  }
186 
192  public function getDatabase() {
193  return $this->mDb;
194  }
195 
201  public function doQuery() {
202  # Use the child class name for profiling
203  $fname = __METHOD__ . ' (' . get_class( $this ) . ')';
204  wfProfileIn( $fname );
205 
206  $descending = ( $this->mIsBackwards == $this->mDefaultDirection );
207  # Plus an extra row so that we can tell the "next" link should be shown
208  $queryLimit = $this->mLimit + 1;
209 
210  if ( $this->mOffset == '' ) {
211  $isFirst = true;
212  } else {
213  // If there's an offset, we may or may not be at the first entry.
214  // The only way to tell is to run the query in the opposite
215  // direction see if we get a row.
216  $oldIncludeOffset = $this->mIncludeOffset;
217  $this->mIncludeOffset = !$this->mIncludeOffset;
218  $isFirst = !$this->reallyDoQuery( $this->mOffset, 1, !$descending )->numRows();
219  $this->mIncludeOffset = $oldIncludeOffset;
220  }
221 
222  $this->mResult = $this->reallyDoQuery(
223  $this->mOffset,
224  $queryLimit,
225  $descending
226  );
227 
228  $this->extractResultInfo( $isFirst, $queryLimit, $this->mResult );
229  $this->mQueryDone = true;
230 
231  $this->preprocessResults( $this->mResult );
232  $this->mResult->rewind(); // Paranoia
233 
234  wfProfileOut( $fname );
235  }
236 
240  function getResult() {
241  return $this->mResult;
242  }
243 
249  function setOffset( $offset ) {
250  $this->mOffset = $offset;
251  }
252 
260  function setLimit( $limit ) {
261  $limit = (int)$limit;
262  // WebRequest::getLimitOffset() puts a cap of 5000, so do same here.
263  if ( $limit > 5000 ) {
264  $limit = 5000;
265  }
266  if ( $limit > 0 ) {
267  $this->mLimit = $limit;
268  }
269  }
270 
276  function getLimit() {
277  return $this->mLimit;
278  }
279 
287  public function setIncludeOffset( $include ) {
288  $this->mIncludeOffset = $include;
289  }
290 
300  function extractResultInfo( $isFirst, $limit, ResultWrapper $res ) {
301  $numRows = $res->numRows();
302  if ( $numRows ) {
303  # Remove any table prefix from index field
304  $parts = explode( '.', $this->mIndexField );
305  $indexColumn = end( $parts );
306 
307  $row = $res->fetchRow();
308  $firstIndex = $row[$indexColumn];
309 
310  # Discard the extra result row if there is one
311  if ( $numRows > $this->mLimit && $numRows > 1 ) {
312  $res->seek( $numRows - 1 );
313  $this->mPastTheEndRow = $res->fetchObject();
314  $this->mPastTheEndIndex = $this->mPastTheEndRow->$indexColumn;
315  $res->seek( $numRows - 2 );
316  $row = $res->fetchRow();
317  $lastIndex = $row[$indexColumn];
318  } else {
319  $this->mPastTheEndRow = null;
320  # Setting indexes to an empty string means that they will be
321  # omitted if they would otherwise appear in URLs. It just so
322  # happens that this is the right thing to do in the standard
323  # UI, in all the relevant cases.
324  $this->mPastTheEndIndex = '';
325  $res->seek( $numRows - 1 );
326  $row = $res->fetchRow();
327  $lastIndex = $row[$indexColumn];
328  }
329  } else {
330  $firstIndex = '';
331  $lastIndex = '';
332  $this->mPastTheEndRow = null;
333  $this->mPastTheEndIndex = '';
334  }
335 
336  if ( $this->mIsBackwards ) {
337  $this->mIsFirst = ( $numRows < $limit );
338  $this->mIsLast = $isFirst;
339  $this->mLastShown = $firstIndex;
340  $this->mFirstShown = $lastIndex;
341  } else {
342  $this->mIsFirst = $isFirst;
343  $this->mIsLast = ( $numRows < $limit );
344  $this->mLastShown = $lastIndex;
345  $this->mFirstShown = $firstIndex;
346  }
347  }
348 
354  function getSqlComment() {
355  return get_class( $this );
356  }
357 
367  public function reallyDoQuery( $offset, $limit, $descending ) {
368  list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $descending );
369  return $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
370  }
371 
380  protected function buildQueryInfo( $offset, $limit, $descending ) {
381  $fname = __METHOD__ . ' (' . $this->getSqlComment() . ')';
382  $info = $this->getQueryInfo();
383  $tables = $info['tables'];
384  $fields = $info['fields'];
385  $conds = isset( $info['conds'] ) ? $info['conds'] : array();
386  $options = isset( $info['options'] ) ? $info['options'] : array();
387  $join_conds = isset( $info['join_conds'] ) ? $info['join_conds'] : array();
388  $sortColumns = array_merge( array( $this->mIndexField ), $this->mExtraSortFields );
389  if ( $descending ) {
390  $options['ORDER BY'] = $sortColumns;
391  $operator = $this->mIncludeOffset ? '>=' : '>';
392  } else {
393  $orderBy = array();
394  foreach ( $sortColumns as $col ) {
395  $orderBy[] = $col . ' DESC';
396  }
397  $options['ORDER BY'] = $orderBy;
398  $operator = $this->mIncludeOffset ? '<=' : '<';
399  }
400  if ( $offset != '' ) {
401  $conds[] = $this->mIndexField . $operator . $this->mDb->addQuotes( $offset );
402  }
403  $options['LIMIT'] = intval( $limit );
404  return array( $tables, $fields, $conds, $fname, $options, $join_conds );
405  }
406 
412  protected function preprocessResults( $result ) {}
413 
420  public function getBody() {
421  if ( !$this->mQueryDone ) {
422  $this->doQuery();
423  }
424 
425  if ( $this->mResult->numRows() ) {
426  # Do any special query batches before display
427  $this->doBatchLookups();
428  }
429 
430  # Don't use any extra rows returned by the query
431  $numRows = min( $this->mResult->numRows(), $this->mLimit );
432 
433  $s = $this->getStartBody();
434  if ( $numRows ) {
435  if ( $this->mIsBackwards ) {
436  for ( $i = $numRows - 1; $i >= 0; $i-- ) {
437  $this->mResult->seek( $i );
438  $row = $this->mResult->fetchObject();
439  $s .= $this->formatRow( $row );
440  }
441  } else {
442  $this->mResult->seek( 0 );
443  for ( $i = 0; $i < $numRows; $i++ ) {
444  $row = $this->mResult->fetchObject();
445  $s .= $this->formatRow( $row );
446  }
447  }
448  } else {
449  $s .= $this->getEmptyBody();
450  }
451  $s .= $this->getEndBody();
452  return $s;
453  }
454 
464  function makeLink( $text, array $query = null, $type = null ) {
465  if ( $query === null ) {
466  return $text;
467  }
468 
469  $attrs = array();
470  if ( in_array( $type, array( 'first', 'prev', 'next', 'last' ) ) ) {
471  # HTML5 rel attributes
472  $attrs['rel'] = $type;
473  }
474 
475  if ( $type ) {
476  $attrs['class'] = "mw-{$type}link";
477  }
478 
479  return Linker::linkKnown(
480  $this->getTitle(),
481  $text,
482  $attrs,
483  $query + $this->getDefaultQuery()
484  );
485  }
486 
494  protected function doBatchLookups() {}
495 
502  protected function getStartBody() {
503  return '';
504  }
505 
511  protected function getEndBody() {
512  return '';
513  }
514 
521  protected function getEmptyBody() {
522  return '';
523  }
524 
532  function getDefaultQuery() {
533  if ( !isset( $this->mDefaultQuery ) ) {
534  $this->mDefaultQuery = $this->getRequest()->getQueryValues();
535  unset( $this->mDefaultQuery['title'] );
536  unset( $this->mDefaultQuery['dir'] );
537  unset( $this->mDefaultQuery['offset'] );
538  unset( $this->mDefaultQuery['limit'] );
539  unset( $this->mDefaultQuery['order'] );
540  unset( $this->mDefaultQuery['month'] );
541  unset( $this->mDefaultQuery['year'] );
542  }
543  return $this->mDefaultQuery;
544  }
545 
551  function getNumRows() {
552  if ( !$this->mQueryDone ) {
553  $this->doQuery();
554  }
555  return $this->mResult->numRows();
556  }
557 
563  function getPagingQueries() {
564  if ( !$this->mQueryDone ) {
565  $this->doQuery();
566  }
567 
568  # Don't announce the limit everywhere if it's the default
569  $urlLimit = $this->mLimit == $this->mDefaultLimit ? null : $this->mLimit;
570 
571  if ( $this->mIsFirst ) {
572  $prev = false;
573  $first = false;
574  } else {
575  $prev = array(
576  'dir' => 'prev',
577  'offset' => $this->mFirstShown,
578  'limit' => $urlLimit
579  );
580  $first = array( 'limit' => $urlLimit );
581  }
582  if ( $this->mIsLast ) {
583  $next = false;
584  $last = false;
585  } else {
586  $next = array( 'offset' => $this->mLastShown, 'limit' => $urlLimit );
587  $last = array( 'dir' => 'prev', 'limit' => $urlLimit );
588  }
589  return array(
590  'prev' => $prev,
591  'next' => $next,
592  'first' => $first,
593  'last' => $last
594  );
595  }
596 
602  function isNavigationBarShown() {
603  if ( !$this->mQueryDone ) {
604  $this->doQuery();
605  }
606  // Hide navigation by default if there is nothing to page
607  return !( $this->mIsFirst && $this->mIsLast );
608  }
609 
620  function getPagingLinks( $linkTexts, $disabledTexts = array() ) {
621  $queries = $this->getPagingQueries();
622  $links = array();
623 
624  foreach ( $queries as $type => $query ) {
625  if ( $query !== false ) {
626  $links[$type] = $this->makeLink(
627  $linkTexts[$type],
628  $queries[$type],
629  $type
630  );
631  } elseif ( isset( $disabledTexts[$type] ) ) {
632  $links[$type] = $disabledTexts[$type];
633  } else {
634  $links[$type] = $linkTexts[$type];
635  }
636  }
637 
638  return $links;
639  }
640 
641  function getLimitLinks() {
642  $links = array();
643  if ( $this->mIsBackwards ) {
644  $offset = $this->mPastTheEndIndex;
645  } else {
646  $offset = $this->mOffset;
647  }
648  foreach ( $this->mLimitsShown as $limit ) {
649  $links[] = $this->makeLink(
650  $this->getLanguage()->formatNum( $limit ),
651  array( 'offset' => $offset, 'limit' => $limit ),
652  'num'
653  );
654  }
655  return $links;
656  }
657 
666  abstract function formatRow( $row );
667 
680  abstract function getQueryInfo();
681 
694  abstract function getIndexField();
695 
712  protected function getExtraSortFields() {
713  return array();
714  }
715 
735  protected function getDefaultDirections() {
736  return false;
737  }
738 }
739 
744 abstract class AlphabeticPager extends IndexPager {
745 
752  function getNavigationBar() {
753  if ( !$this->isNavigationBarShown() ) {
754  return '';
755  }
756 
757  if ( isset( $this->mNavigationBar ) ) {
758  return $this->mNavigationBar;
759  }
760 
761  $linkTexts = array(
762  'prev' => $this->msg( 'prevn' )->numParams( $this->mLimit )->escaped(),
763  'next' => $this->msg( 'nextn' )->numParams( $this->mLimit )->escaped(),
764  'first' => $this->msg( 'page_first' )->escaped(),
765  'last' => $this->msg( 'page_last' )->escaped()
766  );
767 
768  $lang = $this->getLanguage();
769 
770  $pagingLinks = $this->getPagingLinks( $linkTexts );
771  $limitLinks = $this->getLimitLinks();
772  $limits = $lang->pipeList( $limitLinks );
773 
774  $this->mNavigationBar = $this->msg( 'parentheses' )->rawParams(
775  $lang->pipeList( array( $pagingLinks['first'],
776  $pagingLinks['last'] ) ) )->escaped() . " " .
777  $this->msg( 'viewprevnext' )->rawParams( $pagingLinks['prev'],
778  $pagingLinks['next'], $limits )->escaped();
779 
780  if ( !is_array( $this->getIndexField() ) ) {
781  # Early return to avoid undue nesting
782  return $this->mNavigationBar;
783  }
784 
785  $extra = '';
786  $first = true;
787  $msgs = $this->getOrderTypeMessages();
788  foreach ( array_keys( $msgs ) as $order ) {
789  if ( $first ) {
790  $first = false;
791  } else {
792  $extra .= $this->msg( 'pipe-separator' )->escaped();
793  }
794 
795  if ( $order == $this->mOrderType ) {
796  $extra .= $this->msg( $msgs[$order] )->escaped();
797  } else {
798  $extra .= $this->makeLink(
799  $this->msg( $msgs[$order] )->escaped(),
800  array( 'order' => $order )
801  );
802  }
803  }
804 
805  if ( $extra !== '' ) {
806  $extra = ' ' . $this->msg( 'parentheses' )->rawParams( $extra )->escaped();
807  $this->mNavigationBar .= $extra;
808  }
809 
810  return $this->mNavigationBar;
811  }
812 
821  protected function getOrderTypeMessages() {
822  return null;
823  }
824 }
825 
830 abstract class ReverseChronologicalPager extends IndexPager {
831  public $mDefaultDirection = true;
832  public $mYear;
833  public $mMonth;
834 
835  function getNavigationBar() {
836  if ( !$this->isNavigationBarShown() ) {
837  return '';
838  }
839 
840  if ( isset( $this->mNavigationBar ) ) {
841  return $this->mNavigationBar;
842  }
843 
844  $linkTexts = array(
845  'prev' => $this->msg( 'pager-newer-n' )->numParams( $this->mLimit )->escaped(),
846  'next' => $this->msg( 'pager-older-n' )->numParams( $this->mLimit )->escaped(),
847  'first' => $this->msg( 'histlast' )->escaped(),
848  'last' => $this->msg( 'histfirst' )->escaped()
849  );
850 
851  $pagingLinks = $this->getPagingLinks( $linkTexts );
852  $limitLinks = $this->getLimitLinks();
853  $limits = $this->getLanguage()->pipeList( $limitLinks );
854  $firstLastLinks = $this->msg( 'parentheses' )->rawParams( "{$pagingLinks['first']}" .
855  $this->msg( 'pipe-separator' )->escaped() .
856  "{$pagingLinks['last']}" )->escaped();
857 
858  $this->mNavigationBar = $firstLastLinks . ' ' .
859  $this->msg( 'viewprevnext' )->rawParams(
860  $pagingLinks['prev'], $pagingLinks['next'], $limits )->escaped();
861 
862  return $this->mNavigationBar;
863  }
864 
865  function getDateCond( $year, $month ) {
866  $year = intval( $year );
867  $month = intval( $month );
868 
869  // Basic validity checks
870  $this->mYear = $year > 0 ? $year : false;
871  $this->mMonth = ( $month > 0 && $month < 13 ) ? $month : false;
872 
873  // Given an optional year and month, we need to generate a timestamp
874  // to use as "WHERE rev_timestamp <= result"
875  // Examples: year = 2006 equals < 20070101 (+000000)
876  // year=2005, month=1 equals < 20050201
877  // year=2005, month=12 equals < 20060101
878  if ( !$this->mYear && !$this->mMonth ) {
879  return;
880  }
881 
882  if ( $this->mYear ) {
883  $year = $this->mYear;
884  } else {
885  // If no year given, assume the current one
887  $year = $timestamp->format( 'Y' );
888  // If this month hasn't happened yet this year, go back to last year's month
889  if ( $this->mMonth > $timestamp->format( 'n' ) ) {
890  $year--;
891  }
892  }
893 
894  if ( $this->mMonth ) {
895  $month = $this->mMonth + 1;
896  // For December, we want January 1 of the next year
897  if ( $month > 12 ) {
898  $month = 1;
899  $year++;
900  }
901  } else {
902  // No month implies we want up to the end of the year in question
903  $month = 1;
904  $year++;
905  }
906 
907  // Y2K38 bug
908  if ( $year > 2032 ) {
909  $year = 2032;
910  }
911 
912  $ymd = (int)sprintf( "%04d%02d01", $year, $month );
913 
914  if ( $ymd > 20320101 ) {
915  $ymd = 20320101;
916  }
917 
918  $this->mOffset = $this->mDb->timestamp( "${ymd}000000" );
919  }
920 }
921 
926 abstract class TablePager extends IndexPager {
927  var $mSort;
928  var $mCurrentRow;
929 
930  public function __construct( IContextSource $context = null ) {
931  if ( $context ) {
932  $this->setContext( $context );
933  }
934 
935  $this->mSort = $this->getRequest()->getText( 'sort' );
936  if ( !array_key_exists( $this->mSort, $this->getFieldNames() )
937  || !$this->isFieldSortable( $this->mSort )
938  ) {
939  $this->mSort = $this->getDefaultSort();
940  }
941  if ( $this->getRequest()->getBool( 'asc' ) ) {
942  $this->mDefaultDirection = false;
943  } elseif ( $this->getRequest()->getBool( 'desc' ) ) {
944  $this->mDefaultDirection = true;
945  } /* Else leave it at whatever the class default is */
946 
947  parent::__construct();
948  }
949 
954  function getStartBody() {
955  global $wgStylePath;
956  $sortClass = $this->getSortHeaderClass();
957 
958  $s = '';
959  $fields = $this->getFieldNames();
960 
961  # Make table header
962  foreach ( $fields as $field => $name ) {
963  if ( strval( $name ) == '' ) {
964  $s .= Html::rawElement( 'th', array(), '&#160;' ) . "\n";
965  } elseif ( $this->isFieldSortable( $field ) ) {
966  $query = array( 'sort' => $field, 'limit' => $this->mLimit );
967  if ( $field == $this->mSort ) {
968  # This is the sorted column
969  # Prepare a link that goes in the other sort order
970  if ( $this->mDefaultDirection ) {
971  # Descending
972  $image = 'Arr_d.png';
973  $query['asc'] = '1';
974  $query['desc'] = '';
975  $alt = $this->msg( 'descending_abbrev' )->escaped();
976  } else {
977  # Ascending
978  $image = 'Arr_u.png';
979  $query['asc'] = '';
980  $query['desc'] = '1';
981  $alt = $this->msg( 'ascending_abbrev' )->escaped();
982  }
983  $image = "$wgStylePath/common/images/$image";
984  $link = $this->makeLink(
985  Html::element( 'img', array( 'width' => 12, 'height' => 12,
986  'alt' => $alt, 'src' => $image ) ) . htmlspecialchars( $name ), $query );
987  $s .= Html::rawElement( 'th', array( 'class' => $sortClass ), $link ) . "\n";
988  } else {
989  $s .= Html::rawElement( 'th', array(),
990  $this->makeLink( htmlspecialchars( $name ), $query ) ) . "\n";
991  }
992  } else {
993  $s .= Html::element( 'th', array(), $name ) . "\n";
994  }
995  }
996 
997  $tableClass = $this->getTableClass();
998  $ret = Html::openElement( 'table', array( 'style' => 'border:1px;', 'class' => "mw-datatable $tableClass" ) );
999  $ret .= Html::rawElement( 'thead', array(), Html::rawElement( 'tr', array(), "\n" . $s . "\n" ) );
1000  $ret .= Html::openElement( 'tbody' ) . "\n";
1001 
1002  return $ret;
1003  }
1004 
1009  function getEndBody() {
1010  return "</tbody></table>\n";
1011  }
1012 
1017  function getEmptyBody() {
1018  $colspan = count( $this->getFieldNames() );
1019  $msgEmpty = $this->msg( 'table_pager_empty' )->text();
1020  return Html::rawElement( 'tr', array(),
1021  Html::element( 'td', array( 'colspan' => $colspan ), $msgEmpty ) );
1022  }
1023 
1029  function formatRow( $row ) {
1030  $this->mCurrentRow = $row; // In case formatValue etc need to know
1031  $s = Html::openElement( 'tr', $this->getRowAttrs( $row ) ) . "\n";
1032  $fieldNames = $this->getFieldNames();
1033 
1034  foreach ( $fieldNames as $field => $name ) {
1035  $value = isset( $row->$field ) ? $row->$field : null;
1036  $formatted = strval( $this->formatValue( $field, $value ) );
1037 
1038  if ( $formatted == '' ) {
1039  $formatted = '&#160;';
1040  }
1041 
1042  $s .= Html::rawElement( 'td', $this->getCellAttrs( $field, $value ), $formatted ) . "\n";
1043  }
1044 
1045  $s .= Html::closeElement( 'tr' ) . "\n";
1046 
1047  return $s;
1048  }
1049 
1058  function getRowClass( $row ) {
1059  return '';
1060  }
1061 
1070  function getRowAttrs( $row ) {
1071  $class = $this->getRowClass( $row );
1072  if ( $class === '' ) {
1073  // Return an empty array to avoid clutter in HTML like class=""
1074  return array();
1075  } else {
1076  return array( 'class' => $this->getRowClass( $row ) );
1077  }
1078  }
1079 
1091  function getCellAttrs( $field, $value ) {
1092  return array( 'class' => 'TablePager_col_' . $field );
1093  }
1094 
1099  function getIndexField() {
1100  return $this->mSort;
1101  }
1102 
1107  function getTableClass() {
1108  return 'TablePager';
1109  }
1110 
1115  function getNavClass() {
1116  return 'TablePager_nav';
1117  }
1118 
1123  function getSortHeaderClass() {
1124  return 'TablePager_sort';
1125  }
1126 
1131  public function getNavigationBar() {
1132  global $wgStylePath;
1133 
1134  if ( !$this->isNavigationBarShown() ) {
1135  return '';
1136  }
1137 
1138  $path = "$wgStylePath/common/images";
1139  $labels = array(
1140  'first' => 'table_pager_first',
1141  'prev' => 'table_pager_prev',
1142  'next' => 'table_pager_next',
1143  'last' => 'table_pager_last',
1144  );
1145  $images = array(
1146  'first' => 'arrow_first_25.png',
1147  'prev' => 'arrow_left_25.png',
1148  'next' => 'arrow_right_25.png',
1149  'last' => 'arrow_last_25.png',
1150  );
1151  $disabledImages = array(
1152  'first' => 'arrow_disabled_first_25.png',
1153  'prev' => 'arrow_disabled_left_25.png',
1154  'next' => 'arrow_disabled_right_25.png',
1155  'last' => 'arrow_disabled_last_25.png',
1156  );
1157  if ( $this->getLanguage()->isRTL() ) {
1158  $keys = array_keys( $labels );
1159  $images = array_combine( $keys, array_reverse( $images ) );
1160  $disabledImages = array_combine( $keys, array_reverse( $disabledImages ) );
1161  }
1162 
1163  $linkTexts = array();
1164  $disabledTexts = array();
1165  foreach ( $labels as $type => $label ) {
1166  $msgLabel = $this->msg( $label )->escaped();
1167  $linkTexts[$type] = Html::element( 'img', array( 'src' => "$path/{$images[$type]}",
1168  'alt' => $msgLabel ) ) . "<br />$msgLabel";
1169  $disabledTexts[$type] = Html::element( 'img', array( 'src' => "$path/{$disabledImages[$type]}",
1170  'alt' => $msgLabel ) ) . "<br />$msgLabel";
1171  }
1172  $links = $this->getPagingLinks( $linkTexts, $disabledTexts );
1173 
1174  $s = Html::openElement( 'table', array( 'class' => $this->getNavClass() ) );
1175  $s .= Html::openElement( 'tr' ) . "\n";
1176  $width = 100 / count( $links ) . '%';
1177  foreach ( $labels as $type => $label ) {
1178  $s .= Html::rawElement( 'td', array( 'style' => "width:$width;" ), $links[$type] ) . "\n";
1179  }
1180  $s .= Html::closeElement( 'tr' ) . Html::closeElement( 'table' ) . "\n";
1181  return $s;
1182  }
1183 
1190  public function getLimitSelect( $attribs = array() ) {
1191  $select = new XmlSelect( 'limit', false, $this->mLimit );
1192  $select->addOptions( $this->getLimitSelectList() );
1193  foreach ( $attribs as $name => $value ) {
1194  $select->setAttribute( $name, $value );
1195  }
1196  return $select->getHTML();
1197  }
1198 
1206  public function getLimitSelectList() {
1207  # Add the current limit from the query string
1208  # to avoid that the limit is lost after clicking Go next time
1209  if ( !in_array( $this->mLimit, $this->mLimitsShown ) ) {
1210  $this->mLimitsShown[] = $this->mLimit;
1211  sort( $this->mLimitsShown );
1212  }
1213  $ret = array();
1214  foreach ( $this->mLimitsShown as $key => $value ) {
1215  # The pair is either $index => $limit, in which case the $value
1216  # will be numeric, or $limit => $text, in which case the $value
1217  # will be a string.
1218  if ( is_int( $value ) ) {
1219  $limit = $value;
1220  $text = $this->getLanguage()->formatNum( $limit );
1221  } else {
1222  $limit = $key;
1223  $text = $value;
1224  }
1225  $ret[$text] = $limit;
1226  }
1227  return $ret;
1228  }
1229 
1238  function getHiddenFields( $blacklist = array() ) {
1239  $blacklist = (array)$blacklist;
1240  $query = $this->getRequest()->getQueryValues();
1241  foreach ( $blacklist as $name ) {
1242  unset( $query[$name] );
1243  }
1244  $s = '';
1245  foreach ( $query as $name => $value ) {
1246  $s .= Html::hidden( $name, $value ) . "\n";
1247  }
1248  return $s;
1249  }
1250 
1256  function getLimitForm() {
1257  global $wgScript;
1258 
1259  return Html::rawElement(
1260  'form',
1261  array(
1262  'method' => 'get',
1263  'action' => $wgScript
1264  ),
1265  "\n" . $this->getLimitDropdown()
1266  ) . "\n";
1267  }
1268 
1274  function getLimitDropdown() {
1275  # Make the select with some explanatory text
1276  $msgSubmit = $this->msg( 'table_pager_limit_submit' )->escaped();
1277 
1278  return $this->msg( 'table_pager_limit' )
1279  ->rawParams( $this->getLimitSelect() )->escaped() .
1280  "\n<input type=\"submit\" value=\"$msgSubmit\"/>\n" .
1281  $this->getHiddenFields( array( 'limit' ) );
1282  }
1283 
1290  abstract function isFieldSortable( $field );
1291 
1304  abstract function formatValue( $name, $value );
1305 
1313  abstract function getDefaultSort();
1314 
1322  abstract function getFieldNames();
1323 }
IndexPager\__construct
__construct(IContextSource $context=null)
Definition: Pager.php:132
ContextSource\$context
IContextSource $context
Definition: ContextSource.php:33
IndexPager\extractResultInfo
extractResultInfo( $isFirst, $limit, ResultWrapper $res)
Extract some useful data from the result object for use by the navigation bar, put it into $this.
Definition: Pager.php:299
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
IndexPager\formatRow
formatRow( $row)
Abstract formatting function.
IndexPager\buildQueryInfo
buildQueryInfo( $offset, $limit, $descending)
Build variables to use by the database wrapper.
Definition: Pager.php:379
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
AlphabeticPager\getOrderTypeMessages
getOrderTypeMessages()
If this supports multiple order type messages, give the message key for enabling each one in getNavig...
Definition: Pager.php:820
IndexPager\getStartBody
getStartBody()
Hook into getBody(), allows text to be inserted at the start.
Definition: Pager.php:501
IndexPager\preprocessResults
preprocessResults( $result)
Pre-process results; useful for performing batch existence checks, etc.
Definition: Pager.php:411
IndexPager\$mIsFirst
$mIsFirst
True if the current result set is the first one.
Definition: Pager.php:116
ContextSource\msg
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Definition: ContextSource.php:175
IndexPager\getDefaultQuery
getDefaultQuery()
Get an array of query parameters that should be put into self-links.
Definition: Pager.php:531
$tables
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
Definition: hooks.txt:815
ReverseChronologicalPager\$mDefaultDirection
$mDefaultDirection
Definition: Pager.php:830
TablePager\$mCurrentRow
$mCurrentRow
Definition: Pager.php:927
IndexPager\getResult
getResult()
Definition: Pager.php:239
TablePager\getIndexField
getIndexField()
Definition: Pager.php:1098
$last
$last
Definition: profileinfo.php:365
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
$timestamp
if( $limit) $timestamp
Definition: importImages.php:104
Pager\getNavigationBar
getNavigationBar()
IndexPager\getExtraSortFields
getExtraSortFields()
This function should be overridden to return the names of secondary columns to order by in addition t...
Definition: Pager.php:711
IndexPager\$mDefaultDirection
$mDefaultDirection
$mDefaultDirection gives the direction to use when sorting results: false for ascending,...
Definition: Pager.php:112
IndexPager\$mLastShown
$mLastShown
Definition: Pager.php:119
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
TablePager\getCellAttrs
getCellAttrs( $field, $value)
Get any extra attributes to be applied to the given cell.
Definition: Pager.php:1090
TablePager\formatValue
formatValue( $name, $value)
Format a table cell.
$ret
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
Definition: hooks.txt:1530
TablePager\getTableClass
getTableClass()
Definition: Pager.php:1106
IndexPager\getDatabase
getDatabase()
Get the Database object in use.
Definition: Pager.php:191
TablePager\getEndBody
getEndBody()
Definition: Pager.php:1008
$fname
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
Definition: Setup.php:35
$limit
if( $sleep) $limit
Definition: importImages.php:99
AlphabeticPager
IndexPager with an alphabetic list and a formatted navigation bar.
Definition: Pager.php:743
IndexPager\$mLimitsShown
$mLimitsShown
Definition: Pager.php:81
IndexPager\getPagingQueries
getPagingQueries()
Get a URL query array for the prev, next, first and last links.
Definition: Pager.php:562
TablePager\getHiddenFields
getHiddenFields( $blacklist=array())
Get <input type="hidden"> elements for use in a method="get" form.
Definition: Pager.php:1237
$s
$s
Definition: mergeMessageFileList.php:156
IndexPager\makeLink
makeLink( $text, array $query=null, $type=null)
Make a self-link.
Definition: Pager.php:463
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:662
ContextSource\getRequest
getRequest()
Get the WebRequest object.
Definition: ContextSource.php:77
IndexPager\$mResult
ResultWrapper $mResult
Result object for the query.
Definition: Pager.php:130
IndexPager\$mDefaultLimit
$mDefaultLimit
Definition: Pager.php:82
IndexPager\$mQueryDone
$mQueryDone
Definition: Pager.php:84
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:132
$link
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
Definition: hooks.txt:2149
AlphabeticPager\getNavigationBar
getNavigationBar()
Shamelessly stolen bits from ReverseChronologicalPager, didn't want to do class magic as may be still...
Definition: Pager.php:751
ContextSource\getTitle
getTitle()
Get the Title object.
Definition: ContextSource.php:87
Linker\linkKnown
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
Definition: Linker.php:264
IndexPager\getLimitLinks
getLimitLinks()
Definition: Pager.php:640
IndexPager\$mExtraSortFields
$mExtraSortFields
An array of secondary columns to order by.
Definition: Pager.php:97
IndexPager\doBatchLookups
doBatchLookups()
Called from getBody(), before getStartBody() is called and after doQuery() was called.
Definition: Pager.php:493
XmlSelect
Definition: Xml.php:842
IndexPager\getIndexField
getIndexField()
This function should be overridden to return the name of the index fi- eld.
IndexPager\$mDb
$mDb
Definition: Pager.php:85
ContextSource\getLanguage
getLanguage()
Get the Language object.
Definition: ContextSource.php:154
Pager
Basic pager interface.
Definition: Pager.php:32
Html\closeElement
static closeElement( $element)
Returns "</$element>", except if $wgWellFormedXml is off, in which case it returns the empty string w...
Definition: Html.php:235
IndexPager\getEmptyBody
getEmptyBody()
Hook into getBody(), for the bit between the start and the end when there are no rows.
Definition: Pager.php:520
TablePager\getSortHeaderClass
getSortHeaderClass()
Definition: Pager.php:1122
Html\openElement
static openElement( $element, $attribs=array())
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
Definition: Html.php:166
TablePager\getRowAttrs
getRowAttrs( $row)
Get attributes to be applied to the given row.
Definition: Pager.php:1069
IndexPager\$mFirstShown
$mFirstShown
Definition: Pager.php:119
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
IndexPager\setLimit
setLimit( $limit)
Set the limit from an other source than the request.
Definition: Pager.php:259
IndexPager\getPagingLinks
getPagingLinks( $linkTexts, $disabledTexts=array())
Get paging links.
Definition: Pager.php:619
ContextSource
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
Definition: ContextSource.php:30
TablePager
Table-based display with a user-selectable sort order.
Definition: Pager.php:925
IndexPager\$mLimit
$mLimit
Definition: Pager.php:83
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
IndexPager\$mPastTheEndRow
$mPastTheEndRow
Definition: Pager.php:86
IndexPager\$mIsBackwards
$mIsBackwards
Definition: Pager.php:113
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
MWTimestamp\getInstance
static getInstance( $ts=false)
Get a timestamp instance in GMT.
Definition: MWTimestamp.php:387
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
TablePager\isFieldSortable
isFieldSortable( $field)
Return true if the named field should be sortable by the UI, false otherwise.
ContextSource\setContext
setContext(IContextSource $context)
Set the IContextSource object.
Definition: ContextSource.php:57
TablePager\getNavClass
getNavClass()
Definition: Pager.php:1114
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
IndexPager\setIncludeOffset
setIncludeOffset( $include)
Set whether a row matching exactly the offset should be also included in the result or not.
Definition: Pager.php:286
$options
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition: hooks.txt:1530
IndexPager\getDefaultDirections
getDefaultDirections()
Return the default sorting direction: false for ascending, true for descending.
Definition: Pager.php:734
IndexPager\reallyDoQuery
reallyDoQuery( $offset, $limit, $descending)
Do a query with specified parameters, rather than using the object context.
Definition: Pager.php:366
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
$value
$value
Definition: styleTest.css.php:45
TablePager\getNavigationBar
getNavigationBar()
A navigation bar with images.
Definition: Pager.php:1130
IndexPager\$mOffset
$mOffset
Definition: Pager.php:83
IndexPager\setOffset
setOffset( $offset)
Set the offset from an other source than the request.
Definition: Pager.php:248
TablePager\getLimitDropdown
getLimitDropdown()
Gets a limit selection dropdown.
Definition: Pager.php:1273
ReverseChronologicalPager\$mYear
$mYear
Definition: Pager.php:831
IndexPager\$mIncludeOffset
$mIncludeOffset
Whether to include the offset in the query.
Definition: Pager.php:124
TablePager\$mSort
$mSort
Definition: Pager.php:926
Pager\getBody
getBody()
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
IndexPager\getEndBody
getEndBody()
Hook into getBody() for the end of the list.
Definition: Pager.php:510
IndexPager\$mOrderType
$mOrderType
For pages that support multiple types of ordering, which one to use.
Definition: Pager.php:100
IndexPager\$mDefaultQuery
$mDefaultQuery
Definition: Pager.php:119
IndexPager\getSqlComment
getSqlComment()
Get some text to go in brackets in the "function name" part of the SQL comment.
Definition: Pager.php:353
TablePager\getStartBody
getStartBody()
Definition: Pager.php:953
IndexPager\isNavigationBarShown
isNavigationBarShown()
Returns whether to show the "navigation bar".
Definition: Pager.php:601
TablePager\formatRow
formatRow( $row)
Definition: Pager.php:1028
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
$dir
if(count( $args)==0) $dir
Definition: importImages.php:49
TablePager\__construct
__construct(IContextSource $context=null)
Definition: Pager.php:929
TablePager\getLimitSelect
getLimitSelect( $attribs=array())
Get a "<select>" element which has options for each of the allowed limits.
Definition: Pager.php:1189
IndexPager\$mIndexField
$mIndexField
The index to actually be used for ordering.
Definition: Pager.php:92
$path
$path
Definition: NoLocalSettings.php:35
TablePager\getEmptyBody
getEmptyBody()
Definition: Pager.php:1016
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
IndexPager\$mPastTheEndIndex
$mPastTheEndIndex
Definition: Pager.php:119
ReverseChronologicalPager\$mMonth
$mMonth
Definition: Pager.php:832
IndexPager
IndexPager is an efficient pager which uses a (roughly unique) index in the data set to implement pag...
Definition: Pager.php:79
$keys
$keys
Definition: testCompression.php:63
IndexPager\$mRequest
$mRequest
Definition: Pager.php:80
IndexPager\$mIsLast
$mIsLast
Definition: Pager.php:117
IndexPager\$mNavigationBar
$mNavigationBar
Definition: Pager.php:119
TablePager\getLimitForm
getLimitForm()
Get a form containing a limit selection dropdown.
Definition: Pager.php:1255
IndexPager\getLimit
getLimit()
Get the current limit.
Definition: Pager.php:275
ReverseChronologicalPager
IndexPager with a formatted navigation bar.
Definition: Pager.php:829
TablePager\getDefaultSort
getDefaultSort()
The database field name used as a default sort order.
TablePager\getRowClass
getRowClass( $row)
Get a class name to be applied to the given row.
Definition: Pager.php:1057
IndexPager\getBody
getBody()
Get the formatted result list.
Definition: Pager.php:419
Html\rawElement
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
Definition: Html.php:124
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
ReverseChronologicalPager\getNavigationBar
getNavigationBar()
Definition: Pager.php:834
$attribs
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
Definition: hooks.txt:1530
TablePager\getLimitSelectList
getLimitSelectList()
Get a list of items to show in a "<select>" element of limits.
Definition: Pager.php:1205
$res
$res
Definition: database.txt:21
IndexPager\getQueryInfo
getQueryInfo()
This function should be overridden to provide all parameters needed for the main paged query.
$queries
$queries
Definition: profileinfo.php:362
TablePager\getFieldNames
getFieldNames()
An array mapping database field names to a textual description of the field name, for use in the tabl...
ReverseChronologicalPager\getDateCond
getDateCond( $year, $month)
Definition: Pager.php:864
IndexPager\getNumRows
getNumRows()
Get the number of rows in the result set.
Definition: Pager.php:550
ResultWrapper
Result wrapper for grabbing data queried by someone else.
Definition: DatabaseUtility.php:99
IndexPager\doQuery
doQuery()
Do the query, using information from the object context.
Definition: Pager.php:200
$type
$type
Definition: testCompression.php:46