Elgg  Version 2.3
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
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
$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:2123
$site
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:390
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
set_config($name, $value, $site_guid=0)
Add or update a config setting.