Skip to content

Commit

Permalink
MDL-31170 fix automatic blog blocks hiding/unhiding after blog level …
Browse files Browse the repository at this point in the history
…change
  • Loading branch information
skodak committed Jan 15, 2012
1 parent f70f6e9 commit fde76de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/adminlib.php
Expand Up @@ -3051,7 +3051,7 @@ class admin_setting_bloglevel extends admin_setting_configselect {
*/ */
public function write_setting($data) { public function write_setting($data) {
global $DB, $CFG; global $DB, $CFG;
if ($data['bloglevel'] == 0) { if ($data == 0) {
$blogblocks = $DB->get_records_select('block', "name LIKE 'blog_%' AND visible = 1"); $blogblocks = $DB->get_records_select('block', "name LIKE 'blog_%' AND visible = 1");
foreach ($blogblocks as $block) { foreach ($blogblocks as $block) {
$DB->set_field('block', 'visible', 0, array('id' => $block->id)); $DB->set_field('block', 'visible', 0, array('id' => $block->id));
Expand Down

0 comments on commit fde76de

Please sign in to comment.