aboutsummaryrefslogtreecommitdiff
path: root/mod/apiadmin/start.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-05 14:58:20 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-05 14:58:20 +0000
commit6ee2b596da12dc3ac5f6ba6d4ca5545df5beab2d (patch)
tree2cc20df8e2eb0345d934952cd06a4cf5a9430343 /mod/apiadmin/start.php
parent89a9e93a915ca7c576e187f0c38d2c202fed05b2 (diff)
downloadelgg-6ee2b596da12dc3ac5f6ba6d4ca5545df5beab2d.tar.gz
elgg-6ee2b596da12dc3ac5f6ba6d4ca5545df5beab2d.tar.bz2
Farewell APIadmin, farewell GUIDtool. We'll see you over in the plugins repo.
git-svn-id: https://code.elgg.org/elgg/trunk@3096 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/apiadmin/start.php')
-rw-r--r--mod/apiadmin/start.php79
1 files changed, 0 insertions, 79 deletions
diff --git a/mod/apiadmin/start.php b/mod/apiadmin/start.php
deleted file mode 100644
index 5c9d4cce2..000000000
--- a/mod/apiadmin/start.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
- /**
- * Elgg API Admin
- *
- * @package ElggAPIAdmin
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2009
- * @link http://elgg.com/
- */
-
- /**
- * Initialise the API Admin tool
- *
- * @param unknown_type $event
- * @param unknown_type $object_type
- * @param unknown_type $object
- */
- function apiadmin_init($event, $object_type, $object = null) {
-
- global $CONFIG;
-
- // Register a page handler, so we can have nice URLs
- register_page_handler('apiadmin','apiadmin_page_handler');
-
- // Register some actions
- register_action("apiadmin/revokekey",false, $CONFIG->pluginspath . "apiadmin/actions/revokekey.php", true);
- register_action("apiadmin/generate",false, $CONFIG->pluginspath . "apiadmin/actions/generate.php", true);
- }
-
- /**
- * Page setup. Adds admin controls to the admin panel.
- *
- */
- function apiadmin_pagesetup()
- {
- if (get_context() == 'admin' && isadminloggedin()) {
- global $CONFIG;
- add_submenu_item(elgg_echo('apiadmin'), $CONFIG->wwwroot . 'pg/apiadmin/');
- }
- }
-
-
- function apiadmin_page_handler($page)
- {
- global $CONFIG;
-
- if ($page[0])
- {
- switch ($page[0])
- {
- default : include($CONFIG->pluginspath . "apiadmin/index.php");
- }
- }
- else
- include($CONFIG->pluginspath . "apiadmin/index.php");
- }
-
- function apiadmin_delete_key($event, $object_type, $object = null)
- {
- global $CONFIG;
-
- if (($object) && ($object->subtype == get_subtype_id('object', 'api_key')))
- {
- // Delete
- return remove_api_user($CONFIG->site_id, $object->public);
- }
-
- return true;
- }
-
-
- // Make sure test_init is called on initialisation
- register_elgg_event_handler('init','system','apiadmin_init');
- register_elgg_event_handler('pagesetup','system','apiadmin_pagesetup');
-
- // Hook into delete to revoke secret keys
- register_elgg_event_handler('delete','object','apiadmin_delete_key');
-?> \ No newline at end of file