From: tjhunt Date: Wed, 15 Jul 2009 08:24:12 +0000 (+0000) Subject: blocks editing ui: MDL-19398 block.multiple column no longer exists, so remove admin... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=95eecbd8931a6ed39caaba49f83685ebde96712a;p=moodle.git blocks editing ui: MDL-19398 block.multiple column no longer exists, so remove admin for it. --- diff --git a/admin/blocks.php b/admin/blocks.php index 35bf7fcd1b..7bb19c24a0 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -12,7 +12,6 @@ $hide = optional_param('hide', 0, PARAM_INT); $show = optional_param('show', 0, PARAM_INT); $delete = optional_param('delete', 0, PARAM_INT); - $multiple = optional_param('multiple', 0, PARAM_INT); /// Print headings @@ -24,7 +23,6 @@ $strsettings = get_string('settings'); $strcourses = get_string('blockinstances', 'admin'); $strname = get_string('name'); - $strmultiple = get_string('blockmultiple', 'admin'); $strshowblockcourse = get_string('showblockcourse'); /// If data submitted, then process and store. @@ -45,15 +43,6 @@ admin_get_root(true, false); // settings not required - only pages } - if (!empty($multiple) && confirm_sesskey()) { - if (!$block = blocks_get_record($multiple)) { - print_error('blockdoesnotexist', 'error'); - } - $block->multiple = !$block->multiple; - $DB->update_record('block', $block); - admin_get_root(true, false); // settings not required - only pages - } - if (!empty($delete) && confirm_sesskey()) { admin_externalpage_print_header(); print_heading($strmanageblocks); @@ -141,8 +130,8 @@ $table = new flexible_table('admin-blocks-compatible'); - $table->define_columns(array('name', 'instances', 'version', 'hideshow', 'multiple', 'delete', 'settings')); - $table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strmultiple, $strdelete, $strsettings)); + $table->define_columns(array('name', 'instances', 'version', 'hideshow', 'delete', 'settings')); + $table->define_headers(array($strname, $strcourses, $strversion, $strhide.'/'.$strshow, $strdelete, $strsettings)); $table->define_baseurl($CFG->wwwroot.'/'.$CFG->admin.'/blocks.php'); $table->set_attribute('id', 'blocks'); $table->set_attribute('class', 'generaltable generalbox boxaligncenter boxwidthwide'); @@ -187,24 +176,12 @@ ''.$strshow.''; $class = ' class="dimmed_text"'; // Leading space required! } - if ($blockobject->instance_allow_multiple()) { - if($blocks[$blockid]->multiple) { - $multiple = ''.get_string('yes').' ('.get_string('change', 'admin').')'; - } - else { - $multiple = ''.get_string('no').' ('.get_string('change', 'admin').')'; - } - } - else { - $multiple = ''; - } $table->add_data(array( ''.$blockobject->get_title().'', $blocklist, ''.$blockobject->get_version().'', $visible, - $multiple, $delete, $settings ));