aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bb2diaspora.php6
-rw-r--r--include/taxonomy.php2
-rw-r--r--include/widgets.php5
-rw-r--r--include/wiki.php5
4 files changed, 14 insertions, 4 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index da02d6cac..e6c97a750 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -427,6 +427,12 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
$Text = preg_replace_callback('/\@\!?\[([zu])rl\=(\w+.*?)\](\w+.*?)\[\/([zu])rl\]/i', 'bb2dmention_callback', $Text);
+ // strip map tags, as the rendering is performed in bbcode() and the resulting output
+ // is not compatible with Diaspora (at least in the case of openstreetmap and probably
+ // due to the inclusion of an html iframe)
+
+ $Text = preg_replace("/\[map\=(.*?)\]/ism", '$1', $Text);
+ $Text = preg_replace("/\[map\](.*?)\[\/map\]/ism", '$1', $Text);
// Converting images with size parameters to simple images. Markdown doesn't know it.
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text);
diff --git a/include/taxonomy.php b/include/taxonomy.php
index 067bd3246..0b4b2aa9a 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -386,7 +386,7 @@ function get_things($profile_hash,$uid) {
$things[$k] = null;
foreach($r as $rr) {
- $l = q("select xchan_name, xchan_photo_s, xchan_url from likes left join xchan on likee = xchan_hash where
+ $l = q("select xchan_name, xchan_photo_s, xchan_url from likes left join xchan on liker = xchan_hash where
target_type = '%s' and target_id = '%s' and channel_id = %d",
dbesc(ACTIVITY_OBJ_THING),
dbesc($rr['obj_obj']),
diff --git a/include/widgets.php b/include/widgets.php
index 3dc555b46..1441fbeb3 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -967,7 +967,7 @@ function widget_wiki_list($arr) {
'$view' => t('View'),
'$addnew' => t('Create new wiki'),
'$create' => t('Create'),
- '$wikiName' => array('wikiName', t('Wiki name'), '', ''),
+ '$wikiName' => array('wikiName', t('Wiki name')),
'$lockstate' => $x['lockstate'],
'$acl' => $x['acl'],
'$allow_cid' => $x['allow_cid'],
@@ -975,7 +975,7 @@ function widget_wiki_list($arr) {
'$deny_cid' => $x['deny_cid'],
'$deny_gid' => $x['deny_gid'],
'$bang' => $x['bang'],
- '$notify' => t('Send notification')
+ '$notify' => array('postVisible', t('Send notification'), '', '', array(t('No'), t('Yes')))
));
}
return '';
@@ -1017,6 +1017,7 @@ function widget_wiki_pages($arr) {
'$pages' => $pages,
'$canadd' => $can_create,
'$addnew' => t('Add new page'),
+ '$pageName' => array('pageName', t('Enter the name of the new page:'), '', ''),
));
}
diff --git a/include/wiki.php b/include/wiki.php
index bcdf9d7d8..d2cb51bd3 100644
--- a/include/wiki.php
+++ b/include/wiki.php
@@ -32,13 +32,16 @@ function wiki_page_list($resource_id) {
return array('pages' => null, 'wiki' => null);
}
$pages = array();
+ $pages[] = array('title' => 'Home', 'url' => 'Home');
if (is_dir($w['path']) === true) {
$files = array_diff(scandir($w['path']), array('.', '..', '.git'));
// TODO: Check that the files are all text files
foreach($files as $file) {
// strip the .md file extension and unwrap URL encoding to leave HTML encoded name
- $pages[] = array('title' => urldecode(substr($file, 0, -3)), 'url' => urlencode(substr($file, 0, -3)));
+ if( urldecode(substr($file, 0, -3)) !== 'Home') {
+ $pages[] = array('title' => urldecode(substr($file, 0, -3)), 'url' => urlencode(substr($file, 0, -3)));
+ }
}
}