From: Duck (Jakob Munih) Date: Wed, 28 Jan 2009 19:33:50 +0000 (+0100) Subject: Dont harcode drivers X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e269cd5ebc6474bd701113534435f92c79f05d39;p=horde.git Dont harcode drivers --- diff --git a/folks/lib/Driver.php b/folks/lib/Driver.php index 1ea5ca400..f722f661c 100644 --- a/folks/lib/Driver.php +++ b/folks/lib/Driver.php @@ -92,8 +92,10 @@ class Folks_Driver { $vfspath = Folks::VFS_PATH . '/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/'; $vfs_name = $p . '.' . $conf['images']['image_type']; - $img = Horde_Image::factory('gd', array('type' => $conf['images']['image_type'], - 'temp' => Horde::getTempDir())); + $driver = empty($conf['image']['convert']) ? 'gd' : 'im'; + $img = Horde_Image::factory($driver, + array('type' => $conf['images']['image_type'], + 'temp' => Horde::getTempDir())); $result = $img->loadFile($file); if ($result instanceof PEAR_Error) { @@ -165,7 +167,7 @@ class Folks_Driver { public function isBlacklisted($user, $check) { require_once FOLKS_BASE . '/lib/Friends.php'; - $friends = Folks_Friends::singleton($GLOBALS['conf']['friends'], array('user' => $user)); + $friends = Folks_Friends::singleton(null, array('user' => $user)); return $friends->isBlacklisted($check); } @@ -184,7 +186,7 @@ class Folks_Driver { } require_once FOLKS_BASE . '/lib/Friends.php'; - $friends = Folks_Friends::singleton($GLOBALS['conf']['friends'], array('user' => $user)); + $friends = Folks_Friends::singleton(null, array('user' => $user)); return $friends->isFriend($check); } @@ -198,7 +200,7 @@ class Folks_Driver { public function getFriends($user) { require_once FOLKS_BASE . '/lib/Friends.php'; - $friends = Folks_Friends::singleton($GLOBALS['conf']['friends'], array('user' => $user)); + $friends = Folks_Friends::singleton(null, array('user' => $user)); return $friends->getFriends(); }