Exemplo n.º 1
0
 public function delete($pb_delete_related = false, $pa_options = NULL, $pa_fields = NULL, $pa_table_list = NULL)
 {
     $vn_id = $this->getPrimaryKey();
     if ($vn_rc = parent::delete($pb_delete_related, $pa_options, $pa_fields, $pa_table_list)) {
         unset(ca_metadata_elements::$s_settings_cache[$vn_id]);
     }
     return $vn_rc;
 }
 /**
  * Check user's item level access before passing delete to lower level libraries
  *
  */
 public function delete($pb_delete_related = false, $pa_options = null, $pa_fields = null, $pa_table_list = null)
 {
     global $AUTH_CURRENT_USER_ID;
     if ($this->getAppConfig()->get('perform_item_level_access_checking')) {
         if ($this->checkACLAccessForUser(new ca_users($AUTH_CURRENT_USER_ID)) < __CA_ACL_EDIT_DELETE_ACCESS__) {
             $this->postError(2580, _t("You do not have delete access for this item"), "BundlableLabelableBaseModelWithAttributes->delete()");
             return false;
         }
     }
     SearchResult::clearResultCacheForRow($this->tableName(), $this->getPrimaryKey());
     return parent::delete($pb_delete_related, $pa_options, $pa_fields, $pa_table_list);
 }
Exemplo n.º 3
0
 public function delete($pb_delete_related = false, $pa_options = NULL, $pa_fields = NULL, $pa_table_list = NULL)
 {
     $vn_id = $this->getPrimaryKey();
     if ($vn_rc = parent::delete($pb_delete_related, $pa_options, $pa_fields, $pa_table_list)) {
         MemoryCache::delete($vn_id, 'ElementSettings');
     }
     return $vn_rc;
 }