X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FEntity.php;h=982876b8a5301cb8d9c055619cf78da2bca1de3e;hb=49414d6faa37375cef1ea0a156054ddd9cc6ae8d;hp=3a38c7961ae01206ee0b54f76d1781eef1408467;hpb=ebe9a984da7a768d21bcd99f33d28bde4cf0597f;p=civicrm-core.git diff --git a/api/v3/Entity.php b/api/v3/Entity.php index 3a38c7961a..982876b8a5 100644 --- a/api/v3/Entity.php +++ b/api/v3/Entity.php @@ -1,45 +1,21 @@ getFilename(); - - // Check for entities with a master file ("api/v3/MyEntity.php") - $parts = explode(".", $file); - if (end($parts) == "php" && $file != "utils.php" && !preg_match('/Tests?.php$/', $file) ) { - // without the ".php" - $entities[] = substr($file, 0, -4); - } - - // Check for entities with standalone action files ("api/v3/MyEntity/MyAction.php") - $action_dir = $api_dir . DIRECTORY_SEPARATOR . $file; - if (preg_match('/^[A-Z][A-Za-z0-9]*$/', $file) && is_dir($action_dir)) { - if (count(glob("$action_dir/[A-Z]*.php")) > 0) { - $entities[] = $file; - } +function _civicrm_api3_entity_deprecation($entities) { + $deprecated = array(); + if (!empty($entities['values'])) { + foreach ($entities['values'] as $entity) { + if (is_string(_civicrm_api3_deprecation_check($entity))) { + $deprecated[] = $entity; } } } - $entities = array_diff($entities, array('Generic')); - $entities = array_unique($entities); - sort($entities); - return civicrm_api3_create_success($entities); + return $deprecated; } /** @@ -64,4 +40,3 @@ function civicrm_api3_entity_getfields($params) { // without putting an exception in for entity return civicrm_api3_create_success(array()); } -