diff options
-rw-r--r-- | include/bbcode.php | 3 | ||||
-rw-r--r-- | include/items.php | 2 | ||||
-rw-r--r-- | include/notifier.php | 7 | ||||
-rw-r--r-- | include/poller.php | 2 | ||||
-rw-r--r-- | mod/dfrn_request.php | 8 | ||||
-rw-r--r-- | mod/follow.php | 6 | ||||
-rw-r--r-- | mod/item.php | 2 | ||||
-rw-r--r-- | mod/like.php | 4 | ||||
-rw-r--r-- | view/en/profile_advanced.php | 4 | ||||
-rw-r--r-- | view/it/profile_advanced.php | 4 |
10 files changed, 26 insertions, 16 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index ef31f5a66..81b581cdb 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -21,7 +21,8 @@ function bbcode($Text) { // Perform URL Search - $Text = preg_replace("/[^\]\=](https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$1" >$1</a>', $Text); + + $Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\.\=\_\~\#\'\%]*)/", ' <a href="$2" >$2</a>', $Text); $Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/", '<a href="$1" >$1</a>', $Text); $Text = preg_replace("(\[url\=([$URLSearchString]*)\](.+?)\[/url\])", '<a href="$1" >$2</a>', $Text); diff --git a/include/items.php b/include/items.php index f1169aeb4..5f8264beb 100644 --- a/include/items.php +++ b/include/items.php @@ -637,7 +637,7 @@ function item_store($arr) { $arr['body'] = str_replace( array('&amp;', '&gt;', '&lt;', '&quot;'), - array('&' , '>' , '<', '"'), + array('&' , '>' , '<', '"'), $arr['body'] ); diff --git a/include/notifier.php b/include/notifier.php index 39640e51a..4efdad4ce 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -280,7 +280,7 @@ ); } break; - default: + case 'stat': if($followup && $contact['notify']) { logger('notifier: slapdelivery: ' . $contact['name']); $deliver_status = slapper($owner,$contact['notify'],$slap); @@ -324,6 +324,11 @@ } } break; + case 'mail': + case 'dspr': + case 'feed': + default: + break; } } diff --git a/include/poller.php b/include/poller.php index fc45ff9c3..8234becbb 100644 --- a/include/poller.php +++ b/include/poller.php @@ -35,7 +35,7 @@ // 'stat' clause is a temporary measure until we have federation subscriptions working both directions $contacts = q("SELECT * FROM `contact` WHERE ( ( `network` = 'dfrn' AND ( `dfrn-id` != '' OR (`issued-id` != '' AND `duplex` = 1))) - OR ( `network` = 'stat' AND `poll` != '' ) ) + OR ( `network` IN ( 'stat', 'feed' ) AND `poll` != '' )) AND `self` = 0 AND `blocked` = 0 AND `readonly` = 0 ORDER BY RAND()"); if(! count($contacts)) diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index 6850f4be4..24c466bba 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -590,8 +590,12 @@ function dfrn_request_content(&$a) { $myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3 ); } } - else { - $myaddr = ((x($_GET,'address')) ? urldecode($_GET['address']) : ''); + elseif(x($_GET,'addr')) { + $myaddr = hex2bin($_GET['addr']); + } + else { + /* $_GET variables are already urldecoded */ + $myaddr = ((x($_GET,'address')) ? $_GET['address'] : ''); } /** diff --git a/mod/follow.php b/mod/follow.php index 3c9d77657..14bdb9fc6 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -38,11 +38,11 @@ function follow_post(&$a) { $ret = scrape_dfrn($dfrn); if(is_array($ret) && x($ret,'dfrn-request')) { if(strlen($a->path)) - $myaddr = urlencode($a->get_baseurl() . '/profile/' . $a->user['nickname']); + $myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']); else - $myaddr = urlencode($a->user['nickname'] . '@' . $a->get_hostname()); + $myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname()); - goaway($ret['dfrn-request'] . "&address=$myaddr"); + goaway($ret['dfrn-request'] . "&addr=$myaddr"); // NOTREACHED } diff --git a/mod/item.php b/mod/item.php index f9bf9a04e..f964e7737 100644 --- a/mod/item.php +++ b/mod/item.php @@ -228,7 +228,7 @@ function item_post(&$a) { } } if($profile) { - $body = str_replace($name,'[url=' . $profile . ']' . $newname . '[/url]', $body); + $body = str_replace('@' . $name, '@' . '[url=' . $profile . ']' . $newname . '[/url]', $body); $profile = str_replace(',','%2c',$profile); if(strlen($str_tags)) $str_tags .= ','; diff --git a/mod/like.php b/mod/like.php index cb4093d5d..7b2097578 100644 --- a/mod/like.php +++ b/mod/like.php @@ -149,8 +149,8 @@ EOT; $arr['author-name'] = $contact['name']; $arr['author-link'] = $contact['url']; $arr['author-avatar'] = $contact['thumb']; - $arr['body'] = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' . ' ' . t('likes') . ' ' - . '[url=' . $owner['url'] . ']' . $owner['name'] . t('\'s') . '[/url]' . ' ' + $arr['body'] = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' . ' ' . $bodyverb . ' ' + . '[url=' . $item['author-link'] . ']' . $item['author-name'] . t('\'s') . '[/url]' . ' ' . '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]' ; $arr['verb'] = $activity; diff --git a/view/en/profile_advanced.php b/view/en/profile_advanced.php index 9aee6c262..d2b9d0612 100644 --- a/view/en/profile_advanced.php +++ b/view/en/profile_advanced.php @@ -39,8 +39,8 @@ EOT; $o .= '<div id="advanced-profile-dob">' . ((intval($a->profile['dob'])) - ? day_translate(datetime_convert('UTC',date_default_timezone_get(),$a->profile['dob'],'j F, Y')) - : day_translate(datetime_convert('UTC',date_default_timezone_get(),'2001-' . substr($a->profile['dob'],6),'j F'))) + ? day_translate(datetime_convert('UTC','UTC',$a->profile['dob'] . ' 00:00 +00:00','j F, Y')) + : day_translate(datetime_convert('UTC','UTC','2001-' . substr($a->profile['dob'],6) . ' 00:00 +00:00','j F'))) . "</div>\r\n</div>"; $o .= '<div id="advanced-profile-dob-end"></div>'; diff --git a/view/it/profile_advanced.php b/view/it/profile_advanced.php index 899fd56b2..44327f6a6 100644 --- a/view/it/profile_advanced.php +++ b/view/it/profile_advanced.php @@ -39,8 +39,8 @@ EOT; $o .= '<div id="advanced-profile-dob">' . ((intval($a->profile['dob'])) - ? day_translate(datetime_convert('UTC',date_default_timezone_get(),$a->profile['dob'],'j F, Y')) - : day_translate(datetime_convert('UTC',date_default_timezone_get(),'2001-' . substr($a->profile['dob'],6),'j F'))) + ? day_translate(datetime_convert('UTC','UTC',$a->profile['dob'] . ' 00:00 +00:00','j F, Y')) + : day_translate(datetime_convert('UTC','UTC','2001-' . substr($a->profile['dob'],6) . ' 00:00 +00:00','j F'))) . "</div>\r\n</div>"; $o .= '<div id="advanced-profile-dob-end"></div>'; |