mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Added missing Shortcode debug info
This commit is contained in:
@@ -453,11 +453,12 @@ class e107_db_debug {
|
|||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
$this -> scbbcodes[$this -> scbcount]['type'] = $type;
|
|
||||||
$this -> scbbcodes[$this -> scbcount]['code'] = $code;
|
$this->scbbcodes[$this->scbcount]['type'] = $type;
|
||||||
$this -> scbbcodes[$this -> scbcount]['parm'] = htmlentities($parm);
|
$this->scbbcodes[$this->scbcount]['code'] = $code;
|
||||||
$this -> scbbcodes[$this -> scbcount]['details'] = $details;
|
$this->scbbcodes[$this->scbcount]['parm'] = (string)$parm;
|
||||||
$this -> scbcount ++;
|
$this->scbbcodes[$this->scbcount]['details'] = $details;
|
||||||
|
$this->scbcount ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Show_SC_BB()
|
function Show_SC_BB()
|
||||||
|
@@ -767,6 +767,7 @@ class e_parse_shortcode
|
|||||||
{
|
{
|
||||||
$code = $newMatch[1];
|
$code = $newMatch[1];
|
||||||
$parmStr = trim($newMatch[2]);
|
$parmStr = trim($newMatch[2]);
|
||||||
|
$debugParm = $parmStr;
|
||||||
parse_str($parmStr,$parm);
|
parse_str($parmStr,$parm);
|
||||||
$parmArray = true;
|
$parmArray = true;
|
||||||
}
|
}
|
||||||
@@ -821,24 +822,27 @@ class e_parse_shortcode
|
|||||||
$scFile = '';
|
$scFile = '';
|
||||||
$ret = '';
|
$ret = '';
|
||||||
$_method = 'sc_'.strtolower($code);
|
$_method = 'sc_'.strtolower($code);
|
||||||
if (is_object($this->addedCodes) && method_exists($this->addedCodes, $_method))
|
if (is_object($this->addedCodes) && method_exists($this->addedCodes, $_method)) //It is class-based batch shortcode. Class already loaded; call the method
|
||||||
{
|
{
|
||||||
//It is class-based batch shortcode. Class already loaded; call the method
|
|
||||||
$ret = $this->addedCodes->$_method($parm, $sc_mode);
|
$ret = $this->addedCodes->$_method($parm, $sc_mode);
|
||||||
|
if(E107_DBG_BBSC || E107_DBG_SC || E107_DBG_TIMEDETAILS)
|
||||||
|
{
|
||||||
|
$_class = get_class($this->addedCodes); // "(class loaded)"; // debug.
|
||||||
|
$_function = $_method;
|
||||||
|
$_path = "(already loaded)";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif (is_array($this->addedCodes) && array_key_exists($code, $this->addedCodes))
|
elseif (is_array($this->addedCodes) && array_key_exists($code, $this->addedCodes)) // Its array-based shortcode. Load the code for evaluation later.
|
||||||
{
|
{
|
||||||
// Its array-based shortcode. Load the code for evaluation later.
|
|
||||||
$scCode = $this->addedCodes[$code];
|
$scCode = $this->addedCodes[$code];
|
||||||
// $_path = print_a($this->backTrace,true);
|
// $_path = print_a($this->backTrace,true);
|
||||||
//XXX $_path = print_a($this,true);
|
//XXX $_path = print_a($this,true);
|
||||||
|
|
||||||
}
|
}
|
||||||
// Check to see if we've already loaded the .sc file contents
|
|
||||||
elseif (array_key_exists($code, $this->scList))
|
elseif (array_key_exists($code, $this->scList)) // Check to see if we've already loaded the .sc file contents
|
||||||
{
|
{
|
||||||
|
|
||||||
$scCode = $this->scList[$code];
|
$scCode = $this->scList[$code];
|
||||||
@@ -1040,6 +1044,7 @@ class e_parse_shortcode
|
|||||||
global $db_debug;
|
global $db_debug;
|
||||||
|
|
||||||
$other = array();
|
$other = array();
|
||||||
|
|
||||||
if($_class)
|
if($_class)
|
||||||
{
|
{
|
||||||
$other['class'] = $_class;
|
$other['class'] = $_class;
|
||||||
@@ -1055,12 +1060,14 @@ class e_parse_shortcode
|
|||||||
|
|
||||||
if($this->debug_legacy)
|
if($this->debug_legacy)
|
||||||
{
|
{
|
||||||
$other = $this->debug_legacy;
|
$other = $this->debug_legacy;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info = (isset($this->registered_codes[$code])) ? print_a($this->registered_codes[$code],true) : print_a($other,true);
|
$info = (isset($this->registered_codes[$code])) ? print_a($this->registered_codes[$code],true) : print_a($other,true);
|
||||||
|
|
||||||
$db_debug->logCode(2, $code, $parm, $info);
|
$tmp = isset($debugParm) ? $debugParm : $parm;
|
||||||
|
|
||||||
|
$db_debug->logCode(2, $code, $tmp, $info);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user