mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update attach_maintenance.php
This commit is contained in:
parent
9f5b871f8a
commit
0b845aa05e
@ -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,15 +27,12 @@ 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;
|
$thumb_dir = "$attach_dir/" . THUMB_DIR;
|
||||||
if (!is_dir($thumb_dir))
|
if (!is_dir($thumb_dir))
|
||||||
{
|
{
|
||||||
@mkdir($thumb_dir, 0755);
|
@mkdir($thumb_dir, 0755);
|
||||||
@chmod($thumb_dir, 0777);
|
@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
|
||||||
if ($dir = @opendir($attach_dir))
|
if ($dir = @opendir($attach_dir))
|
||||||
|
Loading…
Reference in New Issue
Block a user