set profile when "use existing photo"
This commit is contained in:
parent
515b054a6e
commit
b8c5a91940
@ -71,6 +71,8 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
logger('profile: ' . $_REQUEST['profile']);
|
||||||
|
|
||||||
|
|
||||||
// phase 2 - we have finished cropping
|
// phase 2 - we have finished cropping
|
||||||
|
|
||||||
@ -269,10 +271,18 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
// check_form_security_token_redirectOnErr('/profile_photo', 'profile_photo');
|
|
||||||
|
|
||||||
$resource_id = argv(2);
|
$resource_id = argv(2);
|
||||||
|
|
||||||
|
// When using an existing photo, we don't have a dialogue to offer a choice of profiles,
|
||||||
|
// so it gets attached to the default
|
||||||
|
|
||||||
|
$p = q("select id from profile where is_default = 1 and uid = %d",
|
||||||
|
intval(local_channel())
|
||||||
|
);
|
||||||
|
if($p) {
|
||||||
|
$_REQUEST['profile'] = $p[0]['id'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC",
|
$r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC",
|
||||||
intval(local_channel()),
|
intval(local_channel()),
|
||||||
|
Reference in New Issue
Block a user