DataObjects/Images.php
authorAlan Knowles <alan@roojs.com>
Fri, 15 Nov 2013 04:08:22 +0000 (12:08 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 15 Nov 2013 04:08:22 +0000 (12:08 +0800)
DataObjects/Images.php

index 20ad83a..7c7745e 100644 (file)
@@ -485,8 +485,15 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             $sy = $sz[1];
         }
         // create it?
-         
-        return '<img src="' . $this->URL($size, $provider) . '" width="'. $sx . '" height="'. $sy . '">';
+        $extra = '';
+        if (strlen($this->title) {
+            $extra = ' title="'. htmlspecialchars($this->title) . '"'
+        })
+        
+        return '<img src="' . $this->URL($size, $provider) .
+                $extra .
+                '" width="'. $sx .
+                '" height="'. $sy . '">';
         
         
     }