Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php |
— | — | @@ -724,11 +724,6 @@ |
725 | 725 | } |
726 | 726 | $s = "\n<select id='namespace' name='namespace' class='namespaceselector'>\n"; |
727 | 727 | $arr = $wgContLang->getFormattedNamespaces(); |
728 | | - if( !is_null($allnamespaces) ) { |
729 | | - $arr = array($allnamespaces => wfMsg('namespacesall')) + $arr; |
730 | | - } |
731 | | - |
732 | | - $s .= "\t" . Xml::element("option", array("value" => ''), wfMsg('namespacesall')) . "\n"; |
733 | 728 | |
734 | 729 | foreach($arr as $index => $name) { |
735 | 730 | # Content only |
— | — | @@ -756,8 +751,7 @@ |
757 | 752 | class UnreviewedPagesPage extends PageQueryPage { |
758 | 753 | |
759 | 754 | function __construct( $namespace, $showOutdated=false, $category=NULL ) { |
760 | | - $this->namespace = is_null($namespace) ? null : intval($namespace); |
761 | | - print($namespace===''); |
| 755 | + $this->namespace = intval($namespace); |
762 | 756 | $this->category = $category; |
763 | 757 | $this->showOutdated = $showOutdated; |
764 | 758 | } |
— | — | @@ -791,15 +785,19 @@ |
792 | 786 | } else { |
793 | 787 | $where .= "AND page_ext_reviewed = 0"; |
794 | 788 | } |
795 | | - $sql = "SELECT page_namespace AS ns,page_title AS title,page_len,page_ext_stable |
796 | | - FROM $page"; |
797 | 789 | # Filter by category |
798 | 790 | if( $category ) { |
799 | | - $sql .= ",$categorylinks "; |
800 | 791 | $category = str_replace( ' ', '_', $dbr->strencode($category) ); |
801 | | - $where .= " AND cl_from = page_id AND cl_to = '{$category}' "; |
| 792 | + $sql = "SELECT page_namespace AS ns,page_title AS title,page_len,page_ext_stable |
| 793 | + FROM $page FORCE INDEX(ext_namespace_reviewed) |
| 794 | + RIGHT JOIN $categorylinks ON(cl_from = page_id AND cl_to = '{$category}')"; |
| 795 | + #$where .= " AND cl_from IS NOT NULL "; |
| 796 | + } else { |
| 797 | + $sql = "SELECT page_namespace AS ns,page_title AS title,page_len,page_ext_stable |
| 798 | + FROM $page FORCE INDEX(ext_namespace_reviewed)"; |
802 | 799 | } |
803 | 800 | $sql .= " WHERE ($where) "; |
| 801 | + |
804 | 802 | return $sql; |
805 | 803 | } |
806 | 804 | |
— | — | @@ -809,8 +807,12 @@ |
810 | 808 | } |
811 | 809 | |
812 | 810 | function getOrder() { |
813 | | - return 'ORDER BY page_namespace,page_id DESC'; |
| 811 | + return 'ORDER BY page_id DESC'; |
814 | 812 | } |
| 813 | + |
| 814 | + function linkParameters() { |
| 815 | + return array( 'category' => $this->category,'showoutdated' => $this->showOutdated ); |
| 816 | + } |
815 | 817 | |
816 | 818 | function formatResult( $skin, $result ) { |
817 | 819 | global $wgLang; |