]> git.mxchange.org Git - friendica.git/blobdiff - mod/wall_upload.php
Merge commit 'mike/master'
[friendica.git] / mod / wall_upload.php
index 25a7ac50ee836eae9791c8111a12f0f9b74601c7..ab06b4b2d8727a4b3c32c8213e7b8d8a6115a901 100644 (file)
@@ -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;
@@ -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,20 +85,20 @@ 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  "<br /><br /><img src=\"".$a->get_baseurl(). "/photo/{$hash}-{$smallest}.jpg\" alt=\"$basename\" /><br /><br />";
+       echo  '<br /><br /><a href="' . $a->get_baseurl() . '/photos/' . $page_owner_nick . '/image/' . $hash . '" ><img src="' . $a->get_baseurl() . "/photo/{$hash}-{$smallest}.jpg\" alt=\"$basename\" /></a><br /><br />";
 
        killme();
        return; // NOTREACHED