diff --git a/classes/notificationsmanager.class.php b/classes/notificationsmanager.class.php index 94fa43b5..b27505a8 100644 --- a/classes/notificationsmanager.class.php +++ b/classes/notificationsmanager.class.php @@ -226,7 +226,7 @@ public function load_news() { $MyNews = G::$LoggedUser['LastReadNews']; $CurrentNews = G::$Cache->get_value('news_latest_id'); $Title = G::$Cache->get_value('news_latest_title'); - if ($CurrentNews === false) { + if ($CurrentNews === false || $Title === false) { $QueryID = G::$DB->get_query_id(); G::$DB->query(' SELECT ID, Title diff --git a/sections/index/private.php b/sections/index/private.php index 919b45e7..36cbe2ca 100644 --- a/sections/index/private.php +++ b/sections/index/private.php @@ -16,6 +16,7 @@ $News = $DB->to_array(false, MYSQLI_NUM, false); $Cache->cache_value('news', $News, 3600 * 24 * 30); $Cache->cache_value('news_latest_id', $News[0][0], 0); + $Cache->cache_value('news_latest_title', $News[0][1], 0); } if ($LoggedUser['LastReadNews'] != $News[0][0]) { diff --git a/sections/register/index.php b/sections/register/index.php index 0fab8e02..6b00f6ca 100644 --- a/sections/register/index.php +++ b/sections/register/index.php @@ -11,7 +11,7 @@ include(SERVER_ROOT.'/classes/validate.class.php'); -$Val=NEW VALIDATE; +$Val = NEW VALIDATE; if (!empty($_REQUEST['confirm'])) { // Confirm registration @@ -135,7 +135,11 @@ (UserID, IP, StartTime) VALUES ('$UserID', '".db_string($_SERVER['REMOTE_ADDR'])."', '".sqltime()."')"); - $DB->query("INSERT INTO users_notifications_settings (UserID) VALUES ('$UserID')"); + $DB->query(" + INSERT INTO users_notifications_settings + (UserID) + VALUES + ('$UserID')"); diff --git a/sections/tools/index.php b/sections/tools/index.php index b46e032f..f956a72c 100644 --- a/sections/tools/index.php +++ b/sections/tools/index.php @@ -154,6 +154,7 @@ $LatestNews = $Cache->get_value('news_latest_id'); if ($LatestNews !== false && $LatestNews == $_GET['id']) { $Cache->delete_value('news_latest_id'); + $Cache->delete_value('news_latest_title'); } } header('Location: index.php'); diff --git a/sections/torrents/details.php b/sections/torrents/details.php index ae1efca8..8aea2ded 100644 --- a/sections/torrents/details.php +++ b/sections/torrents/details.php @@ -193,7 +193,7 @@ function compare($X, $Y) {