r78788 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78787‎ | r78788 | r78789 >
Date:14:33, 22 December 2010
Author:catrope
Status:ok
Tags:
Comment:
Followup r78786: merge querypage-work2 for extensions
Modified paths:
  • /trunk/extensions/ApprovedRevs/SpecialApprovedRevs.php (modified) (history)
  • /trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/specials/MV_SpecialListStreams.php (modified) (history)
  • /trunk/extensions/PasswordReset/PasswordReset_Disabledusers.php (modified) (history)
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)
  • /trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php (modified) (history)
  • /trunk/extensions/ProofreadPage/SpecialProofreadPages.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/specials/SD_Filters.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_Forms.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_Templates.php (modified) (history)
  • /trunk/extensions/StalePages/StalePages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PasswordReset/PasswordReset_Disabledusers.php
@@ -51,16 +51,15 @@
5252 return false;
5353 }
5454
55 - function getSQL() {
56 - $db = wfGetDB( DB_SLAVE );
57 - $user = $db->tableName( 'user' );
58 -
59 - return
60 - "SELECT 'Disabledusers' as type,
61 - user_id,
62 - user_name as value
63 - FROM $user
64 - WHERE user_password='DISABLED'";
 55+ function getQueryInfo() {
 56+ return array(
 57+ 'tables' => array ( 'user' ),
 58+ 'fields' => array(
 59+ 'user_id',
 60+ 'user_name AS value'
 61+ ),
 62+ 'conds' => array ( 'user_password' => 'DISABLED' )
 63+ );
6564 }
6665
6766 function sortDescending() {
Index: trunk/extensions/ProofreadPage/SpecialProofreadPages.php
@@ -4,18 +4,12 @@
55 * @ingroup SpecialPage
66 */
77
8 -if ( !defined( 'MEDIAWIKI' ) ) {
9 - die( 1 );
10 -}
11 -
12 -global $IP;
13 -require_once "$IP/includes/QueryPage.php";
14 -
15 -class ProofreadPages extends SpecialPage {
16 -
17 - public function __construct() {
18 - parent::__construct( 'IndexPages' );
19 - $this->index_namespace = preg_quote( wfMsgForContent( 'proofreadpage_index_namespace' ), '/' );
 8+class ProofreadPages extends QueryPage {
 9+ protected $index_namespace, $searchTerm;
 10+
 11+ public function __construct( $name = 'IndexPages' ) {
 12+ parent::__construct( $name );
 13+ $this->index_namespace = wfMsgForContent( 'proofreadpage_index_namespace' );
2014 }
2115
2216 public function execute( $parameters ) {
@@ -25,49 +19,38 @@
2620 list( $limit, $offset ) = wfCheckLimits();
2721 $wgOut->addWikiText( wfMsgForContentNoTrans( 'proofreadpage_specialpage_text' ) );
2822 $searchList = array();
29 - $searchTerm = $wgRequest->getText( 'key' );
 23+ $this->searchTerm = $wgRequest->getText( 'key' );
3024 if( !$wgDisableTextSearch ) {
3125 $wgOut->addHTML(
3226 Xml::openElement( 'form' ) .
3327 Xml::openElement( 'fieldset' ) .
3428 Xml::element( 'legend', null, wfMsg( 'proofreadpage_specialpage_legend' ) ) .
35 - Xml::input( 'key', 20, $searchTerm ) . ' ' .
 29+ Xml::input( 'key', 20, $this->searchTerm ) . ' ' .
3630 Xml::submitButton( wfMsg( 'ilsubmit' ) ) .
3731 Xml::closeElement( 'fieldset' ) .
3832 Xml::closeElement( 'form' )
3933 );
40 - if( $searchTerm ) {
 34+ if( $this->searchTerm ) {
4135 $index_namespace = $this->index_namespace;
4236 $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $index_namespace ) );
4337 $searchEngine = SearchEngine::create();
4438 $searchEngine->setLimitOffset( $limit, $offset );
4539 $searchEngine->setNamespaces( array( $index_ns_index ) );
4640 $searchEngine->showRedirects = false;
47 - $textMatches = $searchEngine->searchText( $searchTerm );
 41+ $textMatches = $searchEngine->searchText( $this->searchTerm );
 42+ $escIndex = preg_quote( $index_namespace, '/' );
4843 while( $result = $textMatches->next() ) {
49 - if ( preg_match( "/^$index_namespace:(.*)$/", $result->getTitle(), $m ) ) {
 44+ if ( preg_match( "/^$escIndex:(.*)$/", $result->getTitle(), $m ) ) {
5045 array_push( $searchList, str_replace( ' ' , '_' , $m[1] ) );
5146 }
5247 }
5348 }
5449 }
55 - $cnl = new ProofreadPagesQuery( $searchList, $searchTerm );
56 - $cnl->doQuery( $offset, $limit );
 50+ parent::execute( $parameters );
5751 }
58 -}
5952
60 -class ProofreadPagesQuery extends QueryPage {
61 - function __construct( $searchList, $searchTerm ) {
62 - $this->searchList = $searchList;
63 - $this->searchTerm = $searchTerm;
64 - $this->index_namespace = preg_quote( wfMsgForContent( 'proofreadpage_index_namespace' ), '/' );
65 - }
66 -
67 - function getName() {
68 - return 'IndexPages';
69 - }
70 -
7153 function isExpensive() {
 54+ // FIXME: the query does filesort, so we're kinda lying here right now
7255 return false;
7356 }
7457
@@ -78,39 +61,28 @@
7962 function linkParameters() {
8063 return array( 'key' => $this->searchTerm );
8164 }
82 -
83 - function getSQL() {
84 - $dbr = wfGetDB( DB_SLAVE );
85 - $page = $dbr->tableName( 'page' );
86 - $pr_index = $dbr->tableName( 'pr_index' );
87 -
88 - $query = "SELECT page_title as title,
89 - pr_count,pr_q0,pr_q1,pr_q2,pr_q3,pr_q4
90 - FROM $pr_index LEFT JOIN $page ON page_id = pr_page_id";
91 -
92 - if( $this->searchTerm ) {
93 - if( $this->searchList ) {
94 - $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $this->index_namespace ) );
95 - $querylist = '';
96 - foreach( $this->searchList as $item ) {
97 - if( $querylist ) {
98 - $querylist .= ', ';
99 - }
100 - $querylist .= "'" . $dbr->strencode( $item ). "'";
101 - }
102 - $query .= " WHERE page_namespace=$index_ns_index AND page_title IN ($querylist)";
 65+
 66+ public function getQueryInfo() {
 67+ $conds = array();
 68+ if ( $this->searchTerm ) {
 69+ if ( $this->searchList ) {
 70+ $index_namespace = pr_index_ns();
 71+ $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $index_namespace ) );
 72+ $conds = array( 'page_namespace' => $index_ns_index, 'page_title' => $this->searchList );
10373 } else {
104 - # The SQL query is complete
 74+ $conds = null;
10575 }
10676 }
107 - return $query;
 77+ return array(
 78+ 'tables' => array( 'pr_index', 'page' ),
 79+ 'fields' => array( 'page_title AS title', '2*pr_q4+pr_q3 AS value', 'pr_count',
 80+ 'pr_q0', 'pr_q1', 'pr_q2' ,'pr_q3', 'pr_q4' ),
 81+ 'conds' => $conds,
 82+ 'options' => array(),
 83+ 'join_conds' => array( 'page' => array( 'LEFT JOIN', 'page_id=pr_page_id' ) )
 84+ );
10885 }
10986
110 - function getOrder() {
111 - return ' ORDER BY 2*pr_q4+pr_q3 ' .
112 - ( $this->sortDescending() ? 'DESC' : '' );
113 - }
114 -
11587 function sortDescending() {
11688 return true;
11789 }
Index: trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php
@@ -23,30 +23,13 @@
2424 * Special page that lists the texts that have no transclusions
2525 * Pages in MediaWiki:Proofreadpage_notnaked_category are excluded.
2626 */
27 -class PagesWithoutScans extends SpecialPage {
 27+class PagesWithoutScans extends QueryPage {
2828
29 - public function __construct() {
30 - parent::__construct( 'PagesWithoutScans' );
 29+ function __construct( $name = 'PagesWithoutScans' ) {
 30+ parent::__construct( $name );
 31+ $this->page_namespace = wfMsgForContent( 'proofreadpage_namespace' );
3132 }
3233
33 - public function execute( $parameters ) {
34 - $this->setHeaders();
35 - list( $limit, $offset ) = wfCheckLimits();
36 - $cnl = new PagesWithoutScansQuery();
37 - $cnl->doQuery( $offset, $limit );
38 - }
39 -}
40 -
41 -class PagesWithoutScansQuery extends QueryPage {
42 -
43 - function __construct() {
44 - $this->page_namespace = preg_quote( wfMsgForContent( 'proofreadpage_namespace' ), '/' );
45 - }
46 -
47 - function getName() {
48 - return 'PagesWithoutScans';
49 - }
50 -
5134 function isExpensive() {
5235 return true;
5336 }
@@ -55,9 +38,9 @@
5639 return false;
5740 }
5841
59 - /*
60 - * return a clause with the list of disambiguation templates.
61 - * this function was copied verbatim from specials/SpecialDisambiguations.php
 42+ /**
 43+ * Return a clause with the list of disambiguation templates.
 44+ * This function was copied verbatim from specials/SpecialDisambiguations.php
6245 */
6346 function disambiguation_templates( $dbr ) {
6447 $dMsgText = wfMsgForContent('disambiguationspage');
@@ -92,30 +75,47 @@
9376 }
9477 return $linkBatch->constructSet( 'tl', $dbr );
9578 }
96 -
97 - function getSQL() {
 79+
 80+ function getQueryInfo() {
9881 $dbr = wfGetDB( DB_SLAVE );
99 - $page = $dbr->tableName( 'page' );
100 - $templatelinks = $dbr->tableName( 'templatelinks' );
101 - $forceindex = $dbr->useIndexClause( 'page_len' );
10282 $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $this->page_namespace ) );
103 -
104 - /* SQL clause to exclude pages with scans */
105 - $pages_with_scans = "( SELECT DISTINCT tl_from FROM $templatelinks LEFT JOIN $page ON page_id=tl_from WHERE tl_namespace=$page_ns_index AND page_namespace=" . NS_MAIN . " ) ";
106 -
107 - /* Exclude disambiguation pages too */
 83+
 84+ // Construct subqueries
 85+ $pagesWithScansSubquery = $dbr->selectSQLText(
 86+ array( 'templatelinks', 'page' ),
 87+ 'DISTINCT tl_from',
 88+ array(
 89+ 'page_id=tl_from',
 90+ 'tl_namespace' => $page_ns_index,
 91+ 'page_namespace' => NS_MAIN
 92+ )
 93+ );
 94+
 95+ // Exclude disambiguation pages too
10896 $dt = $this->disambiguation_templates( $dbr );
109 - $disambiguation_pages = "( SELECT page_id FROM $page LEFT JOIN $templatelinks ON page_id=tl_from WHERE page_namespace=" . NS_MAIN . " AND " . $dt . " )";
110 -
111 - $sql = "SELECT page_namespace as namespace,
112 - page_title as title,
113 - page_len AS value
114 - FROM $page $forceindex
115 - WHERE page_namespace=" . NS_MAIN . " AND page_is_redirect=0
116 - AND page_id NOT IN $pages_with_scans
117 - AND page_id NOT IN $disambiguation_pages";
118 -
119 - return $sql;
 97+ $disambigPagesSubquery = $dbr->selectSQLText(
 98+ array( 'page', 'templatelinks' ),
 99+ 'page_id',
 100+ array(
 101+ 'page_id=tl_from',
 102+ 'page_namespace' => NS_MAIN,
 103+ $dt
 104+ )
 105+ );
 106+
 107+ return array(
 108+ 'tables' => 'page',
 109+ 'fields' => array(
 110+ 'page_namespace AS namespace',
 111+ 'page_title AS title',
 112+ 'page_len AS value' ),
 113+ 'conds' => array(
 114+ 'page_namespace' => NS_MAIN,
 115+ 'page_is_redirect' => 0,
 116+ "page_id NOT IN ($pagesWithScansSubquery)",
 117+ "page_id NOT IN ($disambigPagesSubquery)" ),
 118+ 'options' => array( 'USE INDEX' => 'page_len' )
 119+ );
120120 }
121121
122122 function sortDescending() {
Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -20,6 +20,7 @@
2121 }
2222
2323 $wgExtensionFunctions[] = 'wfProofreadPage';
 24+$wgRunHooks['wgQueryPages'][] = 'wfProofreadPageAddQueryPages';
2425
2526 $dir = dirname( __FILE__ ) . '/';
2627 $wgExtensionMessagesFiles['ProofreadPage'] = $dir . 'ProofreadPage.i18n.php';
@@ -82,3 +83,9 @@
8384 new ProofreadPage;
8485 return true;
8586 }
 87+
 88+function wfProofreadPageAddQueryPages( &$wgQueryPages ) {
 89+ $wgQueryPages['ProofreadPages'] = 'IndexPages';
 90+ $wgQueryPages['PagesWithoutScans'] = 'PagesWithoutScans';
 91+ return true;
 92+}
Index: trunk/extensions/SemanticForms/specials/SF_Forms.php
@@ -7,29 +7,15 @@
88
99 if ( !defined( 'MEDIAWIKI' ) ) die();
1010
11 -class SFForms extends SpecialPage {
12 -
 11+class SFForms extends QueryPage {
1312 /**
1413 * Constructor
1514 */
16 - function __construct() {
17 - parent::__construct( 'Forms' );
 15+ function __construct( $name = 'Forms' ) {
 16+ parent::__construct( $name );
1817 SFUtils::loadMessages();
1918 }
2019
21 - function execute( $query ) {
22 - $this->setHeaders();
23 - list( $limit, $offset ) = wfCheckLimits();
24 - $rep = new FormsPage();
25 - return $rep->doQuery( $offset, $limit );
26 - }
27 -}
28 -
29 -class FormsPage extends QueryPage {
30 - function getName() {
31 - return "Forms";
32 - }
33 -
3420 function isExpensive() { return false; }
3521
3622 function isSyndicated() { return false; }
@@ -64,6 +50,14 @@
6551 AND page_is_redirect = 0";
6652 }
6753
 54+ function getQueryInfo() {
 55+ return array(
 56+ 'tables' => array( 'page' ),
 57+ 'fields' => array( 'page_title AS title', 'page_title AS value' ),
 58+ 'conds' => array( 'page_namespace' => SF_NS_FORM, 'page_is_redirect' => 0 )
 59+ );
 60+ }
 61+
6862 function sortDescending() {
6963 return false;
7064 }
Index: trunk/extensions/SemanticForms/specials/SF_Templates.php
@@ -63,6 +63,14 @@
6464 WHERE page_namespace = {$NStemp}";
6565 }
6666
 67+ function getQueryInfo() {
 68+ return array(
 69+ 'tables' => array( 'page' ),
 70+ 'fields' => array( 'page_title AS title', 'page_title AS value' ),
 71+ 'conds' => array( 'page_namespace' => NS_TEMPLATE )
 72+ );
 73+ }
 74+
6775 function sortDescending() {
6876 return false;
6977 }
Index: trunk/extensions/StalePages/StalePages_body.php
@@ -52,27 +52,20 @@
5353
5454 function isSyndicated() { return false; }
5555
56 - function getSQL() {
57 - global $wgDBtype, $wgStalePagesDays;
 56+ function getQueryInfo() {
 57+ global $wgStalePagesDays;
 58+ $date = mktime() - ( 60 * 60 * 24 * $wgStalePagesDays ); //randomish
5859 $db = wfGetDB( DB_SLAVE );
59 - $page = $db->tableName( 'page' );
60 - $revision = $db->tableName( 'revision' );
61 - $epoch = $wgDBtype == 'mysql' ? 'UNIX_TIMESTAMP(rev_timestamp)' :
62 - 'EXTRACT(epoch FROM rev_timestamp)';
63 -
64 - $date = mktime() - ( 60 * 60 * 24 * $wgStalePagesDays ); //ranomish
6560 $dateString = $db->timestamp($date);
66 -
67 - return
68 - "SELECT 'Stalepages' as type,
69 - page_namespace as namespace,
70 - page_title as title,
71 - $epoch as value
72 - FROM $page, $revision
73 - WHERE page_latest=rev_id
74 - AND page_namespace=" . NS_MAIN . "
75 - AND page_is_redirect=0
76 - AND rev_timestamp < '$dateString'";
 61+ return array(
 62+ 'tables' => array( 'page', 'revision' ),
 63+ 'fields' => array( 'page_namespace AS namespace', 'page_title AS title', 'rev_timestamp AS value' ),
 64+ 'conds' => array( 'page_latest=rev_id',
 65+ 'page_namespace' => NS_MAIN,
 66+ 'page_is_redirect=0',
 67+ 'rev_timestamp < ' . $db->addQuotes( $dateString ) ,
 68+ )
 69+ );
7770 }
7871
7972 function sortDescending() {
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialListStreams.php
@@ -12,14 +12,6 @@
1313
1414 if ( !defined( 'MEDIAWIKI' ) ) die();
1515
16 -
17 -/*function doSpecialListStreams($par = null) {
18 - list( $limit, $offset ) = wfCheckLimits();
19 - $rep = new MV_SpecialListStreams();
20 - return $rep->doQuery( $offset, $limit );
21 -}
22 -SpecialPage::addPage( new SpecialPage('Mv_List_Streams','',true,'doSpecialListStreams',false) );
23 -*/
2416 class MV_SpecialListStreams extends SpecialPage {
2517 public function __construct() {
2618 parent::__construct( 'Mv_List_Streams' );
@@ -30,12 +22,11 @@
3123 return $rep->doQuery( $offset, $limit );
3224 }
3325 }
34 -class MV_SpecialQueryStreams extends QueryPage {
35 -
36 - function getName() {
37 - return "MV_List_Streams";
 26+class MV_SpecialListStreams extends QueryPage {
 27+ public function __construct( $name = 'Mv_List_Streams' ) {
 28+ parent::__construct( $name );
3829 }
39 -
 30+
4031 function isExpensive() {
4132 return false;
4233 }
@@ -45,8 +36,8 @@
4637 function getPageHeader() {
4738 return '<p>' . wfMsg( 'mv_list_streams_docu' ) . "</p><br />\n";
4839 }
49 - function getSQL() {
50 - $dbr = wfGetDB( DB_SLAVE );
 40+
 41+ function getQueryInfo() {
5142 // $relations = $dbr->tableName( 'smw_relations' );
5243 // $NSrel = SMW_NS_RELATION;
5344 # QueryPage uses the value from this SQL in an ORDER clause.
@@ -63,17 +54,22 @@
6455 * stream length
6556 * formats available
6657 * number of associative metadata chunks */
67 - return "SELECT
68 - `id` as `stream_id`,
69 - `name` as title,
70 - `name` as value " .
71 - "FROM " . $dbr->tableName( 'mv_streams' );
7258
 59+ return array(
 60+ 'tables' => array( 'mv_streams' ),
 61+ 'fields' => array( 'id AS stream_id', 'name AS title', 'name AS value' )
 62+ );
7363 }
 64+
7465 function getOrder() {
75 - return ' ORDER BY `mv_streams`.`date_start_time` DESC ';
 66+ return ' ORDER BY date_start_time DESC ';
7667 // ($this->sortDescending() ? 'DESC' : '');
7768 }
 69+
 70+ function getOrderFields() {
 71+ return array( 'date_start_time' );
 72+ }
 73+
7874 function sortDescending() {
7975 return false;
8076 }
Index: trunk/extensions/CrossNamespaceLinks/CrossNamespaceLinks_body.php
@@ -83,22 +83,18 @@
8484 * that it could be fixed rather than put these two on the
8585 * whitelist.
8686 */
87 - function getSQL() {
88 - $dbr = wfGetDB( DB_SLAVE );
89 - extract( $dbr->tableNames( 'page', 'pagelinks' ) );
90 - $namespaces = implode( ',', $this->namespaces );
91 - return
92 - "
93 - SELECT
94 - 'CrossNamespaceLinks' as type,
95 - COUNT(*) as namespace,
96 - page_title as title,
97 - pl_namespace as value
98 - FROM $pagelinks
99 - LEFT JOIN $page ON page_id = pl_from
100 - WHERE page_is_redirect = 0 AND page_namespace = " . NS_MAIN . " AND pl_namespace NOT IN ($namespaces)
101 - GROUP BY page_id
102 - ";
 87+ function getQueryInfo() {
 88+ return array(
 89+ 'tables' => array( 'page', 'pagelinks' ),
 90+ 'fields' => array( 'COUNT(*) AS namespace', 'page_title AS title', 'pl_namespace AS value' ),
 91+ 'options' => array ( 'GROUP BY' => 'page_id' ),
 92+ 'conds' => array( 'page_is_redirect' => 0,
 93+ 'page_namespace' => NS_MAIN,
 94+ 'pl_namespace NOT' => $this->namespaces ),
 95+ 'join_conds' => array(
 96+ 'page' => array( 'LEFT JOIN' => array( 'page_id=pl_from' ) )
 97+ )
 98+ );
10399 }
104100
105101 function sortDescending() { return false; }
Index: trunk/extensions/ApprovedRevs/SpecialApprovedRevs.php
@@ -135,10 +135,58 @@
136136 }
137137 }
138138
 139+ function getQueryInfo() {
 140+ if ( $this->mMode == 'notlatest' ) {
 141+ return array(
 142+ 'tables' => array( 'ar' => 'approved_revs', 'p' => 'page' ),
 143+ 'fields' => array(
 144+ 'p.page_id AS id',
 145+ 'ar.rev_id AS rev_id',
 146+ 'p.page_latest AS latest_id',
 147+ ),
 148+ 'join_conds' => array(
 149+ 'page AS p' => array(
 150+ 'JOIN', 'ar.page_id=p.page_id'
 151+ )
 152+ ),
 153+ 'conds' => array( 'p.page_latest != ar.rev_id')
 154+ );
 155+ } elseif ( $this->mMode == 'unapproved' ) {
 156+ return array(
 157+ 'tables' => array( 'ar' => 'approve_revs', 'p' => 'page' ),
 158+ 'fields' => array( 'p.page_id AS id' ),
 159+ 'join_conds' => array(
 160+ 'page AS p' => array(
 161+ 'RIGHT OUTER JOIN', 'ar.page_id=p.page_id'
 162+ )
 163+ ),
 164+ 'conds' => array( "ar.page_id IS NULL" )
 165+ );
 166+ } else { // all approved pages
 167+ return array(
 168+ 'tables' => array( 'ar' => 'approved_revs', 'p' => 'page' ),
 169+ 'fields' => array(
 170+ 'p.page_id AS id',
 171+ 'ar.rev_id AS rev_id',
 172+ 'p.page_latest AS latest_id',
 173+ ),
 174+ 'join_conds' => array(
 175+ 'page AS p' => array(
 176+ 'JOIN', 'ar.page_id=p.page_id'
 177+ )
 178+ ),
 179+ );
 180+ }
 181+ }
 182+
139183 function getOrder() {
140184 return ' ORDER BY p.page_namespace, p.page_title ASC';
141185 }
142186
 187+ function getOrderFields() {
 188+ return array( 'p.page_namespace', 'p.page_title' );
 189+ }
 190+
143191 function formatResult( $skin, $result ) {
144192 $title = Title::newFromId( $result->id );
145193 $pageLink = $skin->makeLinkObj( $title );
Index: trunk/extensions/SemanticDrilldown/specials/SD_Filters.php
@@ -55,6 +55,14 @@
5656 WHERE page_namespace = $filter_ns";
5757 }
5858
 59+ function getQueryInfo() {
 60+ return array(
 61+ 'tables' => array( 'page' ),
 62+ 'fields' => array( 'page_title AS title', 'page_title AS value' ),
 63+ 'conds' => array( 'page_namespace' => SD_NS_FILTER )
 64+ );
 65+ }
 66+
5967 function sortDescending() {
6068 return false;
6169 }
Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php
@@ -1003,6 +1003,10 @@
10041004 function getOrder() {
10051005 return ' ORDER BY sortkey ';
10061006 }
 1007+
 1008+ function getOrderFields() {
 1009+ return array( 'sortkey' );
 1010+ }
10071011
10081012 function formatResult( $skin, $result ) {
10091013 $title = Title::makeTitle( $result->namespace, $result->value );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78786Merge querypage-work2 branch from trunk. The most relevant changes are:...catrope14:16, 22 December 2010

Status & tagging log