Elgg  Version 1.11
delete.php
Go to the documentation of this file.
1 <?php
9 $id = get_input('id', false);
10 
11 if ($id !== false && elgg_is_admin_logged_in()) {
12  if (elgg_delete_river(array('id' => $id))) {
13  system_message(elgg_echo('river:delete:success'));
14  } else {
15  register_error(elgg_echo('river:delete:fail'));
16  }
17 } else {
18  register_error(elgg_echo('river:delete:fail'));
19 }
20 
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:60
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:419
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
const REFERER
Definition: elgglib.php:1995
$id
Elgg profile plugin edit default profile action removal.
Definition: delete.php:7
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:374
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:383
elgg_delete_river(array $options=array())
Delete river items.
Definition: river.php:162