Ignore:
Timestamp:
Apr 29, 2011, 7:10:00 PM (13 years ago)
Author:
patdenice
Message:

feature:2284
Rename $confimage_library into $confgraphics_library
Display library used in admin intro page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/intro.php

    r8728 r10684  
    3030include_once(PHPWG_ROOT_PATH.'admin/include/check_integrity.class.php');
    3131include_once(PHPWG_ROOT_PATH.'admin/include/c13y_internal.class.php');
     32include_once(PHPWG_ROOT_PATH.'admin/include/image.class.php');
    3233
    3334// +-----------------------------------------------------------------------+
     
    259260}
    260261
     262// graphics library
     263switch (pwg_image::get_library())
     264{
     265  case 'imagick':
     266    $library = 'ImageMagick';
     267    $img = new Imagick();
     268    $version = $img->getVersion();
     269    if (preg_match('/ImageMagick \d+\.\d+\.\d+-?\d*/', $version['versionString'], $match))
     270    {
     271      $library = $match[0];
     272    }
     273    $template->assign('GRAPHICS_LIBRARY', $library);
     274    break;
     275
     276  case 'ext_imagick':
     277    $library = 'External ImageMagick';
     278    exec($conf['ext_imagick_dir'].'convert -version', $returnarray);
     279    if (preg_match('/Version: ImageMagick (\d+\.\d+\.\d+-?\d*)/', $returnarray[0], $match))
     280    {
     281      $library .= ' ' . $match[1];
     282    }
     283    $template->assign('GRAPHICS_LIBRARY', $library);
     284    break;
     285
     286  case 'gd':
     287    $gd_info = gd_info();
     288    $template->assign('GRAPHICS_LIBRARY', 'GD '.@$gd_info['GD Version']);
     289    break;
     290}
     291
    261292// +-----------------------------------------------------------------------+
    262293// |                           sending html code                           |
Note: See TracChangeset for help on using the changeset viewer.