diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-07-21 21:14:54 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-07-21 21:14:54 -0400 |
commit | 5a63ddd6457ae4dba61ff30db5b6601b22ddd1b6 (patch) | |
tree | 84b9b847f384c42a462a0035142b4b5757906922 /include/text.php | |
parent | d504197a786eb46a780278fccb529daa13bfa443 (diff) | |
parent | 8566f9130395ecdbe19f9fce85a26dac39d9fe24 (diff) | |
download | volse-hubzilla-5a63ddd6457ae4dba61ff30db5b6601b22ddd1b6.tar.gz volse-hubzilla-5a63ddd6457ae4dba61ff30db5b6601b22ddd1b6.tar.bz2 volse-hubzilla-5a63ddd6457ae4dba61ff30db5b6601b22ddd1b6.zip |
Merge remote-tracking branch 'upstream/dev' into website-import
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/include/text.php b/include/text.php index 324004438..a9bde8374 100644 --- a/include/text.php +++ b/include/text.php @@ -1284,9 +1284,9 @@ function unobscure(&$item) { if(array_key_exists('item_obscured',$item) && intval($item['item_obscured'])) { $key = get_config('system','prvkey'); if($item['title']) - $item['title'] = crypto_unencapsulate(json_decode_plus($item['title']),$key); + $item['title'] = crypto_unencapsulate(json_decode($item['title'],true),$key); if($item['body']) - $item['body'] = crypto_unencapsulate(json_decode_plus($item['body']),$key); + $item['body'] = crypto_unencapsulate(json_decode($item['body'],true),$key); if(get_config('system','item_cache')) { q("update item set title = '%s', body = '%s', item_obscured = 0 where id = %d", dbesc($item['title']), @@ -1309,7 +1309,7 @@ function unobscure_mail(&$item) { function theme_attachments(&$item) { - $arr = json_decode_plus($item['attach']); + $arr = json_decode($item['attach'],true); if(is_array($arr) && count($arr)) { $attaches = array(); foreach($arr as $r) { @@ -2212,20 +2212,12 @@ function jindent($json) { return $result; } - -function json_decode_plus($s) { - $x = json_decode($s,true); - if(! $x) - $x = json_decode(str_replace(array('\\"','\\\\'),array('"','\\'),$s),true); - - return $x; -} - /** * @brief Creates navigation menu for webpage, layout, blocks, menu sites. * * @return string */ + function design_tools() { $channel = App::get_channel(); |