MDL-24777 upgrade the emoticons settings into the new format, using the default values
authorDavid Mudrak <david.mudrak@gmail.com>
Sat, 23 Oct 2010 18:44:04 +0000 (18:44 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Sat, 23 Oct 2010 18:44:04 +0000 (18:44 +0000)
lib/db/upgrade.php
version.php

index 9d3657c..5a175e9 100644 (file)
@@ -5310,6 +5310,13 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
         upgrade_main_savepoint(true, 2010101900);
     }
 
+    // new format of the emoticons setting
+    if ($oldversion < 2010102300) {
+        $DB->delete_records('config', array('name' => 'emoticons'));
+        $DB->delete_records('cache_text'); // changed md5 hash calculation
+        upgrade_main_savepoint(true, 2010102300);
+    }
+
     return true;
 }
 
index 158a1b5..72f2e1b 100644 (file)
@@ -29,7 +29,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$version = 2010101901;  // YYYYMMDD   = date of the last version bump
+$version = 2010102300;  // YYYYMMDD   = date of the last version bump
                         //         XX = daily increments
 
 $release = '2.0 RC1 (Build: 20101023)';  // Human-friendly version name