]> git.mxchange.org Git - friendica.git/commitdiff
don't allow fullscreen for youtube iframe - this makes it hard to visit the network...
authorFriendika <info@friendika.com>
Fri, 26 Aug 2011 08:32:22 +0000 (01:32 -0700)
committerFriendika <info@friendika.com>
Fri, 26 Aug 2011 08:32:22 +0000 (01:32 -0700)
include/bbcode.php
include/notifier.php
include/queue.php

index c05c369388704b0414c04d0a47e52f03ed78756e..a3f2971e530eb0233bfcd18dcc650c3fc6ef0ad4 100644 (file)
@@ -134,7 +134,7 @@ function bbcode($Text,$preserve_nl = false) {
                // Youtube extensions
         $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text); 
         $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/",'[youtube]$1[/youtube]',$Text); 
-               $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $Text);
+               $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" ></iframe>', $Text);
        }
 //     $Text = preg_replace("/\[youtube\](.*?)\[\/youtube\]/", '<object width="425" height="350" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$1" ><param name="movie" value="http://www.youtube.com/v/$1"></param><!--[if IE]><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350" /><![endif]--></object>', $Text);
 
index 1acb6d71f3bdac7cca5fcb937823263ad07b73eb..e92a4f6a8dbbe62f84e7064df695e44acef63c92 100644 (file)
@@ -641,15 +641,19 @@ function notifier_run($argv, $argc){
 
                                /* Don't deliver to folks who have already been delivered to */
 
-                               if(in_array($rr['id'],$conversants))
+                               if(in_array($rr['id'],$conversants)) {
+                                       logger('notifier: already delivered id=' . $rr['id']);
                                        continue;
+                               }
 
                                $n = q("SELECT * FROM `contact` WHERE `id` = %d LIMIT 1",
-                                               intval($rr['id'])
+                                       intval($rr['id'])
                                );
 
                                if(count($n)) {
                                        $contact = $n[0];
+                                       logger('pubdeliver: network: ' . $contact['network']);
+
                                        switch($contact['network']) {
                                                case NETWORK_DFRN :
                                                        logger('notifier: dfrnpubdelivery: ' . $contact['name']);
index fe96a75ce51604c43ecd42d32d8cb0683012bb20..f1bcf2e9ffeb42c0277692e372425868e7d09c01 100644 (file)
@@ -29,6 +29,11 @@ function queue_run($argv, $argc){
 
        load_hooks();
 
+       if($argc > 1)
+               $queue_id = intval($argv[1]);
+       else
+               $queue_id = 0;
+
        $deadguys = array();
 
        logger('queue: start');
@@ -44,13 +49,19 @@ function queue_run($argv, $argc){
                q("DELETE FROM `queue` WHERE `created` < UTC_TIMESTAMP() - INTERVAL 3 DAY");
        }
                
-       $r = q("SELECT `id` FROM `queue` WHERE `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ");
+       if($queue_id)
+               $r = q("SELECT `id` FROM `queue` WHERE `id` = %d LIMIT 1",
+                       intval($queue_id)
+               );
+       else
+               $r = q("SELECT `id` FROM `queue` WHERE `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ");
 
        if(! count($r)){
                return;
        }
 
-       call_hooks('queue_predeliver', $a, $r);
+       if(! $queue_id)
+               call_hooks('queue_predeliver', $a, $r);
 
 
        // delivery loop
@@ -63,9 +74,16 @@ function queue_run($argv, $argc){
                // queue_predeliver hooks may have changed the queue db details, 
                // so check again if this entry still needs processing
 
-               $qi = q("SELECT * FROM `queue` WHERE `id` = %d AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ",
-                       intval($q_item['id'])
-               );
+               if($queue_id) {
+                       $qi = q("select * from queue where `id` = %d limit 1",
+                               intval($queue_id)
+                       );
+               }
+               else {
+                       $qi = q("SELECT * FROM `queue` WHERE `id` = %d AND `last` < UTC_TIMESTAMP() - INTERVAL 15 MINUTE ",
+                               intval($q_item['id'])
+                       );
+               }
                if(! count($qi))
                        continue;