Elgg  Version 1.9
update_basic.php
Go to the documentation of this file.
1 <?php
13 if ($site = elgg_get_site_entity()) {
14  if (!($site instanceof ElggSite)) {
15  throw new InstallationException("Passing a non-ElggSite to an ElggSite constructor!");
16  }
17 
18  $site->description = get_input('sitedescription');
19  $site->name = strip_tags(get_input('sitename'));
20  $site->email = get_input('siteemail');
21  $site->save();
22 
23  set_config('language', get_input('language'), $site->getGUID());
24 }
25 
26 system_message(elgg_echo('admin:configuration:success'));
A Site entity.
Definition: ElggSite.php:28
set_config($name, $value, $site_guid=0)
Add or update a config setting.
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:592
const REFERER
Definition: elgglib.php:2162
forward($location="", $reason='system')
Forward to $location.
Definition: elgglib.php:79
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg_get_site_entity($site_guid=0)
Get an ElggSite entity (default is current site)
Definition: sites.php:18