Commit 58d6e940 authored by Chris Wharton's avatar Chris Wharton Committed by Robert Lyon

admin: Add admin setting for default multiple blogs (Bug #1087227)

This patch adds an admin setting. If enabled, newly created users will
have multiple blogs by default.

Change-Id: I0beb474d007b49cfd09a6a6a1c479db0b03e68ae
parent d1a73341
......@@ -218,6 +218,13 @@ $siteoptionform = array(
'defaultvalue' => get_config('exporttoqueue'),
'disabled' => in_array('exporttoqueue', $OVERRIDDEN),
),
'defaultmultipleblogs' => array(
'type' => 'checkbox',
'title' => get_string('defaultmultipleblogs', 'admin'),
'description' => get_string('defaultmultipleblogsdescription', 'admin'),
'defaultvalue' => get_config('defaultmultipleblogs'),
'disabled' => in_array('defaultmultipleblogs', $OVERRIDDEN),
),
),
),
'searchsettings' => array(
......@@ -766,7 +773,7 @@ function siteoptions_submit(Pieform $form, $values) {
'registerterms', 'licensemetadata', 'licenseallowcustom', 'allowmobileuploads', 'creategroups', 'createpublicgroups', 'allowgroupcategories', 'wysiwyg',
'staffreports', 'staffstats', 'userscandisabledevicedetection', 'watchlistnotification_delay',
'masqueradingreasonrequired', 'masqueradingnotified', 'searchuserspublic',
'eventloglevel', 'eventlogexpiry', 'sitefilesaccess', 'exporttoqueue',
'eventloglevel', 'eventlogexpiry', 'sitefilesaccess', 'exporttoqueue', 'defaultmultipleblogs',
);
$count = 0;
$where_sql = " WHERE admin = 0 AND id != 0";
......
......@@ -444,6 +444,8 @@ $string['sitefilesaccess'] = 'Access to site files';
$string['sitefilesaccessdescription'] = 'If checked, logged-in users will have access to site files in subfolders. By default, only files in the top level directory are accessible to them.';
$string['watchlistdelaydescription'] = 'The delay in minutes between sending emails regarding watchlist changes.';
$string['watchlistdelaytitle'] = 'Watchlist notification delay';
$string['defaultmultipleblogs'] = 'Multiple Journals';
$string['defaultmultipleblogsdescription'] = 'If checked, all users will have multiple journals by default. Users can override this in their account settings page.';
// Site content
$string['about'] = 'About';
......
......@@ -204,7 +204,7 @@ function expected_account_preferences() {
'groupsideblockmaxgroups' => '',
'groupsideblocksortby' => 'alphabetical',
'hiderealname' => 0,
'multipleblogs' => 0,
'multipleblogs' => get_config('defaultmultipleblogs'),
'showhomeinfo' => 1,
'showprogressbar' => 1,
'mobileuploadtoken' => '',
......
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