]> git.mxchange.org Git - friendica.git/commitdiff
punycode hostname
authorfriendica <info@friendica.com>
Wed, 4 Jul 2012 04:40:13 +0000 (21:40 -0700)
committerfriendica <info@friendica.com>
Wed, 4 Jul 2012 04:40:13 +0000 (21:40 -0700)
boot.php
include/enotify.php

index 6b79274d4569196c2d2f5c27d0b80c9ee9443c15..13821a8b0633d6c280fe993ea76bee6bb4824860 100644 (file)
--- 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)
index 134e42f8e3b25345d1a040019d99e2e883167c2e..5e073bf3ca7f6e513be7b175d7798e99b547b082 100644 (file)
@@ -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.