From 653511e6c607235caa658fb8e1775f24f1a23305 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Wed, 23 Jul 2014 21:24:25 +0200 Subject: [PATCH] Server returns location of lychee Used for the new server-import dialog --- assets/js/lychee.js | 2 ++ php/modules/Session.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/assets/js/lychee.js b/assets/js/lychee.js index 41619de..43484ff 100644 --- a/assets/js/lychee.js +++ b/assets/js/lychee.js @@ -23,6 +23,7 @@ var lychee = { username: "", checkForUpdates: false, sorting: "", + location: "", dropbox: false, dropboxKey: '', @@ -46,6 +47,7 @@ var lychee = { lychee.username = data.config.username || ''; lychee.sorting = data.config.sorting || ''; lychee.dropboxKey = data.config.dropboxKey || ''; + lychee.location = data.config.location || ''; } // No configuration diff --git a/php/modules/Session.php b/php/modules/Session.php index 5ae0303..f07b343 100755 --- a/php/modules/Session.php +++ b/php/modules/Session.php @@ -42,6 +42,9 @@ class Session extends Module { $return['config'] = $this->settings; unset($return['config']['password']); + # Path to Lychee for the server-import dialog + $return['config']['location'] = LYCHEE; + # No login if ($this->settings['username']===''&&$this->settings['password']==='') $return['config']['login'] = false; else $return['config']['login'] = true; @@ -59,6 +62,7 @@ class Session extends Module { unset($return['config']['sorting']); unset($return['config']['dropboxKey']); unset($return['config']['login']); + unset($return['config']['location']); # Logged out $return['loggedIn'] = false;