aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-03-21 13:37:55 +0100
committerMario Vavti <mario@mariovavti.com>2015-03-21 13:37:55 +0100
commit9980645ab8bf061decc36837ceea1dc5ead9f824 (patch)
tree86d2e19826bf3ab86a14a077914080d73c22e1cd
parentead45292e134fa03726912905ca1ca58ccb12fec (diff)
downloadvolse-hubzilla-9980645ab8bf061decc36837ceea1dc5ead9f824.tar.gz
volse-hubzilla-9980645ab8bf061decc36837ceea1dc5ead9f824.tar.bz2
volse-hubzilla-9980645ab8bf061decc36837ceea1dc5ead9f824.zip
fix acl for if we have an cid in /network and make $bang better visible
-rw-r--r--mod/network.php17
-rwxr-xr-xview/tpl/jot.tpl2
-rw-r--r--view/tpl/section_title.tpl5
3 files changed, 21 insertions, 3 deletions
diff --git a/mod/network.php b/mod/network.php
index 7f8d39044..a145aca36 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -116,8 +116,21 @@ function network_content(&$a, $update = 0, $load = false) {
if(x($_GET,'search') || x($_GET,'file'))
$nouveau = true;
- if($cid)
- $def_acl = array('allow_cid' => '<' . intval($cid) . '>');
+ if($cid) {
+ $r = q("SELECT abook_xchan FROM abook WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
+ intval($cid),
+ intval(local_channel())
+ );
+ if(! $r) {
+ if($update) {
+ killme();
+ }
+ notice( t('No such channel') . EOL );
+ goaway($a->get_baseurl(true) . '/network');
+ // NOTREACHED
+ }
+ $def_acl = array('allow_cid' => '<' . $r[0]['abook_xchan'] . '>');
+ }
if(! $update) {
$tabs = network_tabs();
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index 1dfb0cb75..47787676e 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -130,7 +130,7 @@
<div id="profile-jot-submit-right" class="btn-group pull-right">
{{if $showacl}}
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;">
- <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons">{{$bang}}</i>
+ <i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>{{if $bang}}&nbsp;<i class="icon-exclamation jot-icons"></i>{{/if}}
</button>
{{/if}}
{{if $preview}}
diff --git a/view/tpl/section_title.tpl b/view/tpl/section_title.tpl
new file mode 100644
index 000000000..338e57042
--- /dev/null
+++ b/view/tpl/section_title.tpl
@@ -0,0 +1,5 @@
+<div class="section-title-wrapper">
+ <h2>{{$title}}</h2>
+ <div class="clear"></div>
+</div>
+