X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FEntity.php;h=e0c30dbf80947f72b677e58f76899388f57578ca;hb=85bb0909cffd925f4cd5c0022a68a1ff74d3ad8e;hp=d727fc58756fab59ed1214952a17acdd097023ff;hpb=1c0f1b28a78453078dc0b6ddc6bee27323aa5ecc;p=civicrm-core.git diff --git a/api/v3/Entity.php b/api/v3/Entity.php index d727fc5875..e0c30dbf80 100644 --- a/api/v3/Entity.php +++ b/api/v3/Entity.php @@ -1,59 +1,17 @@ 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; - } - } - } - } - $entities = array_diff($entities, array('Generic')); - $entities = array_unique($entities); - sort($entities); - return civicrm_api3_create_success($entities); -} - /** * Placeholder function. This should never be called, as it doesn't have any meaning */ function civicrm_api3_entity_create($params) { - return civicrm_api3_create_error("API (Entity,Create) does not exist Creating a new entity means modifying the source code of civiCRM."); + return civicrm_api3_create_error("API (Entity, Create) does not exist Creating a new entity means modifying the source code of civiCRM."); } /** * Placeholder function. This should never be called, as it doesn't have any meaning */ function civicrm_api3_entity_delete($params) { - return civicrm_api3_create_error("API (Entity,Delete) does not exist Deleting an entity means modifying the source code of civiCRM."); + return civicrm_api3_create_error("API (Entity, Delete) does not exist Deleting an entity means modifying the source code of civiCRM."); } /**