]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
this time got the guid correct for the add button
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 22 Jan 2011 20:32:10 +0000 (20:32 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 22 Jan 2011 20:32:10 +0000 (20:32 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7903 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/layout/shells/content/header.php

index 3f6fc5c5a196be878f190897c514e25312fee017..02979440822f52df200bc7329e14c1d67dfac533 100644 (file)
@@ -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/");