mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Caching for scrape, keywords for remote_self, notifications for addresses that aren't in your contact list.
This commit is contained in:
parent
7d34648373
commit
184dcf75a7
7 changed files with 130 additions and 85 deletions
|
@ -407,19 +407,19 @@ function contacts_content(&$a) {
|
|||
$url = "redir/{$contact['id']}";
|
||||
$sparkle = ' class="sparkle" ';
|
||||
}
|
||||
else {
|
||||
else {
|
||||
$url = $contact['url'];
|
||||
$sparkle = '';
|
||||
}
|
||||
|
||||
$insecure = t('Private communications are not available for this contact.');
|
||||
|
||||
$last_update = (($contact['last-update'] == '0000-00-00 00:00:00')
|
||||
? t('Never')
|
||||
$last_update = (($contact['last-update'] == '0000-00-00 00:00:00')
|
||||
? t('Never')
|
||||
: datetime_convert('UTC',date_default_timezone_get(),$contact['last-update'],'D, j M Y, g:i A'));
|
||||
|
||||
if($contact['last-update'] !== '0000-00-00 00:00:00')
|
||||
$last_update .= ' ' . (($contact['last-update'] == $contact['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29"));
|
||||
$last_update .= ' ' . (($contact['last-update'] <= $contact['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29"));
|
||||
|
||||
$lblsuggest = (($contact['network'] === NETWORK_DFRN) ? t('Suggest friends') : '');
|
||||
|
||||
|
@ -430,7 +430,7 @@ function contacts_content(&$a) {
|
|||
$common = count_common_friends(local_user(),$contact['id']);
|
||||
$common_text = (($common) ? sprintf( tt('%d contact in common','%d contacts in common', $common),$common) : '');
|
||||
|
||||
$polling = (($contact['network'] === NETWORK_MAIL | $contact['network'] === NETWORK_FEED) ? 'polling' : '');
|
||||
$polling = (($contact['network'] === NETWORK_MAIL | $contact['network'] === NETWORK_FEED) ? 'polling' : '');
|
||||
|
||||
$x = count_all_friends(local_user(), $contact['id']);
|
||||
$all_friends = (($x) ? t('View all contacts') : '');
|
||||
|
@ -668,7 +668,7 @@ function contacts_content(&$a) {
|
|||
$url = "redir/{$rr['id']}";
|
||||
$sparkle = ' class="sparkle" ';
|
||||
}
|
||||
else {
|
||||
else {
|
||||
$url = $rr['url'];
|
||||
$sparkle = '';
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ function contacts_content(&$a) {
|
|||
'id' => $rr['id'],
|
||||
'alt_text' => $alt_text,
|
||||
'dir_icon' => $dir_icon,
|
||||
'thumb' => $rr['thumb'],
|
||||
'thumb' => $rr['thumb'],
|
||||
'name' => $rr['name'],
|
||||
'username' => $rr['name'],
|
||||
'sparkle' => $sparkle,
|
||||
|
|
|
@ -15,7 +15,7 @@ function salmon_return($val) {
|
|||
if($val >= 200 && $val < 300)
|
||||
$err = 'OK';
|
||||
|
||||
logger('mod-salmon returns ' . $val);
|
||||
logger('mod-salmon returns ' . $val);
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $err);
|
||||
killme();
|
||||
|
||||
|
@ -50,7 +50,7 @@ function salmon_post(&$a) {
|
|||
$base = $dom->env;
|
||||
elseif($dom->data)
|
||||
$base = $dom;
|
||||
|
||||
|
||||
if(! $base) {
|
||||
logger('mod-salmon: unable to locate salmon data in xml ');
|
||||
http_status_exit(400);
|
||||
|
@ -92,7 +92,7 @@ function salmon_post(&$a) {
|
|||
// Create a fake feed wrapper so simplepie doesn't choke
|
||||
|
||||
$tpl = get_markup_template('fake_feed.tpl');
|
||||
|
||||
|
||||
$base = substr($data,strpos($data,'<entry'));
|
||||
|
||||
$feedxml = $tpl . $base . '</feed>';
|
||||
|
@ -100,7 +100,7 @@ function salmon_post(&$a) {
|
|||
logger('mod-salmon: Processed feed: ' . $feedxml);
|
||||
|
||||
// Now parse it like a normal atom feed to scrape out the author URI
|
||||
|
||||
|
||||
$feed = new SimplePie();
|
||||
$feed->set_raw_data($feedxml);
|
||||
$feed->enable_order_by_date(false);
|
||||
|
@ -192,7 +192,7 @@ function salmon_post(&$a) {
|
|||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// is this a follower? Or have we ignored the person?
|
||||
// If so we can not accept this post.
|
||||
|
@ -223,7 +223,3 @@ function salmon_post(&$a) {
|
|||
|
||||
http_status_exit(200);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue