aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorOlivier van Helden <olivier@van-helden.net>2014-12-03 17:54:07 -0400
committerOlivier van Helden <olivier@van-helden.net>2014-12-03 17:54:07 -0400
commite523061b7261439a71bdacf8f46d4c614740b356 (patch)
tree1a0577c64197c4289ed154d2c2d5fdf48a7e5192 /mod/display.php
parent13fd91d6f5723774a1b96257f8096acb2873b4ed (diff)
parentb71b45aafc618d32d23c099a4d4db8bad2f09e54 (diff)
downloadvolse-hubzilla-e523061b7261439a71bdacf8f46d4c614740b356.tar.gz
volse-hubzilla-e523061b7261439a71bdacf8f46d4c614740b356.tar.bz2
volse-hubzilla-e523061b7261439a71bdacf8f46d4c614740b356.zip
Merge pull request #1 from friendica/master
Merge master from friendica
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()),