if (!($result = $this->data->save())) { if (empty($this->data->errors[0]) OR !($this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['cancontrolpanel'])) { $this->set_error('upload_file_failed'); } else { $this->error =& $this->data->errors[0]; } }