Merge branch 'MDL-35622-master' of git://github.com/FMCorz/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 18 Feb 2013 03:31:07 +0000 (11:31 +0800)
committerDan Poltawski <dan@moodle.com>
Mon, 18 Feb 2013 03:31:07 +0000 (11:31 +0800)
Conflicts:
lib/db/upgrade.php
version.php

1  2 
lib/db/upgrade.php
lib/filelib.php
version.php

@@@ -1565,27 -1565,22 +1565,42 @@@ function xmldb_main_upgrade($oldversion
      }
  
      if ($oldversion < 2013021100.01) {
 -
 -        // Main savepoint reached.
 -        upgrade_main_savepoint(true, 2013021100.01);
 +
 +        // Changing precision of field password on table user to (255).
 +        $table = new xmldb_table('user');
 +        $field = new xmldb_field('password', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'username');
 +
 +        // Launch change of precision for field password.
 +        $dbman->change_field_precision($table, $field);
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2013021100.01);
 +    }
 +
 +    if ($oldversion < 2013021800.00) {
 +        // Add the site identifier to the cache config's file.
 +        $siteidentifier = $DB->get_field('config', 'value', array('name' => 'siteidentifier'));
 +        cache_helper::update_site_identifier($siteidentifier);
 +
 +        // Main savepoint reached.
 +        upgrade_main_savepoint(true, 2013021800.00);
 +    }
 +
++    if ($oldversion < 2013021801.00) {
+         // Fixing possible wrong MIME types for SMART Notebook files.
+         $extensions = array('%.gallery', '%.galleryitem', '%.gallerycollection', '%.nbk', '%.notebook', '%.xbk');
+         $select = $DB->sql_like('filename', '?', false);
+         foreach ($extensions as $extension) {
+             $DB->set_field_select(
+                 'files',
+                 'mimetype',
+                 'application/x-smarttech-notebook',
+                 $select,
+                 array($extension)
+             );
+         }
++        upgrade_main_savepoint(true, 2013021801.00);                                                                                                                                                                                                                          =
+     }
  
      return true;
  }
diff --cc lib/filelib.php
Simple merge
diff --cc version.php
@@@ -30,7 -30,7 +30,7 @@@
  defined('MOODLE_INTERNAL') || die();
  
  
- $version  = 2013021800.00;              // YYYYMMDD      = weekly release date of this DEV branch
 -$version  = 2013021100.01;              // YYYYMMDD      = weekly release date of this DEV branch
++$version  = 2013021801.00;              // YYYYMMDD      = weekly release date of this DEV branch
                                          //         RR    = release increments - 00 in DEV branches
                                          //           .XX = incremental changes