]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2451: Removed gatekeeper/admin_gatekeeper() calls from core actions
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 24 Nov 2010 01:23:02 +0000 (01:23 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 24 Nov 2010 01:23:02 +0000 (01:23 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7433 36083f99-b078-4883-b0ff-0f9b5a30f544

34 files changed:
actions/admin/plugins/disable.php
actions/admin/plugins/disableall.php
actions/admin/plugins/enable.php
actions/admin/plugins/enableall.php
actions/admin/plugins/reorder.php
actions/admin/site/update_advanced.php
actions/admin/site/update_basic.php
actions/admin/user/ban.php
actions/admin/user/delete.php
actions/admin/user/makeadmin.php
actions/admin/user/removeadmin.php
actions/admin/user/resetpassword.php
actions/admin/user/unban.php
actions/comments/add.php
actions/email/save.php
actions/entities/delete.php
actions/friends/add.php
actions/friends/addcollection.php
actions/friends/deletecollection.php
actions/friends/remove.php
actions/import/opendd.php
actions/likes/add.php
actions/notifications/settings/usersettings/save.php
actions/plugins/settings/save.php
actions/plugins/usersettings/save.php
actions/user/default_access.php
actions/user/language.php
actions/user/name.php
actions/user/password.php
actions/user/spotlight.php
actions/useradd.php
actions/usersettings/save.php
engine/lib/notification.php
engine/lib/users.php

index 9db5aec11a49c56707116957313af6c61cc9e109..64994423f222d4eb5c0e12894703c5bead7345fc 100644 (file)
@@ -11,8 +11,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 $plugin = get_input('plugin');
 if (!is_array($plugin)) {
        $plugin = array($plugin);
index 21938727e0738a183c17013fa3acc9d70479d44e..351ebf8402865388912db4519f7e341e44d1e801 100644 (file)
@@ -9,8 +9,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 $plugins = get_installed_plugins();
 
 foreach ($plugins as $p => $data) {
index d3ad5606deadbbd9424c06af15ac9c6f2f26cea7..ebabe7bc8d65a87a8d67734ca034d2395bf4087d 100644 (file)
@@ -11,8 +11,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 $plugin = get_input('plugin');
 
 if (!is_array($plugin)) {
index 9a2df00dcc5e497d3102fed3a5d981844ab227a1..04574f06775dd77ef82409a01b7b2660f7d1dff8 100644 (file)
@@ -9,8 +9,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 $plugins = get_installed_plugins();
 
 foreach ($plugins as $p => $data) {
index 2158653e12ff339aad090436b34eef2e2bf78ead..29c4a726878a8dd395dfbb71a1b83bb4f3ab2faa 100644 (file)
@@ -14,8 +14,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 $mod = get_input('plugin');
 $mod = str_replace('.', '', $mod);
 $mod = str_replace('/', '', $mod);
index 127fd38b6962c21de749277218176eb9b2e26c2d..523c64e3eee473e023e0d566cc33b197b277dc12 100644 (file)
@@ -9,8 +9,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 if (datalist_get('default_site')) {
        $site = get_entity(datalist_get('default_site'));
        if (!($site instanceof ElggSite)) {
index 94882cfd3e26c730daca3931cd87ebda43f92fa2..c809dc671fcd5dba50589092614a96cff3e21654 100644 (file)
@@ -10,8 +10,6 @@
  * @subpackage Administration.Site
  */
 
-admin_gatekeeper();
-
 if (datalist_get('default_site')) {
        $site = get_entity(datalist_get('default_site'));
        if (!($site instanceof ElggSite)) {
index 5ad6c29c5c729c793c59ac82b3778b31d564e743..a8fa579258c25ab6a66118fbcc1f3d6ecc85fa9f 100644 (file)
@@ -9,8 +9,6 @@
  * @subpackage Administration.User
  */
 
-admin_gatekeeper();
-
 $guid = get_input('guid');
 $user = get_entity($guid);
 
index a5e1886ece4962af76401c856052f040fc6e1fb2..c6ed5b819f9782f87d1beee9d9dafea1dc4f0cf6 100644 (file)
@@ -9,10 +9,6 @@
  * @subpackage Administration.User
  */
 
-// block non-admin users - require since this action is not registered
-// @todo why isn't this action registered?
-admin_gatekeeper();
-
 // Get the user
 $guid = get_input('guid');
 $user = get_entity($guid);
index 19f365d624793273cd5b2d19245a7dac2c85018b..54b0b7070c51e7390a618bab6dcfa414529b5067 100644 (file)
@@ -11,8 +11,6 @@
  * @subpackage Administration.User
  */
 
-admin_gatekeeper();
-
 $guid = get_input('guid');
 $user = get_entity($guid);
 
index 97bfc396b383cbadba00d1cd61644d1c2ce9ce13..4466e925f1fe1d80324c9a934cfc0927dd2d5a2d 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Administration.User
  */
 
-admin_gatekeeper();
-
 $guid = get_input('guid');
 $user = get_entity($guid);
 
index 14de69cb6cd362427d4544dfa467f81d6f04fad0..e3f737974a23dceeddf8173188981a8b169fe124 100644 (file)
@@ -14,8 +14,6 @@
  * @subpackage Administration.User
  */
 
-admin_gatekeeper();
-
 $guid = get_input('guid');
 $user = get_entity($guid);
 
index 883e074ed2d81cc8d466959e441799f622a24de2..7a772a0d38272cfe821eb92f45b67e99b2059700 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Administration.User
  */
 
-admin_gatekeeper();
-
 $access_status = access_get_show_hidden_status();
 access_show_hidden_entities(true);
 
index 11418a2e2714571088924150b8f1cd3738e522c6..fde0a6f556868770dec0728fc003cb9ed74c6625 100644 (file)
@@ -6,14 +6,9 @@
  * @subpackage Comments
  */
 
-// Make sure we're logged in; forward to the front page if not
-gatekeeper();
-
-// Get input
 $entity_guid = (int) get_input('entity_guid');
 $comment_text = get_input('generic_comment');
 
-// make sure comment is not empty
 if (empty($comment_text)) {
        register_error(elgg_echo("generic_comment:blank"));
        forward(REFERER);
index 0dee6ee1ebdaa7405a8af6caf617353e17cefcd5..13bc14d650d12ac37cd2d16dca2f588eb7ecf4ca 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Administration.Users
  */
 
-gatekeeper();
-
 $email = get_input('email');
 $user_id = get_input('guid');
 
index 823e85c59da613396bf9cd38b4d0c3ae9ec90fbf..251e1f01c95492a570515e8314c76ecc5bfe03cc 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Core
  */
 
-gatekeeper();
-
 $guid = get_input('guid');
 $entity = get_entity($guid);
 
index d0a0d3d7cbd0673c513764dcf6cbb95076e35e3f..e6fa5b62efcf49fab9edfeddfcc2a2325c816f96 100644 (file)
@@ -6,9 +6,6 @@
  * @subpackage Friends.Management
  */
 
-// Ensure we are logged in
-gatekeeper();
-
 // Get the GUID of the user to friend
 $friend_guid = get_input('friend');
 $friend = get_entity($friend_guid);
index 8fdb2be87d682977afcf2c3b7dcfba962d3343ff..92c78a2c155f9fafec4dc8179830eb8819331fe4 100644 (file)
@@ -6,9 +6,6 @@
  * @subpackage Friends.Collections
  */
 
-//must be logged in
-gatekeeper();
-
 $collection_name = get_input('collection_name');
 $friends = get_input('friends_collection');
 
index b57802ce7663f5a9f741a88b21ad442f3291e171..1c3d878a171b6fd1c07b5fb60c390afe297cb4fa 100644 (file)
@@ -6,10 +6,6 @@
  * @subpackage Friends.Collections
  */
 
-// Make sure we're logged in (send us to the front page if not)
-gatekeeper();
-
-// Get input data
 $collection_id = (int) get_input('collection');
 
 // Check to see that the access collection exist and grab its owner
index 1230b12af08b6646528cd8ea0ceb5a58834c794d..0a43c95bc43527b84eee7f92a67612094768c3ab 100644 (file)
@@ -6,9 +6,6 @@
  * @subpackage Friends.Management
  */
 
-// Ensure we are logged in
-gatekeeper();
-
 // Get the GUID of the user to friend
 $friend_guid = get_input('friend');
 $friend = get_entity($friend_guid);
index 0bf748734f7210107edb32bb0e2a87d5c5a546b6..e6360714509a46341ae44ff7a369a78e805f2265 100644 (file)
@@ -9,13 +9,8 @@
  * @subpackage Core
  */
 
-// Safety
-admin_gatekeeper();
-
-// Get input
 $data = get_input('data', '', false);
 
-// Import
 $return = import($data);
 
 if ($return) {
index b8c2f18b89f178d1142bac5c461eb0f25847e6e8..3de1ebc51a993257e5ae9cc9d77aad11799895c5 100644 (file)
@@ -6,7 +6,6 @@
  * @subpackage Likes
  */
 
-gatekeeper();
 $entity_guid = (int) get_input('guid');
 
 //check to see if the user has already liked the item
index da855c6b56db238508f075c7e217397fc6071fc3..eaa01c3ad32ec1b9c5bb770495991ecdb8bb3a22 100644 (file)
@@ -6,9 +6,7 @@
  * @subpackage Core
  */
 
-// Method
 $method = get_input('method');
-gatekeeper();
 
 $current_settings = get_user_notification_settings();
 
index 2edf58e5b881c78c87d7c381c01fc93934b9cf11..3fa45e0c1076bff7440684cd4a4c433934e5ad59 100644 (file)
@@ -15,8 +15,6 @@ if (!$plugin_info = load_plugin_manifest($plugin)) {
 
 $plugin_name = $plugin_info['name'];
 
-admin_gatekeeper();
-
 $result = false;
 
 $options = array(
index 705871facf2db4e21342ee6806d40245bc9a4626..ddf7e822efffb0fa435d3843d3d0b447e17fce99 100644 (file)
@@ -9,8 +9,6 @@
 $params = get_input('params');
 $plugin = get_input('plugin');
 
-gatekeeper();
-
 $result = false;
 
 foreach ($params as $k => $v) {
index ae489dcbe218065955f4ee53ed35fa30f4878cab..0c2390842f5fc0bec04c627013a98d12bdb6dff4 100644 (file)
@@ -9,8 +9,6 @@
 global $CONFIG;
 
 if ($CONFIG->allow_user_default_access) {
-       gatekeeper();
-
        $default_access = get_input('default_access');
        $user_id = get_input('guid');
 
index 252263cd27e54b41b32c0be313c9b3baceb1ba66..44c591d7ae12a257ef8c93b0eab45838c0bc850a 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Core
  */
 
-gatekeeper();
-
 $language = get_input('language');
 $user_id = get_input('guid');
 
index c3e79d7259699136ec67876bec242a284376b248..e293d409cc0b7325fd136a80660c806e182b8092 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Core
  */
 
-gatekeeper();
-
 $name = strip_tags(get_input('name'));
 $user_id = get_input('guid');
 
index 32b27bf74bc419ae762878c54b4b35d2d12d340a..bbeb0ea7ff9cb18041bf56b240f6f34f7b524415 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Core
  */
 
-gatekeeper();
-
 $current_password = get_input('current_password');
 $password = get_input('password');
 $password2 = get_input('password2');
index 00525254b83680c01b9fb178dcde3e0ed926d3cf..390197e78570673993dc47e9b928912002aeedf3 100644 (file)
@@ -7,8 +7,6 @@
  * @todo This is deprecated in 1.8
  */
 
-gatekeeper();
-
 $closed = get_input('closed', 'true');
 if ($closed != 'true') {
        $closed = false;
index 82625ad1b37f0fc11cbd4ad23f21948b4649deb0..dd6edfe3194ca4a951ab362f12047221845fb3a6 100644 (file)
@@ -6,8 +6,6 @@
  * @subpackage Core
  */
 
-admin_gatekeeper(); // Only admins can add a user
-
 // Get variables
 global $CONFIG;
 $username = get_input('username');
index 6ee33ecd763de6a4cb6f9197ad6bb7212c38a4e9..29cbebc1abcf6f47f4a1783c17c413a6f563c13d 100644 (file)
@@ -8,8 +8,6 @@
 
 global $CONFIG;
 
-gatekeeper();
-
 elgg_trigger_plugin_hook('usersettings:save', 'user');
 
 forward(REFERER);
index 8908dcfab9156e4df225c9019cc1ee2c090b18c6..e75e6b34b594ffcff4b2544d3d6cf512d4f8ecf0 100644 (file)
@@ -373,6 +373,7 @@ function notification_init() {
  */
 function notification_user_settings_save() {
        global $CONFIG;
+       //@todo Wha??
        include($CONFIG->path . "actions/notifications/settings/usersettings/save.php");
 }
 
index cdabfddffee5e1daa19d59942ea09182ed79c2ec..1d735980673b29f21b79733d547cf6cca463d1ae 100644 (file)
@@ -1599,6 +1599,7 @@ function search_list_users_by_name($hook, $user, $returnvalue, $tag) {
  */
 function users_settings_save() {
        global $CONFIG;
+       //@todo Wha??
        include($CONFIG->path . "actions/user/name.php");
        include($CONFIG->path . "actions/user/password.php");
        include($CONFIG->path . "actions/email/save.php");