aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-01-26 23:03:27 -0800
committerfriendica <info@friendica.com>2012-01-26 23:03:27 -0800
commit3197a6e8aaacef1fb504c90d97f291f133151429 (patch)
treed2cfbdf86c60912be8a91ec0d2d3ed6fb15c5454
parent8fe51682590c1f9badf2efc6b4f7fc1ddcc2c31e (diff)
downloadvolse-hubzilla-3197a6e8aaacef1fb504c90d97f291f133151429.tar.gz
volse-hubzilla-3197a6e8aaacef1fb504c90d97f291f133151429.tar.bz2
volse-hubzilla-3197a6e8aaacef1fb504c90d97f291f133151429.zip
fix some changes lost from another branch
-rwxr-xr-xinclude/bb2diaspora.php9
-rw-r--r--mod/delegate.php3
-rw-r--r--view/delegate.tpl6
3 files changed, 10 insertions, 8 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index ab124228d..d367b6716 100755
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -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;
}
diff --git a/mod/delegate.php b/mod/delegate.php
index 56d11970f..c19df0681 100644
--- a/mod/delegate.php
+++ b/mod/delegate.php
@@ -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'])
);
diff --git a/view/delegate.tpl b/view/delegate.tpl
index a12368216..9a7d2e18d 100644
--- a/view/delegate.tpl
+++ b/view/delegate.tpl
@@ -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>