diff options
author | friendica <info@friendica.com> | 2012-11-13 14:49:03 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-11-13 14:49:03 -0800 |
commit | 35a6dd1cae384bc29b2d8ca5214eb82f15e955ad (patch) | |
tree | b1b5bd74522189e67e8eb274b916ee65078f2ee8 /mod/viewsrc.php | |
parent | 34f8b06d4511592dc6bdb3cdae3b44d86e9825e6 (diff) | |
download | volse-hubzilla-35a6dd1cae384bc29b2d8ca5214eb82f15e955ad.tar.gz volse-hubzilla-35a6dd1cae384bc29b2d8ca5214eb82f15e955ad.tar.bz2 volse-hubzilla-35a6dd1cae384bc29b2d8ca5214eb82f15e955ad.zip |
provide json parameter to viewsrc to support end-to-end encryption
Diffstat (limited to 'mod/viewsrc.php')
-rw-r--r-- | mod/viewsrc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/viewsrc.php b/mod/viewsrc.php index d728f96f5..3a369b613 100644 --- a/mod/viewsrc.php +++ b/mod/viewsrc.php @@ -6,7 +6,7 @@ function viewsrc_content(&$a) { $o = ''; $item_id = ((argc() > 1) ? intval(argv(1)) : 0); - $raw_output = ((argc() > 2 && argv[2] === 'raw') ? true : false); + $json = ((argc() > 2 && argv[2] === 'json') ? true : false); if(! local_user()) { notice( t('Permission denied.') . EOL); @@ -25,7 +25,7 @@ function viewsrc_content(&$a) { ); if($r) - $o = (($raw_output) ? $r[0]['body'] : str_replace("\n",'<br />',$r[0]['body'])); + $o = (($json) ? json_encode($r[0]['body']) : str_replace("\n",'<br />',$r[0]['body'])); } if(is_ajax()) { |