mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- show alltasks lists only for authorized user
This commit is contained in:
parent
f5fd1f74bb
commit
c50b039cb2
1 changed files with 5 additions and 3 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue