]> git.mxchange.org Git - friendica.git/commitdiff
d* - remove dupe bbcode code tags
authorfriendica <info@friendica.com>
Mon, 14 Nov 2011 03:04:59 +0000 (19:04 -0800)
committerfriendica <info@friendica.com>
Mon, 14 Nov 2011 03:04:59 +0000 (19:04 -0800)
boot.php
include/bb2diaspora.php

index a3e4855277b2bee7636a330766da70d1b561aa37..3e18db065a96b7d926bb5c9e93236ce12d6ae151 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -9,7 +9,7 @@ require_once('include/nav.php');
 require_once('include/cache.php');
 
 define ( 'FRIENDIKA_PLATFORM',     'Friendica');
-define ( 'FRIENDIKA_VERSION',      '2.3.1163' );
+define ( 'FRIENDIKA_VERSION',      '2.3.1164' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.22'    );
 define ( 'DB_UPDATE_VERSION',      1103      );
 
index 6b0589c43066a68726cab34658feff416400d8f7..8110d3e752c202699601dbec63a8e884c955e10e 100644 (file)
@@ -22,6 +22,8 @@ function diaspora2bb($s) {
        $s = preg_replace("/\[url\=?(.*?)\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/url\]/ism",'[vimeo]$2[/vimeo]',$s); 
        $s = preg_replace("/\[url\=https?:\/\/vimeo.com\/([0-9]+)\](.*?)\[\/url\]/ism",'[vimeo]$1[/vimeo]',$s); 
        $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)(vimeo|youtu|www\.youtube|soundcloud)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url]$2$3$4[/url]',$s);
+       // remove duplicate adjacent code tags
+       $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s);
        $s = scale_diaspora_images($s);
        return $s;
 }