From 6c0564146dfce138fef0f841a0d101a6985b9ae1 Mon Sep 17 00:00:00 2001 From: Matthew Gamble Date: Thu, 29 Sep 2016 23:06:36 +1000 Subject: [PATCH] Output valid image sizes onto page allow for image size picking Currently not implemented, obviously. --- modes/filebrowser.php | 6 +++++- templates/filebrowser.phtml | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modes/filebrowser.php b/modes/filebrowser.php index 16796af..7bd1c26 100644 --- a/modes/filebrowser.php +++ b/modes/filebrowser.php @@ -3,7 +3,11 @@ $paths = Access::getAllowedPaths(); if (empty($_POST)) { - loadPicTemplate("templates/filebrowser.phtml", array("paths" => $paths)); + $appConf = loadPicFile("conf/app.json"); + loadPicTemplate("templates/filebrowser.phtml", array( + "paths" => $paths, + "imageSizes" => json_decode($appConf, true)["image_sizes"], + )); exit(); } if (!isset($_POST["path"]) || !is_numeric($_POST["path"])) { diff --git a/templates/filebrowser.phtml b/templates/filebrowser.phtml index 432d25d..2ec894a 100644 --- a/templates/filebrowser.phtml +++ b/templates/filebrowser.phtml @@ -117,6 +117,10 @@ Keyboard
shortcuts } + +