Wikia code/includes/QueryPage.php
< Wikia code | includes
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.42.3. |
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\QueryPage.php 2011-07-18 22:31:28.314453100 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\QueryPage.php 2011-08-17 15:28:46.649414100 +0100
@@ -481,11 +481,24 @@
$feed = new $wgFeedClasses[$class](
$this->feedTitle(),
$this->feedDesc(),
- $this->feedUrl() );
+ $this->feedUrl()
+ );
$feed->outHeader();
$dbr = wfGetDB( DB_SLAVE );
- $sql = $this->getSQL() . $this->getOrder();
+
+ $fname = get_class($this) . '::doQuery';
+ $sname = $this->getName();
+ if ( !$this->isCached() ) {
+ $sql = $this->getSQL();
+ } else {
+ # Get the cached result
+ $querycache = $dbr->tableName( 'querycache' );
+ $type = $dbr->strencode( $sname );
+ $sql = "SELECT qc_type as type, qc_namespace as namespace,qc_title as title, qc_value as value FROM $querycache WHERE qc_type='$type'";
+ }
+
+ $sql = $sql . " " . $this->getOrder();
$sql = $dbr->limitResult( $sql, $limit, 0 );
$res = $dbr->query( $sql, 'QueryPage::doFeed' );
while( $obj = $dbr->fetchObject( $res ) ) {