예제 #1
0
 public function setFolderPermissions2()
 {
     if (\GO::modules()->isInstalled('files')) {
         \GO\Base\Fs\Folder::createFromPath(\GO::config()->file_storage_path . 'company_photos');
         $folderModel = \GO\Files\Model\Folder::model()->findByPath('company_photos', true);
         if ($folderModel && !$folderModel->acl_id) {
             $folderModel->setNewAcl(1);
             $folderModel->readonly = 1;
             $folderModel->save();
         }
     }
 }