require_once('edit.inc.php');
foreach ($cols as $col => &$colconf) {
- $colconf['visible'] = TRUE;
+ if (isset($colconf['visible'])) {
+ if ($colconf['visible'] == 'admin' and empty($User['admin'])) {
+ $colconf['visible'] = FALSE;
+ continue;
+ }
+ }
+ else {
+ $colconf['visible'] = TRUE;
+ }
if (!isset($colconf['filename'])) {
continue; # exceptional storage
$target = "$tag/{$user['name']}";
$val = file_exists($target);
$tags[$tagname] = ['value' => $val];
- if (empty($User['admin'])) {
- continue; # forbidden
- }
if (!is_writable($tag)) {
continue; # locked tag directory
}
else {
if (isset($cols[$col]['filter'])) {
list ($targetstr, $inputstr) = $cols[$col]['filter'];
- $colconf['value'] = str_replace($targetstr, $inputstr, $colconf['value']);
+ $colconf['value'] = str_replace($targetstr, $inputstr, @$colconf['value']);
}
$attrs = [