function create()
 {
     if (empty($this->sDescriptor)) {
         $this->sDescriptor = md5($this->sDescriptorText);
     }
     return parent::create();
 }
Ejemplo n.º 2
0
 function create()
 {
     if (empty($this->dCreated)) {
         $this->dCreated = getCurrentDateTime();
     }
     if (empty($this->dModified)) {
         $this->dModified = getCurrentDateTime();
     }
     if (empty($this->iModifiedUserId)) {
         $this->iModifiedUserId = $this->iCreatorId;
     }
     if (empty($this->iOwnerId)) {
         $this->iOwnerId = $this->iCreatorId;
     }
     if (empty($this->iMetadataVersion)) {
         $this->iMetadataVersion = 0;
     }
     if (empty($this->bIsCheckedOut)) {
         $this->bIsCheckedOut = false;
     }
     if (empty($this->bImmutable)) {
         $this->bImmutable = false;
     }
     $oFolder = Folder::get($this->getFolderId());
     if (PEAR::isError($oFolder) || $oFolder === false || empty($oFolder)) {
         return false;
     }
     $this->iPermissionObjectId = $oFolder->getPermissionObjectId();
     $res = parent::create();
     return $res;
 }
 function create()
 {
     if (is_null($this->iMetadataVersion)) {
         $this->iMetadataVersion = 0;
     }
     if (is_null($this->dVersionCreated)) {
         $this->dVersionCreated = getCurrentDateTime();
     }
     return parent::create();
 }
 function create()
 {
     if (empty($this->iSize)) {
         $this->iSize = 0;
     }
     if (empty($this->iMimeTypeId)) {
         $this->iMimeTypeId = 9;
     }
     if (is_null($this->iMajorVersion)) {
         $this->iMajorVersion = 0;
     }
     if (is_null($this->iMinorVersion)) {
         $this->iMinorVersion = 1;
     }
     return parent::create();
 }