aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--engine/lib/actions.php9
-rw-r--r--engine/lib/admin.php26
-rw-r--r--engine/lib/elgglib.php8
-rw-r--r--engine/lib/export.php2
-rw-r--r--engine/lib/plugins.php21
-rw-r--r--engine/lib/sessions.php6
-rw-r--r--engine/lib/users.php30
-rw-r--r--engine/lib/widgets.php8
-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
26 files changed, 125 insertions, 129 deletions
diff --git a/engine/lib/actions.php b/engine/lib/actions.php
index 8abd03d64..d95fe0435 100644
--- a/engine/lib/actions.php
+++ b/engine/lib/actions.php
@@ -51,7 +51,7 @@
* @param string $forwarder Optionally, the location to forward to
*
* @link http://docs.elgg.org/Actions
-* @see register_action()
+* @see elgg_register_action()
*
* @return void
*/
@@ -128,7 +128,7 @@ function action($action, $forwarder = "") {
*
* Actions should be namedspaced for your plugin. Example:
* <code>
- * register_action('myplugin/save_settings', ...);
+ * elgg_register_action('myplugin/save_settings', ...);
* </code>
*
* @tip Put action files under the actions/ directory of your plugin.
@@ -370,9 +370,8 @@ function elgg_action_exist($action) {
/**
* Initialize some ajaxy actions features
*/
-function actions_init()
-{
- register_action('security/refreshtoken', TRUE);
+function actions_init() {
+ elgg_register_action('security/refreshtoken', '', 'public');
elgg_view_register_simplecache('js/languages/en');
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 1e6f896ae..82351701c 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -112,19 +112,19 @@ function elgg_add_admin_submenu_item($section_id, $section_title, $parent_id = N
* @return void
*/
function admin_init() {
- register_action('admin/user/ban', FALSE, "", TRUE);
- register_action('admin/user/unban', FALSE, "", TRUE);
- register_action('admin/user/delete', FALSE, "", TRUE);
- register_action('admin/user/resetpassword', FALSE, "", TRUE);
- register_action('admin/user/makeadmin', FALSE, "", TRUE);
- register_action('admin/user/removeadmin', FALSE, "", TRUE);
-
- register_action('admin/site/update_basic', FALSE, "", TRUE);
- register_action('admin/site/update_advanced', FALSE, "", TRUE);
-
- register_action('admin/menu_items', FALSE, "", TRUE);
-
- register_action('admin/plugins/simple_update_states', FALSE, '', TRUE);
+ elgg_register_action('admin/user/ban', '', 'admin');
+ elgg_register_action('admin/user/unban', '', 'admin');
+ elgg_register_action('admin/user/delete', '', 'admin');
+ elgg_register_action('admin/user/resetpassword', '', 'admin');
+ elgg_register_action('admin/user/makeadmin', '', 'admin');
+ elgg_register_action('admin/user/removeadmin', '', 'admin');
+
+ elgg_register_action('admin/site/update_basic', '', 'admin');
+ elgg_register_action('admin/site/update_advanced', '', 'admin');
+
+ elgg_register_action('admin/menu_items', '', 'admin');
+
+ elgg_register_action('admin/plugins/simple_update_states', '', 'admin');
// admin area overview and basic site settings
elgg_add_admin_submenu_item('overview', elgg_echo('admin:overview'));
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 3e09c118a..8a8cecbfa 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -2186,10 +2186,10 @@ function elgg_walled_garden() {
function elgg_init() {
global $CONFIG;
- register_action('comments/add');
- register_action('comments/delete');
- register_action('likes/add');
- register_action('likes/delete');
+ elgg_register_action('comments/add');
+ elgg_register_action('comments/delete');
+ elgg_register_action('likes/add');
+ elgg_register_action('likes/delete');
register_page_handler('js', 'js_page_handler');
diff --git a/engine/lib/export.php b/engine/lib/export.php
index 4de10330f..f81bee2fe 100644
--- a/engine/lib/export.php
+++ b/engine/lib/export.php
@@ -214,7 +214,7 @@ function import($xml) {
function export_init() {
global $CONFIG;
- register_action("import/opendd", false);
+ elgg_register_action("import/opendd");
}
// Register a startup event
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index c0ec7f389..80b68eb5c 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -865,20 +865,17 @@ function plugin_run_once() {
* @return void
*/
function plugin_init() {
- // Now run this stuff, but only once
run_function_once("plugin_run_once");
- // Register some actions
- register_action("plugins/settings/save", false, "", true);
- register_action("plugins/usersettings/save");
-
- register_action('admin/plugins/enable', false, "", true);
- register_action('admin/plugins/disable', false, "", true);
- register_action('admin/plugins/enableall', false, "", true);
- register_action('admin/plugins/disableall', false, "", true);
-
- register_action('admin/plugins/reorder', false, "", true);
+ elgg_register_action("plugins/settings/save", '', 'admin');
+ elgg_register_action("plugins/usersettings/save");
+
+ elgg_register_action('admin/plugins/enable', '', 'admin');
+ elgg_register_action('admin/plugins/disable', '', 'admin');
+ elgg_register_action('admin/plugins/enableall', '', 'admin');
+ elgg_register_action('admin/plugins/disableall', '', 'admin');
+
+ elgg_register_action('admin/plugins/reorder', '', 'admin');
}
-// Register a startup event
elgg_register_event_handler('init', 'system', 'plugin_init');
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php
index 5cb3e8260..4cdc9bcce 100644
--- a/engine/lib/sessions.php
+++ b/engine/lib/sessions.php
@@ -369,7 +369,7 @@ function logout() {
unset($_SESSION['guid']);
unset($_SESSION['id']);
unset($_SESSION['user']);
-
+
setcookie("elggperm", "", (time() - (86400 * 30)), "/");
// pass along any messages
@@ -466,8 +466,8 @@ function session_init($event, $object_type, $object) {
set_last_action($_SESSION['guid']);
}
- register_action("login", true);
- register_action("logout");
+ elgg_register_action("login", '', 'public');
+ elgg_register_action("logout");
// Register a default PAM handler
register_pam_handler('pam_auth_userpass');
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 9ed3d0863..cdabfddff 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1512,31 +1512,31 @@ function users_init() {
register_page_handler('resetpassword', 'elgg_user_resetpassword_page_handler');
register_page_handler('login', 'elgg_user_login_page_handler');
- register_action("register", true);
- register_action("useradd", true);
- register_action("friends/add");
- register_action("friends/remove");
- //register_action('friends/addcollection');
- //register_action('friends/deletecollection');
- //register_action('friends/editcollection');
- //register_action("user/spotlight");
+ elgg_register_action("register", '', 'public');
+ elgg_register_action("useradd", '', 'public');
+ elgg_register_action("friends/add");
+ elgg_register_action("friends/remove");
+ //elgg_register_action('friends/addcollection');
+ //elgg_register_action('friends/deletecollection');
+ //elgg_register_action('friends/editcollection');
+ //elgg_register_action("user/spotlight");
- register_action("usersettings/save");
+ elgg_register_action("usersettings/save");
- register_action("user/passwordreset", TRUE);
- register_action("user/requestnewpassword", TRUE);
+ elgg_register_action("user/passwordreset", '', 'public');
+ elgg_register_action("user/requestnewpassword", '', 'public');
// User name change
extend_elgg_settings_page('user/settings/name', 'usersettings/user', 1);
- //register_action("user/name");
+ //elgg_register_action("user/name");
// User password change
extend_elgg_settings_page('user/settings/password', 'usersettings/user', 1);
- //register_action("user/password");
+ //elgg_register_action("user/password");
// Add email settings
extend_elgg_settings_page('user/settings/email', 'usersettings/user', 1);
- //register_action("email/save");
+ //elgg_register_action("email/save");
// Add language settings
extend_elgg_settings_page('user/settings/language', 'usersettings/user', 1);
@@ -1544,7 +1544,7 @@ function users_init() {
// Add default access settings
extend_elgg_settings_page('user/settings/default_access', 'usersettings/user', 1);
- //register_action("user/language");
+ //elgg_register_action("user/language");
// Register the user type
register_entity_type('user', '');
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index f4cb8765b..e11e4b8e3 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -259,10 +259,10 @@ function elgg_widget_run_once() {
* @return void
*/
function elgg_widgets_init() {
- register_action('widgets/save');
- register_action('widgets/add');
- register_action('widgets/move');
- register_action('widgets/delete');
+ elgg_register_action('widgets/save');
+ elgg_register_action('widgets/add');
+ elgg_register_action('widgets/move');
+ elgg_register_action('widgets/delete');
run_function_once("elgg_widget_run_once");
}
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');
}
/**