aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-14 20:39:46 -0700
committerfriendica <info@friendica.com>2012-07-14 20:39:46 -0700
commit03209d2d0dc6b0ceed2325bff598fede2c538301 (patch)
treefb230666b2b79f97ddd744fe155a4b088640ad29 /mod/profile.php
parenta20a6377277a985fa596b0ea460d91b97f79b4a5 (diff)
downloadvolse-hubzilla-03209d2d0dc6b0ceed2325bff598fede2c538301.tar.gz
volse-hubzilla-03209d2d0dc6b0ceed2325bff598fede2c538301.tar.bz2
volse-hubzilla-03209d2d0dc6b0ceed2325bff598fede2c538301.zip
updates
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php37
1 files changed, 22 insertions, 15 deletions
diff --git a/mod/profile.php b/mod/profile.php
index c9406c464..b5fdeec3a 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -204,7 +204,8 @@ function profile_content(&$a, $update = 0) {
$r = q("SELECT distinct(parent) AS `item_id`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND
+ (`item`.`deleted` = 0 OR item.verb = '" . ACTIVITY_LIKE ."' OR item.verb = '" . ACTIVITY_DISLIKE . "')
and `item`.`moderated` = 0 and `item`.`unseen` = 1
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`wall` = 1
@@ -227,20 +228,21 @@ function profile_content(&$a, $update = 0) {
$sql_extra2 .= protect_sprintf(sprintf(" AND item.created >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
}
-
- $r = q("SELECT COUNT(*) AS `total`
- FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
- and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1
- $sql_extra $sql_extra2 ",
- intval($a->profile['profile_uid'])
- );
-
- if(count($r)) {
- $a->set_pager_total($r[0]['total']);
- $a->set_pager_itemspage(40);
+ if(! get_pconfig($a->profile['profile_uid'],'system','alt_pager')) {
+ $r = q("SELECT COUNT(*) AS `total`
+ FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ and `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ AND `item`.`id` = `item`.`parent` AND `item`.`wall` = 1
+ $sql_extra $sql_extra2 ",
+ intval($a->profile['profile_uid'])
+ );
+
+ if(count($r)) {
+ $a->set_pager_total($r[0]['total']);
+ }
}
+ $a->set_pager_itemspage(40);
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
@@ -324,7 +326,12 @@ function profile_content(&$a, $update = 0) {
$o .= conversation($a,$items,'profile',$update);
if(! $update) {
- $o .= paginate($a);
+ if(! get_pconfig($a->profile['profile_uid'],'system','alt_pager')) {
+ $o .= paginate($a);
+ }
+ else {
+ $o .= alt_pager($a,count($items));
+ }
}
return $o;