aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-11-24 14:19:22 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-11-24 14:19:22 +0100
commitbef8879cb1356b880279c6104fcffb0752414a7c (patch)
treece3733df7ca168f4afe7e963dc81b6f00944c34c /mod/display.php
parent1cb45c30e9032794b7827738cc28f7728ac28677 (diff)
parent5b7124f0daeca4aa619f6411ee373d9ff5a22b7b (diff)
downloadvolse-hubzilla-bef8879cb1356b880279c6104fcffb0752414a7c.tar.gz
volse-hubzilla-bef8879cb1356b880279c6104fcffb0752414a7c.tar.bz2
volse-hubzilla-bef8879cb1356b880279c6104fcffb0752414a7c.zip
Merge pull request #7 from friendica/master
Merge from main project
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/mod/display.php b/mod/display.php
index be06c1e82..ece406543 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -149,7 +149,7 @@ function display_content(&$a, $update = 0, $load = false) {
$updateable = false;
- $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
+ $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval($a->pager['itemspage']),intval($a->pager['start']));
if($load || ($_COOKIE['jsAvailable'] != 1)) {
$r = null;
@@ -189,7 +189,7 @@ function display_content(&$a, $update = 0, $load = false) {
and owner_xchan in ( " . stream_perms_xchans(($observer_hash) ? (PERMS_NETWORK|PERMS_PUBLIC) : PERMS_PUBLIC) . " ))
OR owner_xchan = '%s')
$sql_extra )
- group by mid limit 1",
+ limit 1",
dbesc($target_item['parent_mid']),
dbesc($sys['xchan_hash'])
);
@@ -228,8 +228,8 @@ function display_content(&$a, $update = 0, $load = false) {
}
if($updateable) {
- $x = q("UPDATE item SET item_flags = ( item_flags ^ %d )
- WHERE (item_flags & %d) AND uid = %d and parent = %d ",
+ $x = q("UPDATE item SET item_flags = ( item_flags & ~%d )
+ WHERE (item_flags & %d)>0 AND uid = %d and parent = %d ",
intval(ITEM_UNSEEN),
intval(ITEM_UNSEEN),
intval(local_user()),