MediaWiki  1.23.1
SpecialListfiles.php
Go to the documentation of this file.
1 <?php
25  public function __construct() {
26  parent::__construct( 'Listfiles' );
27  }
28 
29  public function execute( $par ) {
30  $this->setHeaders();
31  $this->outputHeader();
32 
33  if ( $this->including() ) {
34  $userName = $par;
35  $search = '';
36  $showAll = false;
37  } else {
38  $userName = $this->getRequest()->getText( 'user', $par );
39  $search = $this->getRequest()->getText( 'ilsearch', '' );
40  $showAll = $this->getRequest()->getBool( 'ilshowall', false );
41  }
42 
43  $pager = new ImageListPager(
44  $this->getContext(),
45  $userName,
46  $search,
47  $this->including(),
48  $showAll
49  );
50 
51  if ( $this->including() ) {
52  $html = $pager->getBody();
53  } else {
54  $form = $pager->getForm();
55  $body = $pager->getBody();
56  $nav = $pager->getNavigationBar();
57  $html = "$form<br />\n$body<br />\n$nav";
58  }
59  $this->getOutput()->addHTML( $html );
60  }
61 
62  protected function getGroupName() {
63  return 'media';
64  }
65 }
66 
70 class ImageListPager extends TablePager {
71  var $mFieldNames = null;
72  // Subclasses should override buildQueryConds instead of using $mQueryConds variable.
74  var $mUserName = null;
75  var $mSearch = '';
76  var $mIncluding = false;
77  var $mShowAll = false;
78  var $mTableName = 'image';
79 
80  function __construct( IContextSource $context, $userName = null, $search = '',
81  $including = false, $showAll = false
82  ) {
83  global $wgMiserMode;
84 
85  $this->mIncluding = $including;
86  $this->mShowAll = $showAll;
87 
88  if ( $userName ) {
89  $nt = Title::newFromText( $userName, NS_USER );
90  if ( !is_null( $nt ) ) {
91  $this->mUserName = $nt->getText();
92  }
93  }
94 
95  if ( $search !== '' && !$wgMiserMode ) {
96  $this->mSearch = $search;
97  $nt = Title::newFromURL( $this->mSearch );
98 
99  if ( $nt ) {
100  $dbr = wfGetDB( DB_SLAVE );
101  $this->mQueryConds[] = 'LOWER(img_name)' .
102  $dbr->buildLike( $dbr->anyString(),
103  strtolower( $nt->getDBkey() ), $dbr->anyString() );
104  }
105  }
106 
107  if ( !$including ) {
108  if ( $context->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) {
109  $this->mDefaultDirection = true;
110  } else {
111  $this->mDefaultDirection = false;
112  }
113  } else {
114  $this->mDefaultDirection = true;
115  }
116 
117  parent::__construct( $context );
118  }
119 
127  protected function buildQueryConds( $table ) {
128  $prefix = $table === 'image' ? 'img' : 'oi';
129  $conds = array();
130 
131  if ( !is_null( $this->mUserName ) ) {
132  $conds[$prefix . '_user_text'] = $this->mUserName;
133  }
134 
135  if ( $this->mSearch !== '' ) {
136  $nt = Title::newFromURL( $this->mSearch );
137  if ( $nt ) {
138  $dbr = wfGetDB( DB_SLAVE );
139  $conds[] = 'LOWER(' . $prefix . '_name)' .
140  $dbr->buildLike( $dbr->anyString(),
141  strtolower( $nt->getDBkey() ), $dbr->anyString() );
142  }
143  }
144 
145  if ( $table === 'oldimage' ) {
146  // Don't want to deal with revdel.
147  // Future fixme: Show partial information as appropriate.
148  // Would have to be careful about filtering by username when username is deleted.
149  $conds['oi_deleted'] = 0;
150  }
151 
152  // Add mQueryConds in case anyone was subclassing and using the old variable.
153  return $conds + $this->mQueryConds;
154  }
155 
159  function getFieldNames() {
160  if ( !$this->mFieldNames ) {
161  global $wgMiserMode;
162  $this->mFieldNames = array(
163  'img_timestamp' => $this->msg( 'listfiles_date' )->text(),
164  'img_name' => $this->msg( 'listfiles_name' )->text(),
165  'thumb' => $this->msg( 'listfiles_thumb' )->text(),
166  'img_size' => $this->msg( 'listfiles_size' )->text(),
167  'img_user_text' => $this->msg( 'listfiles_user' )->text(),
168  'img_description' => $this->msg( 'listfiles_description' )->text(),
169  );
170  if ( !$wgMiserMode && !$this->mShowAll ) {
171  $this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text();
172  }
173  if ( $this->mShowAll ) {
174  $this->mFieldNames['top'] = $this->msg( 'listfiles-latestversion' )->text();
175  }
176  }
177 
178  return $this->mFieldNames;
179  }
180 
181  function isFieldSortable( $field ) {
182  global $wgMiserMode;
183  if ( $this->mIncluding ) {
184  return false;
185  }
186  $sortable = array( 'img_timestamp', 'img_name', 'img_size' );
187  /* For reference, the indicies we can use for sorting are:
188  * On the image table: img_usertext_timestamp, img_size, img_timestamp
189  * On oldimage: oi_usertext_timestamp, oi_name_timestamp
190  *
191  * In particular that means we cannot sort by timestamp when not filtering
192  * by user and including old images in the results. Which is sad.
193  */
194  if ( $wgMiserMode && !is_null( $this->mUserName ) ) {
195  // If we're sorting by user, the index only supports sorting by time.
196  if ( $field === 'img_timestamp' ) {
197  return true;
198  } else {
199  return false;
200  }
201  } elseif ( $wgMiserMode && $this->mShowAll /* && mUserName === null */ ) {
202  // no oi_timestamp index, so only alphabetical sorting in this case.
203  if ( $field === 'img_name' ) {
204  return true;
205  } else {
206  return false;
207  }
208  }
209 
210  return in_array( $field, $sortable );
211  }
212 
213  function getQueryInfo() {
214  // Hacky Hacky Hacky - I want to get query info
215  // for two different tables, without reimplementing
216  // the pager class.
217  $qi = $this->getQueryInfoReal( $this->mTableName );
218 
219  return $qi;
220  }
221 
232  protected function getQueryInfoReal( $table ) {
233  $prefix = $table === 'oldimage' ? 'oi' : 'img';
234 
235  $tables = array( $table );
236  $fields = array_keys( $this->getFieldNames() );
237 
238  if ( $table === 'oldimage' ) {
239  foreach ( $fields as $id => &$field ) {
240  if ( substr( $field, 0, 4 ) !== 'img_' ) {
241  continue;
242  }
243  $field = $prefix . substr( $field, 3 ) . ' AS ' . $field;
244  }
245  $fields[array_search( 'top', $fields )] = "'no' AS top";
246  } else {
247  if ( $this->mShowAll ) {
248  $fields[array_search( 'top', $fields )] = "'yes' AS top";
249  }
250  }
251  $fields[] = $prefix . '_user AS img_user';
252  $fields[array_search( 'thumb', $fields )] = $prefix . '_name AS thumb';
253 
254  $options = $join_conds = array();
255 
256  # Depends on $wgMiserMode
257  # Will also not happen if mShowAll is true.
258  if ( isset( $this->mFieldNames['count'] ) ) {
259  $tables[] = 'oldimage';
260 
261  # Need to rewrite this one
262  foreach ( $fields as &$field ) {
263  if ( $field == 'count' ) {
264  $field = 'COUNT(oi_archive_name) AS count';
265  }
266  }
267  unset( $field );
268 
269  $dbr = wfGetDB( DB_SLAVE );
270  if ( $dbr->implicitGroupby() ) {
271  $options = array( 'GROUP BY' => 'img_name' );
272  } else {
273  $columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) );
274  $options = array( 'GROUP BY' => array_merge( array( 'img_user' ), $columnlist ) );
275  }
276  $join_conds = array( 'oldimage' => array( 'LEFT JOIN', 'oi_name = img_name' ) );
277  }
278 
279  return array(
280  'tables' => $tables,
281  'fields' => $fields,
282  'conds' => $this->buildQueryConds( $table ),
283  'options' => $options,
284  'join_conds' => $join_conds
285  );
286  }
287 
295  function reallyDoQuery( $offset, $limit, $asc ) {
296  $prevTableName = $this->mTableName;
297  $this->mTableName = 'image';
298  list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $asc );
299  $imageRes = $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
300  $this->mTableName = $prevTableName;
301 
302  if ( !$this->mShowAll ) {
303  return $imageRes;
304  }
305 
306  $this->mTableName = 'oldimage';
307 
308  # Hacky...
309  $oldIndex = $this->mIndexField;
310  if ( substr( $this->mIndexField, 0, 4 ) !== 'img_' ) {
311  throw new MWException( "Expected to be sorting on an image table field" );
312  }
313  $this->mIndexField = 'oi_' . substr( $this->mIndexField, 4 );
314 
315  list( $tables, $fields, $conds, $fname, $options, $join_conds ) = $this->buildQueryInfo( $offset, $limit, $asc );
316  $oldimageRes = $this->mDb->select( $tables, $fields, $conds, $fname, $options, $join_conds );
317 
318  $this->mTableName = $prevTableName;
319  $this->mIndexField = $oldIndex;
320 
321  return $this->combineResult( $imageRes, $oldimageRes, $limit, $asc );
322  }
323 
335  protected function combineResult( $res1, $res2, $limit, $ascending ) {
336  $res1->rewind();
337  $res2->rewind();
338  $topRes1 = $res1->next();
339  $topRes2 = $res2->next();
340  $resultArray = array();
341  for ( $i = 0; $i < $limit && $topRes1 && $topRes2; $i++ ) {
342  if ( strcmp( $topRes1->{$this->mIndexField}, $topRes2->{$this->mIndexField} ) > 0 ) {
343  if ( !$ascending ) {
344  $resultArray[] = $topRes1;
345  $topRes1 = $res1->next();
346  } else {
347  $resultArray[] = $topRes2;
348  $topRes2 = $res2->next();
349  }
350  } else {
351  if ( !$ascending ) {
352  $resultArray[] = $topRes2;
353  $topRes2 = $res2->next();
354  } else {
355  $resultArray[] = $topRes1;
356  $topRes1 = $res1->next();
357  }
358  }
359  }
360  for ( ; $i < $limit && $topRes1; $i++ ) {
361  $resultArray[] = $topRes1;
362  $topRes1 = $res1->next();
363  }
364  for ( ; $i < $limit && $topRes2; $i++ ) {
365  $resultArray[] = $topRes2;
366  $topRes2 = $res2->next();
367  }
368 
369  return new FakeResultWrapper( $resultArray );
370  }
371 
372  function getDefaultSort() {
373  global $wgMiserMode;
374  if ( $this->mShowAll && $wgMiserMode && is_null( $this->mUserName ) ) {
375  // Unfortunately no index on oi_timestamp.
376  return 'img_name';
377  } else {
378  return 'img_timestamp';
379  }
380  }
381 
382  function doBatchLookups() {
383  $userIds = array();
384  $this->mResult->seek( 0 );
385  foreach ( $this->mResult as $row ) {
386  $userIds[] = $row->img_user;
387  }
388  # Do a link batch query for names and userpages
389  UserCache::singleton()->doQuery( $userIds, array( 'userpage' ), __METHOD__ );
390  }
391 
406  function formatValue( $field, $value ) {
407  switch ( $field ) {
408  case 'thumb':
409  $opt = array( 'time' => $this->mCurrentRow->img_timestamp );
410  $file = RepoGroup::singleton()->getLocalRepo()->findFile( $value, $opt );
411  // If statement for paranoia
412  if ( $file ) {
413  $thumb = $file->transform( array( 'width' => 180, 'height' => 360 ) );
414 
415  return $thumb->toHtml( array( 'desc-link' => true ) );
416  } else {
417  return htmlspecialchars( $value );
418  }
419  case 'img_timestamp':
420  // We may want to make this a link to the "old" version when displaying old files
421  return htmlspecialchars( $this->getLanguage()->userTimeAndDate( $value, $this->getUser() ) );
422  case 'img_name':
423  static $imgfile = null;
424  if ( $imgfile === null ) {
425  $imgfile = $this->msg( 'imgfile' )->text();
426  }
427 
428  // Weird files can maybe exist? Bug 22227
429  $filePage = Title::makeTitleSafe( NS_FILE, $value );
430  if ( $filePage ) {
432  $filePage,
433  htmlspecialchars( $filePage->getText() )
434  );
435  $download = Xml::element( 'a',
436  array( 'href' => wfLocalFile( $filePage )->getURL() ),
437  $imgfile
438  );
439  $download = $this->msg( 'parentheses' )->rawParams( $download )->escaped();
440 
441  return "$link $download";
442  } else {
443  return htmlspecialchars( $value );
444  }
445  case 'img_user_text':
446  if ( $this->mCurrentRow->img_user ) {
447  $name = User::whoIs( $this->mCurrentRow->img_user );
450  htmlspecialchars( $name )
451  );
452  } else {
453  $link = htmlspecialchars( $value );
454  }
455 
456  return $link;
457  case 'img_size':
458  return htmlspecialchars( $this->getLanguage()->formatSize( $value ) );
459  case 'img_description':
460  return Linker::formatComment( $value );
461  case 'count':
462  return intval( $value ) + 1;
463  case 'top':
464  // Messages: listfiles-latestversion-yes, listfiles-latestversion-no
465  return $this->msg( 'listfiles-latestversion-' . $value );
466  default:
467  throw new MWException( "Unknown field '$field'" );
468  }
469  }
470 
471  function getForm() {
472  global $wgScript, $wgMiserMode;
473  $inputForm = array();
474  $inputForm['table_pager_limit_label'] = $this->getLimitSelect( array( 'tabindex' => 1 ) );
475  if ( !$wgMiserMode ) {
476  $inputForm['listfiles_search_for'] = Html::input(
477  'ilsearch',
478  $this->mSearch,
479  'text',
480  array(
481  'size' => '40',
482  'maxlength' => '255',
483  'id' => 'mw-ilsearch',
484  'tabindex' => 2,
485  )
486  );
487  }
488  $inputForm['username'] = Html::input( 'user', $this->mUserName, 'text', array(
489  'size' => '40',
490  'maxlength' => '255',
491  'id' => 'mw-listfiles-user',
492  'tabindex' => 3,
493  ) );
494 
495  $inputForm['listfiles-show-all'] = Html::input( 'ilshowall', 1, 'checkbox', array(
496  'checked' => $this->mShowAll,
497  'tabindex' => 4,
498  ) );
499 
500  return Html::openElement( 'form',
501  array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' )
502  ) .
503  Xml::fieldset( $this->msg( 'listfiles' )->text() ) .
504  Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
505  Xml::buildForm( $inputForm, 'table_pager_limit_submit', array( 'tabindex' => 5 ) ) .
506  $this->getHiddenFields( array( 'limit', 'ilsearch', 'user', 'title', 'ilshowall' ) ) .
507  Html::closeElement( 'fieldset' ) .
508  Html::closeElement( 'form' ) . "\n";
509  }
510 
511  function getTableClass() {
512  return 'listfiles ' . parent::getTableClass();
513  }
514 
515  function getNavClass() {
516  return 'listfiles_nav ' . parent::getNavClass();
517  }
518 
519  function getSortHeaderClass() {
520  return 'listfiles_sort ' . parent::getSortHeaderClass();
521  }
522 
523  function getPagingQueries() {
524  $queries = parent::getPagingQueries();
525  if ( !is_null( $this->mUserName ) ) {
526  # Append the username to the query string
527  foreach ( $queries as &$query ) {
528  $query['user'] = $this->mUserName;
529  }
530  }
531 
532  return $queries;
533  }
534 
535  function getDefaultQuery() {
536  $queries = parent::getDefaultQuery();
537  if ( !isset( $queries['user'] ) && !is_null( $this->mUserName ) ) {
538  $queries['user'] = $this->mUserName;
539  }
540 
541  return $queries;
542  }
543 
544  function getTitle() {
545  return SpecialPage::getTitleFor( 'Listfiles' );
546  }
547 }
FakeResultWrapper
Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual da...
Definition: DatabaseUtility.php:230
ContextSource\$context
IContextSource $context
Definition: ContextSource.php:33
Title\makeTitle
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:189
SpecialListFiles\__construct
__construct()
Definition: SpecialListfiles.php:25
SpecialListFiles\execute
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
Definition: SpecialListfiles.php:29
RepoGroup\singleton
static singleton()
Get a RepoGroup instance.
Definition: RepoGroup.php:53
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
ImageListPager\$mSearch
$mSearch
Definition: SpecialListfiles.php:75
$html
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 & $html
Definition: hooks.txt:1530
ContextSource\msg
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Definition: ContextSource.php:175
$tables
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
Definition: hooks.txt:815
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
ImageListPager\getSortHeaderClass
getSortHeaderClass()
Definition: SpecialListfiles.php:519
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
ImageListPager\getPagingQueries
getPagingQueries()
Get a URL query array for the prev, next, first and last links.
Definition: SpecialListfiles.php:523
$form
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Definition: hooks.txt:2573
ImageListPager\getNavClass
getNavClass()
Definition: SpecialListfiles.php:515
SpecialListFiles
Definition: SpecialListfiles.php:24
$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
NS_FILE
const NS_FILE
Definition: Defines.php:85
$limit
if( $sleep) $limit
Definition: importImages.php:99
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Definition: SpecialPage.php:74
IncludableSpecialPage
Shortcut to construct an includable special page.
Definition: IncludableSpecialPage.php:29
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:662
ImageListPager\doBatchLookups
doBatchLookups()
Called from getBody(), before getStartBody() is called and after doQuery() was called.
Definition: SpecialListfiles.php:382
Linker\formatComment
static formatComment( $comment, $title=null, $local=false)
This function is called by all recent changes variants, by the page history, and by the user contribu...
Definition: Linker.php:1254
$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
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
$dbr
$dbr
Definition: testCompression.php:48
Linker\link
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
Definition: Linker.php:192
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
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
ImageListPager\getFieldNames
getFieldNames()
Definition: SpecialListfiles.php:159
MWException
MediaWiki exception.
Definition: MWException.php:26
ImageListPager\getQueryInfo
getQueryInfo()
This function should be overridden to provide all parameters needed for the main paged query.
Definition: SpecialListfiles.php:213
ImageListPager\$mShowAll
$mShowAll
Definition: SpecialListfiles.php:77
TablePager
Table-based display with a user-selectable sort order.
Definition: Pager.php:925
ImageListPager\getTitle
getTitle()
Get the Title object.
Definition: SpecialListfiles.php:544
Xml\element
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Definition: Xml.php:39
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:352
ImageListPager\__construct
__construct(IContextSource $context, $userName=null, $search='', $including=false, $showAll=false)
Definition: SpecialListfiles.php:80
ImageListPager\$mTableName
$mTableName
Definition: SpecialListfiles.php:78
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
ImageListPager\combineResult
combineResult( $res1, $res2, $limit, $ascending)
Combine results from 2 tables.
Definition: SpecialListfiles.php:335
Html\input
static input( $name, $value='', $type='text', $attribs=array())
Convenience function to produce an "<input>" element.
Definition: Html.php:645
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
SpecialPage\getContext
getContext()
Gets the context this SpecialPage is executed in.
Definition: SpecialPage.php:508
$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
ImageListPager\getTableClass
getTableClass()
Definition: SpecialListfiles.php:511
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
ImageListPager\getDefaultSort
getDefaultSort()
The database field name used as a default sort order.
Definition: SpecialListfiles.php:372
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
User\whoIs
static whoIs( $id)
Get the username corresponding to a given user ID.
Definition: User.php:483
ImageListPager\reallyDoQuery
reallyDoQuery( $offset, $limit, $asc)
Override reallyDoQuery to mix together two queries.
Definition: SpecialListfiles.php:295
$value
$value
Definition: styleTest.css.php:45
Xml\buildForm
static buildForm( $fields, $submitLabel=null, $submitAttribs=array())
Generate a form (without the opening form element).
Definition: Xml.php:748
ImageListPager\getQueryInfoReal
getQueryInfoReal( $table)
Actually get the query info.
Definition: SpecialListfiles.php:232
ImageListPager\$mIncluding
$mIncluding
Definition: SpecialListfiles.php:76
ImageListPager\$mQueryConds
$mQueryConds
Definition: SpecialListfiles.php:73
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
Title\newFromURL
static newFromURL( $url)
THIS IS NOT THE FUNCTION YOU WANT.
Definition: Title.php:241
ImageListPager\buildQueryConds
buildQueryConds( $table)
Build the where clause of the query.
Definition: SpecialListfiles.php:127
ImageListPager\isFieldSortable
isFieldSortable( $field)
Return true if the named field should be sortable by the UI, false otherwise.
Definition: SpecialListfiles.php:181
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
$file
if(PHP_SAPI !='cli') $file
Definition: UtfNormalTest2.php:30
SpecialListFiles\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialListfiles.php:62
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
ImageListPager
Definition: SpecialListfiles.php:70
IndexPager\$mIndexField
$mIndexField
The index to actually be used for ordering.
Definition: Pager.php:92
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
UserCache\singleton
static singleton()
Definition: UserCache.php:34
NS_USER
const NS_USER
Definition: Defines.php:81
IContextSource\getRequest
getRequest()
Get the WebRequest object.
ImageListPager\formatValue
formatValue( $field, $value)
Definition: SpecialListfiles.php:406
$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
wfLocalFile
wfLocalFile( $title)
Get an object referring to a locally registered file.
Definition: GlobalFunctions.php:3704
$queries
$queries
Definition: profileinfo.php:362
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:443
SpecialPage\including
including( $x=null)
Whether the special page is being evaluated via transclusion.
Definition: SpecialPage.php:207
Xml\fieldset
static fieldset( $legend=false, $content=false, $attribs=array())
Shortcut for creating fieldsets.
Definition: Xml.php:563
ImageListPager\getDefaultQuery
getDefaultQuery()
Get an array of query parameters that should be put into self-links.
Definition: SpecialListfiles.php:535
ImageListPager\getForm
getForm()
Definition: SpecialListfiles.php:471
ImageListPager\$mUserName
$mUserName
Definition: SpecialListfiles.php:74
ImageListPager\$mFieldNames
$mFieldNames
Definition: SpecialListfiles.php:71