X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.class.php;h=4b304a1275435ae83536041fd5eb1fa84def8e84;hp=d6d3e691902f019bab998e5abd22a291ab4f7de8;hb=fb5a16a9495b3438584cd0ab47ea1d1c0ce26995;hpb=8f3e27ca1aea300a47d35b9474c8f5fd588460da diff --git a/phpfspot.class.php b/phpfspot.class.php index d6d3e69..4b304a1 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -114,9 +114,17 @@ class PHPFSPOT { public function getPhotoName($idx) { - $details = $this->get_photo_details($idx); + if($details = $this->get_photo_details($idx)) { + + $name = $details['name']; + + if(strlen($name) > 15) { + $name = substr($name, 0, 10) ."...". substr($name, -10); + } - return $details['name']; + return $name; + + } } // getPhotoName()