diff --git a/lam/lam.conf b/lam/config/lam.conf
similarity index 100%
rename from lam/lam.conf
rename to lam/config/lam.conf
diff --git a/lam/config/config.php b/lam/lib/config.inc
similarity index 96%
rename from lam/config/config.php
rename to lam/lib/config.inc
index f0c09cd4..a7cdb0fc 100644
--- a/lam/config/config.php
+++ b/lam/lib/config.inc
@@ -62,14 +62,21 @@ class Config {
var $grouplistAttributes;
var $hostlistAttributes;
- // constructor, loads preferences from ../lam.conf
+ // constructor, loads preferences from ../config/lam.conf
function Config() {
$this->reload();
}
- // reloads preferences from ../lam.conf
+ // reloads preferences from ../config/lam.conf
function reload() {
- $conffile = "../lam.conf";
+ // Get path of lam.conf
+ $path = getcwd();
+ $path = explode("/", substr($path,1));
+ for($i = 0; $i <= array_search("lam", $path); $i++) {
+ $conffile .= "/" . $path[$i];
+ }
+ echo ;
+ $conffile .= "/config/lam.conf";
if (is_file($conffile) == True) {
$file = fopen($conffile, "r");
while (!feof($file)) {
@@ -142,13 +149,20 @@ class Config {
fclose($file);
}
else {
- echo _("Unable to load lam.conf!"); echo "
";
+ echo _("Unable to load lam.conf! ") . $conffile ; echo "
";
}
}
- // saves preferences to ../lam.conf
+ // saves preferences to ../config/lam.conf
function save() {
- $conffile = "../lam.conf";
+ // Get path of lam.conf
+ $path = getcwd();
+ $path = explode("/", substr($path,1));
+ for($i = 0; $i <= array_search("lam", $path); $i++) {
+ $conffile .= "/" . $path[$i];
+ }
+ echo ;
+ $conffile .= "/config/lam.conf";
if (is_file($conffile) == True) {
// booleans to check if value was already saved
$save_serverURL = $save_passwd = $save_admins = $save_suffusr = $save_suffgrp = $save_suffhst =
diff --git a/lam/lib/ldap.php b/lam/lib/ldap.inc
similarity index 99%
rename from lam/lib/ldap.php
rename to lam/lib/ldap.inc
index 979cbb37..734ca821 100644
--- a/lam/lib/ldap.php
+++ b/lam/lib/ldap.inc
@@ -22,7 +22,7 @@ $Id$
*/
// ldap.php provides basic functions to connect to the OpenLDAP server and get lists of users and groups.
-include_once("../config/config.php");
+include_once("config.inc");
class Ldap{
diff --git a/lam/lib/listgroups.php b/lam/lib/listgroups.php
deleted file mode 100644
index e0ff1e70..00000000
--- a/lam/lib/listgroups.php
+++ /dev/null
@@ -1,148 +0,0 @@
-