From: Aaron Schulz Date: Fri, 20 Mar 2009 20:39:13 +0000 (+0000) Subject: Add missing group cond to query X-Git-Tag: 1.31.0-rc.0~42426 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=d75c9d3f47b8375be906e9b15ac5fa3cd3640aa7;p=lhc%2Fweb%2Fwiklou.git Add missing group cond to query --- diff --git a/includes/filerepo/ArchivedFile.php b/includes/filerepo/ArchivedFile.php index 3919cfbcf1..68c93b8f5d 100644 --- a/includes/filerepo/ArchivedFile.php +++ b/includes/filerepo/ArchivedFile.php @@ -74,14 +74,16 @@ class ArchivedFile } $conds = array(); - if ($this->id>0) + if( $this->id > 0 ) $conds['fa_id'] = $this->id; - if ($this->key) - $conds['fa_storage_key'] = $this->key; - if ($this->title) + if( $this->key ) { + $conds['fa_storage_group'] = $this->group; + $conds['fa_storage_key'] = $this->key; + } + if( $this->title ) $conds['fa_name'] = $this->title->getDBkey(); - if (!count($conds)) + if( !count($conds)) throw new MWException( "No specific information for retrieving archived file" ); if( !$this->title || $this->title->getNamespace() == NS_FILE ) {