Commit 5341db9b authored by Stacey Walker's avatar Stacey Walker Committed by Richard Mansfield

Added searchusernames config option for Site Configuration

Signed-off-by: default avatarStacey Walker <stacey@catalyst.net.nz>
parent 6297d675
......@@ -206,6 +206,13 @@ $siteoptionform = array(
'description' => get_string('allowgroupcategoriesdescription', 'admin'),
'defaultvalue' => get_config('allowgroupcategories'),
),
'searchusernames' => array(
'type' => 'checkbox',
'title' => get_string('searchusernames', 'admin'),
'description' => get_string('searchusernamesdescription', 'admin'),
'defaultvalue' => get_config('searchusernames'),
'disabled' => in_array('searchusernames', $OVERRIDDEN),
),
),
),
'institutionsettings' => array(
......@@ -424,7 +431,7 @@ function siteoptions_submit(Pieform $form, $values) {
'defaultaccountlifetime', 'defaultaccountinactiveexpire', 'defaultaccountinactivewarn',
'allowpublicviews', 'allowpublicprofiles',
'registration_sendweeklyupdates', 'institutionexpirynotification', 'institutionautosuspend',
'showselfsearchsideblock', 'showtagssideblock',
'showselfsearchsideblock', 'searchusernames', 'showtagssideblock',
'tagssideblockmaxtags', 'country', 'viewmicroheaders', 'userscanchooseviewthemes',
'remoteavatars', 'userscanhiderealnames', 'antispam', 'spamhaus', 'surbl', 'anonymouscomments',
'homepageinfo', 'showonlineuserssideblock', 'registerterms',
......
......@@ -243,6 +243,8 @@ $string['remoteavatars'] = 'Display remote avatars';
$string['remoteavatarsdescription'] = 'If checked, the <a href="http://www.gravatar.com">Gravatar</a> service will be used for users\' default profile icons.';
$string['searchplugin'] = 'Search plugin';
$string['searchplugindescription'] = 'Search plugin to use';
$string['searchusernames'] = 'Search Usernames';
$string['searchusernamesdescription'] = 'Allow usernames to be searched on as part of "Search Users".';
$string['sessionlifetime'] = 'Session lifetime';
$string['sessionlifetimedescription'] = 'Time in minutes after which an inactive logged in user will be automatically logged out';
$string['setsiteoptionsfailed'] = 'Failed setting the %s option';
......
......@@ -2066,5 +2066,9 @@ function xmldb_core_upgrade($oldversion=0) {
add_key($table, $key);
}
if ($oldversion < 2010071300) {
set_config('searchusernames', 1);
}
return $status;
}
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2010070801;
$config->version = 2010071300;
$config->release = '1.3.0beta3dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment