aboutsummaryrefslogtreecommitdiff
path: root/pages/lists
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-12-12 03:16:52 +0000
committerCash Costello <cash.costello@gmail.com>2009-12-12 03:16:52 +0000
commitf3261b03dfe5ee472f8048b85a1f4b9aa776026d (patch)
tree303ff8943051dfb12234587a2f1157ab32de2da5 /pages/lists
parent60afb9fcf78831c7ae7bd1a885fc8d818051c6fd (diff)
downloadelgg-f3261b03dfe5ee472f8048b85a1f4b9aa776026d.tar.gz
elgg-f3261b03dfe5ee472f8048b85a1f4b9aa776026d.tar.bz2
setting page owner for some pages
Diffstat (limited to 'pages/lists')
-rw-r--r--pages/lists/mostrecentimages.php7
-rw-r--r--pages/lists/mostviewedimages.php5
-rw-r--r--pages/lists/recentlycommented.php8
-rw-r--r--pages/lists/recentlyviewed.php8
4 files changed, 23 insertions, 5 deletions
diff --git a/pages/lists/mostrecentimages.php b/pages/lists/mostrecentimages.php
index 5f5116513..8a9f8dbdb 100644
--- a/pages/lists/mostrecentimages.php
+++ b/pages/lists/mostrecentimages.php
@@ -1,7 +1,7 @@
<?php
/**
- * Most recently uploaded images
+ * Most recently uploaded images - individual or world
*
*/
@@ -24,6 +24,11 @@
else
$title = sprintf(elgg_echo("tidypics:friendmostrecent"), $user->name);
}
+ } else {
+ // world view - set page owner to logged in user
+ if (isloggedin()) {
+ set_page_owner(get_loggedin_userid());
+ }
}
// how many do we display
diff --git a/pages/lists/mostviewedimages.php b/pages/lists/mostviewedimages.php
index 16b9d7295..1e856edc6 100644
--- a/pages/lists/mostviewedimages.php
+++ b/pages/lists/mostviewedimages.php
@@ -57,6 +57,11 @@
$title = sprintf(elgg_echo("tidypics:friendmostviewed"), page_owner_entity()->name);
}
} else {
+ // world view - set page owner to logged in user
+ if (isloggedin()) {
+ set_page_owner(get_loggedin_userid());
+ }
+
$title = elgg_echo("tidypics:mostviewed");
}
$area2 = elgg_view_title($title);
diff --git a/pages/lists/recentlycommented.php b/pages/lists/recentlycommented.php
index 962732dba..a39caf6ae 100644
--- a/pages/lists/recentlycommented.php
+++ b/pages/lists/recentlycommented.php
@@ -1,14 +1,18 @@
<?php
/**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
+ * Images recently commented on - world view only
*
*/
// Load Elgg engine
include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
+ // world view - set page owner to logged in user
+ if (isloggedin()) {
+ set_page_owner(get_loggedin_userid());
+ }
+
global $CONFIG;
$prefix = $CONFIG->dbprefix;
$max_limit = 200; //get extra because you'll have multiple views per image in the result set
diff --git a/pages/lists/recentlyviewed.php b/pages/lists/recentlyviewed.php
index 1fa1be0ea..b61107fc4 100644
--- a/pages/lists/recentlyviewed.php
+++ b/pages/lists/recentlyviewed.php
@@ -1,14 +1,18 @@
<?php
/**
- * Tidypics full view of an image
- * Given a GUID, this page will try and display any entity
+ * Most recently viewed images - world view only right now
*
*/
// Load Elgg engine
include_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/engine/start.php";
+ // world view - set page owner to logged in user
+ if (isloggedin()) {
+ set_page_owner(get_loggedin_userid());
+ }
+
global $CONFIG;
$prefix = $CONFIG->dbprefix;
$max_limit = 200; //get extra because you'll have multiple views per image in the result set