Merge branch 'master' of ../hz into dev

This commit is contained in:
zotlabs 2018-06-10 22:16:39 -07:00
commit a8f179145b
4 changed files with 8 additions and 5 deletions

View File

@ -2359,6 +2359,7 @@ function channel_store_lowlevel($arr) {
'channel_dirdate' => ((array_key_exists('channel_dirdate',$arr)) ? $arr['channel_dirdate'] : NULL_DATE), 'channel_dirdate' => ((array_key_exists('channel_dirdate',$arr)) ? $arr['channel_dirdate'] : NULL_DATE),
'channel_lastpost' => ((array_key_exists('channel_lastpost',$arr)) ? $arr['channel_lastpost'] : NULL_DATE), 'channel_lastpost' => ((array_key_exists('channel_lastpost',$arr)) ? $arr['channel_lastpost'] : NULL_DATE),
'channel_deleted' => ((array_key_exists('channel_deleted',$arr)) ? $arr['channel_deleted'] : NULL_DATE), 'channel_deleted' => ((array_key_exists('channel_deleted',$arr)) ? $arr['channel_deleted'] : NULL_DATE),
'channel_active' => ((array_key_exists('channel_active',$arr)) ? $arr['channel_active'] : NULL_DATE),
'channel_max_anon_mail' => ((array_key_exists('channel_max_anon_mail',$arr)) ? $arr['channel_max_anon_mail'] : '10'), 'channel_max_anon_mail' => ((array_key_exists('channel_max_anon_mail',$arr)) ? $arr['channel_max_anon_mail'] : '10'),
'channel_max_friend_req' => ((array_key_exists('channel_max_friend_req',$arr)) ? $arr['channel_max_friend_req'] : '10'), 'channel_max_friend_req' => ((array_key_exists('channel_max_friend_req',$arr)) ? $arr['channel_max_friend_req'] : '10'),
'channel_expire_days' => ((array_key_exists('channel_expire_days',$arr)) ? $arr['channel_expire_days'] : '0'), 'channel_expire_days' => ((array_key_exists('channel_expire_days',$arr)) ? $arr['channel_expire_days'] : '0'),

View File

@ -3697,10 +3697,7 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) {
); );
} }
else { else {
$r = q("UPDATE item SET item_deleted = 1, body = '', title = '', $r = q("DELETE FROM item WHERE id = %d",
changed = '%s', edited = '%s' WHERE id = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($item['id']) intval($item['id'])
); );
} }

View File

@ -81,6 +81,10 @@ function menu_render($menu, $class='', $edit = false, $var = array()) {
if ((! $channel_id) && (local_channel())) if ((! $channel_id) && (local_channel()))
$channel_id = local_channel(); $channel_id = local_channel();
$chan = channelx_by_n($channel_id);
if(! $chan)
return '';
$menu_list = menu_list($channel_id); $menu_list = menu_list($channel_id);
$menu_names = array(); $menu_names = array();
@ -110,6 +114,7 @@ function menu_render($menu, $class='', $edit = false, $var = array()) {
$ret = replace_macros(get_markup_template('usermenu.tpl'),array( $ret = replace_macros(get_markup_template('usermenu.tpl'),array(
'$menu' => $menu['menu'], '$menu' => $menu['menu'],
'$class' => $class, '$class' => $class,
'$nick' => $chan['channel_address'],
'$edit' => (($edit) ? t("Edit") : ''), '$edit' => (($edit) ? t("Edit") : ''),
'$id' => $menu['menu']['menu_id'], '$id' => $menu['menu']['menu_id'],
'$items' => $menu['items'], '$items' => $menu['items'],

View File

@ -2,7 +2,7 @@
<div id="pmenu-{{$id}}" class="pmenu{{if !$class}} widget{{else}} {{$class}}{{/if}}"> <div id="pmenu-{{$id}}" class="pmenu{{if !$class}} widget{{else}} {{$class}}{{/if}}">
{{/if}} {{/if}}
{{if $menu.menu_desc}} {{if $menu.menu_desc}}
<h3 class="pmenu-title">{{$menu.menu_desc}}{{if $edit}} <a href="mitem/{{$menu.menu_id}}" title="{{$edit}}"><i class="fa fa-pencil fakelink" title="{{$edit}}"></i></a>{{/if}}</h3> <h3 class="pmenu-title">{{$menu.menu_desc}}{{if $edit}} <a href="mitem/{{$nick}}/{{$menu.menu_id}}" title="{{$edit}}"><i class="fa fa-pencil fakelink" title="{{$edit}}"></i></a>{{/if}}</h3>
{{/if}} {{/if}}
{{if $items}} {{if $items}}
<ul class="pmenu-body{{if $wrap || !$class}} nav nav-pills flex-column{{elseif !$wrap || $class}} {{$class}}{{/if}}"> <ul class="pmenu-body{{if $wrap || !$class}} nav nav-pills flex-column{{elseif !$wrap || $class}} {{$class}}{{/if}}">