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
|
* Find caller source
|
||||||
*/
|
*/
|
||||||
function debug_find_source ()
|
function debug_find_source ($mode = '')
|
||||||
{
|
{
|
||||||
$source = '';
|
foreach (debug_backtrace() as $trace)
|
||||||
$backtrace = debug_backtrace();
|
|
||||||
|
|
||||||
foreach ($backtrace as $trace)
|
|
||||||
{
|
{
|
||||||
if ($trace['file'] !== __FILE__)
|
if ($trace['file'] !== __FILE__)
|
||||||
{
|
{
|
||||||
$source = str_replace(BB_PATH, '', $trace['file']) .'('. $trace['line'] .')';
|
switch ($mode)
|
||||||
break;
|
{
|
||||||
|
case 'file': return $trace['file'];
|
||||||
|
case 'line': return $trace['line'];
|
||||||
|
default: return hide_bb_path($trace['file']) .'('. $trace['line'] .')';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 'src not found';
|
||||||
return $source;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
5
library/includes/cache/common.php
vendored
5
library/includes/cache/common.php
vendored
@ -69,6 +69,9 @@ class cache_common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find caller source
|
||||||
|
*/
|
||||||
function debug_find_source ($mode = '')
|
function debug_find_source ($mode = '')
|
||||||
{
|
{
|
||||||
foreach (debug_backtrace() as $trace)
|
foreach (debug_backtrace() as $trace)
|
||||||
@ -85,4 +88,4 @@ class cache_common
|
|||||||
}
|
}
|
||||||
return 'src not found';
|
return 'src not found';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -831,7 +831,7 @@ class sql_db
|
|||||||
{
|
{
|
||||||
foreach (debug_backtrace() as $trace)
|
foreach (debug_backtrace() as $trace)
|
||||||
{
|
{
|
||||||
if (!empty($trace['file']) && $trace['file'] !== __FILE__)
|
if ($trace['file'] !== __FILE__)
|
||||||
{
|
{
|
||||||
switch ($mode)
|
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 = '')
|
function debug_find_source ($mode = '')
|
||||||
{
|
{
|
||||||
foreach (debug_backtrace() as $trace)
|
foreach (debug_backtrace() as $trace)
|
||||||
@ -176,4 +179,4 @@ class datastore_common
|
|||||||
}
|
}
|
||||||
return 'src not found';
|
return 'src not found';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user