Index: branches/wmf-deployment/extensions/LiquidThreads/LiquidThreads.php |
— | — | @@ -63,6 +63,7 @@ |
64 | 64 | $wgHooks['XmlDumpWriterOpenPage'][] = 'LqtHooks::dumpThreadData'; |
65 | 65 | $wgHooks['ModifyExportQuery'][] = 'LqtHooks::modifyExportQuery'; |
66 | 66 | $wgHooks['OAIFetchRowsQuery'][] = 'LqtHooks::modifyOAIQuery'; |
| 67 | +$wgHooks['OAIFetchRecordQuery'][] = 'LqtHooks::modifyOAIQuery'; |
67 | 68 | |
68 | 69 | // Deletion |
69 | 70 | $wgHooks['ArticleDeleteComplete'][] = 'LqtDeletionController::onArticleDeleteComplete'; |
Property changes on: branches/wmf-deployment/extensions/LiquidThreads |
___________________________________________________________________ |
Name: svn:mergeinfo |
70 | 71 | - /branches/REL1_15/phase3/extensions/LiquidThreads:51646 |
/trunk/extensions/LiquidThreads:56151-57571,57651,57653-57654,57663,57667 |
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447 |
71 | 72 | + /branches/REL1_15/phase3/extensions/LiquidThreads:51646 |
/trunk/extensions/LiquidThreads:56151-57571,57651,57653-57654,57663,57667,57670-57671 |
/trunk/phase3/extensions/LiquidThreads:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447 |
Index: branches/wmf-deployment/extensions/OAI/OAIRepo_body.php |
— | — | @@ -571,28 +571,30 @@ |
572 | 572 | } |
573 | 573 | |
574 | 574 | function fetchRecord( $pageid ) { |
575 | | - extract( $this->_db->tableNames( 'updates', 'page', 'revision', 'text' ) ); |
576 | | - $sql = "SELECT up_page,page_id,up_timestamp,up_action,up_sequence, |
577 | | - page_namespace, |
578 | | - page_title, |
579 | | - old_text, |
580 | | - old_flags, |
581 | | - rev_id, |
582 | | - rev_deleted, |
583 | | - rev_comment, |
584 | | - rev_user, |
585 | | - rev_user_text, |
586 | | - rev_timestamp, |
587 | | - page_restrictions, |
588 | | - rev_minor_edit |
589 | | - FROM $updates,$page,$revision,$text |
590 | | - WHERE up_page=" . IntVal( $pageid ) . ' |
591 | | - AND page_id=up_page |
592 | | - AND page_latest=rev_id |
593 | | - AND rev_text_id=old_id |
594 | | - LIMIT 1'; |
| 575 | + $db = $this->_db; |
| 576 | + |
| 577 | + $tables = array( 'updates', 'page', 'revision', 'text' ); |
| 578 | + $fields = array( 'page_namespace', 'page_title', 'old_text', 'old_flags', |
| 579 | + 'rev_id', 'rev_deleted', 'rev_comment', 'rev_user', |
| 580 | + 'rev_user_text', 'rev_timestamp', 'page_restrictions', |
| 581 | + 'rev_minor_edit', 'page_is_redirect', 'up_sequence', |
| 582 | + 'page_id', 'up_timestamp', 'up_action', 'up_page', |
| 583 | + 'page_len', 'page_touched', 'page_counter', 'page_latest',); |
| 584 | + $conds = array(); |
| 585 | + $options = array(); |
| 586 | + $join_conds = array( 'page' => array( 'LEFT JOIN', 'page_id=up_page' ), |
| 587 | + 'revision' => array( 'LEFT JOIN', 'page_latest=rev_id' ), |
| 588 | + 'text' => array( 'LEFT JOIN', 'rev_text_id=old_id' ) ); |
| 589 | + |
| 590 | + $conds['up_page'] = $pageid; |
| 591 | + |
| 592 | + $options['LIMIT'] = 1; |
| 593 | + |
| 594 | + wfRunHooks( 'OAIFetchRecordQuery', array( &$tables, &$fields, &$conds, |
| 595 | + &$options, &$join_conds ) ); |
595 | 596 | |
596 | | - return $this->_db->resultObject( $this->_db->query( $sql ) ); |
| 597 | + return $db->select( $tables, $fields, $conds, __METHOD__, |
| 598 | + $options, $join_conds ); |
597 | 599 | } |
598 | 600 | |
599 | 601 | function fetchRows( $from, $until, $chunk, $token = null ) { |
Property changes on: branches/wmf-deployment/extensions/OAI |
___________________________________________________________________ |
Name: svn:mergeinfo |
600 | 602 | - /branches/REL1_15/phase3/extensions/OAI:51646 |
/trunk/extensions/OAI:56207,56209,56296,56333,56355,57666 |
/trunk/phase3/extensions/OAI:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447 |
601 | 603 | + /branches/REL1_15/phase3/extensions/OAI:51646 |
/trunk/extensions/OAI:56207,56209,56296,56333,56355,57666,57670-57671 |
/trunk/phase3/extensions/OAI:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447 |