if(! function_exists('sanitise_acl')) {
function sanitise_acl(&$item) {
- $item = '<' . intval(notags(trim($item))) . '>';
+ if(intval($item))
+ $item = '<' . intval(notags(trim($item))) . '>';
+ else
+ unset($item);
}}
intval($_SESSION['uid'])
);
- notice("Contact has been removed." . EOL );
+ notice( t('Contact has been removed.') . EOL );
goaway($a->get_baseurl() . '/contacts');
return; // NOTREACHED
}
// find the local user who owns this relationship.
- $r = q("SELECT `id`, `uid` FROM `contact` WHERE `issued-id` = '%s' LIMIT 1",
+ $r = q("SELECT * FROM `contact` WHERE `issued-id` = '%s' LIMIT 1",
dbesc($dfrn_id)
);
if(! count($r)) {
$feed->init();
$ismail = false;
- $photo_time = $feed->get_feed_tags( NAMESPACE_DFRN, 'icon-updated');
- if($photo_time)
- $avatar_update = $photo_time[0]['data'];
$rawmail = $feed->get_feed_tags( NAMESPACE_DFRN, 'mail' );
if(isset($rawmail[0]['child'][NAMESPACE_DFRN])) {
. "`) VALUES ('" . implode("', '", array_values($msg)) . "')" );
// send email notification if requested.
+ $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
+ intval($importer['uid'])
+ );
+ require_once('bbcode.php');
+ if((count($r)) && ($r[0]['notify_flags'] & NOTIFY_MAIL)) {
+ $tpl = file_get_contents('view/mail_received_eml.tpl');
+ $email_tpl = replace_macros($tpl, array(
+ '$sitename' => $a->config['sitename'],
+ '$siteurl' => $a->get_baseurl(),
+ '$username' => $r[0]['username'],
+ '$email' => $r[0]['email'],
+ '$from' => $msg['from-name'],
+ '$fn' => $r[0]['name'],
+ '$title' => $msg['title'],
+ '$body' => strip_tags(bbcode($msg['body']))
+ );
+
+ $res = mail($r[0]['email'], t("New mail received at ") . $a->config['sitename'],
+ $email_tpl,t("From: Administrator@") . $_SERVER[SERVER_NAME] );
+ if(!$res) {
+ notice( t("Email notification failed.") . EOL );
+ }
+ }
xml_status(0);
return;
// find the contact record we just created
if($r) {
$r = q("SELECT `id` FROM `contact`
- WHERE `uid` = '%s' AND `url` = '%s' AND `issued-id` = '%s' LIMIT 1",
+ WHERE `uid` = %d AND `url` = '%s' AND `issued-id` = '%s' LIMIT 1",
intval($uid),
$parms['url'],
$parms['issued-id']
// send the notification upstream/downstream as the case may be
if($rr['visible'])
- proc_close(proc_open("php include/notifier.php \"$url\" \"drop\" \"$drop_id\" ",
+ proc_close(proc_open("php include/notifier.php \"$url\" \"drop\" \"$drop_id\" & ",
array(),$foo));
}
}
}
- goaway($a->get_baseurl() . '/photos/' . $a->data['user']['uid']);
+ goaway($a->get_baseurl() . '/photos/' . $a->data['user']['nickname']);
return; // NOTREACHED
}
// send the notification upstream/downstream as the case may be
if($i[0]['visible'])
- proc_close(proc_open("php include/notifier.php \"$url\" \"drop\" \"$drop_id\" ",
+ proc_close(proc_open("php include/notifier.php \"$url\" \"drop\" \"$drop_id\" & ",
array(),$foo));
}
}
$region = notags(trim($_POST['region']));
$postal_code = notags(trim($_POST['postal_code']));
$country_name = notags(trim($_POST['country_name']));
+
$marital = notags(trim(implode(', ',$_POST['marital'])));
+ if($marital != $orig[0]['marital'])
+ $maritalchanged = true;
+
$sexual = notags(trim($_POST['sexual']));
$homepage = notags(trim($_POST['homepage']));
$politic = notags(trim($_POST['politic']));
<div class="marital"><span class="marital-label"><span class="heart">♥</span> Status: </span><span class="marital-text"><?php echo $profile['marital']; ?></span></div>\r
<?php } ?>\r
<?php if(strlen($profile['url'])) { ?>\r
-<div class="homepage"><span class="homepage-label">Status: </span><span class="homepage-url"><?php echo $profile['homepage']; ?></span></div>\r
+<div class="homepage"><span class="homepage-label">Homepage: </span><span class="homepage-url"><?php echo $profile['homepage']; ?></span></div>\r
<?php } ?>\r
<?php echo $page['aside'] ?>\r
</aside>\r