Use new module
authorJamie Cameron <jcameron@webmin.com>
Sun, 1 Mar 2009 03:15:33 +0000 (03:15 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sun, 1 Mar 2009 03:15:33 +0000 (03:15 +0000)
ldap-client/ldap-client-lib.pl
ldap-useradmin/ldap-useradmin-lib.pl

index 825e739..3652eb7 100644 (file)
@@ -1,8 +1,8 @@
 # Functions for parsing and updating the LDAP config file
 
-do '../web-lib.pl';
+BEGIN { push(@INC, ".."); };
+use WebminCore;
 &init_config();
-do '../ui-lib.pl';
 
 @base_types = ("passwd", "shadow", "group", "hosts", "networks", "netmasks",
               "services", "protocols", "aliases", "netgroup");
@@ -237,7 +237,7 @@ elsif ($uri) {
                                }
                        }
                }
-       if (!$ldap) {
+       if (!$ldap && !$err) {
                $err = &text('ldap_eparse', $uri);
                }
        }
index 9aaaaac..70f8cb6 100644 (file)
@@ -3,11 +3,11 @@
 # Sanitaetsbetrieb Brixen  - Azienda Sanitaria di Bressanone
 # www.sb-brixen.it         - www.as-bressanone.it
 
-do '../web-lib.pl';
+BEGIN { push(@INC, ".."); };
+use WebminCore;
 &init_config();
-do '../ui-lib.pl';
-&foreign_require("useradmin", "user-lib.pl");
-&foreign_require("ldap-client", "ldap-client-lib.pl");
+&foreign_require("useradmin");
+&foreign_require("ldap-client");
 %access = &get_module_acl();
 $useradmin::access{'udelete'} = 1;     # needed for users_table / groups_table
 $useradmin::access{'gdelete'} = 1;