X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fremotesubscribe.php;h=b676484cd8fde58626d38fe968b098567b894482;hb=d0559fdf4dafcaf8446b437f4af089c944a23d09;hp=07f40ea2aa1f3f93467a7ef56d40f7f0a183db4e;hpb=71c40322738c537fecd75f81cd530306d35187ad;p=quix0rs-gnu-social.git diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php index 07f40ea2aa..b676484cd8 100644 --- a/actions/remotesubscribe.php +++ b/actions/remotesubscribe.php @@ -20,7 +20,6 @@ if (!defined('LACONICA')) { exit(1); } require_once(INSTALLDIR.'/lib/omb.php'); -require_once('Auth/Yadis/Yadis.php'); class RemotesubscribeAction extends Action { @@ -42,14 +41,17 @@ class RemotesubscribeAction extends Action { function show_form($err=NULL) { $nickname = $this->trimmed('nickname'); + $profile = $this->trimmed('profile_url'); common_show_header(_t('Remote subscribe')); if ($err) { common_element('div', 'error', $err); } common_element_start('form', array('id' => 'remotesubscribe', 'method' => 'POST', 'action' => common_local_url('remotesubscribe'))); - common_input('nickname', _t('User nickname'), $nickname); - common_input('profile', _t('Profile URL')); + common_input('nickname', _t('User nickname'), $nickname, + _t('Nickname of the user you want to follow')); + common_input('profile_url', _t('Profile URL'), $profile, + _t('URL of your profile on another compatible microblogging service')); common_submit('submit', _t('Subscribe')); common_element_end('form'); common_show_footer(); @@ -63,7 +65,7 @@ class RemotesubscribeAction extends Action { return; } - $profile = $this->trimmed('profile'); + $profile = $this->trimmed('profile_url'); if (!$profile) { $this->show_form(_t('No such user!')); @@ -309,8 +311,13 @@ class RemotesubscribeAction extends Action { # store all our info here $omb['listenee'] = $user->nickname; + $omb['listener'] = omb_local_id($omb[OAUTH_ENDPOINT_REQUEST]); $omb['token'] = $token; $omb['secret'] = $secret; + # call doesn't work after bounce back so we cache; maybe serialization issue...? + $omb['access_token_url'] = omb_service_uri($omb[OAUTH_ENDPOINT_ACCESS]); + $omb['post_notice_url'] = omb_service_uri($omb[OMB_ENDPOINT_POSTNOTICE]); + $omb['update_profile_url'] = omb_service_uri($omb[OMB_ENDPOINT_UPDATEPROFILE]); $_SESSION['oauth_authorization_request'] = $omb;