diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-02-18 20:33:25 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2016-02-18 20:33:25 +0100 |
commit | cc264b2d60049a844fe17322fbcb367712a7071f (patch) | |
tree | f1f069a49dd186d4cf21c37a25fb794d6d53e6f2 /mod/profile_photo.php | |
parent | b77c5ae61e5a208daf4b9431a730db874c487e32 (diff) | |
parent | 33c34984e647f48452d53b93b635f6f517a0f392 (diff) | |
download | volse-hubzilla-cc264b2d60049a844fe17322fbcb367712a7071f.tar.gz volse-hubzilla-cc264b2d60049a844fe17322fbcb367712a7071f.tar.bz2 volse-hubzilla-cc264b2d60049a844fe17322fbcb367712a7071f.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/profile_photo.php')
-rw-r--r-- | mod/profile_photo.php | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 0091d0585..9dc71f256 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -274,58 +274,6 @@ function profile_photo_post(&$a) { } -function send_profile_photo_activity($channel,$photo,$profile) { - - // for now only create activities for the default profile - - if(! intval($profile['is_default'])) - return; - - $arr = array(); - $arr['item_thread_top'] = 1; - $arr['item_origin'] = 1; - $arr['item_wall'] = 1; - $arr['obj_type'] = ACTIVITY_OBJ_PHOTO; - $arr['verb'] = ACTIVITY_UPDATE; - - $arr['object'] = json_encode(array( - 'type' => $arr['obj_type'], - 'id' => z_root() . '/photo/profile/l/' . $channel['channel_id'], - 'link' => array('rel' => 'photo', 'type' => $photo['type'], 'href' => z_root() . '/photo/profile/l/' . $channel['channel_id']) - )); - - if(stripos($profile['gender'],t('female')) !== false) - $t = t('%1$s updated her %2$s'); - elseif(stripos($profile['gender'],t('male')) !== false) - $t = t('%1$s updated his %2$s'); - else - $t = t('%1$s updated their %2$s'); - - $ptext = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo['resource_id'] . ']' . t('profile photo') . '[/zrl]'; - - $ltext = '[zrl=' . z_root() . '/profile/' . $channel['channel_address'] . ']' . '[zmg=150x150]' . z_root() . '/photo/' . $photo['resource_id'] . '-4[/zmg][/zrl]'; - - $arr['body'] = sprintf($t,$channel['channel_name'],$ptext) . "\n\n" . $ltext; - - $acl = new AccessList($channel); - $x = $acl->get(); - $arr['allow_cid'] = $x['allow_cid']; - - $arr['allow_gid'] = $x['allow_gid']; - $arr['deny_cid'] = $x['deny_cid']; - $arr['deny_gid'] = $x['deny_gid']; - - $arr['uid'] = $channel['channel_id']; - $arr['aid'] = $channel['channel_account_id']; - - $arr['owner_xchan'] = $channel['channel_hash']; - $arr['author_xchan'] = $channel['channel_hash']; - - post_activity_item($arr); - - -} - /* @brief Generate content of profile-photo view * @@ -452,6 +400,8 @@ function profile_photo_content(&$a) { '$title' => t('Upload Profile Photo'), '$submit' => t('Upload'), '$profiles' => $profiles, + '$single' => ((count($profiles) == 1) ? true : false), + '$profile0' => $profiles[0], '$form_security_token' => get_form_security_token("profile_photo"), // FIXME - yuk '$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>') |