From df80e299c015a9d6d661b4705f65cdbcaad5aaba Mon Sep 17 00:00:00 2001
From: Cash Costello
' . elgg_echo('diagnostics:unittester:warning') . '
'; + +if (elgg_get_config('debug')) { + // create a button to run tests + $params = array( + 'text' => elgg_echo('diagnostics:test:executeall'), + 'href' => 'engine/tests/suite.php', + 'class' => 'elgg-button elgg-button-submit', + ); + $unit_tests .= '' . elgg_view('output/url', $params) . '
'; +} else { + // no tests when not in debug mode + $unit_tests .= elgg_echo('diagnostics:unittester:debug'); +} + +// display admin body +echo elgg_view_module('inline', $diagnostics_title, $diagnostics); +echo elgg_view_module('inline', $unit_tests_title, $unit_tests); diff --git a/mod/diagnostics/views/default/admin/utilities/diagnostics.php b/mod/diagnostics/views/default/admin/utilities/diagnostics.php deleted file mode 100644 index 76f12b0ae..000000000 --- a/mod/diagnostics/views/default/admin/utilities/diagnostics.php +++ /dev/null @@ -1,30 +0,0 @@ -' . elgg_echo('diagnostics:unittester:description') . ''; -$unit_tests .= '' . elgg_echo('diagnostics:unittester:warning') . '
'; - -if (elgg_get_config('debug')) { - // create a button to run tests - $params = array( - 'text' => elgg_echo('diagnostics:test:executeall'), - 'href' => 'engine/tests/suite.php', - 'class' => 'elgg-button elgg-button-submit', - ); - $unit_tests .= '' . elgg_view('output/url', $params) . '
'; -} else { - // no tests when not in debug mode - $unit_tests .= elgg_echo('diagnostics:unittester:debug'); -} - -// display admin body -echo elgg_view_module('inline', $diagnostics_title, $diagnostics); -echo elgg_view_module('inline', $unit_tests_title, $unit_tests); diff --git a/mod/logbrowser/languages/en.php b/mod/logbrowser/languages/en.php index 90689a1b0..3b6ead272 100644 --- a/mod/logbrowser/languages/en.php +++ b/mod/logbrowser/languages/en.php @@ -6,7 +6,7 @@ */ $english = array( - 'admin:utilities:logbrowser' => 'Log browser', + 'admin:administer_utilities:logbrowser' => 'Log browser', 'logbrowser' => 'Log browser', 'logbrowser:browse' => 'Browse system log', 'logbrowser:search' => 'Refine results', diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php index 71b6115a5..3bffe800a 100644 --- a/mod/logbrowser/start.php +++ b/mod/logbrowser/start.php @@ -14,7 +14,7 @@ function logbrowser_init() { elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'logbrowser_user_hover_menu'); - elgg_register_admin_menu_item('administer', 'logbrowser', 'utilities'); + elgg_register_admin_menu_item('administer', 'logbrowser', 'administer_utilities'); } /** diff --git a/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php new file mode 100644 index 000000000..dadc6cda3 --- /dev/null +++ b/mod/logbrowser/views/default/admin/administer_utilities/logbrowser.php @@ -0,0 +1,63 @@ +guid; + } +} else { + $user_guid = get_input('user_guid',0); + if ($user_guid) { + $user = (int) $user_guid; + } else { + $user = ""; + } +} + +$timelower = get_input('timelower'); +if ($timelower) { + $timelower = strtotime($timelower); +} + +$timeupper = get_input('timeupper'); +if ($timeupper) { + $timeupper = strtotime($timeupper); +} + +$form = elgg_view('logbrowser/form', array( + 'user_guid' => $user, + 'timeupper' => $timeupper, + 'timelower' => $timelower, +)); + +// Get log entries +$log = get_system_log($user, "", "", "","", $limit, $offset, false, $timeupper, $timelower); +$count = get_system_log($user, "", "", "","", $limit, $offset, true, $timeupper, $timelower); + +$table = elgg_view('logbrowser/table', array('log_entries' => $log)); + +$nav = elgg_view('navigation/pagination',array( + 'offset' => $offset, + 'count' => $count, + 'limit' => $limit, +)); + +// display admin body +$body = <<<__HTML +$form +$nav +$table +$nav +__HTML; + +echo $body; diff --git a/mod/logbrowser/views/default/admin/utilities/logbrowser.php b/mod/logbrowser/views/default/admin/utilities/logbrowser.php deleted file mode 100644 index dadc6cda3..000000000 --- a/mod/logbrowser/views/default/admin/utilities/logbrowser.php +++ /dev/null @@ -1,63 +0,0 @@ -guid; - } -} else { - $user_guid = get_input('user_guid',0); - if ($user_guid) { - $user = (int) $user_guid; - } else { - $user = ""; - } -} - -$timelower = get_input('timelower'); -if ($timelower) { - $timelower = strtotime($timelower); -} - -$timeupper = get_input('timeupper'); -if ($timeupper) { - $timeupper = strtotime($timeupper); -} - -$form = elgg_view('logbrowser/form', array( - 'user_guid' => $user, - 'timeupper' => $timeupper, - 'timelower' => $timelower, -)); - -// Get log entries -$log = get_system_log($user, "", "", "","", $limit, $offset, false, $timeupper, $timelower); -$count = get_system_log($user, "", "", "","", $limit, $offset, true, $timeupper, $timelower); - -$table = elgg_view('logbrowser/table', array('log_entries' => $log)); - -$nav = elgg_view('navigation/pagination',array( - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, -)); - -// display admin body -$body = <<<__HTML -$form -$nav -$table -$nav -__HTML; - -echo $body; diff --git a/mod/reportedcontent/languages/en.php b/mod/reportedcontent/languages/en.php index c047644e3..c2e197879 100644 --- a/mod/reportedcontent/languages/en.php +++ b/mod/reportedcontent/languages/en.php @@ -8,7 +8,7 @@ $english = array( 'item:object:reported_content' => 'Reported items', - 'admin:utilities:reportedcontent' => 'Reported content', + 'admin:administer_utilities:reportedcontent' => 'Reported content', 'reportedcontent' => 'Reported content', 'reportedcontent:this' => 'Report this', 'reportedcontent:this:tooltip' => 'Report this page to an administrator', diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php index 87b4b3c7b..66a1248d9 100644 --- a/mod/reportedcontent/start.php +++ b/mod/reportedcontent/start.php @@ -39,7 +39,7 @@ function reportedcontent_init() { // Add admin menu item // @todo Might want to move this to a 'feedback' section. something other than utils - elgg_register_admin_menu_item('administer', 'reportedcontent', 'utilities'); + elgg_register_admin_menu_item('administer', 'reportedcontent', 'administer_utilities'); elgg_register_widget_type( 'reportedcontent', diff --git a/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php b/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php new file mode 100644 index 000000000..32f108312 --- /dev/null +++ b/mod/reportedcontent/views/default/admin/administer_utilities/reportedcontent.php @@ -0,0 +1,13 @@ + 'object', 'subtypes' => 'reported_content')); +if (!$list) { + $list = '' . elgg_echo('reportedcontent:none') . '
'; +} + +echo $list; \ No newline at end of file diff --git a/mod/reportedcontent/views/default/admin/utilities/reportedcontent.php b/mod/reportedcontent/views/default/admin/utilities/reportedcontent.php deleted file mode 100644 index 32f108312..000000000 --- a/mod/reportedcontent/views/default/admin/utilities/reportedcontent.php +++ /dev/null @@ -1,13 +0,0 @@ - 'object', 'subtypes' => 'reported_content')); -if (!$list) { - $list = '' . elgg_echo('reportedcontent:none') . '
'; -} - -echo $list; \ No newline at end of file -- cgit v1.2.3