From ab8b44741d3c1cf4f088bc899ed8ebb8647ac436 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 01 Oct 2008 05:21:22 -0400
Subject: [PATCH] - Allow calling msgimport.sh/msgexport.sh from any directory (#1485431)
---
CHANGELOG | 1 +
bin/msgimport.sh | 2 +-
bin/msgexport.sh | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index ab7fd2b..8a5eaac 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@
2008/10/01 (alec)
- Fix spellchecking when switching to html editor (#1485362)
- Fix compose window width/height (#1485396)
+- Allow calling msgimport.sh/msgexport.sh from any directory (#1485431)
2008/09/29 (alec)
----------
diff --git a/bin/msgexport.sh b/bin/msgexport.sh
index 33d5d4b..b15da1f 100755
--- a/bin/msgexport.sh
+++ b/bin/msgexport.sh
@@ -1,7 +1,7 @@
#!/usr/bin/php
<?php
-define('INSTALL_PATH', preg_replace('/bin\/$/', '', getcwd()) . '/');
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
ini_set('memory_limit', -1);
require_once INSTALL_PATH.'program/include/iniset.php';
diff --git a/bin/msgimport.sh b/bin/msgimport.sh
index 9bd97c6..fa5678c 100755
--- a/bin/msgimport.sh
+++ b/bin/msgimport.sh
@@ -1,7 +1,7 @@
#!/usr/bin/php
<?php
-define('INSTALL_PATH', preg_replace('/bin\/$/', '', getcwd()) . '/');
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
ini_set('memory_limit', -1);
require_once INSTALL_PATH.'program/include/iniset.php';
--
Gitblit v1.9.1