aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/reportedcontent/start.php')
-rw-r--r--mod/reportedcontent/start.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index b92ab0f30..8b18a4d64 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -21,7 +21,7 @@ function reportedcontent_init() {
// Extend footer with report content link
if (elgg_is_logged_in()) {
- $href = "javascript:elgg.forward('pg/reportedcontent/add'";
+ $href = "javascript:elgg.forward('reportedcontent/add'";
$href .= "+'?address='+encodeURIComponent(location.href)";
$href .= "+'&title='+encodeURIComponent(document.title));";
@@ -30,15 +30,16 @@ function reportedcontent_init() {
'href' => $href,
'title' => elgg_echo('reportedcontent:this:tooltip'),
'text' => elgg_view_icon('report-this') . elgg_echo('reportedcontent:this'),
- 'section' => 'alt',
'priority' => 500,
+ 'section' => 'alt',
));
}
elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'reportedcontent_user_hover_menu');
// Add admin menu item
- elgg_register_admin_menu_item('reportedcontent', 'utilities');
+ // @todo Might want to move this to a 'feedback' section. something other than utils
+ elgg_register_admin_menu_item('administer', 'reportedcontent', 'administer_utilities');
elgg_register_widget_type(
'reportedcontent',
@@ -59,6 +60,7 @@ function reportedcontent_init() {
* Serves the add report page
*
* @param array $page Array of page routing elements
+ * @return bool
*/
function reportedcontent_page_handler($page) {
// only logged in users can report things
@@ -75,6 +77,7 @@ function reportedcontent_page_handler($page) {
$body = elgg_view_layout('one_sidebar', $params);
echo elgg_view_page(elgg_echo('reportedcontent:this'), $body);
+ return true;
}
/**
@@ -85,7 +88,7 @@ function reportedcontent_user_hover_menu($hook, $type, $return, $params) {
$profile_url = urlencode($user->getURL());
$name = urlencode($user->name);
- $url = "pg/reportedcontent/add/?address=$profile_url&title=$name";
+ $url = "reportedcontent/add?address=$profile_url&title=$name";
if (elgg_is_logged_in() && elgg_get_logged_in_user_guid() != $user->guid) {
$item = new ElggMenuItem(