X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile_photo.php;h=9a694971dbebd5824d8b1cb4771cc695ff3f4102;hb=466267fbb5b5cc466196e40b6a8fe96f25c57e2f;hp=36657ba14e799f9d120217e5dd2005854b2df2c8;hpb=c3fd5ed73202f4dd17dda87ac968b0db4f44d423;p=friendica.git diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 36657ba14e..9a694971db 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -4,17 +4,17 @@ require_once("Photo.php"); function profile_photo_init(&$a) { - if((! local_user()) { + if(! local_user()) { return; } require_once("mod/profile.php"); - profile_load($a,$_SESSION['uid']); + profile_load($a,$a->user['nickname']); } function profile_photo_post(&$a) { - if((! local_user()) { + if(! local_user()) { notice ( "Permission denied." . EOL ); return; } @@ -63,7 +63,7 @@ function profile_photo_post(&$a) { dbesc($base_image['filename']), intval($im->getHeight()), intval($im->getWidth()), - dbesc($im->imageString() + dbesc($im->imageString()) ); if($r === false) @@ -81,7 +81,7 @@ function profile_photo_post(&$a) { dbesc($base_image['filename']), intval($im->getHeight()), intval($im->getWidth()), - dbesc($im->imageString() + dbesc($im->imageString()) ); if($r === false) @@ -89,10 +89,10 @@ function profile_photo_post(&$a) { // Unset the profile photo flag from any other photos I own - $r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d" + $r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d", dbesc($base_image['resource-id']), intval($_SESSION['uid']) - ) + ); } goaway($a->get_baseurl() . '/profiles'); @@ -160,7 +160,7 @@ function profile_photo_post(&$a) { dbesc(basename($filename)), intval($ph->getHeight()), intval($ph->getWidth()), - dbesc($ph->imageString() + dbesc($ph->imageString()) ); if($r === false) notice("Image size reduction (640) failed." . EOL );