From 089bea600bafd2ccfd17bf4d6a71f348239bd98f Mon Sep 17 00:00:00 2001 From: Thomas Mudrunka Date: Fri, 31 May 2013 07:09:35 +0200 Subject: [PATCH] MFG stary php na produkcnim serveru --- assistants/bank.inc.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/assistants/bank.inc.php b/assistants/bank.inc.php index 0c0e27d..73ea875 100644 --- a/assistants/bank.inc.php +++ b/assistants/bank.inc.php @@ -72,9 +72,12 @@ function bank_get_overview($ctx,$prefix='') { return $overview; } -if(isset($bank_json_only) && $bank_json_only) die(json_encode(array( - 'overview'=>bank_get_overview($this)['array'] -))); +if(isset($bank_json_only) && $bank_json_only) { + $overview=bank_get_overview($this); + die(json_encode(array( + 'overview'=>$overview['array'] + ))); +} if(isset($_POST['create_account'])) { bank_add_account($this, $_POST['account_name']); @@ -113,7 +116,8 @@ switch($SUBPATH[0]) { $result = $this->db->safe_query_fetch("SELECT SUM(${bank_table}_amount) as troughput FROM ${bank_table};"); echo("Obrat: ".$result[0]['troughput'].' '.$bank_currency); $result = $this->db->safe_query_fetch("SELECT * FROM `${bank_table}` ORDER BY ${bank_table}_time DESC;"); - echo $this->html->render_item_table(bank_get_overview($this, $bank_table.'_')['table'],'bank'); + $overview=bank_get_overview($this,$bank_table.'_'); + echo $this->html->render_item_table($overview['table'],'bank'); echo ("

Přehled transakcí

"); } else { $account=bank_name($_GET['account']); -- 2.30.2