diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-15 10:39:41 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-15 10:39:41 +0200 |
commit | 019b735ec75989336826e5ad5db6377803ecb050 (patch) | |
tree | 15b642ec6e24d07d9d5c6009ec2ebf2a0b720742 /mod/dfrn_request.php | |
parent | 7e806429cca6ac39a9ef1bd1fd400d03e626389b (diff) | |
parent | d284f8017cefb79571fe51c4ae3f85b9b4e517c9 (diff) | |
download | volse-hubzilla-019b735ec75989336826e5ad5db6377803ecb050.tar.gz volse-hubzilla-019b735ec75989336826e5ad5db6377803ecb050.tar.bz2 volse-hubzilla-019b735ec75989336826e5ad5db6377803ecb050.zip |
Merge branch 'newui' of github.com:fabrixxm/friendika into newui
Diffstat (limited to 'mod/dfrn_request.php')
-rw-r--r-- | mod/dfrn_request.php | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 98901e9f5..5d789f480 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -277,14 +277,15 @@ function dfrn_request_post(&$a) { // Canonicalise email-style profile locator - $url = webfinger_dfrn($url); + $hcard = ''; + $url = webfinger_dfrn($url,$hcard); if(substr($url,0,5) === 'stat:') { - $network = 'stat'; + $network = NETWORK_OSTATUS; $url = substr($url,5); } else { - $network = 'dfrn'; + $network = NETWORK_DFRN; } logger('dfrn_request: url: ' . $url); @@ -342,7 +343,7 @@ function dfrn_request_post(&$a) { require_once('Scrape.php'); - $parms = scrape_dfrn($url); + $parms = scrape_dfrn(($hcard) ? $hcard : $url); if(! count($parms)) { notice( t('Profile location is not valid or does not contain profile information.') . EOL ); @@ -611,6 +612,9 @@ function dfrn_request_content(&$a) { $myaddr = ((x($_GET,'address')) ? $_GET['address'] : ''); } + $target_addr = $a->profile['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 ); + + /** * * The auto_request form only has the profile address @@ -624,6 +628,11 @@ function dfrn_request_content(&$a) { else $tpl = get_markup_template('auto_request.tpl'); + $page_desc = sprintf( t('Diaspora members: Please do not use this form. Instead, enter "%s" into your Diaspora search bar.'), + $target_addr) . EOL . EOL; + + $page_desc .= t("Please enter your 'Identity Address' from one of the following supported social networks:"); + $o .= replace_macros($tpl,array( '$header' => t('Friend/Connection Request'), '$desc' => t('Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca'), @@ -632,11 +641,11 @@ function dfrn_request_content(&$a) { '$yes' => t('Yes'), '$no' => t('No'), '$add_note' => t('Add a personal note:'), - '$page_desc' => t("Please enter your 'Identity Address' from one of the following supported social networks:"), + '$page_desc' => $page_desc, '$friendika' => t('Friendika'), '$statusnet' => t('StatusNet/Federated Social Web'), - '$private_net' => t("Private \x28secure\x29 network"), - '$public_net' => t("Public \x28insecure\x29 network"), + '$diaspora' => t('Diaspora'), + '$diasnote' => t('- please share from your own site as noted above'), '$your_address' => t('Your Identity Address:'), '$submit' => t('Submit Request'), '$cancel' => t('Cancel'), |