mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:37:02 +02:00
folder fixes
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,9 @@ class ModelSearchSearch extends Model {
|
||||
if(count($__folders) > 0) {
|
||||
$folders = "folder IN (" . implode(",", $__folders) . ") AND ";
|
||||
}
|
||||
|
||||
else {
|
||||
$folders = "folder IN (" . implode(",", $_SESSION['folders']) . ") AND ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user