Inherited by AncientPagesPage, FewestrevisionsPage, FileDuplicateSearchPage, ImageQueryPage, LinkSearchPage, ListredirectsPage, MIMEsearchPage, MostcategoriesPage, MostlinkedCategoriesPage, MostlinkedPage, MostrevisionsPage, PageQueryPage, PopularPagesPage, ShortPagesPage, SpecialMostlinkedtemplates, UnusedCategoriesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, and WantedTemplatesPage.
Public Member Functions | |
setListoutput ($bool) | |
A mutator for $this->listoutput;. | |
getName () | |
Subclasses return their name here. | |
getTitle () | |
Return title object representing this page. | |
getSQL () | |
Subclasses return an SQL query here. | |
sortDescending () | |
Override to sort by increasing values. | |
getOrder () | |
isExpensive () | |
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode. | |
isCached () | |
Whether or not the output of the page in question is retrived from the database cache. | |
isSyndicated () | |
Sometime we dont want to build rss / atom feeds. | |
formatResult ($skin, $result) | |
Formats the results of the query for display. | |
getPageHeader () | |
The content returned by this function will be output before any result. | |
linkParameters () | |
If using extra form wheely-dealies, return a set of parameters here as an associative array. | |
tryLastResult () | |
Some special pages (for example SpecialListusers) might not return the current object formatted, but return the previous one instead. | |
recache ($limit, $ignoreErrors=true) | |
Clear the cache and save new results. | |
doQuery ($offset, $limit, $shownavigation=true) | |
This is the actual workhorse. | |
openList ($offset) | |
closeList () | |
preprocessResults ($db, $res) | |
Do any necessary preprocessing of the result object. | |
doFeed ($class= '', $limit=50) | |
Similar to above, but packaging in a syndicated feed instead of a web page. | |
feedResult ($row) | |
Override for custom handling. | |
feedItemDesc ($row) | |
feedItemAuthor ($row) | |
feedTitle () | |
feedDesc () | |
feedUrl () | |
Public Attributes | |
$listoutput = false | |
$offset = 0 | |
$limit = 0 | |
Protected Member Functions | |
outputResults ($out, $skin, $dbr, $res, $num, $offset) | |
Format and output report results using the given information plus OutputPage. |
Definition at line 63 of file QueryPage.php.
QueryPage::closeList | ( | ) |
QueryPage::doFeed | ( | $ | class = '' , |
|
$ | limit = 50 | |||
) |
Similar to above, but packaging in a syndicated feed instead of a web page.
Definition at line 454 of file QueryPage.php.
References $dbr, $limit, $obj, $res, $sql, $wgFeed, $wgFeedClasses, $wgFeedLimit, $wgOut, feedDesc(), feedResult(), feedTitle(), feedUrl(), getOrder(), getSQL(), and wfGetDB().
QueryPage::doQuery | ( | $ | offset, | |
$ | limit, | |||
$ | shownavigation = true | |||
) |
This is the actual workhorse.
It does everything needed to make a real, honest-to-gosh query page.
$offset | database query offset | |
$limit | database query limit | |
$shownavigation | show navigation like "next 200"? |
Reimplemented in LinkSearchPage.
Definition at line 285 of file QueryPage.php.
References $dbr, $fname, $limit, $offset, $res, $sql, $type, $wgContLang, $wgDisableQueryPageUpdate, $wgLang, $wgOut, $wgUser, getName(), getOrder(), getPageHeader(), getSQL(), isCached(), isSyndicated(), linkParameters(), outputResults(), preprocessResults(), wfArrayToCGI(), wfGetDB(), wfMsgHtml(), wfShowingResults(), and wfViewPrevNext().
QueryPage::feedDesc | ( | ) |
QueryPage::feedItemAuthor | ( | $ | row | ) |
QueryPage::feedItemDesc | ( | $ | row | ) |
QueryPage::feedResult | ( | $ | row | ) |
Override for custom handling.
If the titles/links are ok, just do feedItemDesc()
Definition at line 496 of file QueryPage.php.
References $row, $title, feedItemAuthor(), and feedItemDesc().
Referenced by doFeed().
QueryPage::feedTitle | ( | ) |
Definition at line 529 of file QueryPage.php.
References $page, $wgContLanguageCode, $wgSitename, getName(), and SpecialPage::getPage().
Referenced by doFeed().
QueryPage::feedUrl | ( | ) |
Definition at line 540 of file QueryPage.php.
References $title, getName(), and SpecialPage::getTitleFor().
Referenced by doFeed().
QueryPage::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 in PageQueryPage, AncientPagesPage, BrokenRedirectsPage, DisambiguationsPage, DoubleRedirectsPage, FewestrevisionsPage, FileDuplicateSearchPage, LinkSearchPage, ListredirectsPage, MIMEsearchPage, MostcategoriesPage, MostlinkedPage, MostlinkedCategoriesPage, SpecialMostlinkedtemplates, MostrevisionsPage, PopularPagesPage, ShortPagesPage, UnusedCategoriesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, and WantedTemplatesPage.
Definition at line 172 of file QueryPage.php.
Referenced by outputResults().
QueryPage::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 in AncientPagesPage, BrokenRedirectsPage, DeadendPagesPage, DisambiguationsPage, DoubleRedirectsPage, FewestrevisionsPage, FileDuplicateSearchPage, LinkSearchPage, ListredirectsPage, LonelyPagesPage, LongPagesPage, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostlinkedPage, MostlinkedCategoriesPage, SpecialMostlinkedtemplates, MostrevisionsPage, PopularPagesPage, ShortPagesPage, UncategorizedCategoriesPage, UncategorizedImagesPage, UncategorizedPagesPage, UncategorizedTemplatesPage, UnusedCategoriesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, WantedTemplatesPage, and WithoutInterwikiPage.
Definition at line 93 of file QueryPage.php.
Referenced by doQuery(), feedTitle(), feedUrl(), getTitle(), and recache().
QueryPage::getOrder | ( | ) |
Reimplemented in BrokenRedirectsPage, DisambiguationsPage, DoubleRedirectsPage, and LinkSearchPage.
Definition at line 132 of file QueryPage.php.
References sortDescending().
QueryPage::getPageHeader | ( | ) |
The content returned by this function will be output before any result.
Reimplemented in BrokenRedirectsPage, DeadendPagesPage, DisambiguationsPage, DoubleRedirectsPage, LonelyPagesPage, UnusedCategoriesPage, UnusedimagesPage, UnusedtemplatesPage, and WithoutInterwikiPage.
Definition at line 179 of file QueryPage.php.
Referenced by doQuery().
QueryPage::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 in AncientPagesPage, BrokenRedirectsPage, DeadendPagesPage, DisambiguationsPage, DoubleRedirectsPage, FileDuplicateSearchPage, LinkSearchPage, ListredirectsPage, LonelyPagesPage, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostlinkedPage, MostlinkedCategoriesPage, MostrevisionsPage, PopularPagesPage, ShortPagesPage, UncategorizedImagesPage, UncategorizedPagesPage, UnusedCategoriesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, WantedTemplatesPage, and WithoutInterwikiPage.
Definition at line 121 of file QueryPage.php.
QueryPage::getTitle | ( | ) |
Return title object representing this page.
Definition at line 102 of file QueryPage.php.
References getName(), and SpecialPage::getTitleFor().
QueryPage::isCached | ( | ) |
Whether or not the output of the page in question is retrived from the database cache.
Definition at line 153 of file QueryPage.php.
References $wgMiserMode, and isExpensive().
Referenced by doQuery(), WantedTemplatesPage::formatResult(), WantedPagesPage::formatResult(), WantedFilesPage::formatResult(), WantedCategoriesPage::formatResult(), ShortPagesPage::formatResult(), and ShortPagesPage::preprocessResults().
QueryPage::isExpensive | ( | ) |
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
$wgDisableQueryPages causes all query pages to be declared expensive. Some query pages are always expensive.
Reimplemented in AncientPagesPage, BrokenRedirectsPage, DeadendPagesPage, DisambiguationsPage, DoubleRedirectsPage, FewestrevisionsPage, FileDuplicateSearchPage, ListredirectsPage, LonelyPagesPage, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostlinkedPage, MostlinkedCategoriesPage, SpecialMostlinkedtemplates, MostrevisionsPage, PopularPagesPage, ShortPagesPage, UncategorizedImagesPage, UncategorizedPagesPage, UnusedCategoriesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, WantedTemplatesPage, and WithoutInterwikiPage.
Definition at line 142 of file QueryPage.php.
References $wgDisableQueryPages.
Referenced by isCached().
QueryPage::isSyndicated | ( | ) |
Sometime we dont want to build rss / atom feeds.
Reimplemented in AncientPagesPage, BrokenRedirectsPage, DeadendPagesPage, DisambiguationsPage, DoubleRedirectsPage, FewestrevisionsPage, FileDuplicateSearchPage, LinkSearchPage, ListredirectsPage, LonelyPagesPage, MIMEsearchPage, MostcategoriesPage, MostimagesPage, MostlinkedPage, MostlinkedCategoriesPage, SpecialMostlinkedtemplates, MostrevisionsPage, PopularPagesPage, ShortPagesPage, UncategorizedImagesPage, UncategorizedPagesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, WantedTemplatesPage, and WithoutInterwikiPage.
Definition at line 162 of file QueryPage.php.
Referenced by doQuery().
QueryPage::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).
Reimplemented in FileDuplicateSearchPage, LinkSearchPage, and MIMEsearchPage.
Definition at line 189 of file QueryPage.php.
Referenced by doQuery().
QueryPage::openList | ( | $ | offset | ) |
QueryPage::outputResults | ( | $ | out, | |
$ | skin, | |||
$ | dbr, | |||
$ | res, | |||
$ | num, | |||
$ | offset | |||
) | [protected] |
Format and output report results using the given information plus OutputPage.
OutputPage | $out OutputPage to print to | |
Skin | $skin User skin to use | |
Database | $dbr Database (read) connection to use | |
int | $res Result pointer | |
int | $num Number of available result rows | |
int | $offset Paging offset |
Reimplemented in ImageQueryPage.
Definition at line 391 of file QueryPage.php.
References $dbr, $i, $offset, $out, $res, $row, $wgContLang, closeList(), formatResult(), openList(), and tryLastResult().
Referenced by doQuery().
QueryPage::preprocessResults | ( | $ | db, | |
$ | res | |||
) |
Do any necessary preprocessing of the result object.
Reimplemented in MostlinkedPage, MostlinkedCategoriesPage, SpecialMostlinkedtemplates, ShortPagesPage, WantedCategoriesPage, WantedFilesPage, WantedPagesPage, and WantedTemplatesPage.
Definition at line 449 of file QueryPage.php.
Referenced by doQuery().
QueryPage::recache | ( | $ | limit, | |
$ | ignoreErrors = true | |||
) |
QueryPage::setListoutput | ( | $ | bool | ) |
A mutator for $this->listoutput;.
bool | $bool |
Definition at line 84 of file QueryPage.php.
Referenced by WantedPagesPage::WantedPagesPage().
QueryPage::sortDescending | ( | ) |
Override to sort by increasing values.
Reimplemented in AncientPagesPage, DeadendPagesPage, FewestrevisionsPage, ListredirectsPage, LonelyPagesPage, LongPagesPage, MostlinkedCategoriesPage, SpecialMostlinkedtemplates, ShortPagesPage, UncategorizedImagesPage, UncategorizedPagesPage, UnusedimagesPage, UnusedtemplatesPage, UnwatchedpagesPage, WantedCategoriesPage, WantedFilesPage, WantedTemplatesPage, and WithoutInterwikiPage.
Definition at line 128 of file QueryPage.php.
Referenced by getOrder().
QueryPage::tryLastResult | ( | ) |
Some special pages (for example SpecialListusers) might not return the current object formatted, but return the previous one instead.
Setting this to return true, will call one more time wfFormatResult to be sure that the very last result is formatted and shown.
Definition at line 199 of file QueryPage.php.
Referenced by outputResults().
QueryPage::$limit = 0 |
Definition at line 77 of file QueryPage.php.
Referenced by doFeed(), LinkSearchPage::doQuery(), doQuery(), and recache().
QueryPage::$listoutput = false |
Definition at line 69 of file QueryPage.php.
QueryPage::$offset = 0 |
Definition at line 76 of file QueryPage.php.
Referenced by LinkSearchPage::doQuery(), doQuery(), openList(), and outputResults().