diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index e27bcc1..1c4d003 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -1592,12 +1592,18 @@ $logfile=$logdir.'/newsportal.log'; function get_user_mail_auth_data($user) { global $spooldir; + $userdata = array("$user"); $user = strtolower($user); $pkey_config = get_user_config($user, "pkey"); $pkey_cookie = $_COOKIE['pkey']; + if($pkey_config == false || $pkey_cookie == false) { + return false; + } if($pkey_config == $pkey_cookie) { $userfile=$spooldir.'/'.$user.'-articleviews.dat'; - $userdata = unserialize(file_get_contents($userfile)); + if(is_file($userfile)) { + $userdata = unserialize(file_get_contents($userfile)); + } return $userdata; } return false; diff --git a/Rocksolid_Light/rslight/scripts/expire.php b/Rocksolid_Light/rslight/scripts/expire.php index 06b6a53..5e40db9 100755 --- a/Rocksolid_Light/rslight/scripts/expire.php +++ b/Rocksolid_Light/rslight/scripts/expire.php @@ -42,10 +42,12 @@ $dbh = null; if($CONFIG['article_database'] == '1') { $database = $spooldir.'/'.$group.'-articles.db3'; - $articles_dbh = article_db_open($database); - $articles_query = $articles_dbh->prepare('DELETE FROM articles WHERE newsgroup=:newsgroup AND date<:expireme'); - $articles_query->execute([':newsgroup' => $group, ':expireme' => $expireme]); - $articles_dbh = null; + if(is_file($database)) { + $articles_dbh = article_db_open($database); + $articles_query = $articles_dbh->prepare('DELETE FROM articles WHERE newsgroup=:newsgroup AND date<:expireme'); + $articles_query->execute([':newsgroup' => $group, ':expireme' => $expireme]); + $articles_dbh = null; + } } $grouppath = preg_replace('/\./', '/', $group); diff --git a/Rocksolid_Light/rslight/scripts/nocem.php b/Rocksolid_Light/rslight/scripts/nocem.php index 9e3bd61..b9fe4e3 100755 --- a/Rocksolid_Light/rslight/scripts/nocem.php +++ b/Rocksolid_Light/rslight/scripts/nocem.php @@ -108,10 +108,12 @@ function delete_message($messageid, $group) { } if($CONFIG['article_database'] == '1') { $database = $spooldir.'/'.$group.'-articles.db3'; - $articles_dbh = article_db_open($database); - $articles_query = $articles_dbh->prepare('DELETE FROM articles WHERE msgid=:messageid'); - $articles_query->execute(['messageid' => $messageid]); - $articles_dbh = null; + if(is_file($database)) { + $articles_dbh = article_db_open($database); + $articles_query = $articles_dbh->prepare('DELETE FROM articles WHERE msgid=:messageid'); + $articles_query->execute(['messageid' => $messageid]); + $articles_dbh = null; + } } $this_overview=$spooldir.'/'.$group.'-overview'; if(false === (is_file($this_overview))) {