diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/widgets.php | 5 | ||||
-rw-r--r-- | include/wiki.php | 5 |
2 files changed, 7 insertions, 3 deletions
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))); + } } } |