Merge branch 'MDL-22236-master' of git://github.com/damyon/moodle
authorSam Hemelryk <sam@moodle.com>
Mon, 12 Aug 2013 00:11:07 +0000 (12:11 +1200)
committerSam Hemelryk <sam@moodle.com>
Mon, 12 Aug 2013 00:11:07 +0000 (12:11 +1200)
Conflicts:
version.php

1  2 
files/externallib.php
lib/db/upgrade.php
version.php

@@@ -287,13 -300,8 +300,8 @@@ class core_files_external extends exter
          // Get and validate context.
          $context = self::get_context_from_params($fileinfo);
          self::validate_context($context);
-         if (!($fileinfo['component'] == 'user' and $fileinfo['filearea'] == 'private')) {
-             throw new coding_exception('File can be uploaded to user private area only');
-         } else {
-             // TODO MDL-31116 hard-coded to use user_private area.
-             $component = 'user';
-             $filearea = 'private';
+         if (($fileinfo['component'] == 'user' and $fileinfo['filearea'] == 'private')) {
 -            debugging('Uploading directly to user private files area is deprecated. Upload to a draft area and then move the files with core_user::add_files_to_private_files');
++            debugging('Uploading directly to user private files area is deprecated. Upload to a draft area and then move the files with core_user::add_user_private_files');
          }
  
          $browser = get_file_browser();
@@@ -2313,5 -2313,19 +2313,19 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2013072600.01);
      }
  
 -    if ($oldversion < 2013080700.01) {
++    if ($oldversion < 2013081200.00) {
+         // Define field uploadfiles to be added to external_services.
+         $table = new xmldb_table('external_services');
+         $field = new xmldb_field('uploadfiles', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0', 'downloadfiles');
+         // Conditionally launch add field uploadfiles.
+         if (!$dbman->field_exists($table, $field)) {
+             $dbman->add_field($table, $field);
+         }
+         // Main savepoint reached.
 -        upgrade_main_savepoint(true, 2013080700.01);
++        upgrade_main_savepoint(true, 2013081200.00);
+     }
      return true;
  }
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2013080801.00;              // YYYYMMDD      = weekly release date of this DEV branch
 -$version  = 2013080700.01;              // YYYYMMDD      = weekly release date of this DEV branch
++$version  = 2013081200.00;              // YYYYMMDD      = weekly release date of this DEV branch
                                          //         RR    = release increments - 00 in DEV branches
                                          //           .XX = incremental changes