Code

Applied modifications for fixed PHP versions
[gosa.git] / include / functions_setup.inc
index 20edcb3a3e577c4d74495bb9cb3894c8e5b864bb..44adf1ac1fd9893c3c6708177efd722cf0fc1b75 100644 (file)
@@ -40,7 +40,7 @@ function is_schema_readable($server, $admin, $password)
   $r= ldap_bind ($ds, $admin, $password);
 
   /* Get base to look for schema */
-  $sr  = @ldap_read ($ds, "", "objectClass=*", array("subschemaSubentry"));
+  $sr  = @ldap_read ($ds, NULL, "objectClass=*", array("subschemaSubentry"));
   $attr= @ldap_get_entries($ds,$sr);
   if (!isset($attr[0]['subschemasubentry'][0])){
     return (false);
@@ -101,7 +101,7 @@ function schema_check($server, $admin, $password, $aff=0,$CalledByIndexPhP=false
   $r= ldap_bind ($ds, $admin, $password);
 
   /* Get base to look for schema */
-  $sr  = @ldap_read ($ds, "", "objectClass=*", array("subschemaSubentry"));
+  $sr  = @ldap_read ($ds, NULL, "objectClass=*", array("subschemaSubentry"));
   $attr= @ldap_get_entries($ds,$sr);
   if (!isset($attr[0]['subschemasubentry'][0])){
     return (array(array("msg" => _("Can't get schema information from server. No schema check possible!"), "status" => FALSE)));
@@ -504,8 +504,8 @@ function parse_contrib_conf()
   }
 
   /* Look for samba password generation method */
-  if(file_exists("/usr/lib/gosa/mkntpasswd")){
-    $pwdhash  = "/usr/lib/gosa/mkntpasswd";
+  if(file_exists("/usr/bin/mkntpasswd")){
+    $pwdhash  = "/usr/bin/mkntpasswd";
   } elseif (preg_match("/^Usage: mkntpwd /", shell_exec ("mkntpwd 2>&1"))){
     $pwdhash= "mkntpwd";
   } else {
@@ -824,14 +824,14 @@ function show_setup_page4($withoutput = true)
       print_red (_("Can't bind to the specified LDAP server! Please make sure that it is reachable for GOsa."));
     }
   } else {
-    $sr=   @ldap_search ($ds, "", "objectClass=*", array("namingContexts"));
+    $sr=   @ldap_search ($ds, NULL, "objectClass=*", array("namingContexts"));
     $attr= @ldap_get_entries($ds,$sr);
 
     if((empty($attr))) {
       $base= "dc=example,dc=net";
 
       if($withoutput){
-        print_red(_("Bind to server successful, but the server seems to be completly empty, please check all informations twice"));
+        print_red(_("Bind to server successful, but the server seems to be completly empty, please check all information twice"));
       }
 
     } else {