Skip to content

Commit d6de5c4

Browse files
committed
Fixed php glob call
1 parent b169f91 commit d6de5c4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

web/index.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
$GLOBALS['DB']->exec("UPDATE inky_images SET lastupdate = 0");
117117
// Read Directory
118118
echo "<table>";
119-
$files = glob("./*/*.{png,jpg,jpeg}");
119+
$files = glob("./*/*.{png,jpg,jpeg}", \GLOB_BRACE);
120120
for($i = 0;$i < count($files);$i++) {
121121
$stmt = $GLOBALS['DB']->prepare("UPDATE inky_images SET lastupdate = 1 WHERE imagename = :imagename");
122122
$stmt->bindValue(':imagename', $files[$i], PDO::PARAM_STR);
@@ -159,6 +159,7 @@
159159
echo 'Inky: ';
160160
echo '<a href="' . $GLOBALS['CONFIG']['INKY_URL'] . '/next/" target="_blank"><button>Next image</button></a>&nbsp;';
161161
echo '<a href="' . $GLOBALS['CONFIG']['INKY_URL'] . '/clear/" target="_blank"><button>Clear screen</button></a>&nbsp;';
162+
echo '<a href="javascript:window.open(\'' . $GLOBALS['CONFIG']['INKY_URL'] . '/show/\' + document.getElementById(\'extra_url\').value, \'_blank\').focus();"><button>Show URL</button></a>&nbsp;<input type="text" id="extra_url" style="width: 400px;" />';
162163
echo '<br/><br/>';
163164

164165
$i = 0;

0 commit comments

Comments
 (0)