Index: trunk/extensions/OAI/OAIRepo_body.php |
— | — | @@ -659,18 +659,18 @@ |
660 | 660 | else |
661 | 661 | $pages_where = " AND up_page IN (".implode(",",$page_ids).") "; |
662 | 662 | |
663 | | - extract( $this->_db->tableNames( 'updates', 'page', 'revision', 'text', 'pagelinks' ) ); |
| 663 | + extract( $this->_db->tableNames( 'updates', 'page', 'pagelinks' ) ); |
664 | 664 | $sql = "SELECT up_page,up_sequence, |
665 | 665 | r.page_namespace AS page_namespace, |
666 | 666 | r.page_title AS page_title, |
667 | 667 | COUNT(pl.pl_from) AS num_page_ref |
668 | | - FROM updates |
669 | | - LEFT JOIN page AS p ON p.page_id=up_page |
670 | | - LEFT JOIN pagelinks AS pl ON p.page_namespace=pl.pl_namespace AND p.page_title=pl.pl_title |
671 | | - LEFT JOIN page AS ns ON pl.pl_from=ns.page_id |
672 | | - LEFT JOIN page AS r ON pl.pl_from=r.page_id AND r.page_is_redirect=1 |
673 | | - LEFT JOIN pagelinks AS rpl ON r.page_namespace=rpl.pl_namespace AND r.page_title=rpl.pl_title |
674 | | - WHERE ns.page_namespace = p.page_namespace |
| 668 | + FROM $updates |
| 669 | + LEFT JOIN $page AS p ON p.page_id=up_page |
| 670 | + LEFT JOIN $pagelinks AS pl ON p.page_namespace=pl.pl_namespace AND p.page_title=pl.pl_title |
| 671 | + LEFT JOIN $page AS ns ON pl.pl_from=ns.page_id |
| 672 | + LEFT JOIN $page AS r ON pl.pl_from=r.page_id AND r.page_is_redirect=1 |
| 673 | + LEFT JOIN $pagelinks AS rpl ON r.page_namespace=rpl.pl_namespace AND r.page_title=rpl.pl_title |
| 674 | + WHERE p.page_namespace != 0 OR p.page_namespace = ns.page_namespace |
675 | 675 | $pages_where |
676 | 676 | GROUP BY up_page,r.page_id"; |
677 | 677 | |