MIMEsearchPage Class Reference
[SpecialPage]

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...

Inherits QueryPage.

List of all members.

Public Member Functions

 MIMEsearchPage ($major, $minor)
 getName ()
 Subclasses return their name here.
 isExpensive ()
 Due to this page relying upon extra fields being passed in the SELECT it will fail if it's set as expensive and misermode is on.
 isSyndicated ()
 Sometime we dont want to build rss / atom feeds.
 linkParameters ()
 If using extra form wheely-dealies, return a set of parameters here as an associative array.
 getSQL ()
 Subclasses return an SQL query here.
 formatResult ($skin, $result)
 Formats the results of the query for display.

Public Attributes

 $major
 $minor


Detailed Description

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 18 of file SpecialMIMEsearch.php.


Member Function Documentation

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 return "false", the line output will be skipped.

Reimplemented from QueryPage.

Definition at line 63 of file SpecialMIMEsearch.php.

References $result, $text, $user, $wgContLang, $wgLang, Title::makeTitle(), wfMsgExt(), and wfMsgHtml().

MIMEsearchPage::getName (  ) 

Subclasses return their name here.

Make sure the name is also specified in SpecialPage.php and in Language.php as a language message param.

Reimplemented from QueryPage.

Definition at line 26 of file SpecialMIMEsearch.php.

MIMEsearchPage::getSQL (  ) 

Subclasses return an SQL query here.

Note that the query itself should return the following four columns: 'type' (your special page's name), 'namespace', 'title', and 'value' *in that order*. '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.

Don't include an ORDER or LIMIT clause, this will be added.

Reimplemented from QueryPage.

Definition at line 41 of file SpecialMIMEsearch.php.

References $dbr, $major, $minor, and wfGetDB().

MIMEsearchPage::isExpensive (  ) 

Due to this page relying upon extra fields being passed in the SELECT it will fail if it's set as expensive and misermode is on.

Reimplemented from QueryPage.

Definition at line 32 of file SpecialMIMEsearch.php.

MIMEsearchPage::isSyndicated (  ) 

Sometime we dont want to build rss / atom feeds.

Reimplemented from QueryPage.

Definition at line 33 of file SpecialMIMEsearch.php.

MIMEsearchPage::linkParameters (  ) 

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).

Returns:
array

Reimplemented from QueryPage.

Definition at line 35 of file SpecialMIMEsearch.php.

MIMEsearchPage::MIMEsearchPage ( major,
minor 
)

Definition at line 21 of file SpecialMIMEsearch.php.

References $major, and $minor.


Member Data Documentation

MIMEsearchPage::$major

Definition at line 19 of file SpecialMIMEsearch.php.

Referenced by getSQL(), and MIMEsearchPage().

MIMEsearchPage::$minor

Definition at line 19 of file SpecialMIMEsearch.php.

Referenced by getSQL(), and MIMEsearchPage().


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:42 2009 for MediaWiki by  doxygen 1.5.9