r79391 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79390‎ | r79391 | r79392 >
Date:00:07, 1 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Fix tab fail, tweak messages

Fix array_merge stuff from r79390
Modified paths:
  • /trunk/extensions/CodeReview/repopulateCodePaths.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/repopulateCodePaths.php
@@ -39,13 +39,14 @@
4040
4141 $dbr = wfGetDB( DB_SLAVE );
4242
43 - $res = $dbr->select( 'code_paths', '*', array( 'cp_rev_id' => $revisions, 'cp_repo_id' => $repo->getId() ),
 43+ $res = $dbr->select( 'code_paths', '*', array( 'cp_rev_id' => $revisions, 'cp_repo_id' => $repo->getId() ),
4444 __METHOD__ );
4545
46 - $data = array();
 46+ $data = array();
4747 foreach ( $res as $row ) {
48 - $data = array_merge(CodeRevision::getPathFragments(
49 - array( 'path' => $row->cp_path, 'action' => $row->cp_action ) ) );
 48+ $fragments = CodeRevision::getPathFragments(
 49+ array( 'path' => $row->cp_path, 'action' => $row->cp_action ) );
 50+ $data = array_merge( $data, $fragments );
5051
5152 $this->output( "r{$row->cp_rev_id}, path: " . $row->cp_path . " Fragments: " .
5253 count( $fragments ) . "\n" );
@@ -53,7 +54,7 @@
5455
5556 $dbw = wfGetDB( DB_MASTER );
5657 $dbw->begin();
57 - $this->output( "Commiting paths...\n" );
 58+ $this->output( "Commiting paths..." );
5859 CodeRevision::insertPaths( $dbw, $data, $repo->getId(), $row->cp_rev_id );
5960 $dbw->commit();
6061

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79390More refactoring and fixing for bug 23720reedy00:03, 1 January 2011

Comments

#Comment by Nikerabbit (talk | contribs)   09:50, 1 January 2011

Still spaces in beginning with mDescription and and the indentation after call to getPathFragments is quite big.

Status & tagging log