From c726a92a3fee9e6dec3ad5af8c4e412491f109b8 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Jul 2012 21:40:13 -0700 Subject: [PATCH] punycode hostname --- boot.php | 2 +- include/enotify.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 6b79274d45..13821a8b06 100644 --- a/boot.php +++ b/boot.php @@ -375,7 +375,7 @@ if(! class_exists('App')) { // convert punycode back to utf-8 require_once('library/simplepie/idn/idna_convert.class.php'); $x = new idna_convert(); - $this->hostname = $x->decode($s); + $this->hostname = $x->decode($_SERVER['SERVER_NAME']); } if(x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) diff --git a/include/enotify.php b/include/enotify.php index 134e42f8e3..5e073bf3ca 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -54,6 +54,20 @@ function notification($params) { $parent_id = $params['parent']; + // Check to see if there was already a tag notify for this post. + // If so don't create a second notification + + $p = null; + $p = q("select id from notify where type = %d and link = '%s' and uid = %d limit 1", + intval(NOTIFY_TAGSELF), + dbesc($params['link']), + intval($params['uid']) + ); + if($p and count($p)) { + pop_lang(); + return; + } + // if it's a post figure out who's post it is. -- 2.39.5