Przeglądaj źródła

#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 lat temu
rodzic
commit
1142ead720
2 zmienionych plików z 6 dodań i 1 usunięć
  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);
             reset($data);
             $_SESSION['look'] = key($data);
             $_SESSION['look'] = key($data);
             $_SESSION['look_alert'] = 'yes';
             $_SESSION['look_alert'] = 'yes';
+            # Remove current path for filemanager
+            unset($_SESSION['_sf2_attributes']);
+            unset($_SESSION['_sf2_meta']);
         }
         }
     }
     }
     if ($_SESSION['user'] == 'admin' && empty($_GET['loginas'])) {
     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/');
 define('HESTIA_CMD', '/usr/bin/sudo /usr/local/hestia/bin/');
 
 
 if (!empty($_SESSION['look'])) {
 if (!empty($_SESSION['look'])) {
-
     unset($_SESSION['look']);
     unset($_SESSION['look']);
+    # Remove current path for filemanager
+    unset($_SESSION['_sf2_attributes']);
+    unset($_SESSION['_sf2_meta']);
     header("Location: /");
     header("Location: /");
 } else {
 } else {
     if($_SESSION['MURMUR'] && $_SESSION['user']){
     if($_SESSION['MURMUR'] && $_SESSION['user']){