mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update ajax.php
This commit is contained in:
parent
1e55da19fc
commit
d6fbeb6222
7
ajax.php
7
ajax.php
@ -215,7 +215,10 @@ class ajax_common
|
|||||||
{
|
{
|
||||||
$this->response['error_code'] = $error_code;
|
$this->response['error_code'] = $error_code;
|
||||||
$this->response['error_msg'] = strip_tags(preg_replace('#<br\s*/?>#i', "\n", $error_msg));
|
$this->response['error_msg'] = strip_tags(preg_replace('#<br\s*/?>#i', "\n", $error_msg));
|
||||||
$this->response['console_log'] = 'ajax die: ' . $this->debug_find_source();
|
if (DEBUG_AJAX_DIE)
|
||||||
|
{
|
||||||
|
$this->response['console_log'] = 'ajax die: ' . $this->debug_find_source();
|
||||||
|
}
|
||||||
|
|
||||||
$this->send();
|
$this->send();
|
||||||
}
|
}
|
||||||
@ -340,7 +343,7 @@ class ajax_common
|
|||||||
*/
|
*/
|
||||||
function debug_find_source ($mode = '')
|
function debug_find_source ($mode = '')
|
||||||
{
|
{
|
||||||
if (!SQL_PREPEND_SRC_COMM) return 'src disabled';
|
if (!DEBUG_AJAX_DIE) return 'src disabled';
|
||||||
foreach (debug_backtrace() as $trace)
|
foreach (debug_backtrace() as $trace)
|
||||||
{
|
{
|
||||||
if (!empty($trace['file']) && $trace['file'] !== __FILE__)
|
if (!empty($trace['file']) && $trace['file'] !== __FILE__)
|
||||||
|
Loading…
Reference in New Issue
Block a user