diff options
author | Mario <mario@mariovavti.com> | 2018-06-17 17:00:17 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-06-17 17:00:17 +0200 |
commit | 28043726e64f750e646b42aa6f649e277fc3767e (patch) | |
tree | 18a41bea6a4805454e0b1a2dacdfeda451854690 /include | |
parent | 9c5df51141d68e50d3c1f5d3097160408debce48 (diff) | |
parent | 7e736c5359732647f5203bf2bb7fcd50c448fad9 (diff) | |
download | volse-hubzilla-28043726e64f750e646b42aa6f649e277fc3767e.tar.gz volse-hubzilla-28043726e64f750e646b42aa6f649e277fc3767e.tar.bz2 volse-hubzilla-28043726e64f750e646b42aa6f649e277fc3767e.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include')
-rw-r--r-- | include/channel.php | 1 | ||||
-rwxr-xr-x | include/items.php | 5 | ||||
-rw-r--r-- | include/language.php | 2 | ||||
-rw-r--r-- | include/menu.php | 5 |
4 files changed, 8 insertions, 5 deletions
diff --git a/include/channel.php b/include/channel.php index 1a62dcd3c..d26056171 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2359,6 +2359,7 @@ function channel_store_lowlevel($arr) { '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_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_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'), diff --git a/include/items.php b/include/items.php index e75a9659d..54df5d322 100755 --- a/include/items.php +++ b/include/items.php @@ -3697,10 +3697,7 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL, $force = false) { ); } else { - $r = q("UPDATE item SET item_deleted = 1, body = '', title = '', - changed = '%s', edited = '%s' WHERE id = %d", - dbesc(datetime_convert()), - dbesc(datetime_convert()), + $r = q("DELETE FROM item WHERE id = %d", intval($item['id']) ); } diff --git a/include/language.php b/include/language.php index d0ecd3a85..69a7e3004 100644 --- a/include/language.php +++ b/include/language.php @@ -242,7 +242,7 @@ function tt($singular, $plural, $count, $ctx = ''){ if (! function_exists($f)) $f = 'string_plural_select_default'; - $k = $f($count); + $k = $f(intval($count)); return is_array($t) ? $t[$k] : $t; } diff --git a/include/menu.php b/include/menu.php index 4add78c39..1a2059451 100644 --- a/include/menu.php +++ b/include/menu.php @@ -81,6 +81,10 @@ function menu_render($menu, $class='', $edit = false, $var = array()) { if ((! $channel_id) && (local_channel())) $channel_id = local_channel(); + $chan = channelx_by_n($channel_id); + if(! $chan) + return ''; + $menu_list = menu_list($channel_id); $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( '$menu' => $menu['menu'], '$class' => $class, + '$nick' => $chan['channel_address'], '$edit' => (($edit) ? t("Edit") : ''), '$id' => $menu['menu']['menu_id'], '$items' => $menu['items'], |