aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-08-31 19:05:21 +0000
commitc5cc2821311012a8a4385a304a043c4b41f2afbb (patch)
tree3703351e4b5d56905eb52547d6129ffa14cb2a32 /actions
parent775a5f08c501acc565c69659022bc31052677485 (diff)
downloadelgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz
elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions')
-rw-r--r--actions/admin/plugins/disable.php4
-rw-r--r--actions/admin/plugins/disableall.php4
-rw-r--r--actions/admin/plugins/enable.php2
-rw-r--r--actions/admin/plugins/reorder.php98
-rw-r--r--actions/admin/site/update_basic.php190
-rw-r--r--actions/admin/user/ban.php12
-rw-r--r--actions/comments/add.php110
-rw-r--r--actions/comments/delete.php64
-rw-r--r--actions/email/save.php4
-rw-r--r--actions/friends/add.php72
-rw-r--r--actions/friends/addcollection.php92
-rw-r--r--actions/friends/deletecollection.php92
-rw-r--r--actions/friends/editcollection.php34
-rw-r--r--actions/friends/remove.php64
-rw-r--r--actions/login.php108
-rw-r--r--actions/logout.php44
-rw-r--r--actions/register.php62
-rw-r--r--actions/systemsettings/install.php234
-rw-r--r--actions/user/default_access.php8
-rw-r--r--actions/user/requestnewpassword.php20
-rw-r--r--actions/user/spotlight.php28
-rw-r--r--actions/useradd.php8
-rw-r--r--actions/usersettings/save.php38
-rw-r--r--actions/widgets/add.php80
-rw-r--r--actions/widgets/reorder.php58
-rw-r--r--actions/widgets/save.php68
26 files changed, 799 insertions, 799 deletions
diff --git a/actions/admin/plugins/disable.php b/actions/admin/plugins/disable.php
index 2241730ad..90825bc2f 100644
--- a/actions/admin/plugins/disable.php
+++ b/actions/admin/plugins/disable.php
@@ -29,9 +29,9 @@
else
register_error(sprintf(elgg_echo('admin:plugins:disable:no'), $p));
}
-
+
elgg_view_regenerate_simplecache();
- elgg_filepath_cache_reset();
+ elgg_filepath_cache_reset();
forward($_SERVER['HTTP_REFERER']);
exit;
diff --git a/actions/admin/plugins/disableall.php b/actions/admin/plugins/disableall.php
index 5d0be4ad6..672915bce 100644
--- a/actions/admin/plugins/disableall.php
+++ b/actions/admin/plugins/disableall.php
@@ -26,9 +26,9 @@
else
register_error(sprintf(elgg_echo('admin:plugins:disable:no'), $p));
}
-
+
elgg_view_regenerate_simplecache();
- elgg_filepath_cache_reset();
+ elgg_filepath_cache_reset();
forward($_SERVER['HTTP_REFERER']);
exit;
diff --git a/actions/admin/plugins/enable.php b/actions/admin/plugins/enable.php
index 26d7abaf4..890e6648e 100644
--- a/actions/admin/plugins/enable.php
+++ b/actions/admin/plugins/enable.php
@@ -29,7 +29,7 @@
else
register_error(sprintf(elgg_echo('admin:plugins:enable:no'), $p));
}
-
+
elgg_view_regenerate_simplecache();
elgg_filepath_cache_reset();
diff --git a/actions/admin/plugins/reorder.php b/actions/admin/plugins/reorder.php
index 50409df95..36ba1f66d 100644
--- a/actions/admin/plugins/reorder.php
+++ b/actions/admin/plugins/reorder.php
@@ -1,54 +1,54 @@
-<?php
- /**
+<?php
+ /**
* Reorder plugin action.
- *
- * @package Elgg
- * @subpackage Core
+ *
+ * @package Elgg
+ * @subpackage Core
- * @author Curverider Ltd
+ * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
- require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
-
- // block non-admin users
- admin_gatekeeper();
-
- // Validate the action
- action_gatekeeper();
-
- // Get the plugin
- $mod = get_input('plugin');
- $mod = str_replace('.','',$mod);
- $mod = str_replace('/','',$mod);
-
- // Get the new order
- $order = (int) get_input('order');
-
- // Get the current plugin list
- $plugins = get_plugin_list();
-
- // Inject the plugin order back into the list
- if ($key = array_search($mod, $plugins)) {
-
- unset($plugins[$key]);
- while (isset($plugins[$order])) {
- $order++;
- }
-
- $plugins[$order] = $mod;
- }
-
- // Disable
- if (regenerate_plugin_list($plugins))
- system_message(sprintf(elgg_echo('admin:plugins:reorder:yes'), $plugin));
- else
- register_error(sprintf(elgg_echo('admin:plugins:reorder:no'), $plugin));
-
+ * @link http://elgg.org/
+ */
+
+ require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");
+
+ // block non-admin users
+ admin_gatekeeper();
+
+ // Validate the action
+ action_gatekeeper();
+
+ // Get the plugin
+ $mod = get_input('plugin');
+ $mod = str_replace('.','',$mod);
+ $mod = str_replace('/','',$mod);
+
+ // Get the new order
+ $order = (int) get_input('order');
+
+ // Get the current plugin list
+ $plugins = get_plugin_list();
+
+ // Inject the plugin order back into the list
+ if ($key = array_search($mod, $plugins)) {
+
+ unset($plugins[$key]);
+ while (isset($plugins[$order])) {
+ $order++;
+ }
+
+ $plugins[$order] = $mod;
+ }
+
+ // Disable
+ if (regenerate_plugin_list($plugins))
+ system_message(sprintf(elgg_echo('admin:plugins:reorder:yes'), $plugin));
+ else
+ register_error(sprintf(elgg_echo('admin:plugins:reorder:no'), $plugin));
+
elgg_view_regenerate_simplecache();
- elgg_filepath_cache_reset();
-
- forward($_SERVER['HTTP_REFERER']);
-
+ elgg_filepath_cache_reset();
+
+ forward($_SERVER['HTTP_REFERER']);
+
?> \ No newline at end of file
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php
index d56e1d296..31a6b401e 100644
--- a/actions/admin/site/update_basic.php
+++ b/actions/admin/site/update_basic.php
@@ -1,103 +1,103 @@
-<?php
-
- /**
- * Elgg update site action
- *
- * This is an update version of the sitesettings/install action which is used by the admin panel to modify basic settings.
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg update site action
+ *
+ * This is an update version of the sitesettings/install action which is used by the admin panel to modify basic settings.
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- global $CONFIG;
-
- // block non-admin users
- admin_gatekeeper();
- action_gatekeeper();
-
- if (get_input('settings') == 'go') {
-
- if (datalist_get('default_site')) {
-
- $site = get_entity(datalist_get('default_site'));
- if (!($site instanceof ElggSite))
- throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite'));
-
- $site->description = get_input('sitedescription');
- $site->name = get_input('sitename');
- $site->email = get_input('siteemail');
- $site->url = get_input('wwwroot');
-
- datalist_set('path',sanitise_filepath(get_input('path')));
- datalist_set('dataroot',sanitise_filepath(get_input('dataroot')));
- if (get_input('simplecache_enabled')) {
- elgg_view_enable_simplecache();
- } else {
- elgg_view_disable_simplecache();
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ global $CONFIG;
+
+ // block non-admin users
+ admin_gatekeeper();
+ action_gatekeeper();
+
+ if (get_input('settings') == 'go') {
+
+ if (datalist_get('default_site')) {
+
+ $site = get_entity(datalist_get('default_site'));
+ if (!($site instanceof ElggSite))
+ throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite'));
+
+ $site->description = get_input('sitedescription');
+ $site->name = get_input('sitename');
+ $site->email = get_input('siteemail');
+ $site->url = get_input('wwwroot');
+
+ datalist_set('path',sanitise_filepath(get_input('path')));
+ datalist_set('dataroot',sanitise_filepath(get_input('dataroot')));
+ if (get_input('simplecache_enabled')) {
+ elgg_view_enable_simplecache();
+ } else {
+ elgg_view_disable_simplecache();
}
if (get_input('viewpath_cache_enabled')) {
elgg_enable_filepath_cache();
} else {
elgg_disable_filepath_cache();
- }
-
- set_config('language', get_input('language'), $site->getGUID());
-
- set_config('default_access', get_input('default_access'), $site->getGUID());
-
- if (get_input('allow_user_default_access')) {
- set_config('allow_user_default_access', 1, $site->getGUID());
- } else {
- set_config('allow_user_default_access', 0, $site->getGUID());
- }
-
- set_config('view', get_input('view'), $site->getGUID());
-
- $debug = get_input('debug');
- if ($debug)
- set_config('debug', 1, $site->getGUID());
- else
- unset_config('debug', $site->getGUID());
-
- $https_login = get_input('https_login');
- if ($https_login)
- set_config('https_login', 1, $site->getGUID());
- else
- unset_config('https_login', $site->getGUID());
-
- $usage = get_input('usage');
- if ($usage)
- unset_config('ping_home', $site->getGUID());
- else
- set_config('ping_home', 'disabled', $site->getGUID());
-
- $api = get_input('api');
- if ($api)
- unset_config('disable_api', $site->getGUID());
- else
- set_config('disable_api', 'disabled', $site->getGUID());
-
- // Now ping home
- //if ((!isset($usage)) || ($usage!='disabled'))
- //{
- // ping_home($site);
- //}
-
- if ($site->save())
- system_message(elgg_echo("admin:configuration:success"));
- else
- register_error(elgg_echo("admin:configuration:fail"));
-
- //header("Location: {$CONFIG->wwwroot}admin/site/");
- forward($_SERVER['HTTP_REFERER']);
- exit;
-
- }
-
- }
-
+ }
+
+ set_config('language', get_input('language'), $site->getGUID());
+
+ set_config('default_access', get_input('default_access'), $site->getGUID());
+
+ if (get_input('allow_user_default_access')) {
+ set_config('allow_user_default_access', 1, $site->getGUID());
+ } else {
+ set_config('allow_user_default_access', 0, $site->getGUID());
+ }
+
+ set_config('view', get_input('view'), $site->getGUID());
+
+ $debug = get_input('debug');
+ if ($debug)
+ set_config('debug', 1, $site->getGUID());
+ else
+ unset_config('debug', $site->getGUID());
+
+ $https_login = get_input('https_login');
+ if ($https_login)
+ set_config('https_login', 1, $site->getGUID());
+ else
+ unset_config('https_login', $site->getGUID());
+
+ $usage = get_input('usage');
+ if ($usage)
+ unset_config('ping_home', $site->getGUID());
+ else
+ set_config('ping_home', 'disabled', $site->getGUID());
+
+ $api = get_input('api');
+ if ($api)
+ unset_config('disable_api', $site->getGUID());
+ else
+ set_config('disable_api', 'disabled', $site->getGUID());
+
+ // Now ping home
+ //if ((!isset($usage)) || ($usage!='disabled'))
+ //{
+ // ping_home($site);
+ //}
+
+ if ($site->save())
+ system_message(elgg_echo("admin:configuration:success"));
+ else
+ register_error(elgg_echo("admin:configuration:fail"));
+
+ //header("Location: {$CONFIG->wwwroot}admin/site/");
+ forward($_SERVER['HTTP_REFERER']);
+ exit;
+
+ }
+
+ }
+
?> \ No newline at end of file
diff --git a/actions/admin/user/ban.php b/actions/admin/user/ban.php
index 831513a29..1033ec00a 100644
--- a/actions/admin/user/ban.php
+++ b/actions/admin/user/ban.php
@@ -21,15 +21,15 @@
if ( ($obj instanceof ElggUser) && ($obj->canEdit()))
{
// Now actually disable it
- if ($obj->ban('banned')) {
- system_message(elgg_echo('admin:user:ban:yes'));
+ if ($obj->ban('banned')) {
+ system_message(elgg_echo('admin:user:ban:yes'));
}
else
register_error(elgg_echo('admin:user:ban:no'));
- } else {
- $canedit = $obj->canEdit();
- $isinstance = ($obj instanceof ElggUser);
- register_error(elgg_echo('admin:user:ban:no'));
+ } else {
+ $canedit = $obj->canEdit();
+ $isinstance = ($obj instanceof ElggUser);
+ register_error(elgg_echo('admin:user:ban:no'));
}
forward('pg/admin/user/');
diff --git a/actions/comments/add.php b/actions/comments/add.php
index b026c64f0..80478b9ad 100644
--- a/actions/comments/add.php
+++ b/actions/comments/add.php
@@ -1,58 +1,58 @@
-<?php
-
- /**
- * Elgg add comment action
- *
- * @package Elgg
+<?php
- * @author Curverider <curverider.co.uk>
+ /**
+ * Elgg add comment action
+ *
+ * @package Elgg
+
+ * @author Curverider <curverider.co.uk>
+
+ * @link http://elgg.org/
+ */
+
+ // Make sure we're logged in; forward to the front page if not
+ gatekeeper();
+ action_gatekeeper();
+
+ // Get input
+ $entity_guid = (int) get_input('entity_guid');
+ $comment_text = get_input('generic_comment');
+
+ // Let's see if we can get an entity with the specified GUID
+ if ($entity = get_entity($entity_guid)) {
+
+ // If posting the comment was successful, say so
+ if ($entity->annotate('generic_comment',$comment_text,$entity->access_id, $_SESSION['guid'])) {
+
+ if ($entity->owner_guid != $_SESSION['user']->getGUID())
+ notify_user($entity->owner_guid, $_SESSION['user']->getGUID(), elgg_echo('generic_comment:email:subject'),
+ sprintf(
+ elgg_echo('generic_comment:email:body'),
+ $entity->title,
+ $_SESSION['user']->name,
+ $comment_text,
+ $entity->getURL(),
+ $_SESSION['user']->name,
+ $_SESSION['user']->getURL()
+ )
+ );
+
+ system_message(elgg_echo("generic_comment:posted"));
+ //add to river
+ add_to_river('annotation/annotate','comment',$_SESSION['user']->guid,$entity->guid);
+
+
+ } else {
+ register_error(elgg_echo("generic_comment:failure"));
+ }
+
+ } else {
+
+ register_error(elgg_echo("generic_comment:notfound"));
+
+ }
+
+ // Forward to the
+ forward($entity->getURL());
- * @link http://elgg.org/
- */
-
- // Make sure we're logged in; forward to the front page if not
- gatekeeper();
- action_gatekeeper();
-
- // Get input
- $entity_guid = (int) get_input('entity_guid');
- $comment_text = get_input('generic_comment');
-
- // Let's see if we can get an entity with the specified GUID
- if ($entity = get_entity($entity_guid)) {
-
- // If posting the comment was successful, say so
- if ($entity->annotate('generic_comment',$comment_text,$entity->access_id, $_SESSION['guid'])) {
-
- if ($entity->owner_guid != $_SESSION['user']->getGUID())
- notify_user($entity->owner_guid, $_SESSION['user']->getGUID(), elgg_echo('generic_comment:email:subject'),
- sprintf(
- elgg_echo('generic_comment:email:body'),
- $entity->title,
- $_SESSION['user']->name,
- $comment_text,
- $entity->getURL(),
- $_SESSION['user']->name,
- $_SESSION['user']->getURL()
- )
- );
-
- system_message(elgg_echo("generic_comment:posted"));
- //add to river
- add_to_river('annotation/annotate','comment',$_SESSION['user']->guid,$entity->guid);
-
-
- } else {
- register_error(elgg_echo("generic_comment:failure"));
- }
-
- } else {
-
- register_error(elgg_echo("generic_comment:notfound"));
-
- }
-
- // Forward to the
- forward($entity->getURL());
-
?> \ No newline at end of file
diff --git a/actions/comments/delete.php b/actions/comments/delete.php
index 2d3b9b3fd..dc701973b 100644
--- a/actions/comments/delete.php
+++ b/actions/comments/delete.php
@@ -1,35 +1,35 @@
-<?php
-
- /**
- * Elgg delete comment action
- *
- * @package Elgg
+<?php
- * @author Curverider <curverider.co.uk>
+ /**
+ * Elgg delete comment action
+ *
+ * @package Elgg
+
+ * @author Curverider <curverider.co.uk>
+
+ * @link http://elgg.org/
+ */
+
+ // Ensure we're logged in
+ if (!isloggedin()) forward();
+
+ // Make sure we can get the comment in question
+ $annotation_id = (int) get_input('annotation_id');
+ if ($comment = get_annotation($annotation_id)) {
+
+ $entity = get_entity($comment->entity_guid);
+
+ if ($comment->canEdit()) {
+ $comment->delete();
+ system_message(elgg_echo("generic_comment:deleted"));
+ forward($entity->getURL());
+ }
+
+ } else {
+ $url = "";
+ }
+
+ register_error(elgg_echo("generic_comment:notdeleted"));
+ forward($entity->getURL());
- * @link http://elgg.org/
- */
-
- // Ensure we're logged in
- if (!isloggedin()) forward();
-
- // Make sure we can get the comment in question
- $annotation_id = (int) get_input('annotation_id');
- if ($comment = get_annotation($annotation_id)) {
-
- $entity = get_entity($comment->entity_guid);
-
- if ($comment->canEdit()) {
- $comment->delete();
- system_message(elgg_echo("generic_comment:deleted"));
- forward($entity->getURL());
- }
-
- } else {
- $url = "";
- }
-
- register_error(elgg_echo("generic_comment:notdeleted"));
- forward($entity->getURL());
-
?> \ No newline at end of file
diff --git a/actions/email/save.php b/actions/email/save.php
index 6c166242b..2d226552a 100644
--- a/actions/email/save.php
+++ b/actions/email/save.php
@@ -29,7 +29,7 @@
if (!get_user_by_email($email))
{
-
+
if ($user->email != $email) {
$user->email = $email;
if ($user->save())
@@ -38,7 +38,7 @@
system_message(elgg_echo('email:save:success'));
}
else
- register_error(elgg_echo('email:save:fail'));
+ register_error(elgg_echo('email:save:fail'));
}
}
else
diff --git a/actions/friends/add.php b/actions/friends/add.php
index 004b0eaad..63f1e2d94 100644
--- a/actions/friends/add.php
+++ b/actions/friends/add.php
@@ -1,40 +1,40 @@
-<?php
-
- /**
- * Elgg add friend action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg add friend action
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- // Ensure we are logged in
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ // Ensure we are logged in
gatekeeper();
- action_gatekeeper();
-
- // Get the GUID of the user to friend
- $friend_guid = get_input('friend');
- $friend = get_entity($friend_guid);
-
- $errors = false;
-
- // Get the user
- try {
- if (!$_SESSION['user']->addFriend($friend_guid)) $errors = true;
- } catch (Exception $e) {
- register_error(sprintf(elgg_echo("friends:add:failure"),$friend->name));
- $errors = true;
- }
- if (!$errors){
- // add to river
- add_to_river('friends/river/create','friend',$_SESSION['user']->guid,$friend_guid);
- system_message(sprintf(elgg_echo("friends:add:successful"),$friend->name));
- }
-
- // Forward to the user friends page
- forward("pg/friends/" . $_SESSION['user']->username . "/");
-
+ action_gatekeeper();
+
+ // Get the GUID of the user to friend
+ $friend_guid = get_input('friend');
+ $friend = get_entity($friend_guid);
+
+ $errors = false;
+
+ // Get the user
+ try {
+ if (!$_SESSION['user']->addFriend($friend_guid)) $errors = true;
+ } catch (Exception $e) {
+ register_error(sprintf(elgg_echo("friends:add:failure"),$friend->name));
+ $errors = true;
+ }
+ if (!$errors){
+ // add to river
+ add_to_river('friends/river/create','friend',$_SESSION['user']->guid,$friend_guid);
+ system_message(sprintf(elgg_echo("friends:add:successful"),$friend->name));
+ }
+
+ // Forward to the user friends page
+ forward("pg/friends/" . $_SESSION['user']->username . "/");
+
?> \ No newline at end of file
diff --git a/actions/friends/addcollection.php b/actions/friends/addcollection.php
index bda98984b..7dfba1ee7 100644
--- a/actions/friends/addcollection.php
+++ b/actions/friends/addcollection.php
@@ -1,50 +1,50 @@
-<?php
-
- /**
- * Elgg collection add page
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg collection add page
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- //must be logged in
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ //must be logged in
gatekeeper();
- action_gatekeeper();
-
- $collection_name = get_input('collection_name');
- $friends = get_input('friends_collection');
-
- //first check to make sure that a collection name has been set and create the new colection
- if($collection_name){
-
- //create the collection
- $create_collection = create_access_collection($collection_name, $_SESSION['user']->getGUID());
-
- //if the collection was created and the user passed some friends from the form, add them
- if($create_collection && (!empty($friends))){
-
- //add friends to the collection
- foreach($friends as $friend){
- add_user_to_access_collection($friend, $create_collection);
- }
-
- }
-
- // Success message
- system_message(elgg_echo("friends:collectionadded"));
- // Forward to the collections page
- forward("pg/collections/" . $_SESSION['user']->username);
-
- } else {
-
- register_error(elgg_echo("friends:nocollectionname"));
- // Forward to the add collection page
- forward("pg/collections/add");
-
- }
-
+ action_gatekeeper();
+
+ $collection_name = get_input('collection_name');
+ $friends = get_input('friends_collection');
+
+ //first check to make sure that a collection name has been set and create the new colection
+ if($collection_name){
+
+ //create the collection
+ $create_collection = create_access_collection($collection_name, $_SESSION['user']->getGUID());
+
+ //if the collection was created and the user passed some friends from the form, add them
+ if($create_collection && (!empty($friends))){
+
+ //add friends to the collection
+ foreach($friends as $friend){
+ add_user_to_access_collection($friend, $create_collection);
+ }
+
+ }
+
+ // Success message
+ system_message(elgg_echo("friends:collectionadded"));
+ // Forward to the collections page
+ forward("pg/collections/" . $_SESSION['user']->username);
+
+ } else {
+
+ register_error(elgg_echo("friends:nocollectionname"));
+ // Forward to the add collection page
+ forward("pg/collections/add");
+
+ }
+
?> \ No newline at end of file
diff --git a/actions/friends/deletecollection.php b/actions/friends/deletecollection.php
index 674e68751..bdfcc9b2c 100644
--- a/actions/friends/deletecollection.php
+++ b/actions/friends/deletecollection.php
@@ -1,52 +1,52 @@
-<?php
-
- /**
- * Elgg friends: delete collection action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg friends: delete collection action
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- // 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
- $get_collection = get_access_collection($collection_id);
-
- if($get_collection){
-
- if($get_collection->owner_guid == $_SESSION['user']->getGUID()){
-
- $delete_collection = delete_access_collection($collection_id);
-
- // Success message
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ // 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
+ $get_collection = get_access_collection($collection_id);
+
+ if($get_collection){
+
+ if($get_collection->owner_guid == $_SESSION['user']->getGUID()){
+
+ $delete_collection = delete_access_collection($collection_id);
+
+ // Success message
if ($delete_collection)
system_message(elgg_echo("friends:collectiondeleted"));
else
- register_error(elgg_echo("friends:collectiondeletefailed"));
-
- } else {
-
- // Failure message
- register_error(elgg_echo("friends:collectiondeletefailed"));
-
- }
-
- } else {
-
- // Failure message
- register_error(elgg_echo("friends:collectiondeletefailed"));
-
- }
-
- // Forward to the collections page
- forward("pg/collections/" . $_SESSION['user']->username);
-
+ register_error(elgg_echo("friends:collectiondeletefailed"));
+
+ } else {
+
+ // Failure message
+ register_error(elgg_echo("friends:collectiondeletefailed"));
+
+ }
+
+ } else {
+
+ // Failure message
+ register_error(elgg_echo("friends:collectiondeletefailed"));
+
+ }
+
+ // Forward to the collections page
+ forward("pg/collections/" . $_SESSION['user']->username);
+
?> \ No newline at end of file
diff --git a/actions/friends/editcollection.php b/actions/friends/editcollection.php
index a1a38845f..ede61b4b0 100644
--- a/actions/friends/editcollection.php
+++ b/actions/friends/editcollection.php
@@ -1,20 +1,20 @@
-<?php
-
- /**
- * Elgg collection add page
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg collection add page
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- $collection_id = get_input('collection_id');
- $friends = get_input('friend');
-
- //chech the collection exists and the current user owners it
- update_access_collection($collection_id, $friends);
-
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $collection_id = get_input('collection_id');
+ $friends = get_input('friend');
+
+ //chech the collection exists and the current user owners it
+ update_access_collection($collection_id, $friends);
+
?> \ No newline at end of file
diff --git a/actions/friends/remove.php b/actions/friends/remove.php
index d1911bb90..20181bc84 100644
--- a/actions/friends/remove.php
+++ b/actions/friends/remove.php
@@ -1,42 +1,42 @@
-<?php
-
- /**
- * Elgg remove friend action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg remove friend action
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- // Ensure we are logged in
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ // Ensure we are logged in
gatekeeper();
- action_gatekeeper();
-
- // Get the GUID of the user to friend
- $friend_guid = get_input('friend');
- $friend = get_entity($friend_guid);
- $errors = false;
-
- // Get the user
+ action_gatekeeper();
+
+ // Get the GUID of the user to friend
+ $friend_guid = get_input('friend');
+ $friend = get_entity($friend_guid);
+ $errors = false;
+
+ // Get the user
try{
- if ($friend instanceof ElggUser)
+ if ($friend instanceof ElggUser)
$_SESSION['user']->removeFriend($friend_guid);
else
{
register_error(sprintf(elgg_echo("friends:remove:failure"),$friend->name));
$errors = true;
- }
- } catch (Exception $e) {
- register_error(sprintf(elgg_echo("friends:remove:failure"),$friend->name));
- $errors = true;
- }
- if (!$errors)
- system_message(sprintf(elgg_echo("friends:remove:successful"),$friend->name));
-
- // Forward to the user friends page
- forward("pg/friends/" . $_SESSION['user']->username . "/");
-
+ }
+ } catch (Exception $e) {
+ register_error(sprintf(elgg_echo("friends:remove:failure"),$friend->name));
+ $errors = true;
+ }
+ if (!$errors)
+ system_message(sprintf(elgg_echo("friends:remove:successful"),$friend->name));
+
+ // Forward to the user friends page
+ forward("pg/friends/" . $_SESSION['user']->username . "/");
+
?> \ No newline at end of file
diff --git a/actions/login.php b/actions/login.php
index 1d2b7bc07..f3a60af6d 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -1,37 +1,37 @@
-<?php
-
- /**
- * Elgg login action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg login action
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
// Safety first
action_gatekeeper();
-
- // Get username and password
-
- $username = get_input('username');
- $password = get_input("password");
- $persistent = get_input("persistent", false);
-
- // If all is present and correct, try to log in
- $result = false;
- if (!empty($username) && !empty($password)) {
- if ($user = authenticate($username,$password)) {
- $result = login($user, $persistent);
- }
- }
-
- // Set the system_message as appropriate
-
- if ($result) {
- system_message(elgg_echo('loginok'));
+
+ // Get username and password
+
+ $username = get_input('username');
+ $password = get_input("password");
+ $persistent = get_input("persistent", false);
+
+ // If all is present and correct, try to log in
+ $result = false;
+ if (!empty($username) && !empty($password)) {
+ if ($user = authenticate($username,$password)) {
+ $result = login($user, $persistent);
+ }
+ }
+
+ // Set the system_message as appropriate
+
+ if ($result) {
+ system_message(elgg_echo('loginok'));
if ($_SESSION['last_forward_from'])
{
$forward_url = $_SESSION['last_forward_from'];
@@ -54,29 +54,29 @@
forward($_SERVER['HTTP_REFERER']);
} else
forward("pg/dashboard/");
- }
- } else {
- $error_msg = elgg_echo('loginerror');
- // figure out why the login failed
- if (!empty($username) && !empty($password)) {
- // See if it exists and is disabled
- $access_status = access_get_show_hidden_status();
- access_show_hidden_entities(true);
- if (($user = get_user_by_username($username)) && !$user->validated) {
- // give plugins a chance to respond
- if (!trigger_plugin_hook('unvalidated_login_attempt','user',array('entity'=>$user))) {
- // if plugins have not registered an action, the default action is to
- // trigger the validation event again and assume that the validation
- // event will display an appropriate message
- trigger_elgg_event('validate', 'user', $user);
- }
- } else {
- register_error(elgg_echo('loginerror'));
- }
- access_show_hidden_entities($access_status);
- } else {
- register_error(elgg_echo('loginerror'));
- }
- }
-
+ }
+ } else {
+ $error_msg = elgg_echo('loginerror');
+ // figure out why the login failed
+ if (!empty($username) && !empty($password)) {
+ // See if it exists and is disabled
+ $access_status = access_get_show_hidden_status();
+ access_show_hidden_entities(true);
+ if (($user = get_user_by_username($username)) && !$user->validated) {
+ // give plugins a chance to respond
+ if (!trigger_plugin_hook('unvalidated_login_attempt','user',array('entity'=>$user))) {
+ // if plugins have not registered an action, the default action is to
+ // trigger the validation event again and assume that the validation
+ // event will display an appropriate message
+ trigger_elgg_event('validate', 'user', $user);
+ }
+ } else {
+ register_error(elgg_echo('loginerror'));
+ }
+ access_show_hidden_entities($access_status);
+ } else {
+ register_error(elgg_echo('loginerror'));
+ }
+ }
+
?> \ No newline at end of file
diff --git a/actions/logout.php b/actions/logout.php
index 078e5a7aa..67ca6ad65 100644
--- a/actions/logout.php
+++ b/actions/logout.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg logout action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg logout action
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ // Log out
+ $result = logout();
+
+ // Set the system_message as appropriate
+
+ if ($result) {
+ system_message(elgg_echo('logoutok'));
+ } else {
+ register_error(elgg_echo('logouterror'));
+ }
- * @link http://elgg.org/
- */
-
- // Log out
- $result = logout();
-
- // Set the system_message as appropriate
-
- if ($result) {
- system_message(elgg_echo('logoutok'));
- } else {
- register_error(elgg_echo('logouterror'));
- }
-
?> \ No newline at end of file
diff --git a/actions/register.php b/actions/register.php
index 75721822c..5c69624b3 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -1,39 +1,39 @@
-<?php
-
- /**
- * Elgg registration action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg registration action
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
global $CONFIG;
action_gatekeeper();
-
- // Get variables
- $username = get_input('username');
- $password = get_input('password');
- $password2 = get_input('password2');
- $email = get_input('email');
- $name = get_input('name');
- $friend_guid = (int) get_input('friend_guid',0);
- $invitecode = get_input('invitecode');
+
+ // Get variables
+ $username = get_input('username');
+ $password = get_input('password');
+ $password2 = get_input('password2');
+ $email = get_input('email');
+ $name = get_input('name');
+ $friend_guid = (int) get_input('friend_guid',0);
+ $invitecode = get_input('invitecode');
$admin = get_input('admin');
if (is_array($admin)) $admin = $admin[0];
if (!$CONFIG->disable_registration)
- {
+ {
// For now, just try and register the user
- try {
+ try {
if (
(
(trim($password)!="") &&
@@ -49,21 +49,21 @@
$new_user->admin = 'yes';
}
- // Send user validation request on register only
- global $registering_admin;
+ // Send user validation request on register only
+ global $registering_admin;
if (!$registering_admin)
request_user_validation($guid);
if (!$new_user->admin)
- $new_user->disable('new_user', false); // Now disable if not an admin
- // Don't do a recursive disable. Any entities owned by the user at this point
+ $new_user->disable('new_user', false); // Now disable if not an admin
+ // Don't do a recursive disable. Any entities owned by the user at this point
// are products of plugins that
-
+
system_message(sprintf(elgg_echo("registerok"),$CONFIG->sitename));
- forward(); // Forward on success, assume everything else is an error...
- } else {
- register_error(elgg_echo("registerbad"));
+ forward(); // Forward on success, assume everything else is an error...
+ } else {
+ register_error(elgg_echo("registerbad"));
}
} catch (RegistrationException $r) {
register_error($r->getMessage());
@@ -76,6 +76,6 @@
$qs = $qs[0];
$qs .= "?u=" . urlencode($username) . "&e=" . urlencode($email) . "&n=" . urlencode($name) . "&friend_guid=" . $friend_guid;
- forward($qs);
-
+ forward($qs);
+
?> \ No newline at end of file
diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php
index 1d9f63a9f..8b0a31ced 100644
--- a/actions/systemsettings/install.php
+++ b/actions/systemsettings/install.php
@@ -1,125 +1,125 @@
-<?php
-
- /**
- * Elgg install site action
- *
- * Creates a nwe site and sets it as the default
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg install site action
+ *
+ * Creates a nwe site and sets it as the default
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- elgg_set_viewtype('failsafe'); // Set failsafe again incase we get an exception thrown
-
- if (is_installed()) forward();
-
- if (get_input('settings') == 'go') {
-
- if (!datalist_get('default_site')) {
-
- // Sanitise
- $path = sanitise_filepath(get_input('path'));
- $dataroot = sanitise_filepath(get_input('dataroot'));
-
- // Blank?
- if ($dataroot == "/")
- throw new InstallationException(elgg_echo('InstallationException:DatarootBlank'));
-
- // That it's valid
- if (stripos($dataroot, $path)!==false)
- throw new InstallationException(sprintf(elgg_echo('InstallationException:DatarootUnderPath'), $dataroot));
-
- // Check data root is writable
- if (!is_writable($dataroot))
- throw new InstallationException(sprintf(elgg_echo('InstallationException:DatarootNotWritable'), $dataroot));
-
-
- $site = new ElggSite();
- $site->name = get_input('sitename');
- $site->url = get_input('wwwroot');
- $site->description = get_input('sitedescription');
- $site->email = get_input('siteemail');
- $site->access_id = ACCESS_PUBLIC;
- $guid = $site->save();
-
- if (!$guid)
- throw new InstallationException(sprintf(elgg_echo('InstallationException:CantCreateSite'), get_input('sitename'), get_input('wwwroot')));
-
- datalist_set('installed',time());
-
- datalist_set('path', $path);
- datalist_set('dataroot', $dataroot);
-
- datalist_set('default_site',$site->getGUID());
-
- set_config('view', get_input('view'), $site->getGUID());
- set_config('language', get_input('language'), $site->getGUID());
- set_config('default_access', get_input('default_access'), $site->getGUID());
-
- $debug = get_input('debug');
- if ($debug)
- set_config('debug', 1, $site->getGUID());
- else
- unset_config('debug', $site->getGUID());
-
- $usage = get_input('usage');
- if (is_array($usage)) $usage = $usage[0];
-
- if ($usage)
- unset_config('ping_home', $site->getGUID());
- else
- set_config('ping_home', 'disabled', $site->getGUID());
-
- $api = get_input('api');
- if ($api)
- unset_config('disable_api', $site->getGUID());
- else
- set_config('disable_api', 'disabled', $site->getGUID());
-
- $https_login = get_input('https_login');
- if ($https_login)
- set_config('https_login', 1, $site->getGUID());
- else
- unset_config('https_login', $site->getGUID());
-
- // activate some plugins by default
- if (isset($CONFIG->default_plugins))
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ elgg_set_viewtype('failsafe'); // Set failsafe again incase we get an exception thrown
+
+ if (is_installed()) forward();
+
+ if (get_input('settings') == 'go') {
+
+ if (!datalist_get('default_site')) {
+
+ // Sanitise
+ $path = sanitise_filepath(get_input('path'));
+ $dataroot = sanitise_filepath(get_input('dataroot'));
+
+ // Blank?
+ if ($dataroot == "/")
+ throw new InstallationException(elgg_echo('InstallationException:DatarootBlank'));
+
+ // That it's valid
+ if (stripos($dataroot, $path)!==false)
+ throw new InstallationException(sprintf(elgg_echo('InstallationException:DatarootUnderPath'), $dataroot));
+
+ // Check data root is writable
+ if (!is_writable($dataroot))
+ throw new InstallationException(sprintf(elgg_echo('InstallationException:DatarootNotWritable'), $dataroot));
+
+
+ $site = new ElggSite();
+ $site->name = get_input('sitename');
+ $site->url = get_input('wwwroot');
+ $site->description = get_input('sitedescription');
+ $site->email = get_input('siteemail');
+ $site->access_id = ACCESS_PUBLIC;
+ $guid = $site->save();
+
+ if (!$guid)
+ throw new InstallationException(sprintf(elgg_echo('InstallationException:CantCreateSite'), get_input('sitename'), get_input('wwwroot')));
+
+ datalist_set('installed',time());
+
+ datalist_set('path', $path);
+ datalist_set('dataroot', $dataroot);
+
+ datalist_set('default_site',$site->getGUID());
+
+ set_config('view', get_input('view'), $site->getGUID());
+ set_config('language', get_input('language'), $site->getGUID());
+ set_config('default_access', get_input('default_access'), $site->getGUID());
+
+ $debug = get_input('debug');
+ if ($debug)
+ set_config('debug', 1, $site->getGUID());
+ else
+ unset_config('debug', $site->getGUID());
+
+ $usage = get_input('usage');
+ if (is_array($usage)) $usage = $usage[0];
+
+ if ($usage)
+ unset_config('ping_home', $site->getGUID());
+ else
+ set_config('ping_home', 'disabled', $site->getGUID());
+
+ $api = get_input('api');
+ if ($api)
+ unset_config('disable_api', $site->getGUID());
+ else
+ set_config('disable_api', 'disabled', $site->getGUID());
+
+ $https_login = get_input('https_login');
+ if ($https_login)
+ set_config('https_login', 1, $site->getGUID());
+ else
+ unset_config('https_login', $site->getGUID());
+
+ // activate some plugins by default
+ if (isset($CONFIG->default_plugins))
{
- if (!is_array($CONFIG->default_plugins))
+ if (!is_array($CONFIG->default_plugins))
$plugins = explode(',', $CONFIG->default_plugins);
else
$CONFIG->default_plugins = $CONFIG->default_plugins;
-
- foreach ($plugins as $plugin)
- enable_plugin(trim($plugin), $site->getGUID());
- }
- else
- {
- enable_plugin('profile', $site->getGUID());
- enable_plugin('river', $site->getGUID());
- enable_plugin('logbrowser', $site->getGUID());
- enable_plugin('diagnostics', $site->getGUID());
+
+ foreach ($plugins as $plugin)
+ enable_plugin(trim($plugin), $site->getGUID());
+ }
+ else
+ {
+ enable_plugin('profile', $site->getGUID());
+ enable_plugin('river', $site->getGUID());
+ enable_plugin('logbrowser', $site->getGUID());
+ enable_plugin('diagnostics', $site->getGUID());
enable_plugin('uservalidationbyemail', $site->getGUID());
- enable_plugin('htmlawed', $site->getGUID());
- }
-
- // Now ping home
- if ($usage)
- {
- ping_home($site);
- }
-
- system_message(elgg_echo("installation:configuration:success"));
-
- header("Location: ../../account/register.php");
- exit;
-
- }
-
- }
-
+ enable_plugin('htmlawed', $site->getGUID());
+ }
+
+ // Now ping home
+ if ($usage)
+ {
+ ping_home($site);
+ }
+
+ system_message(elgg_echo("installation:configuration:success"));
+
+ header("Location: ../../account/register.php");
+ exit;
+
+ }
+
+ }
+
?> \ No newline at end of file
diff --git a/actions/user/default_access.php b/actions/user/default_access.php
index 0f062ed19..b79200ad0 100644
--- a/actions/user/default_access.php
+++ b/actions/user/default_access.php
@@ -9,8 +9,8 @@
*/
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- global $CONFIG;
-
+ global $CONFIG;
+
if ($CONFIG->allow_user_default_access) {
gatekeeper();
@@ -25,7 +25,7 @@
$user = get_entity($user_id);
if ($user)
- {
+ {
$current_default_access = $user->getPrivateSetting('elgg_default_access');
if ($default_access != $current_default_access)
{
@@ -36,7 +36,7 @@
}
}
else
- register_error(elgg_echo('user:default_access:fail'));
+ register_error(elgg_echo('user:default_access:fail'));
}
//forward($_SERVER['HTTP_REFERER']);
diff --git a/actions/user/requestnewpassword.php b/actions/user/requestnewpassword.php
index 2dff5f34d..a54e71b7e 100644
--- a/actions/user/requestnewpassword.php
+++ b/actions/user/requestnewpassword.php
@@ -14,26 +14,26 @@
action_gatekeeper();
$username = get_input('username');
-
- $access_status = access_get_show_hidden_status();
+
+ $access_status = access_get_show_hidden_status();
access_show_hidden_entities(true);
$user = get_user_by_username($username);
if ($user)
- {
+ {
if ($user->validated) {
if (send_new_password_request($user->guid))
system_message(elgg_echo('user:password:resetreq:success'));
else
- register_error(elgg_echo('user:password:resetreq:fail'));
- } else if (!trigger_plugin_hook('unvalidated_requestnewpassword','user',array('entity'=>$user))) {
- // if plugins have not registered an action, the default action is to
- // trigger the validation event again and assume that the validation
- // event will display an appropriate message
- trigger_elgg_event('validate', 'user', $user);
+ register_error(elgg_echo('user:password:resetreq:fail'));
+ } else if (!trigger_plugin_hook('unvalidated_requestnewpassword','user',array('entity'=>$user))) {
+ // if plugins have not registered an action, the default action is to
+ // trigger the validation event again and assume that the validation
+ // event will display an appropriate message
+ trigger_elgg_event('validate', 'user', $user);
}
}
else
- register_error(sprintf(elgg_echo('user:username:notfound'), $username));
+ register_error(sprintf(elgg_echo('user:username:notfound'), $username));
access_show_hidden_entities($access_status);
forward();
diff --git a/actions/user/spotlight.php b/actions/user/spotlight.php
index b43af2f16..8f50df2c8 100644
--- a/actions/user/spotlight.php
+++ b/actions/user/spotlight.php
@@ -1,15 +1,15 @@
-<?php
-
- gatekeeper();
-
- $closed = get_input('closed','true');
- if ($closed != 'true') {
- $closed = false;
- } else {
- $closed = true;
- }
-
- $_SESSION['user']->spotlightclosed = $closed;
- exit;
-
+<?php
+
+ gatekeeper();
+
+ $closed = get_input('closed','true');
+ if ($closed != 'true') {
+ $closed = false;
+ } else {
+ $closed = true;
+ }
+
+ $_SESSION['user']->spotlightclosed = $closed;
+ exit;
+
?> \ No newline at end of file
diff --git a/actions/useradd.php b/actions/useradd.php
index cf4f03ffe..0149a9753 100644
--- a/actions/useradd.php
+++ b/actions/useradd.php
@@ -14,7 +14,7 @@
admin_gatekeeper(); // Only admins can add a user
action_gatekeeper();
- // Get variables
+ // Get variables
global $CONFIG;
$username = get_input('username');
$password = get_input('password');
@@ -40,9 +40,9 @@
$new_user->admin_created = true;
$new_user->created_by_guid = get_loggedin_userid();
-
-
- notify_user($new_user->guid, $CONFIG->site->guid, elgg_echo('useradd:subject'), sprintf(elgg_echo('useradd:body'), $name, $CONFIG->site->name, $CONFIG->site->url, $username, $password));
+
+
+ notify_user($new_user->guid, $CONFIG->site->guid, elgg_echo('useradd:subject'), sprintf(elgg_echo('useradd:body'), $name, $CONFIG->site->name, $CONFIG->site->url, $username, $password));
system_message(sprintf(elgg_echo("adduser:ok"),$CONFIG->sitename));
} else {
diff --git a/actions/usersettings/save.php b/actions/usersettings/save.php
index b720c371a..8c920def1 100644
--- a/actions/usersettings/save.php
+++ b/actions/usersettings/save.php
@@ -1,22 +1,22 @@
-<?php
- /**
- * Aggregate action for saving settings
- *
- * @package Elgg
- * @subpackage Core
+<?php
+ /**
+ * Aggregate action for saving settings
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- */
-
- require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- global $CONFIG;
-
+ * @link http://elgg.org/
+ */
+
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ global $CONFIG;
+
gatekeeper();
- action_gatekeeper();
-
- trigger_plugin_hook('usersettings:save','user');
-
- forward($_SERVER['HTTP_REFERER']);
-
-?>
+ action_gatekeeper();
+
+ trigger_plugin_hook('usersettings:save','user');
+
+ forward($_SERVER['HTTP_REFERER']);
+
+?>
diff --git a/actions/widgets/add.php b/actions/widgets/add.php
index 76aaa3b17..14653eb18 100644
--- a/actions/widgets/add.php
+++ b/actions/widgets/add.php
@@ -1,43 +1,43 @@
-<?php
-
- /**
- * Elgg widget add action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg widget add action
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+ $guid = get_input('user');
+ $handler = get_input('handler');
+ $context = get_input('context');
+ $column = get_input('column');
+
+ $result = false;
+
+ if (!empty($guid)) {
+
+ if ($user = get_entity($guid)) {
+
+ if ($user->canEdit()) {
+
+ $result = add_widget($user->getGUID(),$handler,$context,0,$column);
+
+ }
+
+ }
+
+ }
+
+ if ($result) {
+ system_message(elgg_echo('widgets:save:success'));
+ } else {
+ register_error(elgg_echo('widgets:save:failure'));
+ }
+
+ forward($_SERVER['HTTP_REFERER']);
- * @link http://elgg.org/
- */
-
- $guid = get_input('user');
- $handler = get_input('handler');
- $context = get_input('context');
- $column = get_input('column');
-
- $result = false;
-
- if (!empty($guid)) {
-
- if ($user = get_entity($guid)) {
-
- if ($user->canEdit()) {
-
- $result = add_widget($user->getGUID(),$handler,$context,0,$column);
-
- }
-
- }
-
- }
-
- if ($result) {
- system_message(elgg_echo('widgets:save:success'));
- } else {
- register_error(elgg_echo('widgets:save:failure'));
- }
-
- forward($_SERVER['HTTP_REFERER']);
-
?> \ No newline at end of file
diff --git a/actions/widgets/reorder.php b/actions/widgets/reorder.php
index 6f3142e8d..3e3a98ebb 100644
--- a/actions/widgets/reorder.php
+++ b/actions/widgets/reorder.php
@@ -1,32 +1,32 @@
-<?php
-
- /**
- * Elgg widget reorder action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg widget reorder action
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
+
+
+ $owner = get_input('owner');
+ $context = get_input('context');
+
+ $maincontent = get_input('debugField1');
+ $sidebar = get_input('debugField2');
+ $rightbar = get_input('debugField3');
+
+ $result = reorder_widgets_from_panel($maincontent, $sidebar, $rightbar, $context, $owner);
+
+ if ($result) {
+ system_message(elgg_echo('widgets:panel:save:success'));
+ } else {
+ register_error(elgg_echo('widgets:panel:save:failure'));
+ }
+
+ forward($_SERVER['HTTP_REFERER']);
- * @link http://elgg.org/
- */
-
-
- $owner = get_input('owner');
- $context = get_input('context');
-
- $maincontent = get_input('debugField1');
- $sidebar = get_input('debugField2');
- $rightbar = get_input('debugField3');
-
- $result = reorder_widgets_from_panel($maincontent, $sidebar, $rightbar, $context, $owner);
-
- if ($result) {
- system_message(elgg_echo('widgets:panel:save:success'));
- } else {
- register_error(elgg_echo('widgets:panel:save:failure'));
- }
-
- forward($_SERVER['HTTP_REFERER']);
-
?> \ No newline at end of file
diff --git a/actions/widgets/save.php b/actions/widgets/save.php
index c6e06a12f..6fdf79c11 100644
--- a/actions/widgets/save.php
+++ b/actions/widgets/save.php
@@ -1,38 +1,38 @@
-<?php
-
- /**
- * Elgg widget save action
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg widget save action
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ */
- * @link http://elgg.org/
- */
-
action_gatekeeper();
-
- $guid = get_input('guid');
- $params = $_REQUEST['params'];
- $pageurl = get_input('pageurl');
- $noforward = get_input('noforward',false);
-
- $result = false;
-
- if (!empty($guid)) {
-
- $result = save_widget_info($guid,$params);
-
- }
-
- if ($result) {
- system_message(elgg_echo('widgets:save:success'));
- } else {
- register_error(elgg_echo('widgets:save:failure'));
- }
-
- if (!$noforward)
- forward($_SERVER['HTTP_REFERER']);
-
+
+ $guid = get_input('guid');
+ $params = $_REQUEST['params'];
+ $pageurl = get_input('pageurl');
+ $noforward = get_input('noforward',false);
+
+ $result = false;
+
+ if (!empty($guid)) {
+
+ $result = save_widget_info($guid,$params);
+
+ }
+
+ if ($result) {
+ system_message(elgg_echo('widgets:save:success'));
+ } else {
+ register_error(elgg_echo('widgets:save:failure'));
+ }
+
+ if (!$noforward)
+ forward($_SERVER['HTTP_REFERER']);
+
?> \ No newline at end of file