From ff31226fdeb972aac2f37f0098240cb366a9bb26 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 5 May 2010 19:14:48 +0000 Subject: Merged 18_new_admin branch to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@5977 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/actions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'engine/lib/actions.php') diff --git a/engine/lib/actions.php b/engine/lib/actions.php index 7e8e43f40..304179828 100644 --- a/engine/lib/actions.php +++ b/engine/lib/actions.php @@ -236,5 +236,18 @@ function get_site_secret() { return $secret; } +/** + * Check if an action is registered and its file exists. + * + * @param string $action + * @return BOOL + * @since 1.8 + */ +function elgg_action_exist($action) { + global $CONFIG; + + return (isset($CONFIG->actions[$action]) && file_exists($CONFIG->actions[$action]['file'])); +} + // Register some actions *************************************************** register_elgg_event_handler("init","system","actions_init"); -- cgit v1.2.3