+ readonly user can export the tasks from published list

This commit is contained in:
Max Pozdeev 2010-11-10 21:33:01 +03:00
parent e74967d73e
commit 8470d68ddc

View file

@ -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, ";