[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11342] api: error handler
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11342] api: error handler |
Date: |
Fri, 27 Sep 2013 17:17:05 +0000 |
Revision: 11342
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11342
Author: sigurdne
Date: 2013-09-27 17:17:05 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
api: error handler
Modified Paths:
--------------
trunk/phpgwapi/inc/class.log.inc.php
Modified: trunk/phpgwapi/inc/class.log.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.log.inc.php 2013-09-27 16:43:47 UTC (rev
11341)
+++ trunk/phpgwapi/inc/class.log.inc.php 2013-09-27 17:17:05 UTC (rev
11342)
@@ -69,7 +69,7 @@
/**
* Constructor
*/
-
+
public function __construct()
{
}
@@ -286,12 +286,22 @@
. lang('line') . ': ' . $err->line .
"</p>\n"
. $trace;
- echo $message;
+
+ if(phpgw::get_var('phpgw_return_as') == 'json')
+ {
+ echo json_encode($message);
+ $call_footer = false;
+ }
+ else
+ {
+ echo $message;
+ $call_footer = true;
+ }
// phpgwapi_cache::message_set($message, 'error');
if ( isset($GLOBALS['phpgw']->common) &&
is_object($GLOBALS['phpgw']->common) )
{
-
$GLOBALS['phpgw']->common->phpgw_exit(true);
+
$GLOBALS['phpgw']->common->phpgw_exit($call_footer);
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11342] api: error handler,
Sigurd Nes <=