From: Duck (Jakob Munih) Date: Mon, 15 Jun 2009 04:47:18 +0000 (+0200) Subject: update Horde_Image usage X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ed04699610bf3154cd5e718cb4cf85d8297e5b4c;p=horde.git update Horde_Image usage --- diff --git a/news/lib/News.php b/news/lib/News.php index c3ad656d8..b8a9131e8 100644 --- a/news/lib/News.php +++ b/news/lib/News.php @@ -265,10 +265,14 @@ class News { $vfspath = self::VFS_PATH . '/images/' . $type; $vfs_name = $id . '.' . $conf['images']['image_type']; - $driver = empty($conf['image']['convert']) ? 'gd' : 'im'; - $img = Horde_Image::factory($driver, - array('type' => $conf['images']['image_type'], - 'temp' => Horde::getTempDir())); + $context = array('tmpdir' => Horde::getTempDir()); + if (!empty($conf['image']['convert'])) { + $context['convert'] = $conf['image']['convert']; + } + $params = array('type' => $conf['images']['image_type'], + 'context' => $context); + $driver = empty($conf['image']['convert']) ? 'Gd' : 'Im'; + $img = Horde_Image::factory($driver, $params); if ($img instanceof PEAR_Error) { return $img;