Elgg  Version 3.0
Namespaces | Variables
save.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Updates the advanced settings for the primary site object.
 

Variables

 $entity_guid = (int) get_input('entity_guid', 0, false)
 
 $comment_guid = (int) get_input('comment_guid', 0, false)
 
 $comment_text = get_input('generic_comment')
 
if(empty($comment_text)) if($comment_guid) else
 
if(!$entity) $user = elgg_get_logged_in_user_entity()
 
 $comment = new ElggComment()
 
$comment description = $comment_text
 
$comment owner_guid = $user->getGUID()
 
$comment container_guid = $entity->getGUID()
 
$comment access_id = $entity->access_id
 
 $guid = $comment->save()
 
 $success_message = elgg_echo('generic_comment:posted')
 
 $forward = $comment->getURL()
 
if(!empty($_SERVER['HTTP_REFERER'])) $result
 

Variable Documentation

$comment = new ElggComment()

Definition at line 43 of file save.php.

$comment_guid = (int) get_input('comment_guid', 0, false)

Definition at line 10 of file save.php.

$comment_text = get_input('generic_comment')

Definition at line 11 of file save.php.

$entity_guid = (int) get_input('entity_guid', 0, false)

Definition at line 9 of file save.php.

$forward = $comment->getURL()

Definition at line 65 of file save.php.

$guid = $comment->save()

Definition at line 48 of file save.php.

if (!empty($_SERVER['HTTP_REFERER'])) $result
Initial value:
= [
'guid' => $comment->guid
$comment
Definition: save.php:43

Definition at line 77 of file save.php.

$success_message = elgg_echo('generic_comment:posted')

Definition at line 62 of file save.php.

if (!$entity) $user = elgg_get_logged_in_user_entity()

Definition at line 41 of file save.php.

$comment access_id = $entity->access_id

Definition at line 47 of file save.php.

number container_guid = $entity->getGUID()

Definition at line 46 of file save.php.

$comment description = $comment_text

Definition at line 44 of file save.php.

if (empty($comment_text)) if ($comment_guid) else
Initial value:
{
$entity_guid
Definition: save.php:9
$entity
Definition: save.php:18
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:87

Definition at line 34 of file save.php.

number owner_guid = $user->getGUID()

Definition at line 45 of file save.php.