diff options
Diffstat (limited to 'mod/profile')
-rw-r--r-- | mod/profile/start.php | 25 | ||||
-rw-r--r-- | mod/profile/views/default/admin/appearance/defaultprofile.php (renamed from mod/profile/defaultprofile.php) | 24 |
2 files changed, 11 insertions, 38 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php index 6263f4a54..90caa8f64 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -40,7 +40,6 @@ function profile_init() { // Register a page handler, so we can have nice URLs register_page_handler('profile', 'profile_page_handler'); - register_page_handler('defaultprofile', 'profileedit_page_handler'); register_page_handler('icon', 'profile_icon_handler'); register_page_handler('iconjs', 'profile_iconjs_handler'); @@ -52,11 +51,7 @@ function profile_init() { // Now override icons register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook'); - elgg_add_submenu_item(array( - 'text' => elgg_echo('profile:edit:default'), - 'href' => "{$CONFIG->wwwroot}pg/defaultprofile/edit", - 'parent_id' => 'appearance', - ), 'admin', 'default'); + elgg_add_admin_submenu_item('defaultprofile', elgg_echo('profile:edit:default'), 'appearance'); } /** @@ -170,24 +165,6 @@ function profile_page_handler($page) { } /** - * Profile edit page handler - * - * @param array $page Array of page elements, forwarded by the page handling mechanism - */ -function profileedit_page_handler($page) { - global $CONFIG; - - // The username should be the file we're getting - if (isset($page[0])) { - switch ($page[0]) { - default: - include($CONFIG->pluginspath . "profile/defaultprofile.php"); - break; - } - } -} - -/** * Pagesetup function * */ diff --git a/mod/profile/defaultprofile.php b/mod/profile/views/default/admin/appearance/defaultprofile.php index 6d9a25832..7c498780b 100644 --- a/mod/profile/defaultprofile.php +++ b/mod/profile/views/default/admin/appearance/defaultprofile.php @@ -9,16 +9,9 @@ * @link http://elgg.com/ */ -require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - -admin_gatekeeper(); -set_context('admin'); - $title = elgg_view_title(elgg_echo('profile:edit:default')); $form = elgg_view('profile/editdefaultprofile'); -set_context('search'); - // List form elements $n = 0; $loaded_defaults = array(); @@ -46,10 +39,13 @@ $resetlisting = elgg_view('input/form', ) ); -$resetlisting = "<div class='default_profile_reset'>{$resetlisting}</div>"; - -set_context('admin'); - -$body = elgg_view_layout("administration", $title . $form . $listing . $resetlisting); - -page_draw(elgg_echo('profile:edit:default'), $body);
\ No newline at end of file +$body = <<<__HTML +$title +$form +$listing +<div class="default_profile_reset"> + $resetlisting +</div> +__HTML; + +echo $body; |