diff --git a/setup/class_setupStep_Welcome.inc b/setup/class_setupStep_Welcome.inc index 54775c0ccb5ae959990abcb362f16891239c0b0d..eeb2c181638b2272621c60af87c715d5b1625b3a 100644 --- a/setup/class_setupStep_Welcome.inc +++ b/setup/class_setupStep_Welcome.inc @@ -1,9 +1,8 @@ <?php - /* This code is part of FusionDirectory (http://www.fusiondirectory.org/) Copyright (C) 2007 Fabian Hickert - Copyright (C) 2011-2013 FusionDirectory + Copyright (C) 2011-2014 FusionDirectory This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,11 +24,13 @@ class Step_Welcome extends setup_step var $languages = array(); var $attributes = array(); var $header_image = "images/setup/welcome.png"; + var $authPath; function __construct() { $this->is_enabled = TRUE; $this->is_active = TRUE; + $this->authPath = CACHE_DIR.'/fusiondirectory.auth'; $this->update_strings(); } @@ -45,7 +46,7 @@ class Step_Welcome extends setup_step $smarty = get_smarty(); $smarty->assign('auth_id', session_id()); - $smarty->assign("path", '/tmp/fusiondirectory.auth'); + $smarty->assign("path", $this->authPath); return $smarty->fetch(get_template_path("setup_welcome.tpl", TRUE, dirname(__FILE__))); } @@ -54,9 +55,8 @@ class Step_Welcome extends setup_step $id = ""; /* Get auth ID from file */ - $path = '/tmp/fusiondirectory.auth'; - if (file_exists($path) && is_readable($path)) { - $contents = file($path); + if (file_exists($this->authPath) && is_readable($this->authPath)) { + $contents = file($this->authPath); $id = chop($contents[0]); } diff --git a/setup/setup_welcome.tpl b/setup/setup_welcome.tpl index 4f12abc10dc018128dae0e083dce7db9181fefef..ba02d21db086f3684bcb711dcde604f73f4eaac9 100644 --- a/setup/setup_welcome.tpl +++ b/setup/setup_welcome.tpl @@ -25,7 +25,7 @@ <b>{t}To continue...{/t}</b> </p> <p> - {t}For security reasons you need to authenticate for the installation by creating the file '/tmp/fusiondirectory.auth', containing the current session ID on the servers local filesystem. This can be done by executing the following command:{/t} + {t 1=$path}For security reasons you need to authenticate for the installation by creating the file '%1', containing the current session ID on the servers local filesystem. This can be done by executing the following command:{/t} </p> <tt> echo -n <b>{$auth_id}</b> > {$path}