mirror of
https://github.com/friendica/friendica
synced 2024-12-22 06:07:27 +01:00
post branch fixes
This commit is contained in:
parent
d11c1c63c0
commit
6fa5557994
7 changed files with 38 additions and 11 deletions
5
boot.php
5
boot.php
|
@ -504,5 +504,8 @@ function expand_acl($s) {
|
||||||
|
|
||||||
if(! function_exists('sanitise_acl')) {
|
if(! function_exists('sanitise_acl')) {
|
||||||
function sanitise_acl(&$item) {
|
function sanitise_acl(&$item) {
|
||||||
$item = '<' . intval(notags(trim($item))) . '>';
|
if(intval($item))
|
||||||
|
$item = '<' . intval(notags(trim($item))) . '>';
|
||||||
|
else
|
||||||
|
unset($item);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -142,7 +142,7 @@ function contacts_content(&$a) {
|
||||||
intval($_SESSION['uid'])
|
intval($_SESSION['uid'])
|
||||||
);
|
);
|
||||||
|
|
||||||
notice("Contact has been removed." . EOL );
|
notice( t('Contact has been removed.') . EOL );
|
||||||
goaway($a->get_baseurl() . '/contacts');
|
goaway($a->get_baseurl() . '/contacts');
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ function dfrn_notify_post(&$a) {
|
||||||
|
|
||||||
// find the local user who owns this relationship.
|
// 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)
|
dbesc($dfrn_id)
|
||||||
);
|
);
|
||||||
if(! count($r)) {
|
if(! count($r)) {
|
||||||
|
@ -47,9 +47,6 @@ function dfrn_notify_post(&$a) {
|
||||||
$feed->init();
|
$feed->init();
|
||||||
|
|
||||||
$ismail = false;
|
$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' );
|
$rawmail = $feed->get_feed_tags( NAMESPACE_DFRN, 'mail' );
|
||||||
if(isset($rawmail[0]['child'][NAMESPACE_DFRN])) {
|
if(isset($rawmail[0]['child'][NAMESPACE_DFRN])) {
|
||||||
|
@ -75,6 +72,29 @@ function dfrn_notify_post(&$a) {
|
||||||
. "`) VALUES ('" . implode("', '", array_values($msg)) . "')" );
|
. "`) VALUES ('" . implode("', '", array_values($msg)) . "')" );
|
||||||
|
|
||||||
// send email notification if requested.
|
// 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);
|
xml_status(0);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -283,7 +283,7 @@ function dfrn_request_post(&$a) {
|
||||||
// find the contact record we just created
|
// find the contact record we just created
|
||||||
if($r) {
|
if($r) {
|
||||||
$r = q("SELECT `id` FROM `contact`
|
$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),
|
intval($uid),
|
||||||
$parms['url'],
|
$parms['url'],
|
||||||
$parms['issued-id']
|
$parms['issued-id']
|
||||||
|
|
|
@ -128,13 +128,13 @@ function photos_post(&$a) {
|
||||||
// send the notification upstream/downstream as the case may be
|
// send the notification upstream/downstream as the case may be
|
||||||
|
|
||||||
if($rr['visible'])
|
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));
|
array(),$foo));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
goaway($a->get_baseurl() . '/photos/' . $a->data['user']['uid']);
|
goaway($a->get_baseurl() . '/photos/' . $a->data['user']['nickname']);
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ function photos_post(&$a) {
|
||||||
// send the notification upstream/downstream as the case may be
|
// send the notification upstream/downstream as the case may be
|
||||||
|
|
||||||
if($i[0]['visible'])
|
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));
|
array(),$foo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,11 @@ function profiles_post(&$a) {
|
||||||
$region = notags(trim($_POST['region']));
|
$region = notags(trim($_POST['region']));
|
||||||
$postal_code = notags(trim($_POST['postal_code']));
|
$postal_code = notags(trim($_POST['postal_code']));
|
||||||
$country_name = notags(trim($_POST['country_name']));
|
$country_name = notags(trim($_POST['country_name']));
|
||||||
|
|
||||||
$marital = notags(trim(implode(', ',$_POST['marital'])));
|
$marital = notags(trim(implode(', ',$_POST['marital'])));
|
||||||
|
if($marital != $orig[0]['marital'])
|
||||||
|
$maritalchanged = true;
|
||||||
|
|
||||||
$sexual = notags(trim($_POST['sexual']));
|
$sexual = notags(trim($_POST['sexual']));
|
||||||
$homepage = notags(trim($_POST['homepage']));
|
$homepage = notags(trim($_POST['homepage']));
|
||||||
$politic = notags(trim($_POST['politic']));
|
$politic = notags(trim($_POST['politic']));
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
<div class="marital"><span class="marital-label"><span class="heart">♥</span> Status: </span><span class="marital-text"><?php echo $profile['marital']; ?></span></div>
|
<div class="marital"><span class="marital-label"><span class="heart">♥</span> Status: </span><span class="marital-text"><?php echo $profile['marital']; ?></span></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if(strlen($profile['url'])) { ?>
|
<?php if(strlen($profile['url'])) { ?>
|
||||||
<div class="homepage"><span class="homepage-label">Status: </span><span class="homepage-url"><?php echo $profile['homepage']; ?></span></div>
|
<div class="homepage"><span class="homepage-label">Homepage: </span><span class="homepage-url"><?php echo $profile['homepage']; ?></span></div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php echo $page['aside'] ?>
|
<?php echo $page['aside'] ?>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
Loading…
Reference in a new issue