aboutsummaryrefslogtreecommitdiff
path: root/mod/apiadmin/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/apiadmin/actions')
-rw-r--r--mod/apiadmin/actions/generate.php35
-rw-r--r--mod/apiadmin/actions/revokekey.php23
2 files changed, 0 insertions, 58 deletions
diff --git a/mod/apiadmin/actions/generate.php b/mod/apiadmin/actions/generate.php
deleted file mode 100644
index cbc43e228..000000000
--- a/mod/apiadmin/actions/generate.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
- global $CONFIG;
-
- admin_gatekeeper();
- action_gatekeeper();
-
- $ref = get_input('ref');
-
- if ($ref)
- {
- $keypair = create_api_user($CONFIG->site_id);
-
- if ($keypair)
- {
-
- $newkey = new ElggObject();
- $newkey->subtype = 'api_key';
- $newkey->access_id = ACCESS_PUBLIC;
- $newkey->title = $ref;
- $newkey->public = $keypair->api_key;
-
- if (!$newkey->save())
- register_error(elgg_echo('apiadmin:generationfail'));
- else
- system_message(elgg_echo('apiadmin:generated'));
- }
- else
- register_error(elgg_echo('apiadmin:generationfail'));
- }
- else
- register_error(elgg_echo('apiadmin:noreference'));
-
-
- forward($_SERVER['HTTP_REFERER']);
-?> \ No newline at end of file
diff --git a/mod/apiadmin/actions/revokekey.php b/mod/apiadmin/actions/revokekey.php
deleted file mode 100644
index 6252c3828..000000000
--- a/mod/apiadmin/actions/revokekey.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-
- global $CONFIG;
-
- admin_gatekeeper();
- action_gatekeeper();
-
- $key = (int)get_input('keyid');
-
- $obj = get_entity($key);
-
- if (($obj) && ($obj instanceof ElggObject) && ($obj->subtype == get_subtype_id('object', 'api_key')))
- {
- if ($obj->delete())
- system_message(elgg_echo('apiadmin:keyrevoked'));
- else
- register_error(elgg_echo('apiadmin:keynotrevoked'));
- }
- else
- register_error(elgg_echo('apiadmin:keynotrevoked'));
-
- forward($_SERVER['HTTP_REFERER']);
-?> \ No newline at end of file