index 9fa8eebec415261e593f4cec23c9418349714088..4b692e02639a45e2ea2bda33de2afc8496408e68 100644 (file)
--- a/gosa-core/html/setup.php
+++ b/gosa-core/html/setup.php
session::set('errorsAlreadyPosted',array());
session::set('LastError',"");
-/* Set template compile directory */
-$smarty->compile_dir= '/var/spool/gosa/';
+$smarty->compile_dir= "/var/spool/gosa/";
+if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){
+
+ if(isset($_SERVER['SCRIPT_FILENAME'])){
+ $smarty->compile_dir= preg_replace("#/html/.*$#","",$_SERVER['SCRIPT_FILENAME']);
+ }
+}
/* 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);
- exit();
+ msg_dialog::display(_("Smarty"),sprintf( _("Compile directory %s is not accessible!"),
+ bold('/var/spool/gosa/')),FATAL_ERROR_DIALOG);
+ exit();
}
/* Get posted language */