mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
* Newly created list shows completed tasks; List name can not have @ and # symbols
This commit is contained in:
parent
48778729d3
commit
e34b90fe33
2 changed files with 4 additions and 4 deletions
|
|
@ -378,10 +378,10 @@ elseif(isset($_GET['addList']))
|
|||
stop_gpc($_POST);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$name = str_replace(array('"',"'",'<','>','&'),array('','','','',''),trim(_post('name')));
|
||||
$name = str_replace(array('"',"'",'<','>','&','@','#'),array('','','','','','',''),trim(_post('name')));
|
||||
$ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}lists");
|
||||
$db->dq("INSERT INTO {$db->prefix}lists (uuid,name,ow,d_created,d_edited) VALUES (?,?,?,?,?)",
|
||||
array(generateUUID(), $name, $ow, time(), time()) );
|
||||
$db->dq("INSERT INTO {$db->prefix}lists (uuid,name,ow,d_created,d_edited,taskview) VALUES (?,?,?,?,?,?)",
|
||||
array(generateUUID(), $name, $ow, time(), time(), 1) );
|
||||
$id = $db->last_insert_id();
|
||||
$t['total'] = 1;
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$id");
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ if(!$ver)
|
|||
}
|
||||
|
||||
# create default list
|
||||
$db->ex("INSERT INTO {$db->prefix}lists (uuid,name,d_created) VALUES (?,?,?)", array(generateUUID(), 'Todo', time()));
|
||||
$db->ex( "INSERT INTO {$db->prefix}lists (uuid,name,d_created,taskview) VALUES (?,?,?,?)", array(generateUUID(), 'Todo', time(), 1) );
|
||||
|
||||
}
|
||||
elseif($ver == $lastVer)
|
||||
|
|
|
|||
Loading…
Reference in a new issue