folder fixes

This commit is contained in:
SJ
2013-03-31 14:50:21 +02:00
parent 5d7a349741
commit 26d18671da
9 changed files with 118 additions and 87 deletions

View File

@ -188,6 +188,11 @@ class ModelFolderFolder extends Model {
if($name == '') { return -1; }
$query = $this->db->query("INSERT INTO " . TABLE_FOLDER_EXTRA . " (uid, name) VALUES(?,?)", array($_SESSION['uid'], $name));
$last_id = $this->db->getLastId();
if(!isset($_SESSION['extra_folders'][$last_id])) { array_push($_SESSION['extra_folders'], $last_id); }
return $this->db->countAffected();
}