aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:48:24 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:48:24 +0000
commitc27eac2d2a970e76a1204757bbe15da8efb2870c (patch)
tree7f524d3ee95391163293d9f77a945e2915c3e8ac /mod/bookmarks
parentf49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (diff)
downloadelgg-c27eac2d2a970e76a1204757bbe15da8efb2870c.tar.gz
elgg-c27eac2d2a970e76a1204757bbe15da8efb2870c.tar.bz2
Refs #1439: Using new page_owner functions in all of core
git-svn-id: http://code.elgg.org/elgg/trunk@7140 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/bookmarks')
-rw-r--r--mod/bookmarks/bookmarklet.php2
-rw-r--r--mod/bookmarks/start.php12
-rw-r--r--mod/bookmarks/views/default/bookmarks/bookmarklet.php2
-rw-r--r--mod/bookmarks/views/default/bookmarks/form.php6
-rwxr-xr-xmod/bookmarks/views/default/bookmarks/group_bookmarks.php6
-rw-r--r--mod/bookmarks/views/default/widgets/bookmarks/view.php2
6 files changed, 15 insertions, 15 deletions
diff --git a/mod/bookmarks/bookmarklet.php b/mod/bookmarks/bookmarklet.php
index e1ff3c6df..ecfe61ae5 100644
--- a/mod/bookmarks/bookmarklet.php
+++ b/mod/bookmarks/bookmarklet.php
@@ -12,7 +12,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
gatekeeper();
// Get the current page's owner
-$page_owner = page_owner_entity();
+$page_owner = elgg_get_page_owner();
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/start.php b/mod/bookmarks/start.php
index 3d748fabe..25b87b6c7 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -53,7 +53,7 @@ function bookmarks_init() {
function bookmarks_pagesetup() {
global $CONFIG;
- $page_owner = page_owner_entity();
+ $page_owner = elgg_get_page_owner();
// Add group bookmark menu item
if (isloggedin()) {
@@ -79,13 +79,13 @@ function bookmarks_page_handler($page) {
// The first component of a bookmarks URL is the username
// If the username is set_input()'d and has group:NN in it, magic happens
- // and the page_owner_entity() is the group.
+ // and the elgg_get_page_owner() is the group.
if (isset($page[0])) {
$owner_name = $page[0];
set_input('username', $owner_name);
// grab the page owner here so the group magic works.
- $owner = page_owner_entity();
+ $owner = elgg_get_page_owner();
} else {
set_page_owner(get_loggedin_userid());
}
@@ -96,7 +96,7 @@ function bookmarks_page_handler($page) {
$content = elgg_echo("bookmarks:unknown_user");
$body = elgg_view_layout('one_column_with_sidebar', $content, $sidebar);
- echo page_draw(sprintf(elgg_echo("bookmarks:user"), page_owner_entity()->name), $body);
+ echo page_draw(sprintf(elgg_echo("bookmarks:user"), elgg_get_page_owner()->name), $body);
return FALSE;
}
@@ -105,7 +105,7 @@ function bookmarks_page_handler($page) {
$section = (isset($page[1])) ? $page[1] : $section = 'items';
//don't show the all site bookmarks breadcrumb when on the all site bookmarks page
- if(page_owner() != 0){
+ if(elgg_get_page_owner_guid() != 0){
elgg_push_breadcrumb(elgg_echo('bookmarks:all'), $CONFIG->wwwroot . 'pg/bookmarks/');
}
@@ -240,7 +240,7 @@ function bookmarks_page_handler($page) {
$content = $header . $content;
$body = elgg_view_layout('one_column_with_sidebar', $content, $sidebar);
- echo page_draw(sprintf(elgg_echo("bookmarks:user"), page_owner_entity()->name), $body);
+ echo page_draw(sprintf(elgg_echo("bookmarks:user"), elgg_get_page_owner()->name), $body);
return TRUE;
}
diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php
index 5205632f2..38ef95152 100644
--- a/mod/bookmarks/views/default/bookmarks/bookmarklet.php
+++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php
@@ -5,7 +5,7 @@
* @package ElggBookmarks
*/
-$page_owner = page_owner_entity();
+$page_owner = elgg_get_page_owner();
$bookmarktext = elgg_echo("bookmarks:this");
if ($page_owner instanceof ElggGroup) {
diff --git a/mod/bookmarks/views/default/bookmarks/form.php b/mod/bookmarks/views/default/bookmarks/form.php
index b779116fd..deef1f7af 100644
--- a/mod/bookmarks/views/default/bookmarks/form.php
+++ b/mod/bookmarks/views/default/bookmarks/form.php
@@ -25,9 +25,9 @@ if(isset($vars['entity'])){
if ($address == "previous")
$address = $_SERVER['HTTP_REFERER'];
$tags = array();
- if(page_owner_entity() instanceof ElggGroup){
+ if(elgg_get_page_owner() instanceof ElggGroup){
//if in a group, set the access level to default to the group
- $access_id = page_owner_entity()->group_acl;
+ $access_id = elgg_get_page_owner()->group_acl;
}else{
$access_id = get_default_access(get_loggedin_user());
}
@@ -89,7 +89,7 @@ if(isset($vars['entity'])){
<?php echo elgg_echo('access'); ?>
<?php
//if it is a group, pull out the group access view
- if(page_owner_entity() instanceof ElggGroup){
+ if(elgg_get_page_owner() instanceof ElggGroup){
$access_options = group_access_options($owner);
echo elgg_view('input/access', array('internalname' => 'access',
'value' => $access_id,
diff --git a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php
index 652743b7b..b476e8cf2 100755
--- a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php
+++ b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php
@@ -2,10 +2,10 @@
//grab the groups bookmarks
$bookmarks = elgg_get_entities(array('type' => 'object', 'subtype' => 'bookmarks',
- 'container_guids' => page_owner(), 'limit' => 6));
+ 'container_guids' => elgg_get_page_owner_guid(), 'limit' => 6));
?>
<div class="group_tool_widget bookmarks">
-<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
+<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
<h3><?php echo elgg_echo('bookmarks:group') ?></h3>
<?php
if($bookmarks){
@@ -29,7 +29,7 @@ if($bookmarks){
echo "<div class='entity_listing clearfloat'>" . $info . "</div>";
}
} else {
- $create_bookmark = $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username . "/add";
+ $create_bookmark = $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username . "/add";
echo "<p class='margin_top'><a href=\"{$create_bookmark}\">" . elgg_echo("bookmarks:new") . "</a></p>";
}
echo "</div>"; \ No newline at end of file
diff --git a/mod/bookmarks/views/default/widgets/bookmarks/view.php b/mod/bookmarks/views/default/widgets/bookmarks/view.php
index 37d4ce3a4..1504ec8b4 100644
--- a/mod/bookmarks/views/default/widgets/bookmarks/view.php
+++ b/mod/bookmarks/views/default/widgets/bookmarks/view.php
@@ -43,7 +43,7 @@ if($bookmarks){
}
- $user_inbox = $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username;
+ $user_inbox = $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username;
if (get_entities('object', 'bookmarks', $vars['entity']->container_guid, '', '', '', true) > $num)
echo "<div class='ContentWrapper bookmarks more'><a href=\"{$user_inbox}\">".elgg_echo('bookmarks:read')."</a></div>";