Skip to content

Commit 9c58742

Browse files
committed
minor update to crud query log function improving its usabiilty
1 parent 7c9d455 commit 9c58742

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crud/crud_query_log.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* crud_query_log()
1313
* @return void
1414
*/
15-
function crud_query_log()
15+
function crud_query_log($custid = null)
1616
{
1717
function_requirements('has_acl');
1818
if ($GLOBALS['tf']->ima != 'admin' || !has_acl('client_billing')) {
@@ -23,7 +23,7 @@ function_requirements('has_acl');
2323
$custid = $GLOBALS['tf']->variables->request['custid'];
2424
elseif (isset($GLOBALS['tf']->variables->request['customer']))
2525
$custid = $GLOBALS['tf']->variables->request['customer'];
26-
Crud::init('select * from query_log' . (isset($custid) ? ' where history_owner='.$custid : ''))
26+
Crud::init('select * from query_log' . (!is_null($custid) ? ' where history_owner='.$custid : ''))
2727
->set_order('history_timestamp', 'desc')
2828
->disable_delete()
2929
->disable_edit()

0 commit comments

Comments
 (0)