Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage_body.php |
— | — | @@ -755,8 +755,9 @@ |
756 | 756 | */ |
757 | 757 | class UnreviewedPagesPage extends PageQueryPage { |
758 | 758 | |
759 | | - function __construct( $namespace, $showOutdated=NULL, $category=NULL ) { |
760 | | - $this->namespace = $namespace=='' ? null : intval($namespace); |
| 759 | + function __construct( $namespace, $showOutdated=false, $category=NULL ) { |
| 760 | + $this->namespace = is_null($namespace) ? null : intval($namespace); |
| 761 | + print($namespace===''); |
761 | 762 | $this->category = $category; |
762 | 763 | $this->showOutdated = $showOutdated; |
763 | 764 | } |
— | — | @@ -790,14 +791,16 @@ |
791 | 792 | } else { |
792 | 793 | $where .= "AND page_ext_reviewed = 0"; |
793 | 794 | } |
794 | | - $sql = "SELECT page_namespace AS ns,page_title AS title,page_len,page_ext_stable FROM $page "; |
| 795 | + $sql = "SELECT page_namespace AS ns,page_title AS title,page_len,page_ext_stable |
| 796 | + FROM $page"; |
795 | 797 | # Filter by category |
796 | 798 | if( $category ) { |
| 799 | + $sql .= ",$categorylinks "; |
797 | 800 | $category = str_replace( ' ', '_', $dbr->strencode($category) ); |
798 | | - $where .= " AND cl_from IS NOT NULL"; |
799 | | - $sql .= "LEFT JOIN $categorylinks ON (cl_from = page_id AND cl_to = '{$category}') "; |
| 801 | + $where .= " AND cl_from = page_id AND cl_to = '{$category}' "; |
800 | 802 | } |
801 | | - $sql .= "WHERE ($where) "; |
| 803 | + $sql .= " WHERE ($where) "; |
| 804 | + echo( $sql ); |
802 | 805 | return $sql; |
803 | 806 | } |
804 | 807 | |
— | — | @@ -807,7 +810,7 @@ |
808 | 811 | } |
809 | 812 | |
810 | 813 | function getOrder() { |
811 | | - return 'ORDER BY page_id DESC'; |
| 814 | + return 'ORDER BY page_namespace,page_id DESC'; |
812 | 815 | } |
813 | 816 | |
814 | 817 | function formatResult( $skin, $result ) { |