]> git.mxchange.org Git - friendica.git/commitdiff
try to auto-fill the profile address if we actually do know it.
authorFriendika <info@friendika.com>
Sat, 1 Jan 2011 21:12:31 +0000 (13:12 -0800)
committerFriendika <info@friendika.com>
Sat, 1 Jan 2011 21:12:31 +0000 (13:12 -0800)
README
include/items.php
mod/dfrn_request.php

diff --git a/README b/README
index 7b9a51dea22721be6156e697396e2e54d8d45a15..e5c5e02d699d5d69f6606e82f8f44fa2a3f9aa89 100644 (file)
--- a/README
+++ b/README
@@ -41,8 +41,8 @@ interaction you've grown to love, *and* was free to use, *and* was open source,
  
     And what if this social network could scale to encompass the entire 
 internet, and *not* require a central organisation to provide servers (in 
-exchange for selling your private information - and everything else they can
-find out about you from logging all of your online activities and
+exchange for selling your private information; and everything else they can
+find out about you from logging all of your online activities and
 conversations)?
 
     Look no further. 
index 22d47d44fe6cdb667f01cd341c080b8186c1cc66..6f73984e2bfb4fce8f645bd915c385ef0ad91079 100644 (file)
@@ -157,7 +157,6 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
                '$namdate'      => xmlify(datetime_convert('UTC','UTC',$owner['name-date']   . '+00:00' , ATOM_TIME)) 
        ));
 
-
        call_hooks('atom_feed', $atom);
 
        if(! count($items)) {
index 93ef4097b838c57029c023de04d700b29552601b..844fbbf6d01bc0e6318ed8c69c394ff66a1b184c 100644 (file)
@@ -544,12 +544,40 @@ function dfrn_request_content(&$a) {
                return; // NOTREACHED
        }
        else {
-               $myaddr = ((x($_GET,'address')) ? urldecode($_GET['address']) : '');
-               // Normal web request. Display our user's introduction form. 
+
+               /**
+                * Normal web request. Display our user's introduction form.
+                */
+               /**
+                * Try to auto-fill the profile address
+                */
+
+               if(local_user()) {
+                       if(strlen($a->path)) {
+                               $myaddr = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
+                       }
+                       else {
+                               $myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3 );
+                       }
+               }
+               else { 
+                       $myaddr = ((x($_GET,'address')) ? urldecode($_GET['address']) : '');
+               }
+
+               /**
+                *
+                * The auto_request form only has the profile address
+                * because nobody is going to read the comments and 
+                * it doesn't matter if they know you or not.
+                *
+                */
+
                if($a->profile['page-flags'] == PAGE_NORMAL)
                        $tpl = load_view_file('view/dfrn_request.tpl');
                else
                        $tpl = load_view_file('view/auto_request.tpl');
+
                $o .= replace_macros($tpl,array(
                        '$header' => t('Friend/Connection Request'),
                        '$pls_answer' => t('Please answer the following:'),