Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused, deprecated functions #17761

Merged
merged 1 commit into from
Jul 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions CRM/ACL/BAO/ACL.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,39 +28,6 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {

public static $_fieldKeys = NULL;

/**
* Get ACL entity table.
* @deprecated
* @return array|null
*/
public static function entityTable() {
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
if (!self::$_entityTable) {
self::$_entityTable = [
'civicrm_contact' => ts('Contact'),
'civicrm_acl_role' => ts('ACL Role'),
];
}
return self::$_entityTable;
}

/**
* @return array|null
* @deprecated
*/
public static function objectTable() {
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
if (!self::$_objectTable) {
self::$_objectTable = [
'civicrm_contact' => ts('Contact'),
'civicrm_group' => ts('Group'),
'civicrm_saved_search' => ts('Contact Group'),
'civicrm_admin' => ts('Import'),
];
}
return self::$_objectTable;
}

/**
* Available operations for pseudoconstant.
*
Expand All @@ -80,44 +47,6 @@ public static function operation() {
return self::$_operation;
}

/**
* Given a table and id pair, return the filter clause
*
* @param string $table
* The table owning the object.
* @param int $id
* The ID of the object.
* @param array $tables
* Tables that will be needed in the FROM.
* @deprecated
*
* @return string|null
* WHERE-style clause to filter results,
* or null if $table or $id is null
*
* @throws \CRM_Core_Exception
*/
public static function getClause($table, $id, &$tables) {
CRM_Core_Error::deprecatedFunctionWarning('unused function to be removed');
$table = CRM_Utils_Type::escape($table, 'String');
$id = CRM_Utils_Type::escape($id, 'Integer');
$whereTables = [];

$ssTable = CRM_Contact_BAO_SavedSearch::getTableName();

if (empty($table)) {
return NULL;
}
elseif ($table == $ssTable) {
return CRM_Contact_BAO_SavedSearch::whereClause($id, $tables, $whereTables);
}
elseif (!empty($id)) {
$tables[$table] = TRUE;
return "$table.id = $id";
}
return NULL;
}

/**
* Construct an associative array of an ACL rule's properties
*
Expand Down