aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-06-30 16:23:42 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-06-30 16:23:42 +0100
commit7a079cd7dcb7b88d745ad9605bdc26c44a6adbc9 (patch)
tree49ed0e74f49066903eb9e61c822fcbec41b78bba /include
parentf64f84b5e999fd454f899c2ce6c82aef81e21fc0 (diff)
downloadvolse-hubzilla-7a079cd7dcb7b88d745ad9605bdc26c44a6adbc9.tar.gz
volse-hubzilla-7a079cd7dcb7b88d745ad9605bdc26c44a6adbc9.tar.bz2
volse-hubzilla-7a079cd7dcb7b88d745ad9605bdc26c44a6adbc9.zip
Make [observer.baseurl] more reliable using connurl which will change
less often than xchan_url, which can break the regex and might not even contain the baseurl at all, plus a bit of doco clean up.
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 6f2296542..bab50240c 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -439,8 +439,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
// replace [observer.baseurl]
if ($observer) {
- $obsBaseURL = $observer['xchan_url'];
- $obsBaseURL = preg_replace("/\/channel\/.*$/", '', $obsBaseURL);
+ $obsBaseURL = $observer['xchan_connurl'];
+ $obsBaseURL = preg_replace("/\/poco\/.*$/", '', $obsBaseURL);
$Text = str_replace('[observer.baseurl]', $obsBaseURL, $Text);
$Text = str_replace('[observer.url]',$observer['xchan_url'], $Text);
$Text = str_replace('[observer.name]',$observer['xchan_name'], $Text);