summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpfspot.class.php12
1 files changed, 10 insertions, 2 deletions
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()