diff --git a/Rocksolid_Light/common/version.txt b/Rocksolid_Light/common/version.txt index 8225a4b..583b27a 100644 --- a/Rocksolid_Light/common/version.txt +++ b/Rocksolid_Light/common/version.txt @@ -1 +1 @@ -0.9.11 +0.9.12 diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 0129f84..5860be7 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -1748,6 +1748,15 @@ function mail_db_open($database, $table = 'messages') function threads_db_open($database, $table = "threads") { + global $spooldir, $logdir, $config_name; + $logfile = $logdir . '/debug.log'; + $spooldir_len = strlen($spooldir); + $group = substr($database, $spooldir_len, (strlen($database) - $spooldir_len) - 9); + $group = trim($group, '/'); + if (! get_section_by_group($group, true)) { + file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Attempt to create: " . $database . " for: " . $group, FILE_APPEND); + return false; + } try { $dbh = new PDO('sqlite:' . $database); } catch (PDOException $e) {