Merge branch 'MDL-25012' of git://github.com/danpoltawski/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 14 Aug 2012 22:41:04 +0000 (00:41 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 14 Aug 2012 22:41:04 +0000 (00:41 +0200)
Conflicts:
lib/db/upgrade.php
version.php

1  2 
blog/edit.php
blog/locallib.php
lang/en/admin.php
lib/db/upgrade.php
lib/filelib.php
lib/pluginlib.php
version.php

diff --cc blog/edit.php
Simple merge
Simple merge
Simple merge
@@@ -1082,17 -1082,24 +1082,36 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2012072600.01);
      }
  
 -    if ($oldversion < 2012080600.00) {
 +    if ($oldversion < 2012080200.02) {
 +        // Drop obsolete question upgrade field that should have been added to the install.xml.
 +        $table = new xmldb_table('question');
 +        $field = new xmldb_field('oldquestiontextformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0');
 +
 +        if ($dbman->field_exists($table, $field)) {
 +            $dbman->drop_field($table, $field);
 +        }
 +
 +        upgrade_main_savepoint(true, 2012080200.02);
 +    }
 +
++    if ($oldversion < 2012081400.01) {
+         // Move the ability to disable blogs to its own setting MDL-25012.
+         if (isset($CFG->bloglevel)) {
+             // Only change settings if existing setting was set.
+             if (empty($CFG->bloglevel)) {
+                 set_config('enableblogs', 0);
+                 // Now set the bloglevel to a valid setting as the disabled setting has been removed.
+                 // This prevents confusing results when users enable the blog system in future.
+                 set_config('bloglevel', BLOG_USER_LEVEL);
+             } else {
+                 set_config('enableblogs', 1);
+             }
+         }
+         // Main savepoint reached
 -        upgrade_main_savepoint(true, 2012080600.00);
++        upgrade_main_savepoint(true, 2012081400.01);
+     }
      return true;
  }
diff --cc lib/filelib.php
Simple merge
Simple merge
diff --cc version.php
@@@ -30,7 -30,7 +30,7 @@@
  defined('MOODLE_INTERNAL') || die();
  
  
- $version  = 2012081400.00;              // YYYYMMDD      = weekly release date of this DEV branch
 -$version  = 2012080600.00;              // YYYYMMDD      = weekly release date of this DEV branch
++$version  = 2012081400.01;              // YYYYMMDD      = weekly release date of this DEV branch
                                          //         RR    = release increments - 00 in DEV branches
                                          //           .XX = incremental changes