Skip to content

Commit

Permalink
fix: logfile move handling fix for upgrade.php
Browse files Browse the repository at this point in the history
  • Loading branch information
keevan committed Dec 22, 2023
1 parent 1deaeb2 commit 738a451
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function xmldb_tool_dataflows_upgrade($oldversion) {

// Move log files that exist across to new format. Breaking change if any
// dataflows implement logic based on these files based on filename format.
if ($oldversion < 2023110901) {
if ($oldversion < 2023122201) {
$path = '*.log';
$pattern = '/(\d+)-(\d{4})-(\d{2})-(\d{2})/m';
$replace = '$2$3$4_$1';
Expand All @@ -301,7 +301,7 @@ function xmldb_tool_dataflows_upgrade($oldversion) {
xmldb_tool_dataflows_logfile_rename_helper($path, $pattern, $replace, true);

// Dataflows savepoint reached.
upgrade_plugin_savepoint(true, 2023110901, 'tool', 'dataflows');
upgrade_plugin_savepoint(true, 2023122201, 'tool', 'dataflows');
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2023122200;
$plugin->release = 2023122200;
$plugin->version = 2023122201;
$plugin->release = 2023122201;
$plugin->requires = 2022112800; // Our lowest supported Moodle (3.3.0).
// TODO $plugin->incompatible = ; // Available as of Moodle 3.9.0 or later.
$plugin->component = 'tool_dataflows';
Expand Down

0 comments on commit 738a451

Please sign in to comment.