diff options
Diffstat (limited to 'mod/bookmarks')
-rw-r--r-- | mod/bookmarks/actions/add.php | 8 | ||||
-rw-r--r-- | mod/bookmarks/bookmarklet.php | 4 | ||||
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/form.php | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/mod/bookmarks/actions/add.php b/mod/bookmarks/actions/add.php index 5b0ce91c4..e633244c1 100644 --- a/mod/bookmarks/actions/add.php +++ b/mod/bookmarks/actions/add.php @@ -23,8 +23,8 @@ if (!$title || !$address) { //create a new bookmark object $entity = new ElggObject; $entity->subtype = "bookmarks"; -$entity->owner_guid = get_loggedin_user()->getGUID(); -$entity->container_guid = (int)get_input('container_guid', get_loggedin_user()->getGUID()); +$entity->owner_guid = get_loggedin_userid(); +$entity->container_guid = (int)get_input('container_guid', get_loggedin_userid()); $entity->title = $title; $entity->description = $notes; $entity->address = $address; @@ -35,9 +35,9 @@ $entity->tags = $tagarray; if ($entity->save()) { system_message(elgg_echo('bookmarks:save:success')); //add to river - add_to_river('river/object/bookmarks/create','create',$_SESSION['user']->guid,$entity->guid); + add_to_river('river/object/bookmarks/create','create',get_loggedin_userid(),$entity->guid); } else { register_error(elgg_echo('bookmarks:save:failed')); } -$account = get_entity((int)get_input('container_guid', get_loggedin_user()->getGUID())); +$account = get_entity((int)get_input('container_guid', get_loggedin_userid())); forward("pg/bookmarks/" . $account->username);
\ No newline at end of file diff --git a/mod/bookmarks/bookmarklet.php b/mod/bookmarks/bookmarklet.php index e71797026..e1ff3c6df 100644 --- a/mod/bookmarks/bookmarklet.php +++ b/mod/bookmarks/bookmarklet.php @@ -13,8 +13,8 @@ gatekeeper(); // Get the current page's owner $page_owner = page_owner_entity(); -if ($page_owner === false || is_null($page_owner) && ($_SESSION['user'])) { - $page_owner = $_SESSION['user']; +if ($page_owner === false || is_null($page_owner) && (get_loggedin_user())) { + $page_owner = get_loggedin_user(); set_page_owner($page_owner->getGUID()); } diff --git a/mod/bookmarks/views/default/bookmarks/form.php b/mod/bookmarks/views/default/bookmarks/form.php index a49fcc088..b779116fd 100644 --- a/mod/bookmarks/views/default/bookmarks/form.php +++ b/mod/bookmarks/views/default/bookmarks/form.php @@ -31,7 +31,7 @@ if(isset($vars['entity'])){ }else{ $access_id = get_default_access(get_loggedin_user()); } - $owner = $vars['user']; + $owner = get_loggedin_user(); $url = "action/bookmarks/add"; } ?> |