diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-07-20 05:21:19 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-07-20 05:21:19 -0700 |
commit | 466267fbb5b5cc466196e40b6a8fe96f25c57e2f (patch) | |
tree | 8fc00033648bd7716fdeac8eaddca054b2fbf1be /mod/profile_photo.php | |
parent | ba8da761e669b22e16e1075e0e1e79d8b458af3e (diff) | |
download | volse-hubzilla-466267fbb5b5cc466196e40b6a8fe96f25c57e2f.tar.gz volse-hubzilla-466267fbb5b5cc466196e40b6a8fe96f25c57e2f.tar.bz2 volse-hubzilla-466267fbb5b5cc466196e40b6a8fe96f25c57e2f.zip |
lotsoflittlestuff
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r-- | mod/profile_photo.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 36657ba14..9a694971d 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 ); |