diff options
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -57,7 +57,7 @@ function dokuwiki_init(){ if ($page[0] === "all") { elgg_set_context("search"); include(elgg_get_plugins_path().'dokuwiki/index.php'); - return; + return true; } elgg_set_context("dokuwiki"); @@ -65,7 +65,7 @@ function dokuwiki_init(){ $dokuwiki_path = elgg_get_plugins_path().'dokuwiki/vendors/dokuwiki/'; $doku = current_dokuwiki_entity(); if (!$doku) // can fail if there is no user and wiki doesnt exist - forward(); + return false; $parsed_url = parse_url(elgg_get_site_url().'dokuwiki/'); $url_base = $parsed_url['path']; if (is_numeric($page[0])) { @@ -74,14 +74,16 @@ function dokuwiki_init(){ if (($ent && $ent instanceof ElggGroup) && $ent->dokuwiki_enable !== 'yes') { // wiki not activated for this group. bail out. - forward(); + elgg_pop_context(); + return false; } if ($ent && (/*$ent instanceof ElggUser ||*/ $ent instanceof ElggGroup)) { elgg_set_page_owner_guid($entity_guid); $data_path = elgg_get_data_path().'wikis/'.$entity_guid; } else { // can't see the group - forward(); + elgg_pop_context(); + return false; } $page = array_slice($page, 1); // pop first element define('DOKU_REL', $url_base.$entity_guid."/"); @@ -135,7 +137,7 @@ function dokuwiki_init(){ $doku_body = elgg_view('dokuwiki/index',array('page'=>implode("/",$page))); echo $doku_body; } - return; + return true; } /** |