Просмотр исходного кода

#944 Filegator does keep track of the “current path” in the user session (#1580)

* Filegator does keep track of the “current path” in the user session when not leaving FM via “Back to CP” those paths remain in place. Sugested changes removes those files also #994

* Add _sf2_meta aswell
Jaap Marcus 5 лет назад
Родитель
Сommit
1142ead720
2 измененных файлов с 6 добавлено и 1 удалено
  1. 3 0
      web/login/index.php
  2. 3 1
      web/logout/index.php

+ 3 - 0
web/login/index.php

@@ -25,6 +25,9 @@ if (isset($_SESSION['user'])) {
             reset($data);
             $_SESSION['look'] = key($data);
             $_SESSION['look_alert'] = 'yes';
+            # Remove current path for filemanager
+            unset($_SESSION['_sf2_attributes']);
+            unset($_SESSION['_sf2_meta']);
         }
     }
     if ($_SESSION['user'] == 'admin' && empty($_GET['loginas'])) {

+ 3 - 1
web/logout/index.php

@@ -4,8 +4,10 @@ session_start();
 define('HESTIA_CMD', '/usr/bin/sudo /usr/local/hestia/bin/');
 
 if (!empty($_SESSION['look'])) {
-
     unset($_SESSION['look']);
+    # Remove current path for filemanager
+    unset($_SESSION['_sf2_attributes']);
+    unset($_SESSION['_sf2_meta']);
     header("Location: /");
 } else {
     if($_SESSION['MURMUR'] && $_SESSION['user']){