aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/page_elements/elgg_topbar.php8
-rw-r--r--views/default/page_elements/elgg_topbar_logout.php14
2 files changed, 15 insertions, 7 deletions
diff --git a/views/default/page_elements/elgg_topbar.php b/views/default/page_elements/elgg_topbar.php
index f4959c749..e88cb0fac 100644
--- a/views/default/page_elements/elgg_topbar.php
+++ b/views/default/page_elements/elgg_topbar.php
@@ -20,13 +20,7 @@ if (($user instanceof ElggUser) && ($user->guid > 0)) {
echo "<a href=\"$user_link\"><img class=\"user_mini_avatar\" src=\"$user_image\" alt=\"User avatar\" /></a>";
// logout link
- echo '<div class="log_out">';
- echo elgg_view('output/url', array(
- 'href' => "{$vars['url']}action/logout",
- 'text' => elgg_echo('logout'),
- 'is_action' => TRUE
- ));
- echo '</div>';
+ echo elgg_view('page_elements/elgg_topbar_logout', $vars);
// elgg tools menu
// need to echo this empty view for backward compatibility.
diff --git a/views/default/page_elements/elgg_topbar_logout.php b/views/default/page_elements/elgg_topbar_logout.php
new file mode 100644
index 000000000..d37c5f126
--- /dev/null
+++ b/views/default/page_elements/elgg_topbar_logout.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * A standard logout link
+ *
+ * Called within the Elgg topbar view.
+ */
+
+echo '<div class="log_out">';
+echo elgg_view('output/url', array(
+ 'href' => "{$vars['url']}action/logout",
+ 'text' => elgg_echo('logout'),
+ 'is_action' => TRUE
+));
+echo '</div>';