Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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 
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition: sessions.php:60
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
register_error($error)
Display an error on next page load.
Definition: elgglib.php:452
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
const REFERER
Definition: elgglib.php:2029
$id
Elgg profile plugin edit default profile action removal.
Definition: delete.php:7
forward($location="", $reason= 'system')
Forward to $location.
Definition: elgglib.php:93
elgg_delete_river(array $options=array())
Delete river items.
Definition: river.php:162
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:438