| Index: trunk/extensions/ApprovedRevs/ApprovedRevs_body.php |
| — | — | @@ -14,6 +14,9 @@ |
| 15 | 15 | * one. |
| 16 | 16 | */ |
| 17 | 17 | public static function getApprovedRevID( $title ) { |
| | 18 | + if ( self::hasUnsupportedNamespace( $title ) ) { |
| | 19 | + return null; |
| | 20 | + } |
| 18 | 21 | $dbr = wfGetDB( DB_SLAVE ); |
| 19 | 22 | $page_id = $title->getArticleId(); |
| 20 | 23 | $rev_id = $dbr->selectField( 'approved_revs', 'rev_id', array( 'page_id' => $page_id ) ); |
| — | — | @@ -46,8 +49,8 @@ |
| 47 | 50 | * extension doesn't support. |
| 48 | 51 | */ |
| 49 | 52 | public static function hasUnsupportedNamespace( $title ) { |
| 50 | | - global $egApprovedRevsUnsupportedNamespaces; |
| 51 | | - $unsupported_namespaces = $egApprovedRevsUnsupportedNamespaces; |
| | 53 | + global $egApprovedRevsExcludedNamespaces; |
| | 54 | + $unsupported_namespaces = $egApprovedRevsExcludedNamespaces; |
| 52 | 55 | $unsupported_namespaces[] = NS_FILE; |
| 53 | 56 | $unsupported_namespaces[] = NS_CATEGORY; |
| 54 | 57 | $unsupported_namespaces[] = NS_MEDIAWIKI; |