r48644 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48643‎ | r48644 | r48645 >
Date:20:39, 20 March 2009
Author:aaron
Status:ok
Tags:
Comment:
Add missing group cond to query
Modified paths:
  • /trunk/phase3/includes/filerepo/ArchivedFile.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ArchivedFile.php
@@ -74,14 +74,16 @@
7575 }
7676 $conds = array();
7777
78 - if ($this->id>0)
 78+ if( $this->id > 0 )
7979 $conds['fa_id'] = $this->id;
80 - if ($this->key)
81 - $conds['fa_storage_key'] = $this->key;
82 - if ($this->title)
 80+ if( $this->key ) {
 81+ $conds['fa_storage_group'] = $this->group;
 82+ $conds['fa_storage_key'] = $this->key;
 83+ }
 84+ if( $this->title )
8385 $conds['fa_name'] = $this->title->getDBkey();
8486
85 - if (!count($conds))
 87+ if( !count($conds))
8688 throw new MWException( "No specific information for retrieving archived file" );
8789
8890 if( !$this->title || $this->title->getNamespace() == NS_FILE ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r48646Backported r48644aaron20:45, 20 March 2009

Status & tagging log