fix pagination on logger page (admin and customer)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -34,7 +34,8 @@ if ($page == 'log'
|
|||||||
$result_stmt = Database::query('
|
$result_stmt = Database::query('
|
||||||
SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
|
SELECT * FROM `' . TABLE_PANEL_LOG . '` ' . $paging->getSqlWhere(false) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
|
||||||
);
|
);
|
||||||
$paging->setEntries(Database::num_rows());
|
$logs_count = Database::num_rows();
|
||||||
|
$paging->setEntries($logs_count);
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
$searchcode = $paging->getHtmlSearchCode($lng);
|
$searchcode = $paging->getHtmlSearchCode($lng);
|
||||||
@@ -105,6 +106,7 @@ if ($page == 'log'
|
|||||||
$count++;
|
$count++;
|
||||||
$_action = $action;
|
$_action = $action;
|
||||||
}
|
}
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ if ($page == 'log'
|
|||||||
SELECT * FROM `' . TABLE_PANEL_LOG . '` WHERE `user` = :loginname ' . $paging->getSqlWhere(true) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
|
SELECT * FROM `' . TABLE_PANEL_LOG . '` WHERE `user` = :loginname ' . $paging->getSqlWhere(true) . ' ' . $paging->getSqlOrderBy() . ' ' . $paging->getSqlLimit()
|
||||||
);
|
);
|
||||||
Database::pexecute($result_stmt, array("loginname" => $userinfo['loginname']));
|
Database::pexecute($result_stmt, array("loginname" => $userinfo['loginname']));
|
||||||
$paging->setEntries(Database::num_rows());
|
$logs_count = Database::num_rows();
|
||||||
|
$paging->setEntries($logs_count);
|
||||||
$sortcode = $paging->getHtmlSortCode($lng);
|
$sortcode = $paging->getHtmlSortCode($lng);
|
||||||
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
$arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s);
|
||||||
$searchcode = $paging->getHtmlSearchCode($lng);
|
$searchcode = $paging->getHtmlSearchCode($lng);
|
||||||
@@ -105,6 +106,7 @@ if ($page == 'log'
|
|||||||
$count++;
|
$count++;
|
||||||
$_action = $action;
|
$_action = $action;
|
||||||
}
|
}
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
2
templates/Sparkle/admin/logger/logger.tpl
vendored
2
templates/Sparkle/admin/logger/logger.tpl
vendored
@@ -19,6 +19,7 @@ $header
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="overviewadd">
|
<div class="overviewadd">
|
||||||
|
{$pagingcode}
|
||||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="" />
|
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="" />
|
||||||
<a href="{$linker->getLink(array('section' => 'logger', 'page' => 'log', 'action' => 'truncate'))}">{$lng['logger']['truncate']}</a>
|
<a href="{$linker->getLink(array('section' => 'logger', 'page' => 'log', 'action' => 'truncate'))}">{$lng['logger']['truncate']}</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,6 +41,7 @@ $header
|
|||||||
|
|
||||||
<if 15 < $log_count >
|
<if 15 < $log_count >
|
||||||
<div class="overviewadd">
|
<div class="overviewadd">
|
||||||
|
{$pagingcode}
|
||||||
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="" />
|
<img src="templates/{$theme}/assets/img/icons/delete.png" alt="" />
|
||||||
<a href="{$linker->getLink(array('section' => 'logger', 'page' => 'log', 'action' => 'truncate'))}">{$lng['logger']['truncate']}</a>
|
<a href="{$linker->getLink(array('section' => 'logger', 'page' => 'log', 'action' => 'truncate'))}">{$lng['logger']['truncate']}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user