aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-16 19:39:13 -0700
committerfriendica <info@friendica.com>2012-07-16 19:39:13 -0700
commit43a673c11e758f3a0ff79b502ddfcc126e72cde5 (patch)
tree314d4234a754a6a77135c9878262201cea39d84e
parent07c31d547fce54dfdcad34a77f1dfcc6269ef62c (diff)
downloadvolse-hubzilla-43a673c11e758f3a0ff79b502ddfcc126e72cde5.tar.gz
volse-hubzilla-43a673c11e758f3a0ff79b502ddfcc126e72cde5.tar.bz2
volse-hubzilla-43a673c11e758f3a0ff79b502ddfcc126e72cde5.zip
make alt_pager the network page default - at least until we get rid of the network page
-rw-r--r--mod/network.php27
-rw-r--r--mod/search_ac.php26
2 files changed, 18 insertions, 35 deletions
diff --git a/mod/network.php b/mod/network.php
index f9f9b4a02..49600f39e 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -579,23 +579,9 @@ function network_content(&$a, $update = 0) {
}
else {
- if(! get_pconfig(local_user(),'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 `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- $sql_extra2 $sql_extra3
- $sql_extra $sql_nets ",
- intval($_SESSION['uid'])
- );
-
- if(count($r)) {
- $a->set_pager_total($r[0]['total']);
- }
- }
- $itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
- $a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40));
- $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
+ $itemspage_network = get_pconfig(local_user(),'system','itemspage_network');
+ $a->set_pager_itemspage(((intval($itemspage_network)) ? $itemspage_network : 40));
+ $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
}
$simple_update = (($update) ? " and `item`.`unseen` = 1 " : '');
@@ -709,12 +695,7 @@ function network_content(&$a, $update = 0) {
$o .= conversation($a,$items,$mode,$update);
if(! $update) {
- if(! get_pconfig(local_user(),'system','alt_pager')) {
- $o .= paginate($a);
- }
- else {
- $o .= alt_pager($a,count($items));
- }
+ $o .= alt_pager($a,count($items));
}
return $o;
diff --git a/mod/search_ac.php b/mod/search_ac.php
index fb3b872da..5bc3c1c0b 100644
--- a/mod/search_ac.php
+++ b/mod/search_ac.php
@@ -46,18 +46,20 @@ function search_ac_init(&$a){
$x['data'][] = intval($g['id']);
}
}
-
- $r = q("SELECT `id`, `name`, `photo`, `url` FROM `gcontact` where 1
- $people_sql_extra
- ORDER BY `name` ASC "
- );
-
- if(count($r)) {
- foreach($r as $g) {
- $x['photos'][] = $g['photo'];
- $x['links'][] = $g['url'];
- $x['suggestions'][] = '@' . $g['name'];
- $x['data'][] = intval($g['id']);
+ else {
+
+ $r = q("SELECT `id`, `name`, `photo`, `url` FROM `gcontact` where 1
+ $people_sql_extra
+ ORDER BY `name` ASC "
+ );
+
+ if(count($r)) {
+ foreach($r as $g) {
+ $x['photos'][] = $g['photo'];
+ $x['links'][] = $g['url'];
+ $x['suggestions'][] = '@' . $g['name'];
+ $x['data'][] = intval($g['id']);
+ }
}
}