X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fviewsrc.php;h=94ed9b5dc247f602feaa6ad21a0df9af43bc73a6;hb=db2d0e009503539b134fd43837d440028d5b8de7;hp=8900e44db446663bde0c5b29c59ebe72e577b297;hpb=8aa25523721303b6883e1a793f20997f8a33ec0a;p=friendica.git
diff --git a/mod/viewsrc.php b/mod/viewsrc.php
old mode 100755
new mode 100644
index 8900e44db4..94ed9b5dc2
--- a/mod/viewsrc.php
+++ b/mod/viewsrc.php
@@ -3,7 +3,7 @@
function viewsrc_content(&$a) {
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Access denied.') . EOL);
return;
}
@@ -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 (dbm::is_result($r))
+ if(is_ajax()) {
+ echo str_replace("\n",'
',$r[0]['body']);
+ killme();
+ } else {
+ $o .= str_replace("\n",'
',$r[0]['body']);
+ }
return $o;
}