mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-19 16:13:00 +02:00
feature:2284
Rename $conf['image_library'] into $conf['graphics_library'] Display library used in admin intro page. git-svn-id: http://piwigo.org/svn/trunk@10684 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -29,6 +29,7 @@ if (!defined('PHPWG_ROOT_PATH'))
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/check_integrity.class.php');
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/c13y_internal.class.php');
|
||||
include_once(PHPWG_ROOT_PATH.'admin/include/image.class.php');
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | Check Access and exit when user status is not ok |
|
||||
@@ -258,6 +259,36 @@ if ($nb_comments > 0)
|
||||
);
|
||||
}
|
||||
|
||||
// graphics library
|
||||
switch (pwg_image::get_library())
|
||||
{
|
||||
case 'imagick':
|
||||
$library = 'ImageMagick';
|
||||
$img = new Imagick();
|
||||
$version = $img->getVersion();
|
||||
if (preg_match('/ImageMagick \d+\.\d+\.\d+-?\d*/', $version['versionString'], $match))
|
||||
{
|
||||
$library = $match[0];
|
||||
}
|
||||
$template->assign('GRAPHICS_LIBRARY', $library);
|
||||
break;
|
||||
|
||||
case 'ext_imagick':
|
||||
$library = 'External ImageMagick';
|
||||
exec($conf['ext_imagick_dir'].'convert -version', $returnarray);
|
||||
if (preg_match('/Version: ImageMagick (\d+\.\d+\.\d+-?\d*)/', $returnarray[0], $match))
|
||||
{
|
||||
$library .= ' ' . $match[1];
|
||||
}
|
||||
$template->assign('GRAPHICS_LIBRARY', $library);
|
||||
break;
|
||||
|
||||
case 'gd':
|
||||
$gd_info = gd_info();
|
||||
$template->assign('GRAPHICS_LIBRARY', 'GD '.@$gd_info['GD Version']);
|
||||
break;
|
||||
}
|
||||
|
||||
// +-----------------------------------------------------------------------+
|
||||
// | sending html code |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user