diff options
Diffstat (limited to 'actions/admin/site/update_basic.php')
| -rw-r--r-- | actions/admin/site/update_basic.php | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php index 5914ab0b5..9765182cc 100644 --- a/actions/admin/site/update_basic.php +++ b/actions/admin/site/update_basic.php @@ -1,31 +1,27 @@ <?php /** - * Elgg update site action + * Updates the basic settings for the primary site object. * - * This is an update version of the sitesettings/install action - * which is used by the admin panel to modify basic settings. + * Basic site settings are saved as metadata on the site object, + * with the exception of the default language, which is saved in + * the config table. * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ + * @package Elgg.Core + * @subpackage Administration.Site */ -admin_gatekeeper(); - -if (datalist_get('default_site')) { - $site = get_entity(datalist_get('default_site')); +if ($site = elgg_get_site_entity()) { if (!($site instanceof ElggSite)) { throw new InstallationException(elgg_echo('InvalidParameterException:NonElggSite')); } $site->description = get_input('sitedescription'); - $site->name = get_input('sitename'); + $site->name = strip_tags(get_input('sitename')); $site->email = get_input('siteemail'); $site->save(); set_config('language', get_input('language'), $site->getGUID()); +} - forward($_SERVER['HTTP_REFERER']); - exit; -}
\ No newline at end of file +system_message(elgg_echo('admin:configuration:success')); +forward(REFERER);
\ No newline at end of file |
