예제 #1
0
 protected function beforeDestroy(&$Item, $id, &$item, &$request)
 {
     parent::beforeDestroy($Item, $id, $item, $request);
     $this->decodeFileContent($item);
     $path = $item->filepath;
     if (file_exists($this->desRoot . $path) && !@unlink($this->desRoot . $path)) {
         throw new Exception('delete');
     }
 }
예제 #2
0
 protected function beforeDestroy(&$Item, $id, &$item, &$request)
 {
     if ($id == 0) {
         throw new Exception('protected_user');
     } else {
         parent::beforeDestroy($Item, $id, $item, $request);
     }
 }