mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-05 05:55:15 +02:00
- 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
This commit is contained in:
parent
891c3d2a60
commit
b8834051eb
@ -1123,9 +1123,18 @@ class acp_attachments
|
||||
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)
|
||||
{
|
||||
$imagick = str_replace('\\', '/', $location);
|
||||
|
@ -161,7 +161,8 @@ if (!function_exists('array_combine'))
|
||||
$values = array_values($values);
|
||||
|
||||
$n = sizeof($keys);
|
||||
if (!$n || !sizeof($values) || ($n != sizeof($values)))
|
||||
$m = sizeof($values);
|
||||
if (!$n || !$m || ($n != $m))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user