aboutsummaryrefslogtreecommitdiffstats
path: root/mod/dfrn_request.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2012-03-15 06:31:47 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2012-03-15 06:31:47 +0100
commit80b57e664a3df68994108a3d511468b249e0bbff (patch)
tree44eb74a6943ecc26a795f136e79d653c39955d63 /mod/dfrn_request.php
parent4fcdada4320d5d5619eb3a1f517d0fea6b26857b (diff)
parentb06c5983a4dae26dd24aecd7473bad98558cd6fc (diff)
downloadvolse-hubzilla-80b57e664a3df68994108a3d511468b249e0bbff.tar.gz
volse-hubzilla-80b57e664a3df68994108a3d511468b249e0bbff.tar.bz2
volse-hubzilla-80b57e664a3df68994108a3d511468b249e0bbff.zip
Merge branch 'master' of https://github.com/friendica/friendica
Diffstat (limited to 'mod/dfrn_request.php')
-rwxr-xr-xmod/dfrn_request.php21
1 files changed, 18 insertions, 3 deletions
diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php
index 4acb5c9bb..c2d37dac7 100755
--- a/mod/dfrn_request.php
+++ b/mod/dfrn_request.php
@@ -77,9 +77,10 @@ function dfrn_request_post(&$a) {
* Lookup the contact based on their URL (which is the only unique thing we have at the moment)
*/
- $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `url` = '%s' AND `self` = 0 LIMIT 1",
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND (`url` = '%s' OR `nurl` = '%s') AND `self` = 0 LIMIT 1",
intval(local_user()),
- dbesc($dfrn_url)
+ dbesc($dfrn_url),
+ dbesc(normalise_link($dfrn_url))
);
if(count($r)) {
@@ -668,7 +669,21 @@ function dfrn_request_content(&$a) {
$page_desc .= t("Please enter your 'Identity Address' from one of the following supported communications networks:");
- $emailnet = t("<strike>Connect as an email follower</strike> \x28Coming soon\x29");
+ // see if we are allowed to have NETWORK_MAIL2 contacts
+
+ $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+ if(get_config('system','dfrn_only'))
+ $mail_disabled = 1;
+
+ if(! $mail_disabled) {
+ $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
+ intval($a->profile['uid'])
+ );
+ if(! count($r))
+ $mail_disabled = 1;
+ }
+
+ $emailnet = (($mail_disabled) ? '' : t("<strike>Connect as an email follower</strike> \x28Coming soon\x29"));
$invite_desc = t('If you are not yet a member of the free social web, <a href="http://dir.friendica.com/siteinfo">follow this link to find a public Friendica site and join us today</a>.');