mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* do not add task with listId=0
This commit is contained in:
parent
b8e27503a9
commit
5d8a8e90b3
1 changed files with 2 additions and 2 deletions
|
|
@ -581,7 +581,7 @@ function check_read_access($listId = null)
|
|||
$db = DBConnection::instance();
|
||||
if(Config::get('password') == '') return true;
|
||||
if(is_logged()) return true;
|
||||
if($listId)
|
||||
if($listId !== null)
|
||||
{
|
||||
$id = $db->sq("SELECT id FROM {$db->prefix}lists WHERE id=? AND published=1", array($listId));
|
||||
if($id) return;
|
||||
|
|
@ -594,7 +594,7 @@ function have_write_access($listId = null)
|
|||
{
|
||||
if(is_readonly()) return false;
|
||||
// check list exist
|
||||
if($listId)
|
||||
if($listId !== null)
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}lists WHERE id=?", array($listId));
|
||||
|
|
|
|||
Loading…
Reference in a new issue