Commit b8132b79 authored by Stacey Walker's avatar Stacey Walker Committed by Richard Mansfield
Browse files

Remove config option to turn off/on collections


Signed-off-by: default avatarStacey Walker <stacey@catalyst.net.nz>
parent 66c9a99a
......@@ -407,13 +407,6 @@ $siteoptionform = array(
'defaultvalue' => get_config('showtagssideblock'),
'disabled' => in_array('showtagssideblock', $OVERRIDDEN),
),
'allowcollections' => array(
'type' => 'checkbox',
'title' => get_string('allowcollections', 'admin'),
'description' => get_string('allowcollectionsdescription', 'admin'),
'defaultvalue' => get_config('allowcollections'),
'disabled' => in_array('allowcollections', $OVERRIDDEN),
),
'tagssideblockmaxtags' => array(
'type' => 'text',
'size' => 4,
......@@ -475,7 +468,6 @@ function siteoptions_submit(Pieform $form, $values) {
'proxyaddress', 'proxyauthmodel', 'proxyauthcredentials',
'homepageinfo', 'showonlineuserssideblock', 'registerterms',
'creategroups', 'createpublicgroups', 'allowgroupcategories',
'allowcollections',
);
$oldlanguage = get_config('lang');
$oldtheme = get_config('theme');
......
......@@ -36,12 +36,6 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once('collection.php');
define('TITLE', get_string('viewcollection', 'collection'));
// check that My Collections is enabled in the config
// if not as the user is trying to access this illegally
if (!get_config('allowcollections')) {
die();
}
$id = param_integer('id');
define('COLLECTION', $id);
......
......@@ -39,12 +39,6 @@ define('TITLE', get_string('deletecollection', 'collection'));
$id = param_integer('id');
// check that My Collections is enabled in the config
// if not as the user is trying to access this illegally
if (!get_config('allowcollections')) {
die();
}
$data = get_record_select('collection', 'id = ?', array($id));
$collection = new Collection($id, (array)$data);
if (!$USER->can_edit_collection($collection)) {
......
......@@ -37,12 +37,6 @@ require_once('pieforms/pieform.php');
require_once('collection.php');
define('TITLE', get_string('deleteview', 'collection'));
// check that My Collections is enabled in the config
// if not as the user is trying to access this illegally
if (!get_config('allowcollections')) {
die();
}
$vid = param_integer('view');
$new = param_integer('new',0);
$id = param_integer('id');
......
......@@ -36,12 +36,6 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require_once('collection.php');
// check that My Collections is enabled in the config
// if not as the user is trying to access this illegally
if (!get_config('allowcollections')) {
die();
}
$new = param_boolean('new', 0);
$id = param_integer('id', 0);
......
......@@ -37,12 +37,6 @@ require_once('pieforms/pieform.php');
require_once('collection.php');
define('TITLE', get_string('mycollections', 'collection'));
// check that My Collections is enabled in the config
// if not as the user is trying to access this illegally
if (!get_config('allowcollections')) {
die();
}
// offset and limit for pagination
$offset = param_integer('offset', 0);
$limit = param_integer('limit', 5);
......
......@@ -36,12 +36,6 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once('pieforms/pieform.php');
require_once('collection.php');
// check that My Collections is enabled in the config
// if not as the user is trying to access this illegally
if (!get_config('allowcollections')) {
die();
}
$new = param_integer('new',0);
$id = param_integer('id');
$newurl = $new ? '&new=1' : '';
......
......@@ -209,8 +209,6 @@ $string['viewstatstabletitle'] = 'Most Popular Views';
$string['adminsonly'] = 'Administrators only';
$string['adminsandstaffonly'] = 'Administrators and Staff only';
$string['advanced'] = 'Advanced';
$string['allowcollections'] = 'Enable My Collections';
$string['allowcollectionsdescription'] = 'If enabled, users will see a tab in the My Portfolio section of the site where they can manage collections of views for displaying as navigation.';
$string['allowpublicviews'] = 'Allow public views';
$string['allowpublicviewsdescription'] = 'If set to yes, users will be able to create portfolio Views that are accessable to the public rather than only to logged in users';
$string['allowpublicprofiles'] = 'Allow public profiles';
......
......@@ -2115,9 +2115,6 @@ function xmldb_core_upgrade($oldversion=0) {
$table->addKeyInfo('collectionfk', XMLDB_KEY_FOREIGN, array('collection'), 'collection', array('id'));
create_table($table);
// set site config to allow collections for users
set_config('allowcollections','1');
}
if ($oldversion < 2010080401) {
......
......@@ -703,7 +703,6 @@ function core_install_firstcoredata_defaults() {
set_config('showonlineuserssideblock', 1);
set_config('footerlinks', serialize(array('privacystatement', 'about', 'contactus')));
set_config('searchusernames', 1);
set_config('allowcollections', 1);
// install the applications
$app = new StdClass;
......
......@@ -1912,7 +1912,6 @@ function institutional_admin_nav() {
*/
function mahara_standard_nav() {
$exportenabled = plugins_installed('export');
$collectionenabled = get_config('allowcollections');
$menu = array(
array(
'path' => '',
......@@ -1946,7 +1945,6 @@ function mahara_standard_nav() {
'url' => 'collection/',
'title' => get_string('mycollections', 'collection'),
'weight' => 50,
'ignore' => !$collectionenabled,
),
array(
'path' => 'groups',
......
Supports Markdown
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