Some fixes, auto language removal (so buggy) and replenishable status.

This commit is contained in:
Yuriy Pikhtarev 2017-06-22 01:42:06 +03:00
commit 2ac12a2e54
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
9 changed files with 35 additions and 43 deletions

View file

@ -271,12 +271,10 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
rename($file, $new_name);
}
}
if (!$fp = fopen($file, 'ab')) {
if ($dir_created = bb_mkdir(dirname($file))) {
$fp = fopen($file, 'ab');
}
if (file_exists($file) && $dir_created = bb_mkdir(dirname($file))) {
$fp = fopen($file, 'ab+');
}
if ($fp) {
if (isset($fp)) {
if ($lock) {
flock($fp, LOCK_EX);
}