aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_request.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-01-03 09:45:13 +0100
committerfabrixxm <fabrix.xm@gmail.com>2011-01-03 09:45:13 +0100
commit43283fd35fb9987a1554612220f11a0875697bd4 (patch)
tree2e9db966f98a1187c6be74998ebd2905fe0a8c39 /mod/dfrn_request.php
parentdcaf4003eca3fe4f958760587eefea52b171fab3 (diff)
parentd92659560b8edd0594b587103b43ad5bd5012639 (diff)
downloadvolse-hubzilla-43283fd35fb9987a1554612220f11a0875697bd4.tar.gz
volse-hubzilla-43283fd35fb9987a1554612220f11a0875697bd4.tar.bz2
volse-hubzilla-43283fd35fb9987a1554612220f11a0875697bd4.zip
Merge branch 'friendika-master'
Diffstat (limited to 'mod/dfrn_request.php')
-rw-r--r--mod/dfrn_request.php32
1 files changed, 30 insertions, 2 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 93ef4097b..844fbbf6d 100644
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -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:'),