Index: branches/5.2.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r16241 -r16247 --- branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16241) +++ branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 16247) @@ -1,6 +1,6 @@ deleteTempFiles($tmp_path); - if ( file_exists($tmp_path . 'resized/') ) { - $this->deleteTempFiles($tmp_path . 'resized/'); + $thumbs_path = preg_replace('/^' . preg_quote(FULL_PATH, '/') . '/', '', $tmp_path, 1); + $thumbs_path = FULL_PATH . THUMBS_PATH . $thumbs_path; + + if ( file_exists($thumbs_path) ) { + $this->deleteTempFiles($thumbs_path); } } @@ -3215,12 +3218,12 @@ $files = glob($path . '*.*'); $max_file_date = strtotime('-1 day'); - foreach ($files as $file) { - if (filemtime($file) < $max_file_date) { + foreach ( $files as $file ) { + if ( filemtime($file) < $max_file_date ) { unlink($file); } } - } + } /** * Checks, that flash uploader is allowed to perform upload