aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-11-18 21:25:40 -0500
committerAndrew Manning <tamanning@zoho.com>2016-11-18 21:25:40 -0500
commitd5c14a513d435aade7d16d792a7e7a22ff9b01ff (patch)
tree523af1dad8ee5980e90f71d1e1f63de4c66d3330 /include
parentf9b836027d4d06d218e0926c539845b641353cfb (diff)
downloadvolse-hubzilla-d5c14a513d435aade7d16d792a7e7a22ff9b01ff.tar.gz
volse-hubzilla-d5c14a513d435aade7d16d792a7e7a22ff9b01ff.tar.bz2
volse-hubzilla-d5c14a513d435aade7d16d792a7e7a22ff9b01ff.zip
Wiki pages display in tab to the left of the edit pane tab. Home is always first in the list.
Diffstat (limited to 'include')
-rw-r--r--include/wiki.php5
1 files changed, 4 insertions, 1 deletions
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)));
+ }
}
}