aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-22 16:49:45 -0800
committerzotlabs <mike@macgirvin.com>2018-01-22 16:49:45 -0800
commit5967360991cb3766a6517759369b6d6fd8563c61 (patch)
tree3179056a6af617e90bf727d2cf075528ecb581e0
parentdeede8e2ddb58db0bedf437f25c56c9fc050f181 (diff)
downloadvolse-hubzilla-5967360991cb3766a6517759369b6d6fd8563c61.tar.gz
volse-hubzilla-5967360991cb3766a6517759369b6d6fd8563c61.tar.bz2
volse-hubzilla-5967360991cb3766a6517759369b6d6fd8563c61.zip
hubzilla issue #920 - unable to delete permission groups with space in name
-rw-r--r--Zotlabs/Module/Settings/Permcats.php4
-rw-r--r--view/tpl/settings_permcats.tpl2
2 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Module/Settings/Permcats.php b/Zotlabs/Module/Settings/Permcats.php
index 336f69653..535399083 100644
--- a/Zotlabs/Module/Settings/Permcats.php
+++ b/Zotlabs/Module/Settings/Permcats.php
@@ -49,7 +49,7 @@ class Permcats {
if(argc() > 2)
- $name = argv(2);
+ $name = hex2bin(argv(2));
if(argc() > 3 && argv(3) === 'drop') {
\Zotlabs\Lib\Permcat::delete(local_channel(),$name);
@@ -70,7 +70,7 @@ class Permcats {
if(($pc['name']) && ($name) && ($pc['name'] == $name))
$existing = $pc['perms'];
if(! $pc['system'])
- $permcats[$pc['name']] = $pc['localname'];
+ $permcats[bin2hex($pc['name'])] = $pc['localname'];
}
}
diff --git a/view/tpl/settings_permcats.tpl b/view/tpl/settings_permcats.tpl
index f6bb9b036..bbbd41669 100644
--- a/view/tpl/settings_permcats.tpl
+++ b/view/tpl/settings_permcats.tpl
@@ -50,7 +50,7 @@
<table id="permcat-index">
{{foreach $permcats as $k => $v}}
<tr class="permcat-row-{{$k}}">
- <td width="99%"><a href="settings/permcats/{{$k}}">{{$k}}</a></td>
+ <td width="99%"><a href="settings/permcats/{{$k}}">{{$v}}</a></td>
<td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('/settings/permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td>
</tr>
{{/foreach}}