X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwall_upload.php;h=f7638b7307d83f67af2186f6d8064d23006bae06;hb=f20464112f274d720649c2f92480cc235df4db19;hp=25a7ac50ee836eae9791c8111a12f0f9b74601c7;hpb=75306b62942a12995db67f48dd9b1a16f38c43eb;p=friendica.git diff --git a/mod/wall_upload.php b/mod/wall_upload.php index 25a7ac50ee..f7638b7307 100644 --- a/mod/wall_upload.php +++ b/mod/wall_upload.php @@ -19,8 +19,9 @@ function wall_upload_post(&$a) { $can_post = false; $visitor = 0; - $page_owner_uid = $r[0]['uid']; - $community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false); + $page_owner_uid = $r[0]['uid']; + $page_owner_nick = $r[0]['nickname']; + $community_page = (($r[0]['page-flags'] == PAGE_COMMUNITY) ? true : false); if((local_user()) && (local_user() == $page_owner_uid)) $can_post = true; @@ -52,7 +53,7 @@ function wall_upload_post(&$a) { $maximagesize = get_config('system','maximagesize'); if(($maximagesize) && ($filesize > $maximagesize)) { - notice( t('Image exceeds size limit of ') . $maximagesize . EOL); + notice( sprintf(t('Image exceeds size limit of %d'), $maximagesize) . EOL); @unlink($src); return; } @@ -75,7 +76,7 @@ function wall_upload_post(&$a) { $smallest = 0; - $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0 ); + $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, '<0>'); if(! $r) { echo ( t('Image upload failed.') . EOL); @@ -84,21 +85,21 @@ function wall_upload_post(&$a) { if($width > 640 || $height > 640) { $ph->scaleImage(640); - $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1 ); + $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, '<0>'); if($r) $smallest = 1; } if($width > 320 || $height > 320) { $ph->scaleImage(320); - $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2 ); + $r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2, 0, '<0>' ); if($r) $smallest = 2; } $basename = basename($filename); - echo "

get_baseurl(). "/photo/{$hash}-{$smallest}.jpg\" alt=\"$basename\" />

"; + echo '

\"$basename\"

"; killme(); - return; // NOTREACHED -} \ No newline at end of file + // NOTREACHED +}