]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into 1507-diaspora-contact-links
authorMichael Vogel <icarus@dabo.de>
Mon, 6 Jul 2015 15:35:48 +0000 (17:35 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 6 Jul 2015 15:35:48 +0000 (17:35 +0200)
include/bb2diaspora.php
include/bbcode.php
include/notifier.php
view/theme/vier/style.css

index 34c932f7457c9306d28e696408ff7a3d320d22cd..69a87b3817a37e9640a38d4b2eb302ddd072b346 100644 (file)
@@ -34,6 +34,15 @@ function diaspora2bb($s) {
 
        $s = str_replace('&#35;','#',$s);
 
+       $search = array(" \n", "\n ");
+       $replace = array("\n", "\n");
+       do {
+               $oldtext = $s;
+               $s = str_replace($search, $replace, $s);
+       } while ($oldtext != $s);
+
+       $s = str_replace("\n\n", "<br>", $s);
+
        $s = html2bbcode($s);
 
        // protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
index 6c5a400ddc307a069ac67a56a57f09c0fc668017..e872d859c53bec8e599715e775ccea8d34d1d8a3 100644 (file)
@@ -887,8 +887,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        $MAILSearchString = $URLSearchString;
 
        // Remove all hashtag addresses
-       if ((!$tryoembed OR $simplehtml) AND ($simplehtml != 7))
+       if ((!$tryoembed OR $simplehtml) AND !in_array($simplehtml, array(3, 7)))
                $Text = preg_replace("/([#@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '$1$3', $Text);
+       elseif ($simplehtml == 3)
+               $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
+                       '$1<a href="$2">$3</a>',
+                       $Text);
        elseif ($simplehtml == 7)
                $Text = preg_replace("/([@])\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism",
                        '$1<span class="vcard"><a href="$2" class="url" title="$3"><span class="fn nickname mention">$3</span></a></span>',
index 24dc63d69648281a0d24645b842d150e4a0e6eab..67d5cdbbd869b7181a2b4f4b97913a7159cb2d27 100644 (file)
@@ -406,9 +406,13 @@ function notifier_run(&$argv, &$argc){
                                        }
                                }
                        }
-               }
 
-               $r = q("SELECT * FROM `contact` WHERE `id` IN ( $conversant_str ) AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0");
+                       // It only makes sense to distribute answers to OStatus messages to Friendica and OStatus - but not Diaspora
+                       $sql_extra = " AND `network` IN ('".NETWORK_OSTATUS."', '".NETWORK_DFRN."')";
+               } else
+                       $sql_extra = "";
+
+               $r = q("SELECT * FROM `contact` WHERE `id` IN ($conversant_str) AND `blocked` = 0 AND `pending` = 0 AND `archive` = 0".$sql_extra);
 
                if(count($r))
                        $contacts = $r;
index 64edef3012845dd59b86d787d4d97fe8e16cef12..79309e338e8090e9d020d0cfc5de0e9dccb1930a 100644 (file)
@@ -1216,6 +1216,7 @@ section.minimal {
 
 .wall-item-container .wall-item-content img {
   max-width: 100%;
+  vertical-align: middle;
   /* max-width: 650px; */
   /* max-width: 580px; */
 }