Permalink
Browse files

see #74 - fix undefined $CONF[page_size]

  • Loading branch information...
DavidGoodwin committed Sep 5, 2017
1 parent 4b999b3 commit 2fc36e82adcf89b863cc6b152832334e35fe7c51
Showing with 4 additions and 2 deletions.
  1. +4 −2 viewlog.php
View
@@ -60,9 +60,11 @@
if ($error != 1)
{
$table_log = table_by_key('log');
$query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT " . intval($CONF['page_size']);
$page_size = isset($CONF['page_size']) ? intval($CONF['page_size']) : 35;
$query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT $page_size");

This comment has been minimized.

Show comment
Hide comment
@Yatulchik

Yatulchik Mar 22, 2018

unexpected ")" at the end of string.... must be:
$query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT $page_size";

@Yatulchik

Yatulchik Mar 22, 2018

unexpected ")" at the end of string.... must be:
$query = "SELECT timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT $page_size";

This comment has been minimized.

Show comment
Hide comment
@DavidGoodwin

DavidGoodwin Mar 22, 2018

Member

already fixed by ae56c2b

@DavidGoodwin

DavidGoodwin Mar 22, 2018

Member

already fixed by ae56c2b

if (db_pgsql()) {
$query = "SELECT extract(epoch from timestamp) as timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT " . intval($CONF['page_size']);
$query = "SELECT extract(epoch from timestamp) as timestamp,username,domain,action,data FROM $table_log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT $page_size";
}
$result=db_query($query);
if ($result['rows'] > 0)

0 comments on commit 2fc36e8

Please sign in to comment.