diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 14 | ||||
-rw-r--r-- | include/channel.php | 3 | ||||
-rw-r--r-- | include/network.php | 12 |
3 files changed, 26 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 0bf326506..7f7be4300 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -498,6 +498,18 @@ function bb_highlight($match) { return $match[0]; } +function bb_fixtable_lf($match) { + + // remove extraneous whitespace between table element tags since newlines will all + // be converted to '<br />' and turn your neatly crafted tables into a whole lot of + // empty space. + + $x = preg_replace("/\]\s+\[/",'][',$match[1]); + return '[table]' . $x . '[/table]'; + +} + + // BBcode 2 HTML was written by WAY2WEB.net // extended to work with Mistpark/Friendica/Redmatrix/Hubzilla - Mike Macgirvin @@ -579,7 +591,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) $Text = preg_replace_callback("/\[code=(.*?)\](.*?)\[\/code\]/ism", 'bb_highlight', $Text); } - + $Text = preg_replace_callback("/\[table\](.*?)\[\/table\]/ism",'bb_fixtable_lf',$Text); // Convert new line chars to html <br /> tags diff --git a/include/channel.php b/include/channel.php index a7624f060..913768017 100644 --- a/include/channel.php +++ b/include/channel.php @@ -761,11 +761,10 @@ function identity_export_year($channel_id,$year,$month = 0) { * * The channel default theme is also selected for use, unless over-riden elsewhere. * - * @param[in,out] App &$a * @param string $nickname * @param string $profile */ -function profile_load(&$a, $nickname, $profile = '') { +function profile_load($nickname, $profile = '') { // logger('profile_load: ' . $nickname . (($profile) ? ' profile: ' . $profile : '')); diff --git a/include/network.php b/include/network.php index 91dac936e..96bf714f6 100644 --- a/include/network.php +++ b/include/network.php @@ -1336,8 +1336,20 @@ function discover_by_webbie($webbie) { $fullname = $vcard['fn']; if($vcard['photo'] && (strpos($vcard['photo'],'http') !== 0)) $vcard['photo'] = $diaspora_base . '/' . $vcard['photo']; + if(($vcard['key']) && (! $pubkey)) + $pubkey = $vcard['key']; if(! $avatar) $avatar = $vcard['photo']; + if($diaspora) { + if(($vcard['guid']) && (! $diaspora_guid)) + $diaspora_guid = $vcard['guid']; + if(($vcard['url']) && (! $diaspora_base)) + $diaspora_base = $vcard['url']; + + + + + } } } |