MediaWiki
REL1_22
|
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 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 = '' |
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.
References $name.
FileDuplicateSearchPage::doBatchLookups | ( | $ | list | ) |
FileDuplicateSearchPage::execute | ( | $ | par | ) |
This is the actual workhorse.
It does everything needed to make a real, honest-to-gosh query page. $par
Reimplemented from QueryPage.
Definition at line 97 of file SpecialFileDuplicateSearch.php.
References QueryPage\$numRows, $out, $title, array(), Html\closeElement(), doBatchLookups(), Html\element(), SpecialPage\file(), getDupes(), SpecialPage\getLanguage(), SpecialPage\getOutput(), SpecialPage\getRequest(), SpecialPage\getTitle(), global, Html\hidden(), Xml\inputLabel(), SpecialPage\msg(), Title\newFromText(), Html\openElement(), SpecialPage\outputHeader(), params, SpecialPage\setHeaders(), showList(), Xml\submitButton(), text, wfEscapeWikiText(), and wfFindFile().
FileDuplicateSearchPage::formatResult | ( | $ | skin, |
$ | result | ||
) |
Reimplemented from QueryPage.
Definition at line 202 of file SpecialFileDuplicateSearch.php.
Fetch dupes from all connected file repositories.
Definition at line 63 of file SpecialFileDuplicateSearch.php.
Referenced by execute().
FileDuplicateSearchPage::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 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.
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.
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.
Reimplemented from QueryPage.
Definition at line 50 of file SpecialFileDuplicateSearch.php.
Sometime we don't 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 54 of file SpecialFileDuplicateSearch.php.
References array().
FileDuplicateSearchPage::showList | ( | $ | dupes | ) |
array | $dupes | of File objects |
Definition at line 71 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.