Update attach_maintenance.php

This commit is contained in:
Roman Kelesidis 2023-09-19 18:08:16 +07:00
parent 9f5b871f8a
commit 0b845aa05e

View File

@ -2,8 +2,6 @@
if (!defined('BB_ROOT')) die(basename(__FILE__)); if (!defined('BB_ROOT')) die(basename(__FILE__));
global $attach_config;
DB()->expect_slow_query(600); DB()->expect_slow_query(600);
$fix_errors = true; $fix_errors = true;
@ -29,14 +27,11 @@ DB()->add_shutdown_query("DROP TEMPORARY TABLE IF EXISTS $tmp_attach_tbl");
$attach_dir = get_attachments_dir(); $attach_dir = get_attachments_dir();
// Creates thumb directory if not exists // Creates thumb directory if not exists
if (intval($attach_config['img_create_thumbnail'])) $thumb_dir = "$attach_dir/" . THUMB_DIR;
if (!is_dir($thumb_dir))
{ {
$thumb_dir = "$attach_dir/" . THUMB_DIR; @mkdir($thumb_dir, 0755);
if (!is_dir($thumb_dir)) @chmod($thumb_dir, 0777);
{
@mkdir($thumb_dir, 0755);
@chmod($thumb_dir, 0777);
}
} }
// Get all names of existed attachments and insert them into $tmp_attach_tbl // Get all names of existed attachments and insert them into $tmp_attach_tbl