MediaWiki
REL1_20
|
Searches the database for files of the requested hash, comparing this with the 'img_sha1' field in the image table. More...
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 dont 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 Attributes | |
File | $file = null |
$file selected reference file, if present | |
$hash = '' |
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.
FileDuplicateSearchPage::__construct | ( | $ | name = 'FileDuplicateSearch' | ) |
Definition at line 38 of file SpecialFileDuplicateSearch.php.
FileDuplicateSearchPage::doBatchLookups | ( | $ | list | ) |
Definition at line 164 of file SpecialFileDuplicateSearch.php.
References $file.
Referenced by execute().
FileDuplicateSearchPage::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 89 of file SpecialFileDuplicateSearch.php.
References QueryPage\$numRows, $out, $title, Xml\closeElement(), doBatchLookups(), Xml\element(), SpecialPage\file(), getDupes(), SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getTitle(), Html\hidden(), Xml\inputLabel(), SpecialPage\msg(), Title\newFromText(), Xml\openElement(), SpecialPage\outputHeader(), SpecialPage\setHeaders(), showList(), Xml\submitButton(), wfEscapeWikiText(), and wfFindFile().
FileDuplicateSearchPage::formatResult | ( | $ | skin, |
$ | result | ||
) |
Reimplemented from QueryPage.
Definition at line 183 of file SpecialFileDuplicateSearch.php.
Fetch dupes from all connected file repositories.
Definition at line 55 of file SpecialFileDuplicateSearch.php.
Referenced by execute().
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 76 of file SpecialFileDuplicateSearch.php.
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 43 of file SpecialFileDuplicateSearch.php.
Whether or not the output of the page in question is retrieved from the database cache.
Reimplemented from QueryPage.
Definition at line 44 of file SpecialFileDuplicateSearch.php.
Sometime we dont want to build rss / atom feeds.
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).
Reimplemented from QueryPage.
Definition at line 46 of file SpecialFileDuplicateSearch.php.
FileDuplicateSearchPage::showList | ( | $ | dupes | ) |
$dupes | Array of File objects |
Definition at line 63 of file SpecialFileDuplicateSearch.php.
Referenced by execute().
$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.