From 3f2d83738a8652e61fc00f8e20ce88fb474d878a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 7 Jul 2010 15:13:59 +0000 Subject: [PATCH] Updated the setup -Added a fallback if we cannot write to the smarty compile_dir git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18953 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/setup.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gosa-core/html/setup.php b/gosa-core/html/setup.php index 9fa8eebec..bdd606229 100644 --- a/gosa-core/html/setup.php +++ b/gosa-core/html/setup.php @@ -61,12 +61,24 @@ session::set('errorsAlreadyPosted',array()); session::set('LastError',""); /* Set template compile directory */ -$smarty->compile_dir= '/var/spool/gosa/'; +if(!session::is_set("SETUP_COMPILE_DIR")){ + session::set('SETUP_COMPILE_DIR', '/var/spool/gosa/'); +} +if(isset($_POST['compile_dir']) && isset($_POST['useCompileDir'])){ + session::set('SETUP_COMPILE_DIR', get_post('compile_dir')); +} + +$smarty->compile_dir= session::get('SETUP_COMPILE_DIR'); /* Check for compile directory */ if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){ - msg_dialog::display(_("Smarty"),sprintf( _("Compile directory %s is not accessible!"), - bold($smarty->compile_dir)),FATAL_ERROR_DIALOG); + echo "
". + "

". + " "._("Please specify a writeable directory for GOsa to create temporary files."). + "

". + " ".sprintf(_("GOsa requires a writeable directory temporary store generated templates."), $smarty->compile_dir). + " ". + "
"; exit(); } -- 2.30.2