Ejemplo n.º 1
0
 /**
  * beforeFilter
  *
  * @return void
  * @access public
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     if ($this->action == 'admin_edit') {
         $this->Security->disabledFields = array('ip');
     }
 }
 public function admin_mass()
 {
     $action = $this->MassAction->getAction();
     if ($action == 'spam') {
         $this->__removeSpam();
     }
     parent::admin_mass();
 }
 function beforeFilter()
 {
     parent::beforeFilter();
     $this->LoadsysAuth->allow('index', 'add');
     $this->Auth->allow('*');
     $this->FileUpload->fileModel = 'Comment';
     //Upload by default.
     $this->FileUpload->fields = array('name' => 'file_name', 'type' => 'file_type', 'size' => 'file_size');
     $this->FileUpload->allowedTypes = array('image/jpeg', 'image/jpg', 'image/png', 'image/gif', 'image/tiff', 'image/x-tiff', 'application/pdf', 'application/x-pdf', 'application/acrobat', 'text/pdf', 'text/x-pdf', 'text/plain', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/mspowerpoint', 'application/powerpoint', 'application/vnd.ms-powerpoint', 'application/x-mspowerpoint', 'application/x-msexcel', 'application/excel', 'application/vnd.ms.-excel', 'application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip', 'application/x-tar', 'application/x-compressed', 'application/x-gzip', 'application/rtf', 'multipart/x-gzip');
 }