diff options
author | David M <davidmj@users.sourceforge.net> | 2006-03-09 02:43:35 +0000 |
---|---|---|
committer | David M <davidmj@users.sourceforge.net> | 2006-03-09 02:43:35 +0000 |
commit | b8834051eb5d7d376e7c5a2be273decdd6c9b886 (patch) | |
tree | 3a5c5c7035feabceb6670d69755c4c79f6a31ce8 /phpBB/install/install.php | |
parent | 891c3d2a609e3f06aee8c834dba9aaa0129e6dcf (diff) | |
download | forums-b8834051eb5d7d376e7c5a2be273decdd6c9b886.tar forums-b8834051eb5d7d376e7c5a2be273decdd6c9b886.tar.gz forums-b8834051eb5d7d376e7c5a2be273decdd6c9b886.tar.bz2 forums-b8834051eb5d7d376e7c5a2be273decdd6c9b886.tar.xz forums-b8834051eb5d7d376e7c5a2be273decdd6c9b886.zip |
- By default, new installations of magick add itself to PATH and not to a variable that it creates.
git-svn-id: file:///svn/phpbb/trunk@5611 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/install.php')
-rw-r--r-- | phpBB/install/install.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/install/install.php b/phpBB/install/install.php index de019791e6..c2f4478c07 100644 --- a/phpBB/install/install.php +++ b/phpBB/install/install.php @@ -421,9 +421,17 @@ if ($stage == 0) if (empty($_ENV['MAGICK_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) ? ';' : ':', $_ENV['PATH']))); + $locations = array_merge($path_locations, $locations); foreach ($locations as $location) { + // The path might not end properly, fudge it + if (substr($location, -1, 1) !== '/') + { + $location .= '/'; + } + if (@is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000) { $img_imagick = str_replace('\\', '/', $location); @@ -1350,7 +1358,7 @@ function inst_language_select($default = '') $dir = @opendir($phpbb_root_path . 'language'); - while ($file = readdir($dir)) + while (($file = readdir($dir)) !== false) { $path = $phpbb_root_path . 'language/' . $file; |