]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 365035: sendmail cannot execute importxml.pl from any other path than the bugzill...
authorlpsolit%gmail.com <>
Fri, 5 Jan 2007 08:03:58 +0000 (08:03 +0000)
committerlpsolit%gmail.com <>
Fri, 5 Jan 2007 08:03:58 +0000 (08:03 +0000)
Bugzilla/Config.pm

index 6df644014329b60a5d4e99e4a2f617fe12e41031..db7cb28b27cf261823cc33441e3b5a23d44aea6f 100644 (file)
@@ -27,6 +27,7 @@
 #                 Christopher Aillon <christopher@aillon.com>
 #                 Erik Stambaugh <erik@dasbistro.com>
 #                 Frédéric Buclin <LpSolit@gmail.com>
+#                 Guzman Braso <gbn@hqso.net>
 
 package Bugzilla::Config;
 
@@ -53,6 +54,14 @@ use base qw(Exporter);
 
 # constant paths
 our $libpath = '.';
+
+# importxml.pl, when run by a mail daemon, sets the bugzilla path explicitly.
+# This then mucks it up, so if we are coming from importxml.pl, set $libpath
+# back to the way it was.
+if ($::path) {
+    $libpath = $::path;
+}
+
 our $templatedir = "$libpath/template";
 
 # variable paths