From 76ed6452d9b8062cd386fb58034a91cacaf28374 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 19 Jul 2013 20:45:36 +0300 Subject: [PATCH] Serve genesis_url by es_id --- ajax/genesis.php | 3 ++- appinfo/app.php | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ajax/genesis.php b/ajax/genesis.php index 0e15d1b3..67690bf8 100644 --- a/ajax/genesis.php +++ b/ajax/genesis.php @@ -17,7 +17,8 @@ namespace OCA\Office; // Check if we are a user \OCP\User::checkLoggedIn(); -$filename = "/welcome.odt"; +$session = Session::getSession($_SERVER['QUERY_STRING']); +$filename = isset($session['genesis_url']) ? $session['genesis_url'] : ''; $download = new Download($filename); $download->sendResponse(); \ No newline at end of file diff --git a/appinfo/app.php b/appinfo/app.php index a08e43c3..cce7e0f0 100755 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -35,4 +35,9 @@ OCP\App::addNavigationEntry(array( OC::$CLASSPATH['OCA\Office\Storage'] = 'office/lib/storage.php'; OC::$CLASSPATH['OCA\Office\Download\Simple'] = 'office/lib/download/simple.php'; -OC::$CLASSPATH['OCA\Office\Download\Range'] = 'office/lib/download/range.php'; \ No newline at end of file +OC::$CLASSPATH['OCA\Office\Download\Range'] = 'office/lib/download/range.php'; + +// Testing +if (!\OCA\Office\Session::getSession('dev0')){ + \OCA\Office\Session::setMockSession(); +} \ No newline at end of file