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.");