From e3ea4a75e98778fb0b7333ebb6ab53d0accc10ab Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 25 May 2009 21:04:29 +0000 Subject: [PATCH] MDL-15249 fixed installation warnings --- mod/assignment/settings.php | 6 ++++-- mod/forum/settings.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mod/assignment/settings.php b/mod/assignment/settings.php index 745ef72f9f1..cdf7effac5d 100644 --- a/mod/assignment/settings.php +++ b/mod/assignment/settings.php @@ -2,8 +2,10 @@ require_once($CFG->dirroot.'/mod/assignment/lib.php'); -$settings->add(new admin_setting_configselect('assignment_maxbytes', get_string('maximumsize', 'assignment'), - get_string('configmaxbytes', 'assignment'), 1048576, get_max_upload_sizes($CFG->maxbytes))); +if (isset($CFG->maxbytes)) { + $settings->add(new admin_setting_configselect('assignment_maxbytes', get_string('maximumsize', 'assignment'), + get_string('configmaxbytes', 'assignment'), 1048576, get_max_upload_sizes($CFG->maxbytes))); +} $options = array(ASSIGNMENT_COUNT_WORDS => trim(get_string('numwords', '')), ASSIGNMENT_COUNT_LETTERS => trim(get_string('numletters', ''))); diff --git a/mod/forum/settings.php b/mod/forum/settings.php index c70a885b7d1..b554d044c72 100644 --- a/mod/forum/settings.php +++ b/mod/forum/settings.php @@ -20,8 +20,10 @@ $settings->add(new admin_setting_configtext('forum_longpost', get_string('longpo $settings->add(new admin_setting_configtext('forum_manydiscussions', get_string('manydiscussions', 'forum'), get_string('configmanydiscussions', 'forum'), 100, PARAM_INT)); -$settings->add(new admin_setting_configselect('forum_maxbytes', get_string('maxattachmentsize', 'forum'), - get_string('configmaxbytes', 'forum'), 512000, get_max_upload_sizes($CFG->maxbytes))); +if (isset($CFG->maxbytes)) { + $settings->add(new admin_setting_configselect('forum_maxbytes', get_string('maxattachmentsize', 'forum'), + get_string('configmaxbytes', 'forum'), 512000, get_max_upload_sizes($CFG->maxbytes))); +} // Default number of attachments allowed per post in all forums $settings->add(new admin_setting_configtext('forum_maxattachments', get_string('maxattachments', 'forum'),