X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwall_upload.php;h=64f174a78e4763a58e445d153a21a4de73643ed1;hb=355c42cb309eb1313097411067ca999b699aa620;hp=dd2197d7cd776ae6f3b43dff97e3fa58e443de00;hpb=0bfb6314dfd917ab5e1ab37a654821f9db22f7fb;p=friendica.git diff --git a/mod/wall_upload.php b/mod/wall_upload.php index dd2197d7cd..64f174a78e 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -55,7 +55,7 @@ function wall_upload_post(&$a) { if(($maximagesize) && ($filesize > $maximagesize)) { echo sprintf( t('Image exceeds size limit of %d'), $maximagesize) . EOL; @unlink($src); - return; + killme(); } $imagedata = @file_get_contents($src); @@ -100,7 +100,25 @@ function wall_upload_post(&$a) { } $basename = basename($filename); - echo '

\"$basename\"

"; + + +/* mod Waitman Gobble NO WARRANTY */ + +//if we get the signal then return the image url info in BBCODE, otherwise this outputs the info and bails (for the ajax image uploader on wall post) + if ($_REQUEST['hush']!='yeah') { + + /*existing code*/ + if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) + echo "\n\n" . '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.jpg[/img][/url]\n\n"; + else + echo '

\"$basename\"

"; + /*existing code*/ + + } else { + $m = '[url=' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '][img]' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.jpg[/img][/url]"; + return($m); + } +/* mod Waitman Gobble NO WARRANTY */ killme(); // NOTREACHED