- show alltasks lists only for authorized user

This commit is contained in:
Max Pozdeev 2022-01-15 15:15:59 +03:00
parent f5fd1f74bb
commit c50b039cb2

View file

@ -22,10 +22,12 @@ $db = DBConnection::instance();
if(isset($_GET['loadLists']))
{
check_token();
if (!is_logged()) $sqlWhere = 'WHERE published=1';
else $sqlWhere = '';
$t = array();
$t['list'][] = prepareAllTasksList();
if (!is_logged()) $sqlWhere = 'WHERE published=1';
else {
$sqlWhere = '';
$t['list'][] = prepareAllTasksList(); // show alltasks lists only for authorized user
}
$t['total'] = 1;
$q = $db->dq("SELECT * FROM {$db->prefix}lists $sqlWhere ORDER BY ow ASC, id ASC");
while($r = $q->fetchAssoc())