Skip to content

Commit

Permalink
Merge pull request #1872 from resurtm/1853-link-assets-force-copy
Browse files Browse the repository at this point in the history
Fixes #1853. CAssetManager: $forceCopy and $linkAssets cannot be true at the same time anymore.
  • Loading branch information
samdark committed Dec 20, 2012
2 parents d754c54 + 575d25e commit e0c6e57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Version 1.1.13 work in progress
- Bug #1716: Fixed CCodeModel::pluralize() and CConsoleCommand::pluralize() so it doesn't force lowercase the first letter in any words (nsanden)
- Bug #1726: Fixed the error Undefined variable: json in CJSON.php when json_decode function did not exist (heyhoo)
- Bug #1792: Fixed persistent access permissions when two identities were used in a single application run. (jhenriquemc, François Gannaz)
- Bug #1853: CAssetManager::publish() method will throw an exception if $forceCopy and $linkAssets are both true (resurtm, mdomba)
- Bug: Table schema is refreshed on Gii model generation when schemaCachingDuration is used (SonkoDmitry)
- Bug: CDbCommand::setFetchMode wasn't accepting additional arguments needed for PDO::FETCH_CLASS (samdark)
- Bug: CCaptchaAction::validate check wasn't working properly in some cases (samdark, Qiang)
Expand Down
2 changes: 2 additions & 0 deletions framework/web/CAssetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ public function publish($path,$hashByName=false,$level=-1,$forceCopy=null)
{
if($forceCopy===null)
$forceCopy=$this->forceCopy;
if($forceCopy && $this->linkAssets)
throw new CException(Yii::t('yii','The "forceCopy" and "linkAssets" cannot be both true.'));
if(isset($this->_published[$path]))
return $this->_published[$path];
elseif(($src=realpath($path))!==false)
Expand Down

0 comments on commit e0c6e57

Please sign in to comment.