Merge remote-tracking branch 'friendica/master'
This commit is contained in:
commit
ba732c97c1
7 changed files with 30 additions and 5 deletions
11
boot.php
11
boot.php
|
@ -9,7 +9,7 @@ require_once('include/nav.php');
|
||||||
require_once('include/cache.php');
|
require_once('include/cache.php');
|
||||||
|
|
||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_VERSION', '2.3.1199' );
|
define ( 'FRIENDICA_VERSION', '2.3.1200' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1112 );
|
define ( 'DB_UPDATE_VERSION', 1112 );
|
||||||
|
|
||||||
|
@ -1036,6 +1036,8 @@ function get_birthdays() {
|
||||||
if($r && count($r)) {
|
if($r && count($r)) {
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$now = strtotime('now');
|
$now = strtotime('now');
|
||||||
|
$cids = array();
|
||||||
|
|
||||||
$istoday = false;
|
$istoday = false;
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if(strlen($rr['name']))
|
if(strlen($rr['name']))
|
||||||
|
@ -1052,6 +1054,13 @@ function get_birthdays() {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if(! strlen($rr['name']))
|
if(! strlen($rr['name']))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// avoid duplicates
|
||||||
|
|
||||||
|
if(in_array($rr['cid'],$cids))
|
||||||
|
continue;
|
||||||
|
$cids[] = $rr['cid'];
|
||||||
|
|
||||||
$today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
|
$today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
|
||||||
$sparkle = '';
|
$sparkle = '';
|
||||||
$url = $rr['url'];
|
$url = $rr['url'];
|
||||||
|
|
|
@ -11,7 +11,7 @@ function stripcode_br_cb($s) {
|
||||||
|
|
||||||
function tryoembed($match){
|
function tryoembed($match){
|
||||||
$url = ((count($match)==2)?$match[1]:$match[2]);
|
$url = ((count($match)==2)?$match[1]:$match[2]);
|
||||||
logger('tryoembed: $url');
|
logger("tryoembed: $url");
|
||||||
|
|
||||||
$o = oembed_fetch_url($url);
|
$o = oembed_fetch_url($url);
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@ function conversation(&$a, $items, $mode, $update) {
|
||||||
$arr = array('item' => $item, 'output' => $tmp_item);
|
$arr = array('item' => $item, 'output' => $tmp_item);
|
||||||
call_hooks('display_item', $arr);
|
call_hooks('display_item', $arr);
|
||||||
|
|
||||||
$threads[$threadsid]['id'] = $arr[$item['item_id']];
|
$threads[$threadsid]['id'] = $item['item_id'];
|
||||||
$threads[$threadsid]['html'] .= $arr['output'];
|
$threads[$threadsid]['html'] .= $arr['output'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,6 +188,13 @@ function diaspora_msg_build($msg,$user,$contact,$prvkey,$pubkey,$public = false)
|
||||||
|
|
||||||
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
|
logger('diaspora_msg_build: ' . $msg, LOGGER_DATA);
|
||||||
|
|
||||||
|
// without a public key nothing will work
|
||||||
|
|
||||||
|
if(! $pubkey) {
|
||||||
|
logger('diaspora_msg_build: pubkey missing: contact id: ' . $contact['id']);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$inner_aes_key = random_string(32);
|
$inner_aes_key = random_string(32);
|
||||||
$b_inner_aes_key = base64_encode($inner_aes_key);
|
$b_inner_aes_key = base64_encode($inner_aes_key);
|
||||||
$inner_iv = random_string(16);
|
$inner_iv = random_string(16);
|
||||||
|
@ -1672,6 +1679,12 @@ function diaspora_profile($importer,$xml) {
|
||||||
|
|
||||||
$birthday = datetime_convert('UTC','UTC',$birthday,'Y-m-d');
|
$birthday = datetime_convert('UTC','UTC',$birthday,'Y-m-d');
|
||||||
|
|
||||||
|
// this is to prevent multiple birthday notifications in a single year
|
||||||
|
// if we already have a stored birthday and the 'm-d' part hasn't changed, preserve the entry, which will preserve the notify year
|
||||||
|
|
||||||
|
if(substr($birthday,5) === substr($contact['bd'],5))
|
||||||
|
$birthday = $contact['bd'];
|
||||||
|
|
||||||
$r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
$r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1",
|
||||||
dbesc($name),
|
dbesc($name),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
|
|
|
@ -58,6 +58,9 @@ function poco_load($cid,$uid = 0,$url = null) {
|
||||||
|
|
||||||
logger('poco_load: json: ' . print_r($j,true),LOGGER_DATA);
|
logger('poco_load: json: ' . print_r($j,true),LOGGER_DATA);
|
||||||
|
|
||||||
|
if(! isset($j->entry))
|
||||||
|
return;
|
||||||
|
|
||||||
$total = 0;
|
$total = 0;
|
||||||
foreach($j->entry as $entry) {
|
foreach($j->entry as $entry) {
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ function profile_init(&$a) {
|
||||||
|
|
||||||
if(! $blocked) {
|
if(! $blocked) {
|
||||||
$keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
|
$keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
|
||||||
$keywords = str_replace(array(',',' ',',,'),array(' ',',',','),$keywords);
|
$keywords = str_replace(array('#',',',' ',',,'),array('',' ',',',','),$keywords);
|
||||||
if(strlen($keywords))
|
if(strlen($keywords))
|
||||||
$a->page['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\r\n" ;
|
$a->page['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\r\n" ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@import url('../duepuntozero/style.css');
|
@import url('../duepuntozero/style.css');
|
||||||
|
|
||||||
a, a:visited { color: #7433af; text-decoration: none; }
|
a, a:link, a:visited { color: #7433af; text-decoration: none; }
|
||||||
a:hover {text-decoration: underline; }
|
a:hover {text-decoration: underline; }
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue