Permalink
Browse files

MDL-33812 Backup: Added some upgrade information about the changes

  • Loading branch information...
1 parent 2fd679c commit 640f8eed6d26f89b4a9f3562fae092193cedcfe7 @FMCorz FMCorz committed Aug 29, 2012
Showing with 22 additions and 5 deletions.
  1. +17 −0 backup/upgrade.txt
  2. +5 −5 backup/util/dbops/backup_plan_dbops.class.php
View
@@ -0,0 +1,17 @@
+This files describes API changes in /backup/*,
+information provided here is intended especially for developers.
+
+=== 2.4 ===
+
+* Since 2.3.1+ the backup file name schema has changed. The ID of the course will always be part of
+ the filename regardless of the setting 'backup_shortname'. See MDL-33812.
+
+=== 2.3 ===
+
+* Since 2.3.1+ the backup file name schema has changed. The ID of the course will always be part of
+ the filename regardless of the setting 'backup_shortname'. See MDL-33812.
+
+=== 2.2 ===
+
+* Since 2.2.4+ the backup file name schema has changed. The ID of the course will always be part of
+ the filename regardless of the setting 'backup_shortname'. See MDL-33812.
@@ -197,19 +197,19 @@ public static function get_mnet_localhost_wwwroot() {
* @param int $courseid/$sectionid/$cmid
* @param bool $users Should be true is users were included in the backup
* @param bool $anonymised Should be true is user information was anonymized.
- * @param bool $withoutname if false, include the name in the file name (default)
+ * @param bool $useidonly only use the ID in the file name
* @return string The filename to use
*/
- public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $withoutname = false) {
+ public static function get_default_backup_filename($format, $type, $id, $users, $anonymised, $useidonly = false) {
global $DB;
// Calculate backup word
$backupword = str_replace(' ', '_', textlib::strtolower(get_string('backupfilename')));
$backupword = trim(clean_filename($backupword), '_');
- // Not $withoutname, lets fetch the name
+ // Not $useidonly, lets fetch the name
$shortname = '';
- if (!$withoutname) {
+ if (!$useidonly) {
// Calculate proper name element (based on type)
switch ($type) {
case backup::TYPE_1COURSE:
@@ -233,7 +233,7 @@ public static function get_default_backup_filename($format, $type, $id, $users,
// The name will always contain the ID, but we append the course short name if requested.
$name = $id;
- if (!$withoutname && $shortname != '') {
+ if (!$useidonly && $shortname != '') {
$name .= '-' . $shortname;
}

0 comments on commit 640f8ee

Please sign in to comment.