if header is a symlink --> work on it's target

This commit is contained in:
Ralf Becker 2009-05-31 09:51:57 +00:00
parent 8a66799414
commit bf7e7889cf

View File

@ -50,6 +50,16 @@ class setup_cmd_header extends setup_cmd
// header is 3 levels lower then this command in setup/inc
$this->header_path = dirname(dirname(dirname(__FILE__))).'/header.inc.php';
// if header is a symlink --> work on it's target
if (is_link($this->header_path))
{
$this->header_path = readlink($this->header_path);
if ($this->header_path[0] != '/' && $this->header_path[1] != ':')
{
$this->header_path = dirname(dirname(dirname(__FILE__))).'/'.$this->header_path;
}
}
$this->setup_header =& new setup_header();
}