fix acl for if we have an cid in /network and make $bang better visible

This commit is contained in:
Mario Vavti 2015-03-21 13:37:55 +01:00
parent ead45292e1
commit 9980645ab8
3 changed files with 21 additions and 3 deletions

View File

@ -116,8 +116,21 @@ function network_content(&$a, $update = 0, $load = false) {
if(x($_GET,'search') || x($_GET,'file')) if(x($_GET,'search') || x($_GET,'file'))
$nouveau = true; $nouveau = true;
if($cid) if($cid) {
$def_acl = array('allow_cid' => '<' . intval($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) { if(! $update) {
$tabs = network_tabs(); $tabs = network_tabs();

View File

@ -130,7 +130,7 @@
<div id="profile-jot-submit-right" class="btn-group pull-right"> <div id="profile-jot-submit-right" class="btn-group pull-right">
{{if $showacl}} {{if $showacl}}
<button id="dbtn-acl" class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" onclick="return false;"> <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> </button>
{{/if}} {{/if}}
{{if $preview}} {{if $preview}}

View File

@ -0,0 +1,5 @@
<div class="section-title-wrapper">
<h2>{{$title}}</h2>
<div class="clear"></div>
</div>