From 8e790bec60067cc25726e17fb228281daeaa0645 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Fri, 22 Jul 2016 10:40:04 +0100 Subject: [PATCH] Clear any FTP session selection we may have --- lib/github-manager.php | 4 ++++ lib/go-localhost-root.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/github-manager.php b/lib/github-manager.php index 6d1781b..18eb694 100644 --- a/lib/github-manager.php +++ b/lib/github-manager.php @@ -52,6 +52,10 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset $fh = fopen($settingsFile, 'w'); fwrite($fh, $settingsContents); fclose($fh); + + // Clear any FTP session we may have + $_SESSION['ftpSiteRef'] = false; + // Hide this popup and reload file manager echo ""; } else { diff --git a/lib/go-localhost-root.php b/lib/go-localhost-root.php index 26af7a5..82d98aa 100644 --- a/lib/go-localhost-root.php +++ b/lib/go-localhost-root.php @@ -22,6 +22,10 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn']) { $fh = fopen($settingsFile, 'w'); fwrite($fh, $settingsContents); fclose($fh); + + // Clear any FTP session we may have + $_SESSION['ftpSiteRef'] = false; + // Now we've reset the root path to localhost root, refresh the file manager to show it echo ""; } else {