Index: trunk/extensions/ProofreadPage/ProofreadPage.php |
— | — | @@ -673,8 +673,6 @@ |
674 | 674 | /* |
675 | 675 | * Parser hook that includes a list of pages. |
676 | 676 | * It needs 3 parameters : index, from, to |
677 | | - * |
678 | | - * todo : handle LST... |
679 | 677 | */ |
680 | 678 | function pr_renderPages( $input, $args ) { |
681 | 679 | global $pr_page_namespace, $pr_index_namespace; |
— | — | @@ -1158,14 +1156,18 @@ |
1159 | 1157 | return true; |
1160 | 1158 | } |
1161 | 1159 | |
| 1160 | + $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $pr_page_namespace ) ); |
| 1161 | + $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $pr_index_namespace ) ); |
| 1162 | + if( $page_ns_index==null ){ |
| 1163 | + return true; |
| 1164 | + } |
| 1165 | + |
1162 | 1166 | $dbr = wfGetDB( DB_SLAVE ); |
1163 | 1167 | $pr_index = $dbr->tableName( 'pr_index' ); |
1164 | 1168 | $page = $dbr->tableName( 'page' ); |
1165 | 1169 | $pagelinks = $dbr->tableName( 'pagelinks' ); |
1166 | 1170 | $templatelinks = $dbr->tableName( 'templatelinks' ); |
1167 | 1171 | $catlinks = $dbr->tableName( 'categorylinks' ); |
1168 | | - $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $pr_page_namespace ) ); |
1169 | | - $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $pr_index_namespace ) ); |
1170 | 1172 | |
1171 | 1173 | # count transclusions from page namespace |
1172 | 1174 | $query = "SELECT COUNT(page_id) AS count FROM templatelinks LEFT JOIN $page ON page_title=tl_title where tl_from=$id and tl_namespace=$page_ns_index"; |