MediaWiki
REL1_19
|
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') | |
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 = null | |
$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 39 of file SpecialFileDuplicateSearch.php.
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 90 of file SpecialFileDuplicateSearch.php.
References QueryPage\$numRows, $out, $title, $wgScript, Xml\closeElement(), 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 170 of file SpecialFileDuplicateSearch.php.
References $result, $user, $wgContLang, SpecialPage\getLanguage(), SpecialPage\getUser(), Linker\link(), Title\makeTitle(), and Title\newFromText().
Referenced by showList().
Fetch dupes from all connected file repositories.
Definition at line 56 of file SpecialFileDuplicateSearch.php.
References RepoGroup\singleton().
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 77 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 44 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 45 of file SpecialFileDuplicateSearch.php.
Sometime we dont want to build rss / atom feeds.
Reimplemented from QueryPage.
Definition at line 43 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 47 of file SpecialFileDuplicateSearch.php.
FileDuplicateSearchPage::showList | ( | $ | dupes | ) |
$dupes | Array of File objects |
Definition at line 64 of file SpecialFileDuplicateSearch.php.
References QueryPage\closeList(), formatResult(), SpecialPage\getOutput(), and QueryPage\openList().
Referenced by execute().
FileDuplicateSearchPage::$file = null [protected] |
Definition at line 37 of file SpecialFileDuplicateSearch.php.
FileDuplicateSearchPage::$filename = '' |
Definition at line 32 of file SpecialFileDuplicateSearch.php.
FileDuplicateSearchPage::$hash = '' [protected] |
Definition at line 32 of file SpecialFileDuplicateSearch.php.