diff options
author | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-25 22:18:22 +0000 |
---|---|---|
committer | nickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-25 22:18:22 +0000 |
commit | 76d3b27335145459e1b9da4e07cf37ad8bd050c1 (patch) | |
tree | 7ac84ed02686061d1ced1e1951598e30334da9c3 /mod/profile | |
parent | 6a64b7d0b595c97c4bef9a8fa22d567611fb3fd1 (diff) | |
download | elgg-76d3b27335145459e1b9da4e07cf37ad8bd050c1.tar.gz elgg-76d3b27335145459e1b9da4e07cf37ad8bd050c1.tar.bz2 |
Updating administration plugins with admin submenu views.
git-svn-id: http://code.elgg.org/elgg/trunk@6220 36083f99-b078-4883-b0ff-0f9b5a30f544
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; |