fix

parent ae49f46f
......@@ -139,11 +139,6 @@ class CoContent extends \common\components\ActiveRecordModel
return $this->hasMany(CoContentLang::className(), ['content_id' => 'id']);
}
public function beforeSave($insert) {
$this->text = str_replace("../../../source/","/source/",$this->text);
return parent::beforeSave($insert);
}
private function getPath()
{
return Yii::getAlias('@frontend/web') . self::PHOTO_FOLDER;
......
......@@ -77,6 +77,12 @@ class CoContentLang extends \common\components\ActiveRecordModel
];
}
public function beforeSave($insert)
{
$this->text = str_replace("../../../source/","/source/",$this->text);
return parent::beforeSave($insert);
}
/**
* @return \yii\db\ActiveQuery
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment