X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fviewsrc.php;h=3fa4eaed53bad2b53686a59aef0af30acf1f5645;hb=0c9cc29a51941eb572bf16fd5489d0947d47d033;hp=8900e44db446663bde0c5b29c59ebe72e577b297;hpb=00c342e13d833fd215e5dc03a508e1abe660fe21;p=friendica.git
diff --git a/mod/viewsrc.php b/mod/viewsrc.php
index 8900e44db4..3fa4eaed53 100644
--- a/mod/viewsrc.php
+++ b/mod/viewsrc.php
@@ -18,13 +18,19 @@ function viewsrc_content(&$a) {
$r = q("SELECT `item`.`body` FROM `item`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ and `item`.`moderated` = 0
AND `item`.`id` = '%s' LIMIT 1",
intval(local_user()),
dbesc($item_id)
);
if(count($r))
- $o .= str_replace("\n",'
',$r[0]['body']);
+ if(is_ajax()) {
+ echo str_replace("\n",'
',$r[0]['body']);
+ killme();
+ } else {
+ $o .= str_replace("\n",'
',$r[0]['body']);
+ }
return $o;
}