mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
+ readonly user can export the tasks from published list
This commit is contained in:
parent
e74967d73e
commit
8470d68ddc
1 changed files with 4 additions and 5 deletions
|
|
@ -9,14 +9,13 @@
|
|||
//$dontStartSession = 1;
|
||||
require_once('./init.php');
|
||||
|
||||
if(!have_write_access()) {
|
||||
die("Access denied");
|
||||
}
|
||||
$onlyPublishedList = false;
|
||||
if(!have_write_access()) $onlyPublishedList = true;
|
||||
|
||||
$listId = (int)_get('list');
|
||||
$listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId");
|
||||
$listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId ". ($onlyPublishedList ? "AND published=1" : "") );
|
||||
if(!$listData) {
|
||||
die("No such list");
|
||||
die("No such list or access denied");
|
||||
}
|
||||
|
||||
$sqlSort = "ORDER BY compl ASC, ";
|
||||
|
|
|
|||
Loading…
Reference in a new issue