40 $referrer_url = !empty($_SERVER[
'HTTP_REFERER']) ? $_SERVER[
'HTTP_REFERER'] :
'';
42 if ($referrer_url && 0 == strpos($referrer_url,
$site_url)) {
43 $referrer_path = substr($referrer_url, strlen(
$site_url));
44 $segments = explode(
'/', $referrer_path);
45 if (in_array(
$guid, $segments)) {
55 "entity:delete:$type:$subtype:success",
56 "entity:delete:$type:success",
57 "entity:delete:success",
elgg_language_key_exists($key, $language= 'en')
Check if a given language key exists.
if(!$entity->delete()) $forward_url
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_normalize_site_url($unsafe_url)
From untrusted input, get a site URL safe for forwarding.
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
if(!$forward_url) $success_keys
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg system_message
Wrapper function for system_messages.
elgg register_error
Wrapper function for system_messages.
get_entity($guid)
Loads and returns an entity object from a guid.