diff --git a/livesupport/modules/archiveServer/var/conf.php b/livesupport/modules/archiveServer/var/conf.php index 88c2effa5..1364eebee 100644 --- a/livesupport/modules/archiveServer/var/conf.php +++ b/livesupport/modules/archiveServer/var/conf.php @@ -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; + } } ?>