Skip to content

Commit

Permalink
Merge branch 'MDL-25012' of git://github.com/danpoltawski/moodle
Browse files Browse the repository at this point in the history
Conflicts:
	lib/db/upgrade.php
	version.php
  • Loading branch information
stronk7 committed Aug 14, 2012
2 parents 267c898 + 6a2a055 commit 76b9763
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 340 deletions.
33 changes: 17 additions & 16 deletions admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,23 @@
$ADMIN->add('appearance', $temp);

// blog
$temp = new admin_settingpage('blog', new lang_string('blog','blog'));
$temp->add(new admin_setting_configcheckbox('useblogassociations', new lang_string('useblogassociations', 'blog'), new lang_string('configuseblogassociations','blog'), 1));
$temp->add(new admin_setting_bloglevel('bloglevel', new lang_string('bloglevel', 'admin'), new lang_string('configbloglevel', 'admin'), 4, array(BLOG_GLOBAL_LEVEL => new lang_string('worldblogs','blog'),
BLOG_SITE_LEVEL => new lang_string('siteblogs','blog'),
BLOG_USER_LEVEL => new lang_string('personalblogs','blog'),
0 => new lang_string('disableblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('useexternalblogs', new lang_string('useexternalblogs', 'blog'), new lang_string('configuseexternalblogs','blog'), 1));
$temp->add(new admin_setting_configselect('externalblogcrontime', new lang_string('externalblogcrontime', 'blog'), new lang_string('configexternalblogcrontime', 'blog'), 86400,
array(43200 => new lang_string('numhours', '', 12),
86400 => new lang_string('numhours', '', 24),
172800 => new lang_string('numdays', '', 2),
604800 => new lang_string('numdays', '', 7))));
$temp->add(new admin_setting_configtext('maxexternalblogsperuser', new lang_string('maxexternalblogsperuser','blog'), new lang_string('configmaxexternalblogsperuser', 'blog'), 1));
$temp->add(new admin_setting_configcheckbox('blogusecomments', new lang_string('enablecomments', 'admin'), new lang_string('configenablecomments', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('blogshowcommentscount', new lang_string('showcommentscount', 'admin'), new lang_string('configshowcommentscount', 'admin'), 1));
$ADMIN->add('appearance', $temp);
if (!empty($CFG->enableblogs)) {
$temp = new admin_settingpage('blog', new lang_string('blog','blog'));
$temp->add(new admin_setting_configcheckbox('useblogassociations', new lang_string('useblogassociations', 'blog'), new lang_string('configuseblogassociations','blog'), 1));
$temp->add(new admin_setting_bloglevel('bloglevel', new lang_string('bloglevel', 'admin'), new lang_string('configbloglevel', 'admin'), 4, array(BLOG_GLOBAL_LEVEL => new lang_string('worldblogs','blog'),
BLOG_SITE_LEVEL => new lang_string('siteblogs','blog'),
BLOG_USER_LEVEL => new lang_string('personalblogs','blog'))));
$temp->add(new admin_setting_configcheckbox('useexternalblogs', new lang_string('useexternalblogs', 'blog'), new lang_string('configuseexternalblogs','blog'), 1));
$temp->add(new admin_setting_configselect('externalblogcrontime', new lang_string('externalblogcrontime', 'blog'), new lang_string('configexternalblogcrontime', 'blog'), 86400,
array(43200 => new lang_string('numhours', '', 12),
86400 => new lang_string('numhours', '', 24),
172800 => new lang_string('numdays', '', 2),
604800 => new lang_string('numdays', '', 7))));
$temp->add(new admin_setting_configtext('maxexternalblogsperuser', new lang_string('maxexternalblogsperuser','blog'), new lang_string('configmaxexternalblogsperuser', 'blog'), 1));
$temp->add(new admin_setting_configcheckbox('blogusecomments', new lang_string('enablecomments', 'admin'), new lang_string('configenablecomments', 'admin'), 1));
$temp->add(new admin_setting_configcheckbox('blogshowcommentscount', new lang_string('showcommentscount', 'admin'), new lang_string('configshowcommentscount', 'admin'), 1));
$ADMIN->add('appearance', $temp);
}

// Navigation settings
$temp = new admin_settingpage('navigation', new lang_string('navigation'));
Expand Down
6 changes: 1 addition & 5 deletions admin/settings/subsystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@

$optionalsubsystems->add(new admin_setting_configcheckbox('enablerssfeeds', new lang_string('enablerssfeeds', 'admin'), new lang_string('configenablerssfeeds', 'admin'), 0));

$optionalsubsystems->add(new admin_setting_bloglevel('bloglevel', new lang_string('bloglevel', 'admin'),
new lang_string('configbloglevel', 'admin'), 4, array(5 => new lang_string('worldblogs','blog'),
4 => new lang_string('siteblogs','blog'),
1 => new lang_string('personalblogs','blog'),
0 => new lang_string('disableblogs','blog'))));
$optionalsubsystems->add(new admin_setting_configcheckbox('enableblogs', new lang_string('enableblogs', 'admin'), new lang_string('configenableblogs', 'admin'), 1));

$options = array('off'=>new lang_string('off', 'mnet'), 'strict'=>new lang_string('on', 'mnet'));
$optionalsubsystems->add(new admin_setting_configselect('mnet_dispatcher_mode', new lang_string('net', 'mnet'), new lang_string('configmnet', 'mnet'), 'off', $options));
Expand Down
33 changes: 0 additions & 33 deletions admin/tool/bloglevelupgrade/db/install.php

This file was deleted.

174 changes: 0 additions & 174 deletions admin/tool/bloglevelupgrade/index.php

This file was deleted.

33 changes: 0 additions & 33 deletions admin/tool/bloglevelupgrade/lang/en/tool_bloglevelupgrade.php

This file was deleted.

30 changes: 0 additions & 30 deletions admin/tool/bloglevelupgrade/settings.php

This file was deleted.

30 changes: 0 additions & 30 deletions admin/tool/bloglevelupgrade/version.php

This file was deleted.

2 changes: 1 addition & 1 deletion blocks/blog_menu/block_blog_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function get_content() {
return $this->content;
}

if (empty($CFG->bloglevel)) {
if (empty($CFG->enableblogs)) {
$this->content = new stdClass();
$this->content->text = '';
if ($this->page->user_is_editing()) {
Expand Down
2 changes: 1 addition & 1 deletion blocks/blog_recent/block_blog_recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function get_content() {
}

// verify blog is enabled
if (empty($CFG->bloglevel)) {
if (empty($CFG->enableblogs)) {
$this->content = new stdClass();
$this->content->text = '';
if ($this->page->user_is_editing()) {
Expand Down
2 changes: 1 addition & 1 deletion blog/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
$id = required_param('entryid', PARAM_INT);
}

if (empty($CFG->bloglevel)) {
if (empty($CFG->enableblogs)) {
print_error('blogdisable', 'blog');
}

Expand Down
2 changes: 1 addition & 1 deletion blog/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
$PAGE->set_url('/blog/index.php', $url_params);

if (empty($CFG->bloglevel)) {
if (empty($CFG->enableblogs)) {
print_error('blogdisable', 'blog');
}

Expand Down
Loading

0 comments on commit 76b9763

Please sign in to comment.