diff options
author | zotlabs <mike@macgirvin.com> | 2016-12-04 11:43:27 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-12-04 11:43:27 -0800 |
commit | 16e48a859cffb0f81f19dc847210c98ac32d8d09 (patch) | |
tree | 09da7eda944892f4faaaa87700f212bcbcb13b69 /include | |
parent | 6346c005278d83df3b6b6ae0880ee48f4b5c936e (diff) | |
parent | 3f6fe4f2be18dd99f30a2cd5e47fb3aaeee4b0b7 (diff) | |
download | volse-hubzilla-16e48a859cffb0f81f19dc847210c98ac32d8d09.tar.gz volse-hubzilla-16e48a859cffb0f81f19dc847210c98ac32d8d09.tar.bz2 volse-hubzilla-16e48a859cffb0f81f19dc847210c98ac32d8d09.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 10 | ||||
-rw-r--r-- | include/wiki.php | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 6794fca96..b315255f5 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -824,12 +824,14 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false) $Text = preg_replace("(\[h6\](.*?)\[\/h6\])ism",'<h6>$1</h6>',$Text); } // Check for table of content without params - if (strpos($Text,'[toc]') !== false) { - $Text = preg_replace("/\[toc\]/ism",'<ul id="toc"></ul>',$Text); + while(strpos($Text,'[toc]') !== false) { + $toc_id = 'toc-' . random_string(10); + $Text = preg_replace("/\[toc\]/ism", '<ul id="' . $toc_id . '" class="toc" data-toc=".section-content-wrapper"></ul><script>$("#' . $toc_id . '").toc();</script>', $Text, 1); } // Check for table of content with params - if (strpos($Text,'[toc') !== false) { - $Text = preg_replace("/\[toc([^\]]+?)\]/ism",'<ul$1></ul>',$Text); + while(strpos($Text,'[toc') !== false) { + $toc_id = 'toc-' . random_string(10); + $Text = preg_replace("/\[toc([^\]]+?)\]/ism", '<ul id="' . $toc_id . '" class="toc"$1></ul><script>$("#' . $toc_id . '").toc();</script>', $Text, 1); } // Check for centered text if (strpos($Text,'[/center]') !== false) { diff --git a/include/wiki.php b/include/wiki.php index dd5dbbe11..542d617b9 100644 --- a/include/wiki.php +++ b/include/wiki.php @@ -19,7 +19,7 @@ function wiki_list($channel, $observer_hash) { $w['htmlName'] = get_iconfig($w, 'wiki', 'htmlName'); $w['urlName'] = get_iconfig($w, 'wiki', 'urlName'); $w['path'] = get_iconfig($w, 'wiki', 'path'); - $w['path'] = get_iconfig($w, 'wiki', 'mimeType'); + $w['mimeType'] = get_iconfig($w, 'wiki', 'mimeType'); } } // TODO: query db for wikis the observer can access. Return with two lists, for read and write access |