From: Mischa POSLAWSKY Date: Tue, 17 Jul 2018 20:08:43 +0000 (+0200) Subject: login/edit: hide empty tags column (empty groups) X-Git-Tag: v3.6~12 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/3da3adc1788fb8be517e61e8b6be094b40875b35 login/edit: hide empty tags column (empty groups) --- diff --git a/login/edit.php b/login/edit.php index ad9dbda..49b8ed8 100644 --- a/login/edit.php +++ b/login/edit.php @@ -17,14 +17,16 @@ and !empty($Place['user']) and $Place['user'] !== $User['name']) { require_once('edit.inc.php'); foreach ($cols as $col => &$colconf) { + $colconf['visible'] = TRUE; + if (!isset($colconf['filename'])) { continue; # exceptional storage } if (isset($colconf['values'])) { if (!file_exists($colconf['filename'])) { + $colconf['visible'] = FALSE; continue; - #TODO: drop key } $tags = []; foreach (glob($colconf['filename'] . '/*') as $tag) { @@ -158,6 +160,10 @@ if ($_POST) {