diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Contact.php | 1 | ||||
-rw-r--r-- | include/enotify.php | 8 | ||||
-rw-r--r-- | include/socgraph.php | 10 |
3 files changed, 17 insertions, 2 deletions
diff --git a/include/Contact.php b/include/Contact.php index 4f7a2a19f..4c80f5d6a 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -119,6 +119,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { '$name' => $xchan['xchan_name'], '$photo' => ((is_array($a->profile) && array_key_exists('photo',$a->profile)) ? $a->profile['photo'] : $xchan['xchan_photo_l']), '$follow' => $xchan['xchan_addr'], + '$link' => zid($xchan['xchan_url']), '$connect' => $connect, '$newwin' => (($mode === 'chanview') ? t('New window') : ''), '$newtit' => t('Open the selected location in a different window or browser tab'), diff --git a/include/enotify.php b/include/enotify.php index 3fef3ba0a..6fc771c58 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -421,6 +421,14 @@ function notification($params) { logger('notification: sending notification email'); + $hn = get_pconfig($recip['channel_id'],'system','email_notify_host'); + if($hn && (! stristr(get_app()->get_hostname(),$hn))) { + // this isn't the email notification host + pop_lang(); + return; + } + + $textversion = strip_tags(html_entity_decode(bbcode(stripslashes(str_replace(array("\\r", "\\n"), array( "", "\n"), $body))),ENT_QUOTES,'UTF-8')); diff --git a/include/socgraph.php b/include/socgraph.php index 740886b1c..0cdf43ec7 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -72,6 +72,9 @@ function poco_load($xchan = '',$url = null) { if($xchan) { if(array_key_exists('chatrooms',$j) && is_array($j['chatrooms'])) { foreach($j['chatrooms'] as $room) { + if((! $room['url']) || (! $room['desc'])) + continue; + $r = q("select * from xchat where xchat_url = '%s' and xchat_xchan = '%s' limit 1", dbesc($room['url']), dbesc($xchan) @@ -117,6 +120,7 @@ function poco_load($xchan = '',$url = null) { $name = $entry['displayName']; $hash = $entry['hash']; $rating = ((array_key_exists('rating',$entry)) ? intval($entry['rating']) : 0); + $rating = ((array_key_exists('rating_text',$entry)) ? escape_tags($entry['rating_text']) :''); if(x($entry,'urls') && is_array($entry['urls'])) { foreach($entry['urls'] as $url) { @@ -188,17 +192,19 @@ function poco_load($xchan = '',$url = null) { ); if(! $r) { - q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_updated ) values ( '%s', '%s', %d, '%s' ) ", + q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_updated ) values ( '%s', '%s', %d, '%s', '%s' ) ", dbesc($xchan), dbesc($hash), intval($rating), + dbesc($rating_text), dbesc(datetime_convert()) ); } else { - q("update xlink set xlink_updated = '%s', xlink_rating = %d where xlink_id = %d", + q("update xlink set xlink_updated = '%s', xlink_rating = %d, xlink_rating_text = '%s' where xlink_id = %d", dbesc(datetime_convert()), intval($rating), + dbesc($rating_text), intval($r[0]['xlink_id']) ); } |