MediaWiki
REL1_21
|
Searches the database for files of the requested MIME type, comparing this with the 'img_major_mime' and 'img_minor_mime' fields in the image table. More...
Public Member Functions | |
__construct ($name= 'MIMEsearch') | |
execute ($par) | |
This is the actual workhorse. | |
formatResult ($skin, $result) | |
Formats the results of the query for display. | |
getQueryInfo () | |
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => options join_conds => JOIN conditions. | |
isCacheable () | |
Is the output of this query cacheable? Non-cacheable expensive pages will be disabled in miser mode and will not have their results written to the querycache table. | |
isExpensive () | |
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode. | |
isSyndicated () | |
Sometime we don't want to build rss / atom feeds. | |
linkParameters () | |
If using extra form wheely-dealies, return a set of parameters here as an associative array. | |
Public Attributes | |
$minor | |
Protected Member Functions | |
getGroupName () | |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'. | |
Static Protected Member Functions | |
static | isValidType ($type) |
Protected Attributes | |
$major |
Searches the database for files of the requested MIME type, comparing this with the 'img_major_mime' and 'img_minor_mime' fields in the image table.
Definition at line 30 of file SpecialMIMEsearch.php.
MIMEsearchPage::__construct | ( | $ | name = 'MIMEsearch' | ) |
Definition at line 33 of file SpecialMIMEsearch.php.
References $name.
MIMEsearchPage::execute | ( | $ | par | ) |
This is the actual workhorse.
It does everything needed to make a real, honest-to-gosh query page.
Reimplemented from QueryPage.
Definition at line 69 of file SpecialMIMEsearch.php.
References $mime, array(), Xml\closeElement(), Xml\element(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getTitle(), global, Html\hidden(), Xml\inputLabel(), list, SpecialPage\msg(), Xml\openElement(), SpecialPage\outputHeader(), SpecialPage\setHeaders(), File\splitMime(), Xml\submitButton(), and text.
MIMEsearchPage::formatResult | ( | $ | skin, |
$ | result | ||
) |
Formats the results of the query for display.
The skin is the current skin; you can use it for making links. The result is a single row of result data. You should be able to grab SQL results off of it. If the function returns false, the line output will be skipped.
$skin | Skin |
$result | object Result row |
$skin | Skin object |
$result | Object: database row |
Reimplemented from QueryPage.
Definition at line 95 of file SpecialMIMEsearch.php.
References $result, $time, $user, $wgContLang, SpecialPage\getLanguage(), global, Linker\link(), Linker\makeMediaLinkObj(), Title\makeTitle(), SpecialPage\msg(), and Title\newFromText().
MIMEsearchPage::getGroupName | ( | ) | [protected] |
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.
Reimplemented from SpecialPage.
Definition at line 137 of file SpecialMIMEsearch.php.
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s) for passing to Database::select() fields => Field(s) for passing to Database::select(), may be * conds => WHERE conditions options => options join_conds => JOIN conditions.
Note that the query itself should return the following three columns: 'namespace', 'title', and 'value'. 'value' is used for sorting.
These may be stored in the querycache table for expensive queries, and that cached data will be returned sometimes, so the presence of extra fields can't be relied upon. The cached 'value' column will be an integer; non-numeric values are useful only for sorting the initial query (except if they're timestamps, see usesTimestamps()).
Don't include an ORDER or LIMIT clause, they will be added.
If this function is not overridden or returns something other than an array, getSQL() will be used instead. This is for backwards compatibility only and is strongly deprecated.
Reimplemented from QueryPage.
Definition at line 53 of file SpecialMIMEsearch.php.
References array().
Is the output of this query cacheable? Non-cacheable expensive pages will be disabled in miser mode and will not have their results written to the querycache table.
Reimplemented from QueryPage.
Definition at line 45 of file SpecialMIMEsearch.php.
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
$wgDisableQueryPages causes all query pages to be declared expensive. Some query pages are always expensive.
Reimplemented from QueryPage.
Definition at line 37 of file SpecialMIMEsearch.php.
Sometime we don't want to build rss / atom feeds.
Reimplemented from QueryPage.
Definition at line 41 of file SpecialMIMEsearch.php.
static MIMEsearchPage::isValidType | ( | $ | type | ) | [static, protected] |
$type | string |
Definition at line 121 of file SpecialMIMEsearch.php.
References array().
If using extra form wheely-dealies, return a set of parameters here as an associative array.
They will be encoded and added to the paging links (prev/next/lengths).
Reimplemented from QueryPage.
Definition at line 49 of file SpecialMIMEsearch.php.
References array().
MIMEsearchPage::$major [protected] |
Definition at line 31 of file SpecialMIMEsearch.php.
MIMEsearchPage::$minor |
Definition at line 31 of file SpecialMIMEsearch.php.