From: Michael J. Rubinsky Date: Sat, 1 Aug 2009 21:22:30 +0000 (-0400) Subject: When making humanReadable, return a '---' instead of null/empty strings. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=53bd14810e9a803419d46c3d666c5761678de40f;p=horde.git When making humanReadable, return a '---' instead of null/empty strings. --- diff --git a/framework/Image/lib/Horde/Image/Exif.php b/framework/Image/lib/Horde/Image/Exif.php index e35c7f41a..4e5f53cee 100644 --- a/framework/Image/lib/Horde/Image/Exif.php +++ b/framework/Image/lib/Horde/Image/Exif.php @@ -53,6 +53,7 @@ class Horde_Image_Exif { return array('Make' => array('description' => _("Camera Make"), 'type' => 'text'), 'Model' => array('description' => _("Camera Model"), 'type' => 'text'), + 'Software' => array('description' => _("Software Version"), 'type' => 'text'), 'ImageType' => array('description' => _("Photo Type"), 'type' => 'text'), 'ImageDescription' => array('description' => _("Photo Description"), 'type' => 'text'), 'FileSize' => array('description' => _("File Size"), 'type' => 'number'), @@ -406,10 +407,10 @@ class Horde_Image_Exif // here and let the calling code deal with it, or allow this // method to take an optional charset to convert to (would // introduce a dependency on Horde_String to do the conversion). - return substr($data, 7); + $data = trim(substr($data, 7)); default: - return $data; + return !empty($data) ? $data : '---'; } }