aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-12-13 02:03:17 +0000
committerCash Costello <cash.costello@gmail.com>2009-12-13 02:03:17 +0000
commitdd8ff039f642b9eb6ea65cc1a58017ce867ec7b3 (patch)
tree71f92cbf22405ddbec079480e207c7fd3fe00e0a /lib
parente7a7c88d81f494d8a0c99f36338247caaf6b4bd3 (diff)
downloadelgg-dd8ff039f642b9eb6ea65cc1a58017ce867ec7b3.tar.gz
elgg-dd8ff039f642b9eb6ea65cc1a58017ce867ec7b3.tar.bz2
fixed display of some album pages - caused a cascade of changes required
Diffstat (limited to 'lib')
-rw-r--r--lib/tidypics.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/tidypics.php b/lib/tidypics.php
index b0a8a70d2..f2a1ccce4 100644
--- a/lib/tidypics.php
+++ b/lib/tidypics.php
@@ -33,7 +33,7 @@
function tp_get_latest_photos($num_images, $owner_guid = 0)
{
$prev_context = set_context('front');
- $image_html = tp_list_entities('object', 'image', $owner_guid, $num_images, false, false, false);
+ $image_html = tp_list_entities('object', 'image', $owner_guid, 0, $num_images, false, false, false);
set_context($prev_context);
return $image_html;
}
@@ -152,6 +152,7 @@
foreach ($where as $w)
$query .= " $w and ";
$query .= get_access_sql_suffix(); // Add access controls
+
if (!$count) {
$query .= " order by $order_by";
if ($limit) $query .= " limit $offset, $limit"; // Add order and limit
@@ -163,11 +164,12 @@
}
}
- function tp_list_entities($type= "", $subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false, $pagination = true) {
+ function tp_list_entities($type= "", $subtype = "", $owner_guid = 0, $container_guid = null, $limit = 10, $fullview = true, $viewtypetoggle = false, $pagination = true) {
$offset = (int) get_input('offset');
- $count = tp_get_entities($type, $subtype, $owner_guid, "", $limit, $offset, true);
- $entities = tp_get_entities($type, $subtype, $owner_guid, "", $limit, $offset);
+ $count = tp_get_entities($type, $subtype, $owner_guid, "", $limit, $offset, true, 0, $container_guid);
+
+ $entities = tp_get_entities($type, $subtype, $owner_guid, "", $limit, $offset, false, 0, $container_guid);
return tp_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination);
}