Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in the last commet on line 183 there is some typo #2

Open
hmos11 opened this issue Mar 26, 2015 · 0 comments
Open

in the last commet on line 183 there is some typo #2

hmos11 opened this issue Mar 26, 2015 · 0 comments

Comments

@hmos11
Copy link

hmos11 commented Mar 26, 2015

//this is the correct one
$model = $this->owner;
if (!$model->isNewRecord) {
foreach ($this->fileNameAttributes as $value) {
Yii::info(var_export($this->_files, true));
if($model->{$value.'_delete'}==1 && !is_null($this->_files[$value]) ){
$oldFilePath = Yii::getAlias(str_replace('@web', '@webroot', $this->_oldUrls[$value]));
if(is_file($oldFilePath))unlink($oldFilePath);
}elseif (empty($model->{$value}) && !empty($this->_oldUrls[$value]) && $this->skipOnEmpty[$value]) {
$model->{$value} = $this->_oldUrls[$value];
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant