diff --git a/admin/settings/development.php b/admin/settings/development.php index 46f92bcfaf1..06aec9b0fc0 100644 --- a/admin/settings/development.php +++ b/admin/settings/development.php @@ -12,9 +12,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page $englobalsearch = new admin_setting_configcheckbox('enableglobalsearch', get_string('enableglobalsearch', 'admin'), get_string('configenableglobalsearch', 'admin'), 0); $englobalsearch->set_updatedcallback('search_updatedcallback'); $temp->add($englobalsearch); - - $temp->add(new admin_setting_configcheckbox('experimentalsplitrestore', get_string('experimentalsplitrestore', 'admin'), get_string('configexperimentalsplitrestore', 'admin'), 0)); - $temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0)); + //TODO: Re-enable cc-import once re-implemented in 2.0.x + //$temp->add(new admin_setting_configcheckbox('enableimsccimport', get_string('enable_cc_import', 'imscc'), get_string('enable_cc_import_description', 'imscc'), 0)); $temp->add(new admin_setting_configcheckbox('enablesafebrowserintegration', get_string('enablesafebrowserintegration', 'admin'), get_string('configenablesafebrowserintegration', 'admin'), 0)); $temp->add(new admin_setting_configcheckbox('enablegroupmembersonly', get_string('enablegroupmembersonly', 'admin'), get_string('configenablegroupmembersonly', 'admin'), 0)); diff --git a/lang/en/admin.php b/lang/en/admin.php index e6c81c866db..ce0f2835433 100755 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -204,7 +204,6 @@ $string['configenablewebservices'] = 'Web services enable other systems to log i $string['configenablewsdocumentation'] = 'Enable auto-generation of web services documentation. A user can access to his own documentation on his security keys page {$a}. It displays the documentation for the enabled protocols only.'; $string['configerrorlevel'] = 'Choose the amount of PHP warnings that you want to be displayed. Normal is usually the best choice.'; $string['configexcludeoldflashclients'] = 'Some versions of the Adobe Flash plugin are known to be vulnerable to attacks from malicious Flash content. You can specify a minimum supported version here, and Moodle will not show Flash files to users with lower versions. Instead they will see an alternate Flash file telling them how to upgrade. Leave this empty to disable all checks.'; -$string['configexperimentalsplitrestore'] = 'If enabled, course backup files will be checked for XML errors and split into smaller parts for use in the restore process. This will result in improvements to restore robustness and execution times, particularly for medium to large course backups.'; $string['configextendedusernamechars'] = 'Enable this setting to allow students to use any characters in their usernames (note this does not affect their actual names). The default is "false" which restricts usernames to be alphanumeric lowercase characters, underscore (_), hyphen (-), period (.) or at symbol (@).'; $string['configextramemorylimit'] = 'Some scripts like search, backup/restore or cron require more memory. Set higher values for large sites.'; $string['configextrauserselectorfields'] = 'Select which fields are searched and displayed, in addition to full names, when selecting users, for example when assigning roles or when adding users to a group. For security reasons, it is recommended that the username field is NOT selected.'; @@ -518,7 +517,6 @@ $string['exceptions'] = 'exceptions'; $string['excludeoldflashclients'] = 'Required Flash player version'; $string['experimental'] = 'Experimental'; $string['experimentalsettings'] = 'Experimental settings'; -$string['experimentalsplitrestore'] = 'Experimental split restore'; $string['extendedusernamechars'] = 'Allow extended characters in usernames'; $string['extramemorylimit'] = 'Extra PHP memory limit'; $string['extrauserselectorfields'] = 'When selecting users, search and display'; diff --git a/lib/cronlib.php b/lib/cronlib.php index 5dc3fd68486..68702e67b09 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -266,6 +266,25 @@ function cron_run() { } flush(); + // Delete old backup_controllers and logs + + if (!empty($CFG->loglifetime)) { // value in days + $loglifetime = $timenow - ($CFG->loglifetime * 3600 * 24); + // Delete child records from backup_logs + $DB->execute("DELETE FROM {backup_logs} + WHERE EXISTS ( + SELECT 'x' + FROM {backup_controllers} bc + WHERE bc.backupid = {backup_logs}.backupid + AND bc.timecreated < ?)", array($loglifetime)); + // Delete records from backup_controllers + $DB->execute("DELETE FROM {backup_controllers} + WHERE timecreated < ?", array($loglifetime)); + mtrace("Deleted old backup records"); + } + flush(); + + /// Delete old cached texts @@ -483,4 +502,4 @@ function cron_run() { $difftime = microtime_diff($starttime, microtime()); mtrace("Execution took ".$difftime." seconds"); -} \ No newline at end of file +} diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 002dcd8a870..64a70dc1f37 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -5469,6 +5469,14 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint(true, 2010111000); } + if ($oldversion < 2010111702) { + + // Clean up the old experimental split restore no loger used + unset_config('experimentalsplitrestore'); + + upgrade_main_savepoint(true, 2010111702); + } + return true; } diff --git a/version.php b/version.php index 9a28ac089b6..e7aa9deda7c 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2010111701; // YYYYMMDD = date of the last version bump +$version = 2010111702; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 RC2 (Build: 20101118)'; // Human-friendly version name