From: moodler Date: Wed, 1 Aug 2007 08:05:55 +0000 (+0000) Subject: Added new settings supportname and supportemail MDL-10529 Admin is no longer to... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=9610a4fae383f5fa0b08749065ae98f7939138ef;p=moodle.git Added new settings supportname and supportemail MDL-10529 Admin is no longer to be used as main contact --- diff --git a/admin/settings/server.php b/admin/settings/server.php index 90b4ae7239..3189ba1000 100644 --- a/admin/settings/server.php +++ b/admin/settings/server.php @@ -54,6 +54,8 @@ $options['0'] = get_string('none'); $options = array_merge($options, $charsets); $temp->add(new admin_setting_configselect('sitemailcharset', get_string('sitemailcharset', 'admin'), get_string('configsitemailcharset','admin'), '', $options)); $temp->add(new admin_setting_configcheckbox('allowusermailcharset', get_string('allowusermailcharset', 'admin'), get_string('configallowusermailcharset', 'admin'), 0)); +$temp->add(new admin_setting_configtext('supportname', get_string('supportname', 'admin'), get_string('configsupportname', 'admin'), '', PARAM_NOTAGS)); +$temp->add(new admin_setting_configtext('supportemail', get_string('supportemail', 'admin'), get_string('configsupportemail', 'admin'), '', PARAM_NOTAGS)); $ADMIN->add('server', $temp, 100); diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index ad696fb93b..cebffb0748 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1566,6 +1566,13 @@ function xmldb_main_upgrade($oldversion=0) { $result = $result && add_key($table, $key); } + if ($result && $oldversion < 2007080101) { + if ($firstadmin = get_admin()) { // the person currently used for support emails + set_config('supportname', s(fullname($firstadmin))); // New settings same as old + set_config('supportemail', s($firstadmin->email)); + } + } + /* /// drop old gradebook tables if ($result && $oldversion < 2007072209) { diff --git a/version.php b/version.php index 4639b699d6..af7355132d 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2007080100; // YYYYMMDD = date + $version = 2007080101; // YYYYMMDD = date // XY = increments within a single day $release = '1.9 dev'; // Human-friendly version name