Skip to content

Commit ced720c

Browse files
authored
Update update.php
1 parent 7297e92 commit ced720c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

update.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<?php
22
$addon = rex_addon::get('zip_install');
33

4+
// Check if the installed version is less than 1.5
45
if (rex_version::compare($addon->getVersion(), '1.5', '<')) {
56
$tmpPath = rex_path::addon('zip_install', 'tmp');
67

78
if (is_dir($tmpPath)) {
89
// Try to delete the directory
910
if (!rex_dir::delete($tmpPath)) {
1011
// If deletion fails, log a warning
11-
rex_logger::logWarning('The temporary directory ' . $tmpPath . ' could not be deleted.');
12+
rex_logger::log('The temporary directory ' . $tmpPath . ' could not be deleted.', null, rex_logger::WARNING);
1213
} else {
13-
rex_logger::logInfo('The temporary directory ' . $tmpPath . ' has been successfully deleted.');
14+
// Log successful deletion as a notice
15+
rex_logger::log('The temporary directory ' . $tmpPath . ' has been successfully deleted.', null, rex_logger::NOTICE);
1416
}
1517
}
1618
}

0 commit comments

Comments
 (0)