Code

Simple style updates
[gosa.git] / include / functions.inc
index 65c9fa53a16f485c081ec2d128c2b1441f04b0f4..835d6636ea1847c7f49b7d5688bd294a86e86069 100644 (file)
@@ -20,6 +20,7 @@
 
 /* Configuration file location */
 define ("CONFIG_DIR", "/etc/gosa");
+define ("CONFIG_FILE", "gosa.conf-trunk");
 define ("CONFIG_TEMPLATE_DIR", "../contrib/");
 define ("HELP_BASEDIR", "/var/www/doc/");
 
@@ -2128,6 +2129,9 @@ function gosa_ldap_explode_dn($dn,$config = NULL,$verify_in_ldap=false)
 
 function is_php4()
 {
+  if (isset($_SESSION['PHP4COMPATIBLE'])){
+    return true;
+  }
   return (preg_match('/^4/', phpversion()));
 }
 
@@ -2162,7 +2166,7 @@ function get_base_from_hook($dn, $attrib)
       if (check_command($command)){
         @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute");
         exec($command, $output);
-        if (preg_match("/^[0-9]+$/", $output)){
+        if (preg_match("/^[0-9]+$/", $output[0])){
           return ($output[0]);
         } else {
           print_red(_("Warning - base_hook is not avialable. Using default base."));