Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
update_basic.php
Go to the documentation of this file.
1 <?php
14 if (!$site) {
15  throw new InstallationException("The system is missing an ElggSite entity!");
16 }
17 if (!($site instanceof ElggSite)) {
18  throw new InstallationException("Passing a non-ElggSite to an ElggSite constructor!");
19 }
20 
21 $site->description = get_input('sitedescription');
22 $site->name = strip_tags(get_input('sitename'));
23 $site->email = get_input('siteemail');
24 $site->save();
25 
26 set_config('language', get_input('language'), $site->guid);
27 
28 $default_limit = (int)get_input('default_limit');
29 if ($default_limit < 1) {
30  register_error(elgg_echo('admin:configuration:default_limit'));
32 }
33 
34 set_config('default_limit', $default_limit, $site->guid);
35 
36 system_message(elgg_echo('admin:configuration:success'));
elgg_get_site_entity($site_guid=0)
Get an entity (default is current site)
Definition: sites.php:18
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
$default_limit
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
$site
forward($location="", $reason= 'system')
Forward to $location.
Definition: elgglib.php:93
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:438
set_config($name, $value, $site_guid=0)
Add or update a config setting.