]> git.mxchange.org Git - friendica.git/commitdiff
fix some changes lost from another branch
authorfriendica <info@friendica.com>
Fri, 27 Jan 2012 07:03:27 +0000 (23:03 -0800)
committerfriendica <info@friendica.com>
Fri, 27 Jan 2012 07:03:27 +0000 (23:03 -0800)
include/bb2diaspora.php
mod/delegate.php
view/delegate.tpl

index ab124228df26714b35031a32324232b3bd6455d9..d367b6716678ede92306685a5dba102d27c8ee2d 100755 (executable)
@@ -20,9 +20,6 @@ function diaspora2bb($s) {
        $s = html2bbcode($s);
 //     $s = str_replace('&#42;','*',$s);
 
-       // we seem to get a lot of text smushed together with links from Diaspora.
-       // if it's a url that we haven't already parsed into a bbcode structure, put a space before it.
-       $s = preg_replace("/([^=\"\]])(https?:\/\/)/ism",'$1 $2',$s);
 
     $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/url\]/ism",'[youtube]$2[/youtube]',$s); 
     $s = preg_replace("/\[url\=https?:\/\/www.youtube.com\/watch\?v\=(.*?)\].*?\[\/url\]/ism",'[youtube]$1[/youtube]',$s); 
@@ -32,6 +29,12 @@ function diaspora2bb($s) {
        // remove duplicate adjacent code tags
        $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
        $s = scale_diaspora_images($s);
+
+       // we seem to get a lot of text smushed together with links from Diaspora.
+
+       $s = preg_replace('/[^ ]\[url\=(.*?)\]/',' [url=$1]' ,$s);
+       $s = preg_replace('/\[\/url\][^ ]/','[/url] ',$s);
+
        return $s;
 }
 
index 56d11970fe7d3dfadf9335f1ad69bb4c04e5b12a..c19df0681d7c5c154a4be90a7a7643682f411dc2 100644 (file)
@@ -54,8 +54,7 @@ function delegate_content(&$a) {
 
        // These people can manage this account/page with full privilege
 
-       $r = q("SELECT * FROM `user` WHERE `uid` = %d AND `email` = '%s' AND `password` = '%s' LIMIT 1",
-               intval(local_user()),
+       $r = q("SELECT * FROM `user` WHERE `email` = '%s' AND `password` = '%s' ",
                dbesc($a->user['email']),
                dbesc($a->user['password'])
        );
index a12368216a27d9b69c8f85de1f0c7b0fae72e6d1..9a7d2e18d2ac9176118cec4aa89c59fea8d5393a 100644 (file)
@@ -9,7 +9,7 @@
 
 <div class="contact-block-div">
 <a class="contact-block-link" href="#" >
-<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username" />
+<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username ($x.nickname)" />
 </a>
 </div>
 
@@ -26,7 +26,7 @@
 
 <div class="contact-block-div">
 <a class="contact-block-link" href="$base/delegate/remove/$x.uid" >
-<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username" />
+<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username ($x.nickname)" />
 </a>
 </div>
 
@@ -44,7 +44,7 @@ $none
 
 <div class="contact-block-div">
 <a class="contact-block-link" href="$base/delegate/add/$x.uid" >
-<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username" />
+<img class="contact-block-img" src="$base/photo/thumb/$x.uid" title="$x.username ($x.nickname)" />
 </a>
 </div>