Maria's profile photo issue, please push to master.
This commit is contained in:
parent
8467ecb1d7
commit
12f33d2cd4
@ -150,6 +150,14 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
|||||||
// If setting for the default profile, unset the profile photo flag from any other photos I own
|
// If setting for the default profile, unset the profile photo flag from any other photos I own
|
||||||
|
|
||||||
if($is_default_profile) {
|
if($is_default_profile) {
|
||||||
|
|
||||||
|
$r = q("update profile set photo = '%s', thumb = '%s' where is_default = 1 and uid = %d",
|
||||||
|
dbesc(z_root() . '/photo/profile/l/' . local_channel()),
|
||||||
|
dbesc(z_root() . '/photo/profile/m/' . local_channel()),
|
||||||
|
intval(local_channel())
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
$r = q("UPDATE photo SET photo_usage = %d WHERE photo_usage = %d
|
$r = q("UPDATE photo SET photo_usage = %d WHERE photo_usage = %d
|
||||||
AND resource_id != '%s' AND uid = %d",
|
AND resource_id != '%s' AND uid = %d",
|
||||||
intval(PHOTO_NORMAL),
|
intval(PHOTO_NORMAL),
|
||||||
@ -159,8 +167,6 @@ class Profile_photo extends \Zotlabs\Web\Controller {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
send_profile_photo_activity($channel,$base_image,$profile);
|
send_profile_photo_activity($channel,$base_image,$profile);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3649,6 +3649,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
$disallowed = array('id','aid','uid','guid');
|
$disallowed = array('id','aid','uid','guid');
|
||||||
|
|
||||||
foreach($arr['profile'] as $profile) {
|
foreach($arr['profile'] as $profile) {
|
||||||
|
|
||||||
$x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1",
|
$x = q("select * from profile where profile_guid = '%s' and uid = %d limit 1",
|
||||||
dbesc($profile['profile_guid']),
|
dbesc($profile['profile_guid']),
|
||||||
intval($channel['channel_id'])
|
intval($channel['channel_id'])
|
||||||
@ -3671,6 +3672,9 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
if(in_array($k,$disallowed))
|
if(in_array($k,$disallowed))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if($profile['is_default'] && in_array($k,['photo','thumb']))
|
||||||
|
continue;
|
||||||
|
|
||||||
if($k === 'name')
|
if($k === 'name')
|
||||||
$clean['fullname'] = $v;
|
$clean['fullname'] = $v;
|
||||||
elseif($k === 'with')
|
elseif($k === 'with')
|
||||||
|
Reference in New Issue
Block a user