summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2cd2dd)
raw | patch | inline | side by side (parent: f2cd2dd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Jul 2010 15:13:59 +0000 (15:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 7 Jul 2010 15:13:59 +0000 (15:13 +0000) |
-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
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18953 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/html/setup.php | patch | blob | history |
index 9fa8eebec415261e593f4cec23c9418349714088..bdd606229ed1b999aaced1eb9b8c6dc7b915e37d 100644 (file)
--- a/gosa-core/html/setup.php
+++ b/gosa-core/html/setup.php
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 "<form action='?' method='POST'>".
+ " <h2>".
+ " "._("Please specify a writeable directory for GOsa to create temporary files.").
+ " </h2>".
+ " ".sprintf(_("GOsa requires a writeable directory temporary store generated templates."), $smarty->compile_dir).
+ "<input name='compile_dir' type='text' value=\"".htmlentities(session::get('SETUP_COMPILE_DIR'), ENT_QUOTES, 'UTF-8')."\"> ".
+ "<button name='useCompileDir'>".msgPool::okButton()."</button></form>";
exit();
}