MediaWiki  REL1_22
FileDuplicateSearchPage Class Reference

Searches the database for files of the requested hash, comparing this with the 'img_sha1' field in the image table. More...

Inheritance diagram for FileDuplicateSearchPage:
Collaboration diagram for FileDuplicateSearchPage:

List of all members.

Public Member Functions

 __construct ($name= 'FileDuplicateSearch')
 doBatchLookups ($list)
 execute ($par)
 This is the actual workhorse.
 formatResult ($skin, $result)
 getDupes ()
 Fetch dupes from all connected file repositories.
 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.
 isCached ()
 Whether or not the output of the page in question is retrieved from the database cache.
 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.
 showList ($dupes)

Public Attributes

 $filename = ''

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

Protected Attributes

File $file = null
 $file selected reference file, if present
 $hash = ''

Detailed Description

Searches the database for files of the requested hash, comparing this with the 'img_sha1' field in the image table.

Definition at line 31 of file SpecialFileDuplicateSearch.php.


Constructor & Destructor Documentation

FileDuplicateSearchPage::__construct ( name = 'FileDuplicateSearch')

Definition at line 38 of file SpecialFileDuplicateSearch.php.

References $name.


Member Function Documentation

Definition at line 181 of file SpecialFileDuplicateSearch.php.

References $batch, $file, and as.

Referenced by execute().

FileDuplicateSearchPage::formatResult ( skin,
result 
)
Parameters:
Skin$skin
File$result
Returns:
string

Reimplemented from QueryPage.

Definition at line 202 of file SpecialFileDuplicateSearch.php.

Fetch dupes from all connected file repositories.

Returns:
array of File objects

Definition at line 63 of file SpecialFileDuplicateSearch.php.

Referenced by execute().

Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-group-*' for valid names This method defaults to group 'other'.

Returns:
string
Since:
1.21

Reimplemented from SpecialPage.

Definition at line 229 of file SpecialFileDuplicateSearch.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.

Returns:
array
Since:
1.18

Reimplemented from QueryPage.

Definition at line 84 of file SpecialFileDuplicateSearch.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.

Returns:
bool
Since:
1.18

Reimplemented from QueryPage.

Definition at line 46 of file SpecialFileDuplicateSearch.php.

Whether or not the output of the page in question is retrieved from the database cache.

Returns:
bool

Reimplemented from QueryPage.

Definition at line 50 of file SpecialFileDuplicateSearch.php.

Sometime we don't want to build rss / atom feeds.

Returns:
bool

Reimplemented from QueryPage.

Definition at line 42 of file SpecialFileDuplicateSearch.php.

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 54 of file SpecialFileDuplicateSearch.php.

References array().

Parameters:
array$dupesof File objects

Definition at line 71 of file SpecialFileDuplicateSearch.php.

Referenced by execute().


Member Data Documentation

File FileDuplicateSearchPage::$file = null [protected]

$file selected reference file, if present

Definition at line 36 of file SpecialFileDuplicateSearch.php.

Referenced by doBatchLookups().

FileDuplicateSearchPage::$filename = ''

Definition at line 32 of file SpecialFileDuplicateSearch.php.

FileDuplicateSearchPage::$hash = '' [protected]

Definition at line 32 of file SpecialFileDuplicateSearch.php.


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