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;
}
dbesc($base_image['filename']),
intval($im->getHeight()),
intval($im->getWidth()),
- dbesc($im->imageString()
+ dbesc($im->imageString())
);
if($r === false)
dbesc($base_image['filename']),
intval($im->getHeight()),
intval($im->getWidth()),
- dbesc($im->imageString()
+ dbesc($im->imageString())
);
if($r === false)
// 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');
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 );