r57672 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57671‎ | r57672 | r57673 >
Date:15:54, 13 October 2009
Author:werdna
Status:deferred
Tags:
Comment:
Merge r57670 and r57671
Modified paths:
  • /branches/wmf-deployment/extensions/LiquidThreads (modified) (history)
  • /branches/wmf-deployment/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /branches/wmf-deployment/extensions/OAI (modified) (history)
  • /branches/wmf-deployment/extensions/OAI/OAIRepo_body.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/LiquidThreads/LiquidThreads.php
@@ -63,6 +63,7 @@
6464 $wgHooks['XmlDumpWriterOpenPage'][] = 'LqtHooks::dumpThreadData';
6565 $wgHooks['ModifyExportQuery'][] = 'LqtHooks::modifyExportQuery';
6666 $wgHooks['OAIFetchRowsQuery'][] = 'LqtHooks::modifyOAIQuery';
 67+$wgHooks['OAIFetchRecordQuery'][] = 'LqtHooks::modifyOAIQuery';
6768
6869 // Deletion
6970 $wgHooks['ArticleDeleteComplete'][] = 'LqtDeletionController::onArticleDeleteComplete';
Property changes on: branches/wmf-deployment/extensions/LiquidThreads
___________________________________________________________________
Name: svn:mergeinfo
7071 - /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
7172 + /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 @@
572572 }
573573
574574 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 ) );
595596
596 - return $this->_db->resultObject( $this->_db->query( $sql ) );
 597+ return $db->select( $tables, $fields, $conds, __METHOD__,
 598+ $options, $join_conds );
597599 }
598600
599601 function fetchRows( $from, $until, $chunk, $token = null ) {
Property changes on: branches/wmf-deployment/extensions/OAI
___________________________________________________________________
Name: svn:mergeinfo
600602 - /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
601603 + /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

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57670Replicate changes in r57666 for GetRecord methodwerdna15:49, 13 October 2009
r57671Also hook OAIFetchRecordQuerywerdna15:50, 13 October 2009

Status & tagging log