Elgg  Version 1.9
add.php
Go to the documentation of this file.
1 <?php
9 $collection_name = htmlspecialchars(get_input('collection_name', '', false), ENT_QUOTES, 'UTF-8');
10 $friends = get_input('friends_collection');
11 
12 if (!$collection_name) {
13  register_error(elgg_echo("friends:nocollectionname"));
15 }
16 
18 
19 if ($id) {
21  if ($result) {
22  system_message(elgg_echo("friends:collectionadded"));
23  forward("collections/owner/" . elgg_get_logged_in_user_entity()->username);
24  } else {
25  register_error(elgg_echo("friends:nocollectionname"));
27  }
28 } else {
29  register_error(elgg_echo("friends:nocollectionname"));
31 }
$collection_name
Definition: add.php:9
if(! $collection_name) $id
Definition: add.php:17
$friends
Definition: add.php:10
register_error($error)
Display an error on next page load.
Definition: elgglib.php:605
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:592
const REFERER
Definition: elgglib.php:2162
forward($location="", $reason='system')
Forward to $location.
Definition: elgglib.php:79
update_access_collection($collection_id, $members)
Updates the membership in an access collection.
Definition: access.php:648
create_access_collection($name, $owner_guid=0, $site_guid=0)
Creates a new access collection.
Definition: access.php:596
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:32