function read($app_name)
{
$filename = "/etc/" . $app_name . ".conf";
- $this->system = xmldocfile($filename);
-
- if (!$this->system)
+ if (!is_readable($filename))
{
$filename = "/usr/local/etc/" . $app_name . ".conf";
- $this->system = xmldocfile($filename);
}
-
- if ($this->system)
+ if (is_readable($filename))
{
- $root = $this->system->root();
- if ($root->tagname != $app_name)
+ $this->system = xmldocfile($filename);
+
+ if ($this->system)
{
- print("Configuration error: Wrong configuration file.<br>");
- $this->system = false;
+ $root = $this->system->root();
+
+ if ($root->tagname != $app_name)
+ {
+ print("Configuration error: Wrong configuration file.<br>");
+ $this->system = false;
+ }
}
}
else
function read($app_name)
{
$filename = "/etc/" . $app_name . ".conf";
- $this->system = xmldocfile($filename);
-
- if (!$this->system)
+ if (!is_readable($filename))
{
$filename = "/usr/local/etc/" . $app_name . ".conf";
- $this->system = xmldocfile($filename);
}
-
- if ($this->system)
+ if (is_readable($filename))
{
- $root = $this->system->root();
- if ($root->tagname != $app_name)
+ $this->system = xmldocfile($filename);
+
+ if ($this->system)
{
- print("Configuration error: Wrong configuration file.<br>");
- $this->system = false;
+ $root = $this->system->root();
+
+ if ($root->tagname != $app_name)
+ {
+ print("Configuration error: Wrong configuration file.<br>");
+ $this->system = false;
+ }
}
}
else