diff options
-rw-r--r-- | lib/dokuwiki.php | 4 | ||||
-rw-r--r-- | lib/dokuwiki/lib/tpl/default/main.php | 2 | ||||
-rw-r--r-- | start.php | 20 |
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/dokuwiki.php b/lib/dokuwiki.php index af2e14b8d..8084508fa 100644 --- a/lib/dokuwiki.php +++ b/lib/dokuwiki.php @@ -1,8 +1,8 @@ <?php function current_dokuwiki_entity($create = true) { - $page_owner = page_owner(); - $user = get_loggedin_user(); + $page_owner = elgg_get_page_owner_guid(); + $user = elgg_get_logged_in_user_entity(); //error_log($page_owner->guid); //error_log($user->guid); if (!$page_owner) diff --git a/lib/dokuwiki/lib/tpl/default/main.php b/lib/dokuwiki/lib/tpl/default/main.php index 2de6f4987..6373ec4e9 100644 --- a/lib/dokuwiki/lib/tpl/default/main.php +++ b/lib/dokuwiki/lib/tpl/default/main.php @@ -35,7 +35,7 @@ $sidebar = ob_get_clean(); if (empty($sidebar_inline) && empty($page_inline)) { $body = elgg_view_layout('two_column_left_sidebar', '', $content, $sidebar); - echo page_draw("dokuwiki",$body); + echo elgg_view_page("dokuwiki", $body); } else { $all_link = elgg_get_site_url().'dokuwiki/'.elgg_get_page_owner_guid(); @@ -9,20 +9,20 @@ * @link http://lorea.cc */ -register_elgg_event_handler('init','system','dokuwiki_init'); +elgg_register_event_handler('init','system','dokuwiki_init'); function dokuwiki_init(){ elgg_register_library('elgg:dokuwiki', elgg_get_plugins_path().'dokuwiki/lib/dokuwiki.php'); - register_entity_type('object','dokuwiki'); - register_plugin_hook('entity:icon:url', 'object', 'elggdokuwiki_icon_hook'); - register_entity_url_handler('elggdokuwiki_url','object', 'dokuwiki'); + elgg_register_entity_type('object','dokuwiki'); + elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'elggdokuwiki_icon_hook'); + elgg_register_entity_url_handler('elggdokuwiki_url','object', 'dokuwiki'); // add block link to elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'dokuwiki_owner_block_menu'); - register_page_handler('dokuwiki','dokuwiki_page_handler'); + elgg_register_page_handler('dokuwiki','dokuwiki_page_handler'); add_group_tool_option('dokuwiki',elgg_echo('groups:enabledokuwiki'),false); add_group_tool_option('dokuwiki_frontsidebar',elgg_echo('groups:enabledokuwiki_frontsidebar'),false); @@ -38,7 +38,7 @@ function dokuwiki_init(){ $item = new ElggMenuItem('wiki', elgg_echo('dokuwiki:title'), 'dokuwiki/all'); elgg_register_menu_item('site', $item); - elgg_extend_view("metatags", "dokuwiki/metatags"); + elgg_extend_view("page/elements/head", "dokuwiki/metatags"); } /** @@ -59,7 +59,7 @@ function dokuwiki_init(){ include(elgg_get_plugins_path().'dokuwiki/index.php'); return; } - set_context("dokuwiki"); + elgg_set_context("dokuwiki"); $dokuwiki_path = elgg_get_plugins_path().'dokuwiki/lib/dokuwiki/'; $doku = current_dokuwiki_entity(); if (!$doku) // can fail if there is no user and wiki doesnt exist @@ -74,7 +74,7 @@ function dokuwiki_init(){ forward(); } if ($ent && (/*$ent instanceof ElggUser ||*/ $ent instanceof ElggGroup)) { - set_page_owner($entity_guid); + elgg_set_page_owner_guid($entity_guid); $data_path = elgg_get_data_path().'wikis/'.$entity_guid; } else { // can't see the group @@ -119,8 +119,8 @@ function dokuwiki_init(){ if (empty($page) || (count($page)==1 && !$page[0])) { $page = array('doku.php'); } - $_SERVER['PHP_AUTH_USER'] = get_loggedin_user()->username; - $_SERVER['PHP_AUTH_PW'] = get_loggedin_user()->password; + $_SERVER['PHP_AUTH_USER'] = elgg_get_logged_in_user_entity()->username; + $_SERVER['PHP_AUTH_PW'] = elgg_get_logged_in_user_entity()->password; if (count($page) == 1) { $doku_body = elgg_view('dokuwiki/index',array('page'=>$page[0])); echo $doku_body; |