MDL-31170 fix automatic blog blocks hiding/unhiding after blog level change

This commit is contained in:
Petr Skoda
2012-01-17 01:24:54 +01:00
committed by Eloy Lafuente (stronk7)
parent d471e3f59d
commit 42add67bec
+1 -1
View File
@@ -3027,7 +3027,7 @@ class admin_setting_bloglevel extends admin_setting_configselect {
*/
public function write_setting($data) {
global $DB, $CFG;
if ($data['bloglevel'] == 0) {
if ($data == 0) {
$blogblocks = $DB->get_records_select('block', "name LIKE 'blog_%' AND visible = 1");
foreach ($blogblocks as $block) {
$DB->set_field('block', 'visible', 0, array('id' => $block->id));