diff options
author | friendica <info@friendica.com> | 2013-08-06 03:54:49 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-08-06 03:54:49 -0700 |
commit | 24b9799dcad3dc4a224ce2ceaf52645657106a60 (patch) | |
tree | 0230360c1c7f4ec9d05f5846fb297dc3500d1470 | |
parent | 71347bb9e0c5daca206b0ea32812874e165b7b63 (diff) | |
download | volse-hubzilla-24b9799dcad3dc4a224ce2ceaf52645657106a60.tar.gz volse-hubzilla-24b9799dcad3dc4a224ce2ceaf52645657106a60.tar.bz2 volse-hubzilla-24b9799dcad3dc4a224ce2ceaf52645657106a60.zip |
convert all stored json calls to json_decode_plus()
-rw-r--r-- | include/conversation.php | 4 | ||||
-rwxr-xr-x | include/items.php | 18 | ||||
-rw-r--r-- | include/message.php | 12 | ||||
-rwxr-xr-x | include/text.php | 6 | ||||
-rw-r--r-- | include/zot.php | 4 | ||||
-rw-r--r-- | mod/editpost.php | 4 |
6 files changed, 24 insertions, 24 deletions
diff --git a/include/conversation.php b/include/conversation.php index 2d92b37be..d80ff2cc7 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -174,7 +174,7 @@ function localize_item(&$item){ $Alink = $item['author']['xchan_url']; - $obj= json_decode($item['object'],true); + $obj= json_decode_plus($item['object']); $Blink = $Bphoto = ''; @@ -203,7 +203,7 @@ function localize_item(&$item){ $Alink = $item['author']['xchan_url']; - $obj= json_decode($item['object'],true); + $obj= json_decode_plus($item['object']); $Blink = $Bphoto = ''; diff --git a/include/items.php b/include/items.php index 2d8189010..b02e27ce0 100755 --- a/include/items.php +++ b/include/items.php @@ -621,9 +621,9 @@ function encode_item($item) { if(array_key_exists('item_flags',$item) && ($item['item_flags'] & ITEM_OBSCURED)) { $key = get_config('system','prvkey'); if($item['title']) - $item['title'] = aes_unencapsulate(json_decode($item['title'],true),$key); + $item['title'] = aes_unencapsulate(json_decode_plus($item['title']),$key); if($item['body']) - $item['body'] = aes_unencapsulate(json_decode($item['body'],true),$key); + $item['body'] = aes_unencapsulate(json_decode_plus($item['body']),$key); } if($item['item_restrict'] & ITEM_DELETED) { @@ -655,11 +655,11 @@ function encode_item($item) { $x['owner'] = encode_item_xchan($item['owner']); $x['author'] = encode_item_xchan($item['author']); if($item['object']) - $x['object'] = json_decode($item['object'],true); + $x['object'] = json_decode_plus($item['object']); if($item['target']) - $x['target'] = json_decode($item['target'],true); + $x['target'] = json_decode_plus($item['target']); if($item['attach']) - $x['attach'] = json_decode($item['attach'],true); + $x['attach'] = json_decode_plus($item['attach']); if($y = encode_item_flags($item)) $x['flags'] = $y; @@ -821,9 +821,9 @@ function encode_mail($item) { if(array_key_exists('mail_flags',$item) && ($item['mail_flags'] & MAIL_OBSCURED)) { $key = get_config('system','prvkey'); if($item['title']) - $item['title'] = aes_unencapsulate(json_decode($item['title'],true),$key); + $item['title'] = aes_unencapsulate(json_decode_plus($item['title']),$key); if($item['body']) - $item['body'] = aes_unencapsulate(json_decode($item['body'],true),$key); + $item['body'] = aes_unencapsulate(json_decode_plus($item['body']),$key); } $x['message_id'] = $item['mid']; @@ -1939,14 +1939,14 @@ function tag_deliver($uid,$item_id) { logger('tag_deliver: community tag activity received'); if(($item['owner_xchan'] === $u[0]['channel_hash']) && (! get_pconfig($u[0]['channel_id'],'system','blocktags'))) { - $j_tgt = json_decode($item['target'],true); + $j_tgt = json_decode_plus($item['target']); if($j_tgt && $j_tgt['id']) { $p = q("select * from item where mid = '%s' and uid = %d limit 1", dbesc($j_tgt['id']), intval($u[0]['channel_id']) ); if($p) { - $j_obj = json_decode($item['object'],true); + $j_obj = json_decode_plus($item['object']); logger('tag_deliver: tag object: ' . print_r($j_obj,true), LOGGER_DATA); if($j_obj && $j_obj['id'] && $j_obj['title']) { if(is_array($j_obj['link'])) diff --git a/include/message.php b/include/message.php index d6294cdba..fc0d5f2b3 100644 --- a/include/message.php +++ b/include/message.php @@ -181,9 +181,9 @@ function private_messages_list($uid, $mailbox = '', $start = 0, $numitems = 0) { $key = get_config('system','prvkey'); if($r[$k]['title']) - $r[$k]['title'] = aes_unencapsulate(json_decode($r[$k]['title'],true),$key); + $r[$k]['title'] = aes_unencapsulate(json_decode_plus($r[$k]['title']),$key); if($r[$k]['body']) - $r[$k]['body'] = aes_unencapsulate(json_decode($r[$k]['body'],true),$key); + $r[$k]['body'] = aes_unencapsulate(json_decode_plus($r[$k]['body']),$key); } } @@ -220,9 +220,9 @@ function private_messages_fetch_message($channel_id, $messageitem_id, $updatesee if($messages[$k]['mail_flags'] & MAIL_OBSCURED) { $key = get_config('system','prvkey'); if($messages[$k]['title']) - $messages[$k]['title'] = aes_unencapsulate(json_decode($messages[$k]['title'],true),$key); + $messages[$k]['title'] = aes_unencapsulate(json_decode_plus($messages[$k]['title']),$key); if($messages[$k]['body']) - $messages[$k]['body'] = aes_unencapsulate(json_decode($messages[$k]['body'],true),$key); + $messages[$k]['body'] = aes_unencapsulate(json_decode_plus($messages[$k]['body']),$key); } } @@ -308,9 +308,9 @@ function private_messages_fetch_conversation($channel_id, $messageitem_id, $upda if($messages[$k]['mail_flags'] & MAIL_OBSCURED) { $key = get_config('system','prvkey'); if($messages[$k]['title']) - $messages[$k]['title'] = aes_unencapsulate(json_decode($messages[$k]['title'],true),$key); + $messages[$k]['title'] = aes_unencapsulate(json_decode_plus($messages[$k]['title']),$key); if($messages[$k]['body']) - $messages[$k]['body'] = aes_unencapsulate(json_decode($messages[$k]['body'],true),$key); + $messages[$k]['body'] = aes_unencapsulate(json_decode_plus($messages[$k]['body']),$key); } } diff --git a/include/text.php b/include/text.php index 979fd897a..61b39cb59 100755 --- a/include/text.php +++ b/include/text.php @@ -988,9 +988,9 @@ function prepare_body(&$item,$attach = false) { if(array_key_exists('item_flags',$item) && ($item['item_flags'] & ITEM_OBSCURED)) { $key = get_config('system','prvkey'); if($item['title']) - $item['title'] = aes_unencapsulate(json_decode($item['title'],true),$key); + $item['title'] = aes_unencapsulate(json_decode_plus($item['title']),$key); if($item['body']) - $item['body'] = aes_unencapsulate(json_decode($item['body'],true),$key); + $item['body'] = aes_unencapsulate(json_decode_plus($item['body']),$key); } $s = prepare_text($item['body'],$item['mimetype']); @@ -1004,7 +1004,7 @@ function prepare_body(&$item,$attach = false) { } - $arr = json_decode($item['attach'],true); + $arr = json_decode_plus($item['attach']); if(count($arr)) { $s .= '<div class="body-attach">'; foreach($arr as $r) { diff --git a/include/zot.php b/include/zot.php index 437ec0c86..d1bc03bc2 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1153,9 +1153,9 @@ function remove_community_tag($sender,$arr,$uid) { $i = $r[0]; if($i['target']) - $i['target'] = json_decode($i['target'],true); + $i['target'] = json_decode_plus($i['target']); if($i['object']) - $i['object'] = json_decode($i['object'],true); + $i['object'] = json_decode_plus($i['object']); if(! ($i['target'] && $i['object'])) { logger('remove_community_tag: no target/object'); diff --git a/mod/editpost.php b/mod/editpost.php index e36e0ea5a..583bae9eb 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -52,9 +52,9 @@ function editpost_content(&$a) { if($itm[0]['item_flags'] & ITEM_OBSCURED) { $key = get_config('system','prvkey'); if($itm[0]['title']) - $itm[0]['title'] = aes_unencapsulate(json_decode($itm[0]['title'],true),$key); + $itm[0]['title'] = aes_unencapsulate(json_decode_plus($itm[0]['title']),$key); if($itm[0]['body']) - $itm[0]['body'] = aes_unencapsulate(json_decode($itm[0]['body'],true),$key); + $itm[0]['body'] = aes_unencapsulate(json_decode_plus($itm[0]['body']),$key); } $tpl = get_markup_template("jot.tpl"); |