]> git.mxchange.org Git - friendica.git/commitdiff
cleanup and loose ends
authorFriendika <info@friendika.com>
Wed, 9 Nov 2011 00:54:32 +0000 (16:54 -0800)
committerFriendika <info@friendika.com>
Wed, 9 Nov 2011 00:54:32 +0000 (16:54 -0800)
include/bb2diaspora.php
include/contact_selectors.php
include/items.php

index 262b61ac0a8a7e2a13973843bcfd8366535121eb..6b0589c43066a68726cab34658feff416400d8f7 100644 (file)
@@ -6,6 +6,11 @@ require_once('include/event.php');
 require_once('library/markdown.php');
 require_once('include/html2bbcode.php');
 
+// we don't want to support a bbcode specific markdown interpreter
+// and the markdown library we have is pretty good, but provides HTML output.
+// So we'll use that to convert to HTML, then convert the HTML back to bbcode, 
+// and then clean up a few Diaspora specific constructs.
+
 function diaspora2bb($s) {
 
        $s = preg_replace('/\@\{(.+?)\; (.+?)\@(.+?)\}/','@[url=https://$3/u/$2]$1[/url]',$s);
@@ -57,8 +62,6 @@ function stripdcode_br_cb($s) {
 }
 
 
-       // BBcode 2 HTML was written by WAY2WEB.net
-       // extended to work with Mistpark/Friendika - Mike Macgirvin
 
 function bb2diaspora($Text,$preserve_nl = false) {
 
@@ -95,7 +98,6 @@ function bb2diaspora($Text,$preserve_nl = false) {
        $Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '[$2]($1)', $Text);
 
        $Text = preg_replace("/\[img\](.*?)\[\/img\]/", '![' . t('image/photo') . '](' . '$1' . ')', $Text);
-//     $Text = preg_replace("/\[img\](.*?)\[\/img\]/", t('image/photo'), $Text);
 
        // Perform MAIL Search
        $Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '[$1](mailto:$1)', $Text);
index 1303acf74a13a1788930997dd8953c61e8752a79..4749027046627e857c1c06ad91044e15ff583383 100644 (file)
@@ -75,6 +75,6 @@ function network_to_name($s) {
        call_hooks('network_to_name', $s);
 
        return str_replace(array(NETWORK_DFRN,NETWORK_OSTATUS,NETWORK_FEED,NETWORK_MAIL,NETWORK_DIASPORA,NETWORK_FACEBOOK,NETWORK_ZOT),
-               array(t('Friendika'),t('OStatus'),t('RSS/Atom'),t('Email'),t('Diaspora'),t('Facebook'),t('Zot!')),$s);
+               array(t('Friendica'),t('OStatus'),t('RSS/Atom'),t('Email'),t('Diaspora'),t('Facebook'),t('Zot!')),$s);
 
 }
index 2af2b5f55c8ec41b149b8e1d119dc2164638070f..35db71946cbe3236c179a887344cee974e314e77 100644 (file)
@@ -1671,9 +1671,9 @@ function local_delivery($importer,$data) {
 
                // Does our member already have a friend matching this description?
 
-               $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `url` = '%s' AND `uid` = %d LIMIT 1",
+               $r = q("SELECT * FROM `contact` WHERE `name` = '%s' AND `nurl` = '%s' AND `uid` = %d LIMIT 1",
                        dbesc($fsugg['name']),
-                       dbesc($fsugg['url']),
+                       dbesc(normalise_link($fsugg['url'])),
                        intval($fsugg['uid'])
                );
                if(count($r))