From 831714f0f0e5bd9a17c760a2476a12603be5d089 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 21 Aug 2014 16:46:24 -0700 Subject: profile edit - missing visibility and drop link on non-default profiles, re-arrange order of replacing red#matrix smilie so it works correctly, accept a post with body content of '0' which was interpreted by x() as nothing (was treated as integer). --- include/items.php | 8 ++++---- include/text.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index fbe67817d..783c67752 100755 --- a/include/items.php +++ b/include/items.php @@ -1664,8 +1664,8 @@ function item_store($arr,$allow_exec = false) { } - $arr['title'] = ((x($arr,'title')) ? trim($arr['title']) : ''); - $arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : ''); + $arr['title'] = ((array_key_exists('title',$arr) && strlen($arr['title'])) ? trim($arr['title']) : ''); + $arr['body'] = ((array_key_exists('body',$arr) && strlen($arr['body'])) ? trim($arr['body']) : ''); $arr['allow_cid'] = ((x($arr,'allow_cid')) ? trim($arr['allow_cid']) : ''); $arr['allow_gid'] = ((x($arr,'allow_gid')) ? trim($arr['allow_gid']) : ''); @@ -2136,7 +2136,6 @@ function item_store_update($arr,$allow_exec = false) { $arr['commented'] = $orig[0]['commented']; $arr['received'] = datetime_convert(); $arr['changed'] = datetime_convert(); - $arr['title'] = ((x($arr,'title')) ? notags(trim($arr['title'])) : ''); $arr['location'] = ((x($arr,'location')) ? notags(trim($arr['location'])) : $orig[0]['location']); $arr['coord'] = ((x($arr,'coord')) ? notags(trim($arr['coord'])) : $orig[0]['coord']); $arr['verb'] = ((x($arr,'verb')) ? notags(trim($arr['verb'])) : $orig[0]['verb']); @@ -2152,7 +2151,8 @@ function item_store_update($arr,$allow_exec = false) { $arr['deny_gid'] = ((array_key_exists('deny_gid',$arr)) ? trim($arr['deny_gid']) : $orig[0]['deny_gid']); $arr['item_private'] = ((array_key_exists('item_private',$arr)) ? intval($arr['item_private']) : $orig[0]['item_private']); - $arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : ''); + $arr['title'] = ((array_key_exists('title',$arr) && strlen($arr['title'])) ? trim($arr['title']) : ''); + $arr['body'] = ((array_key_exists('body',$arr) && strlen($arr['body'])) ? trim($arr['body']) : ''); $arr['attach'] = ((x($arr,'attach')) ? notags(trim($arr['attach'])) : $orig[0]['attach']); $arr['app'] = ((x($arr,'app')) ? notags(trim($arr['app'])) : $orig[0]['app']); // $arr['item_restrict'] = ((x($arr,'item_restrict')) ? intval($arr['item_restrict']) : $orig[0]['item_restrict'] ); diff --git a/include/text.php b/include/text.php index 680e6fe95..d3d8b84a6 100755 --- a/include/text.php +++ b/include/text.php @@ -1002,9 +1002,9 @@ function smilies($s, $sample = false) { ':facepalm', ':like', ':dislike', + 'red#matrix', 'red#', - 'r#', - 'red#matrix' + 'r#' ); $icons = array( @@ -1040,9 +1040,9 @@ function smilies($s, $sample = false) { ':facepalm', ':like', ':dislike', + 'redred#matrixmatrix', 'redred#matrix', - 'redr#matrix', - 'redred#matrixmatrix' + 'redr#matrix' ); -- cgit v1.2.3