Lines Matching refs:page
92 $res = $approve_sqlite->query('SELECT rev FROM revision WHERE page=? AND approved IS NOT NULL', $id);
99 if ($this->getConf('approve_integration') && $this->use_approve_here($id)) { // check if this is newest approve page
104 } elseif ($rev == p_get_metadata($id, 'last_change date')) { // check if it is last page revision
123 WHERE page = ?
153 foreach ($current_user_pages as $page) {
154 $current_rev = p_get_metadata($page, 'last_change date');
156 $pages[$page] = [
163 $res = $sqlite->query('SELECT page, MAX(rev) as "rev", timestamp FROM ireadit WHERE user=? GROUP BY page',
166 $res = $sqlite->query('SELECT page, MAX(rev) as "rev", timestamp FROM ireadit GROUP BY page');
169 $page = $row['page'];
172 if (isset($pages[$page])) {
173 $pages[$page]['last_read_rev'] = $rev;
174 $pages[$page]['timestamp'] = $timestamp;
179 foreach ($current_user_pages as $page) {
180 if (!$this->use_approve_here($page)) continue; // ignore the pages where approve doesn't apply
181 $approved_revs = $this->get_approved_revs($page);
182 if (count($approved_revs) == 0) { // page was never approved - don't list it
183 unset($pages[$page]);
189 $res = $sqlite->query('SELECT rev, timestamp FROM ireadit WHERE user=? AND page=? ORDER BY rev DESC',
190 $user, $page);
192 $res = $sqlite->query('SELECT rev, timestamp FROM ireadit WHERE page=? ORDER BY rev DESC', $page);
206 $pages[$page] = [
215 foreach ($pages as &$page) {
216 if ($page['current_rev'] == $page['last_read_rev']) {
217 $page['state'] = 'read';
218 } elseif ($page['last_read_rev'] == NULL) {
219 $page['state'] = 'unread';
221 $page['state'] = 'outdated';