Allow media upload on previz mode
This commit is contained in:
@@ -102,15 +102,15 @@ class Media extends PhpObject {
|
||||
return $this->getMediasInfo($this->iMediaId);
|
||||
}
|
||||
|
||||
public function isProjectModeValid() {
|
||||
return ($this->oProject->getMode() == Project::MODE_BLOG);
|
||||
public function isProjectEditable() {
|
||||
return $this->oProject->isEditable();
|
||||
}
|
||||
|
||||
public function addMedia($sMediaName, $sMethod='upload') {
|
||||
$sError = '';
|
||||
$asParams = array();
|
||||
if(!$this->isProjectModeValid() && $sMethod!='sync') {
|
||||
$sError = 'upload_wrong_mode';
|
||||
if(!$this->isProjectEditable() && $sMethod!='sync') {
|
||||
$sError = 'upload_mode_archived';
|
||||
$asParams[] = $this->oProject->getProjectCodeName();
|
||||
}
|
||||
elseif($this->oDb->pingValue(self::MEDIA_TABLE, array('filename'=>$sMediaName)) && $sMethod!='sync') {
|
||||
|
||||
Reference in New Issue
Block a user