#753 report 1043

This commit is contained in:
tomas 2005-04-08 22:27:32 +00:00
parent e5d684309f
commit 9549a022f3

View file

@ -22,8 +22,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $
Version : $Revision: 1.11 $
Author : $Author: tomas $
Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/archiveServer/var/conf.php,v $
------------------------------------------------------------------------------*/
@ -120,17 +120,23 @@ $config = array(
// see if a ~/.livesupport/archiveServer.conf.php exists, and
// overwrite the settings from there if any
$this_file = $_SERVER["SCRIPT_FILENAME"];
$fileowner_id = fileowner($this_file);
$fileowner_array = posix_getpwuid($fileowner_id);
$fileowner_homedir = $fileowner_array['dir'];
$home_conf = $fileowner_homedir . '/.livesupport/archiveServer.conf.php';
if (file_exists($home_conf)) {
$default_config = $config;
include $home_conf;
$user_config = $config;
$config = $user_config + $default_config;
$this_file = null;
if(isset($_SERVER["SCRIPT_FILENAME"])){
$this_file = $_SERVER["SCRIPT_FILENAME"];
}elseif(isset($argv[0])){
$this_file = $argv[0];
}
if(!is_null($this_file)){
$fileowner_id = fileowner($this_file);
$fileowner_array = posix_getpwuid($fileowner_id);
$fileowner_homedir = $fileowner_array['dir'];
$home_conf = $fileowner_homedir . '/.livesupport/archiveServer.conf.php';
if (file_exists($home_conf)) {
$default_config = $config;
include $home_conf;
$user_config = $config;
$config = $user_config + $default_config;
}
}
?>