Index: trunk/extensions/ProofreadPage/ProofreadPage.i18n.php |
— | — | @@ -67,9 +67,7 @@ |
68 | 68 | <td align=center class='quality0' width=\"$1\"></td> |
69 | 69 | <td ><span id=pr_index style=\"visibility:hidden;\">$7</span></td> |
70 | 70 | </tr></table>", |
71 | | - 'proofreadpage_pages' => '{{PLURAL:$1|page|pages}}', |
72 | | - 'proofreadpage_specialpage_text' => '', |
73 | | - 'proofreadpage_specialpage_legend' => 'Search index pages', |
| 71 | + 'proofreadpage_pages' => "{{PLURAL:$1|page|pages}}", |
74 | 72 | ); |
75 | 73 | |
76 | 74 | /** Message documentation (Message documentation) |
Index: trunk/extensions/ProofreadPage/SpecialProofreadPages.php |
— | — | @@ -17,29 +17,10 @@ |
18 | 18 | } |
19 | 19 | |
20 | 20 | function execute( $parameters ) { |
21 | | - global $wgOut, $wgRequest, $wgDisableTextSearch; |
22 | | - |
23 | 21 | $this->setHeaders(); |
24 | 22 | list( $limit, $offset ) = wfCheckLimits(); |
25 | | - $wgOut->addWikiText( wfMsgForContentNoTrans( 'proofreadpage_specialpage_text' ) ); |
26 | 23 | |
27 | | - if( $wgDisableTextSearch ) { |
28 | | - $search = false; |
29 | | - } else { |
30 | | - $search = $wgRequest->getText( 'key' ); |
31 | | - $wgOut->addHTML( |
32 | | - Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor( 'IndexPages' )->getLocalUrl() ) ) . |
33 | | - Xml::openElement( 'fieldset' ) . |
34 | | - Xml::hidden( 'title', SpecialPage::getTitleFor( 'IndexPages' )->getPrefixedText() ) . |
35 | | - Xml::element( 'legend', null, wfMsg( 'proofreadpage_specialpage_legend' ) ) . |
36 | | - Xml::input( 'key', 20, $search ) . ' ' . |
37 | | - Xml::submitButton( wfMsg( 'ilsubmit' ) ) . |
38 | | - Xml::closeElement( 'fieldset' ) . |
39 | | - Xml::closeElement( 'form' ) |
40 | | - ); |
41 | | - } |
42 | | - |
43 | | - $cnl = new ProofreadPagesQuery( $search ); |
| 24 | + $cnl = new ProofreadPagesQuery(); |
44 | 25 | $cnl->doQuery( $offset, $limit ); |
45 | 26 | } |
46 | 27 | } |
— | — | @@ -48,10 +29,6 @@ |
49 | 30 | |
50 | 31 | class ProofreadPagesQuery extends QueryPage { |
51 | 32 | |
52 | | - function ProofreadPagesQuery( $search ) { |
53 | | - $this->search = $search; |
54 | | - } |
55 | | - |
56 | 33 | function getName() { |
57 | 34 | return 'IndexPages'; |
58 | 35 | } |
— | — | @@ -68,20 +45,18 @@ |
69 | 46 | $dbr = wfGetDB( DB_SLAVE ); |
70 | 47 | $page = $dbr->tableName( 'page' ); |
71 | 48 | $pr_index = $dbr->tableName( 'pr_index' ); |
72 | | - $searchindex = $dbr->tableName( 'searchindex' ); |
73 | 49 | |
74 | | - if($this->search) { |
75 | | - $query = "SELECT page_title as title, |
76 | | - pr_count,pr_q0,pr_q1,pr_q2,pr_q3,pr_q4 |
77 | | - FROM $pr_index LEFT JOIN $page ON page_id = pr_page_id |
78 | | - LEFT JOIN $searchindex ON si_page = pr_page_id |
79 | | - WHERE match (si_text) against ('". $dbr->strencode( $this->search ) ."')"; |
80 | | - } else { |
81 | | - $query = "SELECT page_title as title, |
82 | | - pr_count,pr_q0,pr_q1,pr_q2,pr_q3,pr_q4 |
83 | | - FROM $pr_index LEFT JOIN $page ON page_id = pr_page_id"; |
84 | | - } |
85 | | - return $query; |
| 50 | + return |
| 51 | + "SELECT pr_page_id as title, |
| 52 | + page_title as title, |
| 53 | + pr_count, |
| 54 | + pr_q0, |
| 55 | + pr_q1, |
| 56 | + pr_q2, |
| 57 | + pr_q3, |
| 58 | + pr_q4 |
| 59 | + FROM $pr_index |
| 60 | + LEFT JOIN $page ON page_id = pr_page_id"; |
86 | 61 | } |
87 | 62 | |
88 | 63 | function getOrder() { |