aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-03-13 20:50:56 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-03-13 20:50:56 +0000
commit148f259bde6e377571cf592e0bfd508d948639b5 (patch)
tree5e129ac374b3184cd3737056a032fbad2beb0442
parentd85c4e73ed21d14e53ad870cca98381a751a0ec0 (diff)
downloadforums-148f259bde6e377571cf592e0bfd508d948639b5.tar
forums-148f259bde6e377571cf592e0bfd508d948639b5.tar.gz
forums-148f259bde6e377571cf592e0bfd508d948639b5.tar.bz2
forums-148f259bde6e377571cf592e0bfd508d948639b5.tar.xz
forums-148f259bde6e377571cf592e0bfd508d948639b5.zip
- empty() expects a variable, not a function :D
git-svn-id: file:///svn/phpbb/trunk@5625 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/acp/acp_attachments.php6
-rw-r--r--phpBB/install/install.php6
2 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index e2d8770066..8097e9b2d3 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1120,7 +1120,9 @@ class acp_attachments
$exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : '';
- if (empty(getenv('MAGICK_HOME')))
+ $magic_home = getenv('MAGICK_HOME');
+
+ if (empty($magic_home))
{
$locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
$path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
@@ -1144,7 +1146,7 @@ class acp_attachments
}
else
{
- $imagick = str_replace('\\', '/', getenv('MAGICK_HOME'));
+ $imagick = str_replace('\\', '/', $magic_home);
}
return $imagick;
diff --git a/phpBB/install/install.php b/phpBB/install/install.php
index 8fd4875329..0c3521eb1d 100644
--- a/phpBB/install/install.php
+++ b/phpBB/install/install.php
@@ -416,9 +416,11 @@ if ($stage == 0)
$exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : '';
+ $magic_home = getenv('MAGICK_HOME');
+
// Imagemagick are you there? Give me a sign or a path ...
$img_imagick = '';
- if (empty(getenv('MAGICK_HOME')))
+ if (empty($magic_home))
{
$locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
$path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
@@ -441,7 +443,7 @@ if ($stage == 0)
}
else
{
- $img_imagick = str_replace('\\', '/', getenv('MAGICK_HOME'));
+ $img_imagick = str_replace('\\', '/', $magic_home);
}
?>