aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 11:08:16 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 11:08:16 +0000
commitd429cdeb9b74bb6452270d169f0c9fc5f325122e (patch)
tree5e8d5a2b7570a8d4d23d551930f208e0fea539d3 /mod
parent91ddcf79742a6c116b12c2aff3bacdbde525bf2a (diff)
downloadelgg-d429cdeb9b74bb6452270d169f0c9fc5f325122e.tar.gz
elgg-d429cdeb9b74bb6452270d169f0c9fc5f325122e.tar.bz2
Moved GUID tool to admin menu.
git-svn-id: https://code.elgg.org/elgg/trunk@3061 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/guidtool/export.php3
-rw-r--r--mod/guidtool/format_picker.php1
-rw-r--r--mod/guidtool/import.php1
-rw-r--r--mod/guidtool/index.php3
-rw-r--r--mod/guidtool/languages/en.php2
-rw-r--r--mod/guidtool/start.php13
6 files changed, 16 insertions, 7 deletions
diff --git a/mod/guidtool/export.php b/mod/guidtool/export.php
index 4f9b66761..732307a25 100644
--- a/mod/guidtool/export.php
+++ b/mod/guidtool/export.php
@@ -9,6 +9,9 @@
* @link http://elgg.com/
*/
+ admin_gatekeeper();
+ set_context('admin');
+
$entity_guid = get_input('entity_guid');
// Render the file upload page
diff --git a/mod/guidtool/format_picker.php b/mod/guidtool/format_picker.php
index df2521a18..4055612bd 100644
--- a/mod/guidtool/format_picker.php
+++ b/mod/guidtool/format_picker.php
@@ -12,6 +12,7 @@
global $CONFIG;
admin_gatekeeper();
+ set_context('admin');
$formats = guidtool_get_import_actions();
diff --git a/mod/guidtool/import.php b/mod/guidtool/import.php
index 0b163ddbf..2d89bc5a4 100644
--- a/mod/guidtool/import.php
+++ b/mod/guidtool/import.php
@@ -10,6 +10,7 @@
*/
admin_gatekeeper();
+ set_context('admin');
$format = get_input('format', 'opendd');
diff --git a/mod/guidtool/index.php b/mod/guidtool/index.php
index bbf27016a..42abaae3b 100644
--- a/mod/guidtool/index.php
+++ b/mod/guidtool/index.php
@@ -12,11 +12,12 @@
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
admin_gatekeeper();
+ set_context('admin');
$title = elgg_echo("guidtool");
$body = elgg_view_title($title);
- $context = get_context();
+ $context = get_context();
set_context('search');
$limit = get_input('limit', 10);
diff --git a/mod/guidtool/languages/en.php b/mod/guidtool/languages/en.php
index 5365deede..1c6d90c18 100644
--- a/mod/guidtool/languages/en.php
+++ b/mod/guidtool/languages/en.php
@@ -17,7 +17,7 @@
'guidtool' => 'GUID Tool',
'guidtool:browse' => 'Browse GUIDs',
- 'guidtool:import' => 'Import',
+ '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.',
diff --git a/mod/guidtool/start.php b/mod/guidtool/start.php
index 0a416320b..8dc9dd65a 100644
--- a/mod/guidtool/start.php
+++ b/mod/guidtool/start.php
@@ -16,14 +16,14 @@
{
global $CONFIG;
- if (isadminloggedin())
+ /*if (isadminloggedin())
{
add_menu(elgg_echo('guidtool'), $CONFIG->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');
@@ -40,7 +40,7 @@
{
global $CONFIG;
- if (get_context()=='guidtool')
+ 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/");
@@ -61,11 +61,14 @@
switch ($page[0])
{
case 'view' :
- case 'export':
-
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')