Added a PHP5 module for the configuration class
[gnucomo.git] / src / phpclasses / configuration.class.php
index 1aaaa66..4f0c2a5 100644 (file)
@@ -26,7 +26,7 @@
 //
 //  RELATIONS      : 
 //  SEE ALSO       :
-//  LAST MODIFIED  : Jul 29, 2002
+//  LAST MODIFIED  : Nov 19, 2007
 ///////////////////////////////////////////////////////////////////////////
 */
 
@@ -61,6 +61,7 @@ class configuration
    function read($app_name)
    {
       $this->system = false;
+      $this->user = false;
       $filename = "/etc/" . $app_name . ".conf";
       if (!is_readable($filename))
       {
@@ -69,7 +70,7 @@ class configuration
       if (is_readable($filename))
       {
 
-         $this->system = xmldocfile($filename);
+         $this->system = domxml_open_file($filename);
 
          if ($this->system)
          {
@@ -83,7 +84,6 @@ class configuration
          }
       }
 
-      $this->user = false;
       if (isset($_ENV['HOME']) && $_ENV['HOME'] != '/')
       {
          //  Read configurations from the user's homedir.
@@ -92,7 +92,7 @@ class configuration
          if (is_readable($filename))
          {
 
-            $this->user = xmldocfile($filename);
+            $this->user = domxml_open_file($filename);
 
             if ($this->user)
             {