Elgg  Version 1.9
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');
12 if (!$collection_name) {
13  register_error(elgg_echo("friends:nocollectionname"));
15 }
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 }
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:419
update_access_collection($collection_id, $members)
Updates the membership in an access collection.
Definition: access.php:648
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
Definition: add.php:9
Definition: elgglib.php:2162
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:374
Definition: add.php:10
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:383
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:32
if(!$collection_name) $id
Definition: add.php:17
create_access_collection($name, $owner_guid=0, $site_guid=0)
Creates a new access collection.
Definition: access.php:596