mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Short list syntax can be used
Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
parent
4bb72dfe59
commit
742575bb56
7 changed files with 10 additions and 10 deletions
|
@ -248,7 +248,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
|
|||
$old_name = $file;
|
||||
$ext = '';
|
||||
if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) {
|
||||
list($old_name, $ext) = $matches;
|
||||
[$old_name, $ext] = $matches;
|
||||
}
|
||||
$new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext;
|
||||
clearstatcache();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue