From cec8a4f34681d4c2a43e0c07de0a68bc22f1b558 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 22 Jan 2011 20:32:10 +0000 Subject: this time got the guid correct for the add button git-svn-id: http://code.elgg.org/elgg/trunk@7903 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/layout/shells/content/header.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'views/default') diff --git a/views/default/layout/shells/content/header.php b/views/default/layout/shells/content/header.php index 3f6fc5c5a..029794408 100644 --- a/views/default/layout/shells/content/header.php +++ b/views/default/layout/shells/content/header.php @@ -26,8 +26,10 @@ if ($context) { $buttons = $vars['buttons']; } else { if (isloggedin() && $context) { - $guid = elgg_get_page_owner_guid(); - if (!$guid) { + $owner = elgg_get_page_owner(); + if (elgg_instanceof($owner, 'group')) { + $guid = $owner->getGUID(); + } else { $guid = get_loggedin_userid(); } $new_link = elgg_get_array_value('new_link', $vars, "pg/$context/add/$guid/"); -- cgit v1.2.3