mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated
This commit is contained in:
parent
1471025fe1
commit
2bd4c00028
@ -441,21 +441,21 @@ class sql_db
|
||||
/**
|
||||
* Find caller source
|
||||
*/
|
||||
function debug_find_source ()
|
||||
function debug_find_source ($mode = '')
|
||||
{
|
||||
$source = '';
|
||||
$backtrace = debug_backtrace();
|
||||
|
||||
foreach ($backtrace as $trace)
|
||||
foreach (debug_backtrace() as $trace)
|
||||
{
|
||||
if ($trace['file'] !== __FILE__)
|
||||
{
|
||||
$source = str_replace(BB_PATH, '', $trace['file']) .'('. $trace['line'] .')';
|
||||
break;
|
||||
switch ($mode)
|
||||
{
|
||||
case 'file': return $trace['file'];
|
||||
case 'line': return $trace['line'];
|
||||
default: return hide_bb_path($trace['file']) .'('. $trace['line'] .')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $source;
|
||||
return 'src not found';
|
||||
}
|
||||
|
||||
/**
|
||||
|
3
library/includes/cache/common.php
vendored
3
library/includes/cache/common.php
vendored
@ -69,6 +69,9 @@ class cache_common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find caller source
|
||||
*/
|
||||
function debug_find_source ($mode = '')
|
||||
{
|
||||
foreach (debug_backtrace() as $trace)
|
||||
|
@ -831,7 +831,7 @@ class sql_db
|
||||
{
|
||||
foreach (debug_backtrace() as $trace)
|
||||
{
|
||||
if (!empty($trace['file']) && $trace['file'] !== __FILE__)
|
||||
if ($trace['file'] !== __FILE__)
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
@ -841,7 +841,7 @@ class sql_db
|
||||
}
|
||||
}
|
||||
}
|
||||
return '';
|
||||
return 'src not found';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -160,6 +160,9 @@ class datastore_common
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find caller source
|
||||
*/
|
||||
function debug_find_source ($mode = '')
|
||||
{
|
||||
foreach (debug_backtrace() as $trace)
|
||||
|
Loading…
Reference in New Issue
Block a user