From 6ee2b596da12dc3ac5f6ba6d4ca5545df5beab2d Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 5 Mar 2009 14:58:20 +0000 Subject: 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 --- mod/apiadmin/actions/generate.php | 35 ------ mod/apiadmin/actions/revokekey.php | 23 ---- mod/apiadmin/index.php | 36 ------ mod/apiadmin/languages/en.php | 41 ------- mod/apiadmin/manifest.xml | 9 -- mod/apiadmin/start.php | 79 ------------- .../views/default/apiadmin/forms/add_key.php | 13 --- mod/apiadmin/views/default/object/api_key.php | 35 ------ mod/guidtool/actions/delete.php | 21 ---- mod/guidtool/export.php | 25 ---- mod/guidtool/format_picker.php | 26 ----- mod/guidtool/import.php | 25 ---- mod/guidtool/index.php | 46 -------- mod/guidtool/languages/en.php | 32 ------ mod/guidtool/manifest.xml | 10 -- mod/guidtool/start.php | 128 --------------------- mod/guidtool/view.php | 22 ---- .../views/default/forms/guidtool/export.php | 23 ---- .../views/default/forms/guidtool/format.php | 40 ------- .../views/default/forms/guidtool/import.php | 26 ----- mod/guidtool/views/default/guidtool/gallery.php | 29 ----- mod/guidtool/views/default/guidtool/listing.php | 39 ------- mod/guidtool/views/default/guidtool/profile.php | 16 --- .../views/default/object/guidtoolwrapper.php | 21 ---- 24 files changed, 800 deletions(-) delete mode 100644 mod/apiadmin/actions/generate.php delete mode 100644 mod/apiadmin/actions/revokekey.php delete mode 100644 mod/apiadmin/index.php delete mode 100644 mod/apiadmin/languages/en.php delete mode 100644 mod/apiadmin/manifest.xml delete mode 100644 mod/apiadmin/start.php delete mode 100644 mod/apiadmin/views/default/apiadmin/forms/add_key.php delete mode 100644 mod/apiadmin/views/default/object/api_key.php delete mode 100644 mod/guidtool/actions/delete.php delete mode 100644 mod/guidtool/export.php delete mode 100644 mod/guidtool/format_picker.php delete mode 100644 mod/guidtool/import.php delete mode 100644 mod/guidtool/index.php delete mode 100644 mod/guidtool/languages/en.php delete mode 100644 mod/guidtool/manifest.xml delete mode 100644 mod/guidtool/start.php delete mode 100644 mod/guidtool/view.php delete mode 100644 mod/guidtool/views/default/forms/guidtool/export.php delete mode 100644 mod/guidtool/views/default/forms/guidtool/format.php delete mode 100644 mod/guidtool/views/default/forms/guidtool/import.php delete mode 100644 mod/guidtool/views/default/guidtool/gallery.php delete mode 100644 mod/guidtool/views/default/guidtool/listing.php delete mode 100644 mod/guidtool/views/default/guidtool/profile.php delete mode 100644 mod/guidtool/views/default/object/guidtoolwrapper.php (limited to 'mod') 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 @@ -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 @@ -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 diff --git a/mod/apiadmin/index.php b/mod/apiadmin/index.php deleted file mode 100644 index 3c6e5c541..000000000 --- a/mod/apiadmin/index.php +++ /dev/null @@ -1,36 +0,0 @@ - \ No newline at end of file diff --git a/mod/apiadmin/languages/en.php b/mod/apiadmin/languages/en.php deleted file mode 100644 index c1cfb9984..000000000 --- a/mod/apiadmin/languages/en.php +++ /dev/null @@ -1,41 +0,0 @@ - 'API Administration', - - - 'apiadmin:keyrevoked' => 'API Key revoked', - 'apiadmin:keynotrevoked' => 'API Key could not be revoked', - 'apiadmin:generated' => 'API Key successfully generated', - - 'apiadmin:yourref' => 'Your reference', - 'apiadmin:generate' => 'Generate a new keypair', - - 'apiadmin:noreference' => 'You must provide a reference for your new key.', - 'apiadmin:generationfail' => 'There was a problem generating the new keypair', - 'apiadmin:generated' => 'New API keypair generated successfully', - - 'apiadmin:revoke' => 'Revoke key', - 'apiadmin:public' => 'Public', - 'apiadmin:private' => 'Private', - - - 'item:object:api_key' => 'API Keys', - ); - - add_translation("en",$english); -?> \ No newline at end of file diff --git a/mod/apiadmin/manifest.xml b/mod/apiadmin/manifest.xml deleted file mode 100644 index 469cfe006..000000000 --- a/mod/apiadmin/manifest.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file 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 @@ -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 diff --git a/mod/apiadmin/views/default/apiadmin/forms/add_key.php b/mod/apiadmin/views/default/apiadmin/forms/add_key.php deleted file mode 100644 index efa871e70..000000000 --- a/mod/apiadmin/views/default/apiadmin/forms/add_key.php +++ /dev/null @@ -1,13 +0,0 @@ - 'ref')); - $gen_control = elgg_view('input/submit', array('value' => elgg_echo('apiadmin:generate'))); - - $form_body = <<< END -
-

$ref_label: $ref_control $gen_control

-
-END; - - echo elgg_view('input/form', array('action' => "{$vars['url']}action/apiadmin/generate", "body" => $form_body)); -?> \ No newline at end of file diff --git a/mod/apiadmin/views/default/object/api_key.php b/mod/apiadmin/views/default/object/api_key.php deleted file mode 100644 index 64ca3d087..000000000 --- a/mod/apiadmin/views/default/object/api_key.php +++ /dev/null @@ -1,35 +0,0 @@ - $entity, - 'size' => 'small', - ) - ); - - - $public_label = elgg_echo('apiadmin:public'); - $private_label = elgg_echo('apiadmin:private'); - $revoke_label = elgg_echo('apiadmin:revoke'); - - $ts = time(); - $token = generate_action_token($ts); - - - $info = "

{$entity->title} url}action/apiadmin/revokekey?keyid={$entity->guid}&__elgg_token=$token&__elgg_ts=$ts\">$revoke_label

"; - $info .= "

$public_label: {$entity->public}
"; - if (isadminloggedin()) { - // Only show secret portion to admins - - // Fetch key - $keypair = get_api_user($CONFIG->site_id, $entity->public); - - $info .= "$private_label: {$keypair->secret}"; - } - $info .= "

"; - - echo elgg_view_listing($icon, $info); -?> \ No newline at end of file diff --git a/mod/guidtool/actions/delete.php b/mod/guidtool/actions/delete.php deleted file mode 100644 index 36126ee10..000000000 --- a/mod/guidtool/actions/delete.php +++ /dev/null @@ -1,21 +0,0 @@ -delete()) - system_message(sprintf(elgg_echo('guidtool:deleted'), $guid)); - else - register_error(sprintf(elgg_echo('guidtool:notdeleted'), $guid)); - } - else - register_error(sprintf(elgg_echo('guidtool:notdeleted'), $guid)); - - forward($_SERVER['HTTP_REFERER']); -?> \ No newline at end of file diff --git a/mod/guidtool/export.php b/mod/guidtool/export.php deleted file mode 100644 index 732307a25..000000000 --- a/mod/guidtool/export.php +++ /dev/null @@ -1,25 +0,0 @@ - $entity_guid)); - - $body = elgg_view_layout('two_column_left_sidebar', '', $body); - - page_draw($title, $body); -?> \ No newline at end of file diff --git a/mod/guidtool/format_picker.php b/mod/guidtool/format_picker.php deleted file mode 100644 index 4055612bd..000000000 --- a/mod/guidtool/format_picker.php +++ /dev/null @@ -1,26 +0,0 @@ - $formats)); - - $body = elgg_view_layout('two_column_left_sidebar', '', $body); - - page_draw($title, $body); -?> \ No newline at end of file diff --git a/mod/guidtool/import.php b/mod/guidtool/import.php deleted file mode 100644 index 2d89bc5a4..000000000 --- a/mod/guidtool/import.php +++ /dev/null @@ -1,25 +0,0 @@ - $format, 'forward_url')); - - $body = elgg_view_layout('two_column_left_sidebar', '', $body); - - page_draw($title, $body); -?> \ No newline at end of file diff --git a/mod/guidtool/index.php b/mod/guidtool/index.php deleted file mode 100644 index 42abaae3b..000000000 --- a/mod/guidtool/index.php +++ /dev/null @@ -1,46 +0,0 @@ -subtype = 'guidtoolwrapper'; - $tmp->entity = $e; - $wrapped_entries[] = $tmp; - } - - $body .= elgg_view_entity_list($wrapped_entries, $count, $offset, $limit, false); - - set_context($context); - -// Display main admin menu - page_draw($title,elgg_view_layout("two_column_left_sidebar", '', $body)); -?> \ No newline at end of file diff --git a/mod/guidtool/languages/en.php b/mod/guidtool/languages/en.php deleted file mode 100644 index 1c6d90c18..000000000 --- a/mod/guidtool/languages/en.php +++ /dev/null @@ -1,32 +0,0 @@ - 'GUID Tool', - 'guidtool:browse' => 'Browse GUIDs', - 'guidtool:import' => 'Import GUID data', - 'guidtool:import:desc' => 'Paste the data you want to import in following window, this must be in "%s" format.', - - 'guidtool:pickformat' => 'Please select the format that you wish to import or export.', - - 'guidbrowser:export' => 'Export', - - 'guidtool:deleted' => 'GUID %d deleted', - 'guidtool:notdeleted' => 'GUID %d not deleted', - ); - - add_translation("en",$english); -?> \ No newline at end of file diff --git a/mod/guidtool/manifest.xml b/mod/guidtool/manifest.xml deleted file mode 100644 index ed3e323ee..000000000 --- a/mod/guidtool/manifest.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/mod/guidtool/start.php b/mod/guidtool/start.php deleted file mode 100644 index 8dc9dd65a..000000000 --- a/mod/guidtool/start.php +++ /dev/null @@ -1,128 +0,0 @@ -wwwroot . "pg/guidtool/",array( -// menu_item(elgg_echo('guidtool:browse'), $CONFIG->wwwroot."pg/guidtool/"), -// menu_item(elgg_echo('guidtool:import'), $CONFIG->wwwroot."pg/guidtool/import/"), - ),'guidtool'); - - }*/ - - // Register a page handler, so we can have nice URLs - register_page_handler('guidtool','guidtool_page_handler'); - - // Register some actions - register_action("guidtool/delete",false, $CONFIG->pluginspath . "guidtool/actions/delete.php", true); - - } - - /** - * Post init gumph. - */ - function guidtool_page_setup() - { - global $CONFIG; - - if ((isadminloggedin()) && (get_context()=='admin')) - { - add_submenu_item(elgg_echo('guidtool:browse'), $CONFIG->wwwroot."pg/guidtool/"); - add_submenu_item(elgg_echo('guidtool:import'), $CONFIG->wwwroot."pg/guidtool/import/"); - } - } - - /** - * Log browser page handler - * - * @param array $page Array of page elements, forwarded by the page handling mechanism - */ - function guidtool_page_handler($page) - { - global $CONFIG; - - if (isset($page[0])) - { - switch ($page[0]) - { - case 'view' : - if ((isset($page[1]) && (!empty($page[1])))) { - add_submenu_item('GUID:'.$page[1], $CONFIG->url . "pg/guidtool/view/{$page[1]}/"); - add_submenu_item(elgg_echo('guidbrowser:export'), $CONFIG->url . "pg/guidtool/export/{$page[1]}/"); - } - - case 'export': - - if ((isset($page[1]) && (!empty($page[1])))) { - - set_input('entity_guid', $page[1]); - if ($page[0] == 'view') - include($CONFIG->pluginspath . "guidtool/view.php"); - else - { - if ((isset($page[2]) && (!empty($page[2])))) { - set_input('format', $page[2]); - include($CONFIG->pluginspath . "guidtool/export.php"); - } else { - set_input('forward_url', $CONFIG->url . "pg/guidtool/export/$page[1]/"); - include($CONFIG->pluginspath . "guidtool/format_picker.php"); - } - } - } - else include($CONFIG->pluginspath . "guidtool/index.php"); - break; - case 'import' : - if ((isset($page[1]) && (!empty($page[1])))) { - set_input('format', $page[1]); - include($CONFIG->pluginspath . "guidtool/import.php"); - } else { - set_input('forward_url', $CONFIG->url . "pg/guidtool/import/"); - include($CONFIG->pluginspath . "guidtool/format_picker.php"); - } - break; - default: - include($CONFIG->pluginspath . "guidtool/index.php"); - } - } - else - include($CONFIG->pluginspath . "guidtool/index.php"); - } - - /** - * Get a list of import actions - * - */ - function guidtool_get_import_actions() - { - global $CONFIG; - - $return = array(); - - foreach ($CONFIG->actions as $action => $handler) - { - if (strpos($action, "import/")===0) - $return[] = substr($action, 7); - } - - return $return; - } - - // Initialise log - register_elgg_event_handler('init','system','guidtool_init'); - register_elgg_event_handler('pagesetup','system','guidtool_page_setup'); -?> \ No newline at end of file diff --git a/mod/guidtool/view.php b/mod/guidtool/view.php deleted file mode 100644 index ba6302d70..000000000 --- a/mod/guidtool/view.php +++ /dev/null @@ -1,22 +0,0 @@ - $entity_guid)); - - $body = elgg_view_layout('two_column_left_sidebar', '', $body); - - page_draw($title, $body); -?> \ No newline at end of file diff --git a/mod/guidtool/views/default/forms/guidtool/export.php b/mod/guidtool/views/default/forms/guidtool/export.php deleted file mode 100644 index f8b07368a..000000000 --- a/mod/guidtool/views/default/forms/guidtool/export.php +++ /dev/null @@ -1,23 +0,0 @@ - -
- htmlentities(file_get_contents($CONFIG->url . "export/$format/$entity_guid/"), ENT_QUOTES, 'UTF-8'))) ?> -
\ No newline at end of file diff --git a/mod/guidtool/views/default/forms/guidtool/format.php b/mod/guidtool/views/default/forms/guidtool/format.php deleted file mode 100644 index 2d3cfa976..000000000 --- a/mod/guidtool/views/default/forms/guidtool/format.php +++ /dev/null @@ -1,40 +0,0 @@ - - -
-
- - " /> -
-
\ No newline at end of file diff --git a/mod/guidtool/views/default/forms/guidtool/import.php b/mod/guidtool/views/default/forms/guidtool/import.php deleted file mode 100644 index f9348bffa..000000000 --- a/mod/guidtool/views/default/forms/guidtool/import.php +++ /dev/null @@ -1,26 +0,0 @@ -

" . sprintf(elgg_echo('guidtool:import:desc'), $format) . "

" . - elgg_view('input/plaintext', array('internalname' => 'data')) . elgg_view('input/submit', array('value' => elgg_echo("save"))); -?> -
- $formbody, 'action' => "{$CONFIG->url}action/import/$format")) -?> -
- \ No newline at end of file diff --git a/mod/guidtool/views/default/guidtool/gallery.php b/mod/guidtool/views/default/guidtool/gallery.php deleted file mode 100644 index 23148ee50..000000000 --- a/mod/guidtool/views/default/guidtool/gallery.php +++ /dev/null @@ -1,29 +0,0 @@ -entity; - $by = $entity->getOwnerEntity(); - - - $strap = $entity->title ? $entity->title : $entity->name; - $info .= "

url}pg/guidtool/view/{$entity->guid}/\">[GUID:{$entity->guid}] " . get_class($entity) . " " . get_subtype_from_id($entity->subtype) . " $strap

"; - - $desc = $entity->description ? substr($entity->description, 0, 100) : ""; - $info .= "

$desc

"; - - $info .= "
"; - if ($by) $info .= elgg_echo('by') . " getURL()."\">{$by->name} "; - $info .= " " . friendly_time($entity->time_created )."
"; - - echo elgg_view_listing($icon, $info); -?> \ No newline at end of file diff --git a/mod/guidtool/views/default/guidtool/listing.php b/mod/guidtool/views/default/guidtool/listing.php deleted file mode 100644 index d543b8e03..000000000 --- a/mod/guidtool/views/default/guidtool/listing.php +++ /dev/null @@ -1,39 +0,0 @@ -entity; - $by = $entity->getOwnerEntity(); - - $icon = elgg_view( - 'graphics/icon', array( - 'entity' => $entity, - 'size' => 'small', - ) - ); - - $ts = time(); - $token = generate_action_token($ts); - - $controllinks = "url}pg/guidtool/export/{$entity->guid}/\">".elgg_echo('export')." "; - if ($entity->canEdit()) - $controllinks .= elgg_view('output/confirmlink', array('text' => elgg_echo('delete'), 'href' => "{$CONFIG->url}action/guidtool/delete?guid={$entity->guid}&__elgg_token=$token&__elgg_ts=$ts")); - - $strap = $entity->title ? $entity->title : $entity->name; - $info .= "

url}pg/guidtool/view/{$entity->guid}/\">[GUID:{$entity->guid}] " . get_class($entity) . " " . get_subtype_from_id($entity->subtype) . " $strap

"; - - $info .= "
"; - if ($by) $info .= elgg_echo('by') . " getURL()."\">{$by->name} "; - $info .= " " . friendly_time($entity->time_created )." [$controllinks]
"; - - echo elgg_view_listing($icon, $info); -?> \ No newline at end of file diff --git a/mod/guidtool/views/default/guidtool/profile.php b/mod/guidtool/views/default/guidtool/profile.php deleted file mode 100644 index 6f76f7b3f..000000000 --- a/mod/guidtool/views/default/guidtool/profile.php +++ /dev/null @@ -1,16 +0,0 @@ - get_entity($entity_guid))); -?> \ No newline at end of file diff --git a/mod/guidtool/views/default/object/guidtoolwrapper.php b/mod/guidtool/views/default/object/guidtoolwrapper.php deleted file mode 100644 index 49845ad7a..000000000 --- a/mod/guidtool/views/default/object/guidtoolwrapper.php +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file -- cgit v1.2.3