From 6d01a374182a8ff5f8e2ba97d437739fbbe44aeb Mon Sep 17 00:00:00 2001 From: maxpozdeev Date: Mon, 8 Aug 2022 01:02:10 +0300 Subject: [PATCH] fix missing var in export and rss feed scripts --- src/export.php | 1 + src/feed.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/export.php b/src/export.php index 3c8b947..f950fb5 100644 --- a/src/export.php +++ b/src/export.php @@ -13,6 +13,7 @@ $onlyPublishedList = false; if(!have_write_access()) $onlyPublishedList = true; $listId = (int)_get('list'); +$db = DBConnection::instance(); $listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId ". ($onlyPublishedList ? "AND published=1" : "") ); if(!$listData) { die("No such list or access denied"); diff --git a/src/feed.php b/src/feed.php index ccfdd5f..b6b7378 100644 --- a/src/feed.php +++ b/src/feed.php @@ -13,7 +13,7 @@ require_once(MTTINC. 'markup.php'); $lang = Lang::instance(); $listId = (int)_get('list'); - +$db = DBConnection::instance(); $listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId"); if (need_auth() && (!$listData || !$listData['published'])) { die("Access denied!
List is not published.");