diff options
author | patdenice <patdenice@piwigo.org> | 2011-04-29 17:10:00 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2011-04-29 17:10:00 +0000 |
commit | 90825d08ea8c6af10aadc2067cf8fbf125c8a29f (patch) | |
tree | 4526c7594bd9ce3d9d4f0c47ae5af406fc7e75b1 /admin/intro.php | |
parent | 920f8b443a300d2d2fa429b8188efec10314dd97 (diff) |
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
Diffstat (limited to '')
-rw-r--r-- | admin/intro.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/admin/intro.php b/admin/intro.php index 09b7e0811..7b6985e6f 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -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 | // +-----------------------------------------------------------------------+ |