diff index.php @ 15:3dbddf76760a

Add filename as title.
author edogawaconan <me@myconan.net>
date Wed, 22 Oct 2014 01:17:34 +0900
parents c2a468e9f3ac
children 3c0b3a38a7fc
line wrap: on
line diff
--- a/index.php	Wed Oct 22 01:12:55 2014 +0900
+++ b/index.php	Wed Oct 22 01:17:34 2014 +0900
@@ -45,7 +45,7 @@
   function link_to($target, $title) {
     $lightbox = "";
     if (substr($target, -1) !== "/" && preg_match("/(jpe?g|gif|png|webp)$/i", pathinfo($target, PATHINFO_EXTENSION)) === 1) {
-      $lightbox = ' data-lightbox="aa" ';
+      $lightbox = ' data-lightbox="aa" data-title="' . $target . '" ';
     }
 
     return('<a href="' . a($target) . '"' . $lightbox . ">" . h($title) . "</a>");