]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2655: Converted register_action to elgg_register_action throughout core
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 24 Nov 2010 00:50:54 +0000 (00:50 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 24 Nov 2010 00:50:54 +0000 (00:50 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7432 36083f99-b078-4883-b0ff-0f9b5a30f544

26 files changed:
engine/lib/actions.php
engine/lib/admin.php
engine/lib/elgglib.php
engine/lib/export.php
engine/lib/plugins.php
engine/lib/sessions.php
engine/lib/users.php
engine/lib/widgets.php
mod/blog/start.php
mod/bookmarks/start.php
mod/categories/start.php
mod/defaultwidgets/start.php
mod/diagnostics/start.php
mod/ecml/start.php
mod/file/start.php
mod/groups/start.php
mod/invitefriends/start.php
mod/messageboard/start.php
mod/messages/start.php
mod/notifications/start.php
mod/pages/start.php
mod/profile/start.php
mod/reportedcontent/start.php
mod/sitepages/start.php
mod/thewire/start.php
mod/uservalidationbyemail/start.php

index 8abd03d64732f9bc34fd5ee49150f0353aaeded9..d95fe043530528d23477f72b5513941d18af648a 100644 (file)
@@ -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');
 
index 1e6f896ae7d909f14af88f029d1bd2edc7f8a886..82351701c0d4c6ec271ef2bea9956d65c55f62f3 100644 (file)
@@ -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'));
index 3e09c118ac34c43ee6bdce7f23481d8343c70438..8a8cecbfa8d44656e6bee693512ef3bfa1d32c56 100644 (file)
@@ -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');
 
index 4de10330f33bb03278dbb7aca50885cafd1e6766..f81bee2fedfc9a2a43a2ba919357d88ae0afd7b6 100644 (file)
@@ -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
index c0ec7f389f278397ea6b16a92e40367cbff76a89..80b68eb5c3635f23dee3e4fe18c5122711632b48 100644 (file)
@@ -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');
index 5cb3e8260379cce5ef9644bc27dcd26cb935ba4c..4cdc9bcce34cd0252662d2904a7fc9f3562890d5 100644 (file)
@@ -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');
index 9ed3d086395e7be3095e27e1ad012cadcf4e78d6..cdabfddffee5e1daa19d59942ea09182ed79c2ec 100644 (file)
@@ -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', '');
index f4cb8765bc447c6133a0f7bdaeb29fd13ebb387d..e11e4b8e326b3765a45cd4efd1839e041f7210c5 100644 (file)
@@ -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");
 }
index 365a21cfa7f27052e31e6cb0c8fe4199e3b76eae..091099e2f15664afdc71e000cda1d15912361f46 100644 (file)
@@ -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');
index 95922cd225fbbed8e4580ddd411fe076bf293f6a..579b40baaa76d65af2440fd681533b7f3b3d55ff 100644 (file)
@@ -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");
index b717294f75ccd2206a554e97b6f4002c813ac426..40d6c9c4d4af5a7c0a36c402b00ec3d373dc2f76 100644 (file)
@@ -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');
 
index 9e86a1625524e2bc004d6226373ed0d54b6452b4..f7adc35814d2fe6fda3fdb142ed20be3bf6d3fa9 100644 (file)
@@ -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");
index 8895a2eeca847bdcc340da0c5834e4a0f4fad12d..5f0f80d623cd1d8dc772fb6884037713c96a82b9 100644 (file)
@@ -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");
 }
 
 /**
index 0d60dd1a57c07da26308dcec16dac41f6039832b..4000ff98aee87c155ac8bbf2e55a4aeccc1c2503 100644 (file)
@@ -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);
index 10fbff27e98d2173d3061227dfe72bd0bd15ac70..9042dd6c353f94bd3c1381e02d6fc0208f669dd2 100644 (file)
        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");
 
 ?>
index 3e9f228edd1b3e9944368c5abf50d39935477375..7fa2f523378097ce56549a30508ddf55a5a9d26e 100644 (file)
                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');
 
        // 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");
 
 ?>
index 1ad1d3ca15c960f4ccd44cde9703a90c0c34345a..aa08e05836ecbdb6b126622cc51bb3d57936f590 100644 (file)
@@ -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');
index 0cd54657388d27f6b9e81b04964f30e0e894e40b..56dfce1bd879211e165cfdc967293f7a692b4616 100644 (file)
@@ -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");
index 027003284db86095dc5bceb8325f43b50fab3c41..bca8d3a91b737212d8c3ed28831df63f9e431420 100644 (file)
@@ -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
index 093b49b0f1250fc151f497f3b1ba23a53c3e68b4..a200056181e610f3bfb49fa28110c3cbe7d01d6d 100644 (file)
@@ -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");
index 9d196d867bf924034edc6bc8799791155b734b99..7c278e67bb75bff130528e45e13281b3776645a4 100644 (file)
@@ -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');
index c8a83077c49dbe723a6f469706a5d4adeff25e38..623d411ef948ff2fc2fd8a9a21ed8ab4a8f73e54 100644 (file)
@@ -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");
index d301a9802a7b6cb1bcb56e2d8753a82326629031..ed7eedd4f06ef4b0d87c418fb4851b09d731c61c 100644 (file)
@@ -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
index 2960bd6a53af3fe2e87a2ebe9bf05cd9dc02be3c..5aa4a21174399ce7d1a485fe5edd9d2c5caa7722 100644 (file)
@@ -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");
        
 }
 
index 31bad5809cc1adbea9d0748daf1c4b76d6b0ba65..d66f0ca14e6055efafb01dd9353da300afa395f7 100644 (file)
@@ -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');
                                
                        // 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;
 
                }
                
                
        // 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");
                
 ?>
index 36dccf8bf3453dfffd7d9033e8311a637b03aa02..12250624c5060879c9a6efbb28679a6f4f551541 100644 (file)
@@ -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');
 }
 
 /**