aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-24 00:50:54 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-24 00:50:54 +0000
commit9c1e6d6463937bdee2d1de9735463a69f8af305d (patch)
tree8ae66e2c9533ebf21fcf6c1b96be58b140681b7b /mod
parent9f8dfe11118813e0f4c2808abb012171db61ec52 (diff)
downloadelgg-9c1e6d6463937bdee2d1de9735463a69f8af305d.tar.gz
elgg-9c1e6d6463937bdee2d1de9735463a69f8af305d.tar.bz2
Fixes #2655: Converted register_action to elgg_register_action throughout core
git-svn-id: http://code.elgg.org/elgg/trunk@7432 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/start.php6
-rw-r--r--mod/bookmarks/start.php10
-rw-r--r--mod/categories/start.php2
-rw-r--r--mod/defaultwidgets/start.php2
-rw-r--r--mod/diagnostics/start.php2
-rw-r--r--mod/ecml/start.php2
-rw-r--r--mod/file/start.php8
-rw-r--r--mod/groups/start.php32
-rw-r--r--mod/invitefriends/start.php2
-rw-r--r--mod/messageboard/start.php4
-rw-r--r--mod/messages/start.php4
-rw-r--r--mod/notifications/start.php4
-rw-r--r--mod/pages/start.php6
-rw-r--r--mod/profile/start.php20
-rw-r--r--mod/reportedcontent/start.php6
-rw-r--r--mod/sitepages/start.php2
-rw-r--r--mod/thewire/start.php24
-rw-r--r--mod/uservalidationbyemail/start.php8
18 files changed, 72 insertions, 72 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index 365a21cfa..091099e2f 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -49,9 +49,9 @@ function blog_init() {
$action_path = dirname(__FILE__) . '/actions/blog';
- register_action('blog/save', FALSE, "$action_path/save.php");
- register_action('blog/auto_save_revision', FALSE, "$action_path/auto_save_revision.php");
- register_action('blog/delete', FALSE, "$action_path/delete.php");
+ elgg_register_action('blog/save', "$action_path/save.php");
+ elgg_register_action('blog/auto_save_revision', "$action_path/auto_save_revision.php");
+ elgg_register_action('blog/delete', "$action_path/delete.php");
// ecml
elgg_register_plugin_hook_handler('get_views', 'ecml', 'blog_ecml_views_hook');
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index 95922cd22..579b40baa 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -340,8 +340,8 @@ elgg_register_event_handler('pagesetup','system','bookmarks_pagesetup');
// Register actions
global $CONFIG;
-register_action('bookmarks/add',false,$CONFIG->pluginspath . "bookmarks/actions/add.php");
-register_action('bookmarks/edit',false,$CONFIG->pluginspath . "bookmarks/actions/edit.php");
-register_action('bookmarks/delete',false,$CONFIG->pluginspath . "bookmarks/actions/delete.php");
-register_action('bookmarks/reference',false,$CONFIG->pluginspath . "bookmarks/actions/reference.php");
-register_action('bookmarks/remove',false,$CONFIG->pluginspath . "bookmarks/actions/remove.php");
+elgg_register_action('bookmarks/add', $CONFIG->pluginspath . "bookmarks/actions/add.php");
+elgg_register_action('bookmarks/edit', $CONFIG->pluginspath . "bookmarks/actions/edit.php");
+elgg_register_action('bookmarks/delete', $CONFIG->pluginspath . "bookmarks/actions/delete.php");
+elgg_register_action('bookmarks/reference', $CONFIG->pluginspath . "bookmarks/actions/reference.php");
+elgg_register_action('bookmarks/remove', $CONFIG->pluginspath . "bookmarks/actions/remove.php");
diff --git a/mod/categories/start.php b/mod/categories/start.php
index b717294f7..40d6c9c4d 100644
--- a/mod/categories/start.php
+++ b/mod/categories/start.php
@@ -15,7 +15,7 @@ function categories_init() {
elgg_extend_view('css', 'categories/css');
- register_action('settings/categories/save', FALSE, $CONFIG->pluginspath . 'categories/actions/save.php', TRUE);
+ elgg_register_action('settings/categories/save', $CONFIG->pluginspath . 'categories/actions/save.php', 'admin');
register_page_handler('categories', 'categories_page_handler');
diff --git a/mod/defaultwidgets/start.php b/mod/defaultwidgets/start.php
index 9e86a1625..f7adc3581 100644
--- a/mod/defaultwidgets/start.php
+++ b/mod/defaultwidgets/start.php
@@ -204,4 +204,4 @@ elgg_register_plugin_hook_handler('permissions_check', 'user', 'defaultwidgets_c
elgg_register_plugin_hook_handler('permissions_check', 'object', 'defaultwidgets_can_edit');
elgg_register_plugin_hook_handler('container_permissions_check', 'user', 'defaultwidgets_can_edit_container');
-register_action("defaultwidgets/update", false, $CONFIG->pluginspath . "defaultwidgets/actions/update.php");
+elgg_register_action("defaultwidgets/update", $CONFIG->pluginspath . "defaultwidgets/actions/update.php");
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php
index 8895a2eec..5f0f80d62 100644
--- a/mod/diagnostics/start.php
+++ b/mod/diagnostics/start.php
@@ -17,7 +17,7 @@ function diagnostics_init()
register_page_handler('diagnostics','diagnostics_page_handler');
// Register some actions
- register_action("diagnostics/download",false, $CONFIG->pluginspath . "diagnostics/actions/download.php");
+ elgg_register_action("diagnostics/download", $CONFIG->pluginspath . "diagnostics/actions/download.php");
}
/**
diff --git a/mod/ecml/start.php b/mod/ecml/start.php
index 0d60dd1a5..4000ff98a 100644
--- a/mod/ecml/start.php
+++ b/mod/ecml/start.php
@@ -37,7 +37,7 @@ function ecml_init() {
elgg_extend_view('css', 'ecml/admin/css');
// admin action to save permissions
- register_action('settings/ecml/save', FALSE, dirname(__FILE__) . '/actions/save_permissions.php', TRUE);
+ elgg_register_action('settings/ecml/save', dirname(__FILE__) . '/actions/save_permissions.php', 'admin');
// show ECML-enabled icon on free-text input areas
//elgg_extend_view('input/longtext', 'ecml/input_ext', 0);
diff --git a/mod/file/start.php b/mod/file/start.php
index 10fbff27e..9042dd6c3 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -309,11 +309,11 @@
elgg_register_event_handler('pagesetup','system','file_submenus');
// Register actions
- register_action("file/upload", false, $CONFIG->pluginspath . "file/actions/upload.php");
- register_action("file/save", false, $CONFIG->pluginspath . "file/actions/save.php");
- register_action("file/delete", false, $CONFIG->pluginspath. "file/actions/delete.php");
+ elgg_register_action("file/upload", $CONFIG->pluginspath . "file/actions/upload.php");
+ elgg_register_action("file/save", $CONFIG->pluginspath . "file/actions/save.php");
+ elgg_register_action("file/delete", $CONFIG->pluginspath. "file/actions/delete.php");
// temporary - see #2010
- register_action("file/download", false, $CONFIG->pluginspath. "file/actions/download.php");
+ elgg_register_action("file/download", $CONFIG->pluginspath. "file/actions/download.php");
?>
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 3e9f228ed..7fa2f5233 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -27,15 +27,15 @@
register_page_handler('groupicon','groups_icon_handler');
// Register some actions
- register_action("groups/edit",false, $CONFIG->pluginspath . "groups/actions/edit.php");
- register_action("groups/delete",false, $CONFIG->pluginspath . "groups/actions/delete.php");
- register_action("groups/join",false, $CONFIG->pluginspath . "groups/actions/join.php");
- register_action("groups/leave",false, $CONFIG->pluginspath . "groups/actions/leave.php");
- register_action("groups/joinrequest",false, $CONFIG->pluginspath . "groups/actions/joinrequest.php");
- register_action("groups/killrequest",false,$CONFIG->pluginspath . "groups/actions/groupskillrequest.php");
- register_action("groups/killinvitation",false,$CONFIG->pluginspath . "groups/actions/groupskillinvitation.php");
- register_action("groups/addtogroup",false, $CONFIG->pluginspath . "groups/actions/addtogroup.php");
- register_action("groups/invite",false, $CONFIG->pluginspath . "groups/actions/invite.php");
+ elgg_register_action("groups/edit", $CONFIG->pluginspath . "groups/actions/edit.php");
+ elgg_register_action("groups/delete", $CONFIG->pluginspath . "groups/actions/delete.php");
+ elgg_register_action("groups/join", $CONFIG->pluginspath . "groups/actions/join.php");
+ elgg_register_action("groups/leave", $CONFIG->pluginspath . "groups/actions/leave.php");
+ elgg_register_action("groups/joinrequest", $CONFIG->pluginspath . "groups/actions/joinrequest.php");
+ elgg_register_action("groups/killrequest", $CONFIG->pluginspath . "groups/actions/groupskillrequest.php");
+ elgg_register_action("groups/killinvitation", $CONFIG->pluginspath . "groups/actions/groupskillinvitation.php");
+ elgg_register_action("groups/addtogroup", $CONFIG->pluginspath . "groups/actions/addtogroup.php");
+ elgg_register_action("groups/invite", $CONFIG->pluginspath . "groups/actions/invite.php");
// Use group widgets
use_widgets('groups');
@@ -638,12 +638,12 @@
// Register actions
global $CONFIG;
- register_action("groups/addtopic",false,$CONFIG->pluginspath . "groups/actions/forums/addtopic.php");
- register_action("groups/deletetopic",false,$CONFIG->pluginspath . "groups/actions/forums/deletetopic.php");
- register_action("groups/addpost",false,$CONFIG->pluginspath . "groups/actions/forums/addpost.php");
- register_action("groups/edittopic",false,$CONFIG->pluginspath . "groups/actions/forums/edittopic.php");
- register_action("groups/deletepost",false,$CONFIG->pluginspath . "groups/actions/forums/deletepost.php");
- register_action("groups/featured",false,$CONFIG->pluginspath . "groups/actions/featured.php");
- register_action("groups/editpost",false,$CONFIG->pluginspath . "groups/actions/forums/editpost.php");
+ elgg_register_action("groups/addtopic", $CONFIG->pluginspath . "groups/actions/forums/addtopic.php");
+ elgg_register_action("groups/deletetopic", $CONFIG->pluginspath . "groups/actions/forums/deletetopic.php");
+ elgg_register_action("groups/addpost", $CONFIG->pluginspath . "groups/actions/forums/addpost.php");
+ elgg_register_action("groups/edittopic", $CONFIG->pluginspath . "groups/actions/forums/edittopic.php");
+ elgg_register_action("groups/deletepost", $CONFIG->pluginspath . "groups/actions/forums/deletepost.php");
+ elgg_register_action("groups/featured", $CONFIG->pluginspath . "groups/actions/featured.php");
+ elgg_register_action("groups/editpost", $CONFIG->pluginspath . "groups/actions/forums/editpost.php");
?>
diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php
index 1ad1d3ca1..aa08e0583 100644
--- a/mod/invitefriends/start.php
+++ b/mod/invitefriends/start.php
@@ -17,5 +17,5 @@ function invitefriends_pagesetup() {
}
}
-register_action('invitefriends/invite', false, $CONFIG->pluginspath . 'invitefriends/actions/invite.php');
+elgg_register_action('invitefriends/invite', $CONFIG->pluginspath . 'invitefriends/actions/invite.php');
elgg_register_event_handler('pagesetup', 'system', 'invitefriends_pagesetup');
diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php
index 0cd546573..56dfce1bd 100644
--- a/mod/messageboard/start.php
+++ b/mod/messageboard/start.php
@@ -88,5 +88,5 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC)
elgg_register_event_handler('init', 'system', 'messageboard_init');
// Register actions
-register_action("messageboard/add", FALSE, $CONFIG->pluginspath . "messageboard/actions/add.php");
-register_action("messageboard/delete", FALSE, $CONFIG->pluginspath . "messageboard/actions/delete.php");
+elgg_register_action("messageboard/add", $CONFIG->pluginspath . "messageboard/actions/add.php");
+elgg_register_action("messageboard/delete", $CONFIG->pluginspath . "messageboard/actions/delete.php");
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 027003284..bca8d3a91 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -324,5 +324,5 @@ elgg_register_plugin_hook_handler('container_permissions_check','object','messag
// Register actions
global $CONFIG;
-register_action("messages/send",false,$CONFIG->pluginspath . "messages/actions/send.php");
-register_action("messages/delete",false,$CONFIG->pluginspath . "messages/actions/delete.php"); \ No newline at end of file
+elgg_register_action("messages/send", $CONFIG->pluginspath . "messages/actions/send.php");
+elgg_register_action("messages/delete", $CONFIG->pluginspath . "messages/actions/delete.php"); \ No newline at end of file
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
index 093b49b0f..a20005618 100644
--- a/mod/notifications/start.php
+++ b/mod/notifications/start.php
@@ -175,5 +175,5 @@ function notifications_update_collection_notify($event, $object_type, $returnval
elgg_register_event_handler('init', 'system', 'notifications_plugin_init', 1000);
-register_action("notificationsettings/save", FALSE, $CONFIG->pluginspath . "notifications/actions/save.php");
-register_action("notificationsettings/groupsave", FALSE, $CONFIG->pluginspath . "notifications/actions/groupsave.php");
+elgg_register_action("notificationsettings/save", $CONFIG->pluginspath . "notifications/actions/save.php");
+elgg_register_action("notificationsettings/groupsave", $CONFIG->pluginspath . "notifications/actions/groupsave.php");
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 9d196d867..7c278e67b 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -22,9 +22,9 @@ function pages_init() {
register_entity_url_handler('pages_url','object', 'page');
// Register some actions
- register_action("pages/edit",false, $CONFIG->pluginspath . "pages/actions/pages/edit.php");
- register_action("pages/editwelcome",false, $CONFIG->pluginspath . "pages/actions/pages/editwelcome.php");
- register_action("pages/delete",false, $CONFIG->pluginspath . "pages/actions/pages/delete.php");
+ elgg_register_action("pages/edit", $CONFIG->pluginspath . "pages/actions/pages/edit.php");
+ elgg_register_action("pages/editwelcome", $CONFIG->pluginspath . "pages/actions/pages/editwelcome.php");
+ elgg_register_action("pages/delete", $CONFIG->pluginspath . "pages/actions/pages/delete.php");
// Extend some views
elgg_extend_view('css','pages/css');
diff --git a/mod/profile/start.php b/mod/profile/start.php
index c8a83077c..623d411ef 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -284,13 +284,13 @@ elgg_register_event_handler('profileupdate','all','object_notifications');
// Register actions
global $CONFIG;
-register_action("profile/edit",false,$CONFIG->pluginspath . "profile/actions/edit.php");
-register_action("profile/iconupload",false,$CONFIG->pluginspath . "profile/actions/iconupload.php");
-register_action("profile/cropicon",false,$CONFIG->pluginspath . "profile/actions/cropicon.php");
-register_action("profile/editdefault",false,$CONFIG->pluginspath . "profile/actions/editdefault.php", true);
-register_action("profile/editdefault/delete",false,$CONFIG->pluginspath . "profile/actions/deletedefaultprofileitem.php", true);
-register_action("profile/editdefault/reset",false,$CONFIG->pluginspath . "profile/actions/resetdefaultprofile.php", true);
-register_action("profile/editdefault/reorder",false,$CONFIG->pluginspath . "profile/actions/reorder.php", true);
-register_action("profile/editdefault/editfield",false,$CONFIG->pluginspath . "profile/actions/editfield.php", true);
-register_action("profile/addcomment",false,$CONFIG->pluginspath . "profile/actions/addcomment.php");
-register_action("profile/deletecomment",false,$CONFIG->pluginspath . "profile/actions/deletecomment.php");
+elgg_register_action("profile/edit", $CONFIG->pluginspath . "profile/actions/edit.php");
+elgg_register_action("profile/iconupload", $CONFIG->pluginspath . "profile/actions/iconupload.php");
+elgg_register_action("profile/cropicon", $CONFIG->pluginspath . "profile/actions/cropicon.php");
+elgg_register_action("profile/editdefault", $CONFIG->pluginspath . "profile/actions/editdefault.php", 'admin');
+elgg_register_action("profile/editdefault/delete", $CONFIG->pluginspath . "profile/actions/deletedefaultprofileitem.php", 'admin');
+elgg_register_action("profile/editdefault/reset", $CONFIG->pluginspath . "profile/actions/resetdefaultprofile.php", 'admin');
+elgg_register_action("profile/editdefault/reorder", $CONFIG->pluginspath . "profile/actions/reorder.php", 'admin');
+elgg_register_action("profile/editdefault/editfield", $CONFIG->pluginspath . "profile/actions/editfield.php", 'admin');
+elgg_register_action("profile/addcomment", $CONFIG->pluginspath . "profile/actions/addcomment.php");
+elgg_register_action("profile/deletecomment", $CONFIG->pluginspath . "profile/actions/deletecomment.php");
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index d301a9802..ed7eedd4f 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -24,9 +24,9 @@ function reportedcontent_init() {
elgg_add_admin_submenu_item('reportedcontent', elgg_echo('reportedcontent'), 'overview');
//register action
- register_action('reportedcontent/add', FALSE, "{$CONFIG->pluginspath}reportedcontent/actions/add.php");
- register_action('reportedcontent/delete', FALSE, "{$CONFIG->pluginspath}reportedcontent/actions/delete.php");
- register_action('reportedcontent/archive', FALSE, "{$CONFIG->pluginspath}reportedcontent/actions/archive.php");
+ elgg_register_action('reportedcontent/add', "{$CONFIG->pluginspath}reportedcontent/actions/add.php");
+ elgg_register_action('reportedcontent/delete', "{$CONFIG->pluginspath}reportedcontent/actions/delete.php");
+ elgg_register_action('reportedcontent/archive', "{$CONFIG->pluginspath}reportedcontent/actions/archive.php");
}
// Initialise Reported Content
diff --git a/mod/sitepages/start.php b/mod/sitepages/start.php
index 2960bd6a5..5aa4a2117 100644
--- a/mod/sitepages/start.php
+++ b/mod/sitepages/start.php
@@ -49,7 +49,7 @@ function sitepages_init() {
// hook into the walled garden pages
elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'sitepages_public_pages');
- register_action('settings/sitepages/save', FALSE, "{$CONFIG->pluginspath}sitepages/actions/edit_settings.php");
+ elgg_register_action('settings/sitepages/save', "{$CONFIG->pluginspath}sitepages/actions/edit_settings.php");
}
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index 31bad5809..d66f0ca14 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -28,7 +28,7 @@
// Extend system CSS with our own styles, which are defined in the thewire/css view
elgg_extend_view('css','thewire/css');
- //extend views
+ //extend views
elgg_extend_view('profile/status', 'thewire/profile_status');
// Register a page handler, so we can have nice URLs
@@ -38,8 +38,8 @@
register_entity_url_handler('thewire_url','object','thewire');
// Your thewire widget
- add_widget_type('thewire',elgg_echo("thewire:read"),elgg_echo("thewire:yourdesc"));
-
+ add_widget_type('thewire',elgg_echo("thewire:read"),elgg_echo("thewire:yourdesc"));
+
// Register entity type
register_entity_type('object','thewire');
@@ -159,17 +159,17 @@
// Set its description appropriately
$thewire->description = elgg_substr(strip_tags($post), 0, 160);
- // add some metadata
- $thewire->method = $method; //method, e.g. via site, sms etc
- $thewire->parent = $parent; //used if the note is a reply
-
- //save
+ // add some metadata
+ $thewire->method = $method; //method, e.g. via site, sms etc
+ $thewire->parent = $parent; //used if the note is a reply
+
+ //save
$save = $thewire->save();
if($save)
add_to_river('river/object/thewire/create','create',$SESSION['user']->guid,$thewire->guid);
-
- return $save;
+
+ return $save;
}
@@ -199,7 +199,7 @@
// Register actions
global $CONFIG;
- register_action("thewire/add",false,$CONFIG->pluginspath . "thewire/actions/add.php");
- register_action("thewire/delete",false,$CONFIG->pluginspath . "thewire/actions/delete.php");
+ elgg_register_action("thewire/add", $CONFIG->pluginspath . "thewire/actions/add.php");
+ elgg_register_action("thewire/delete", $CONFIG->pluginspath . "thewire/actions/delete.php");
?>
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php
index 36dccf8bf..12250624c 100644
--- a/mod/uservalidationbyemail/start.php
+++ b/mod/uservalidationbyemail/start.php
@@ -44,10 +44,10 @@ function uservalidationbyemail_init() {
$action_path = dirname(__FILE__) . '/actions';
- register_action('uservalidationbyemail/validate', FALSE, "$action_path/validate.php", TRUE);
- register_action('uservalidationbyemail/resend_validation', FALSE, "$action_path/resend_validation.php", TRUE);
- register_action('uservalidationbyemail/delete', FALSE, "$action_path/delete.php", TRUE);
- register_action('uservalidationbyemail/bulk_action', FALSE, "$action_path/bulk_action.php", TRUE);
+ elgg_register_action('uservalidationbyemail/validate', "$action_path/validate.php", 'admin');
+ elgg_register_action('uservalidationbyemail/resend_validation', "$action_path/resend_validation.php", 'admin');
+ elgg_register_action('uservalidationbyemail/delete', "$action_path/delete.php", 'admin');
+ elgg_register_action('uservalidationbyemail/bulk_action', "$action_path/bulk_action.php", 'admin');
}
/**