aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-15 22:01:47 -0700
committerfriendica <info@friendica.com>2013-04-15 22:01:47 -0700
commit97957e0c1b3f4ab39111e923a621aa3ef99581df (patch)
treee797904059270a2b4c2c6793eca5d37027e6287e /include/text.php
parentb17cadfd0e059c2f243eb110a9ca408ccd81898e (diff)
parent6e2e8f101a930ec39d3a38ee4aeec5ad3b0c8cf7 (diff)
downloadvolse-hubzilla-97957e0c1b3f4ab39111e923a621aa3ef99581df.tar.gz
volse-hubzilla-97957e0c1b3f4ab39111e923a621aa3ef99581df.tar.bz2
volse-hubzilla-97957e0c1b3f4ab39111e923a621aa3ef99581df.zip
Merge pull request #48 from beardy-unixer/master
Uncripple Zids
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index 360a7357f..c7210010c 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1128,14 +1128,22 @@ function prepare_text($text,$content_type = 'text/bbcode') {
function zidify_callback($match) {
- $replace = '<a' . $match[1] . 'class="zrl"' . $match[2] . ' href="' . zid($match[3]) . '"';
+ if (feature_enabled(local_user(),'sendzid')) {
+ $replace = '<a' . $match[1] . ' href="' . zid($match[2]) . '"';}
+ else {
+ $replace = '<a' . $match[1] . 'class="zrl"' . $match[2] . ' href="' . zid($match[3]) . '"';}
+
$x = str_replace($match[0],$replace,$match[0]);
return $x;
}
function zidify_links($s) {
- $s = preg_replace_callback('/\<a(.*?)class\=\"zrl\"(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);
+ if (feature_enabled(local_user(),'sendzid')) {
+ $s = preg_replace_callback('/\<a(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);}
+ else {
+ $s = preg_replace_callback('/\<a(.*?)class\=\"zrl\"(.*?)href\=\"(.*?)\"/ism','zidify_callback',$s);}
+
return $s;
}