1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Added missing Shortcode debug info

This commit is contained in:
Cameron 2013-04-29 19:38:26 -07:00
parent 5bf82bace4
commit 2993fb1504
2 changed files with 24 additions and 16 deletions

View File

@ -453,11 +453,12 @@ class e107_db_debug {
{
return FALSE;
}
$this -> scbbcodes[$this -> scbcount]['type'] = $type;
$this -> scbbcodes[$this -> scbcount]['code'] = $code;
$this -> scbbcodes[$this -> scbcount]['parm'] = htmlentities($parm);
$this -> scbbcodes[$this -> scbcount]['details'] = $details;
$this -> scbcount ++;
$this->scbbcodes[$this->scbcount]['type'] = $type;
$this->scbbcodes[$this->scbcount]['code'] = $code;
$this->scbbcodes[$this->scbcount]['parm'] = (string)$parm;
$this->scbbcodes[$this->scbcount]['details'] = $details;
$this->scbcount ++;
}
function Show_SC_BB()

View File

@ -767,6 +767,7 @@ class e_parse_shortcode
{
$code = $newMatch[1];
$parmStr = trim($newMatch[2]);
$debugParm = $parmStr;
parse_str($parmStr,$parm);
$parmArray = true;
}
@ -821,24 +822,27 @@ class e_parse_shortcode
$scFile = '';
$ret = '';
$_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);
}
elseif (is_array($this->addedCodes) && array_key_exists($code, $this->addedCodes))
if(E107_DBG_BBSC || E107_DBG_SC || E107_DBG_TIMEDETAILS)
{
// Its array-based shortcode. Load the code for evaluation later.
$_class = get_class($this->addedCodes); // "(class loaded)"; // debug.
$_function = $_method;
$_path = "(already loaded)";
}
}
elseif (is_array($this->addedCodes) && array_key_exists($code, $this->addedCodes)) // Its array-based shortcode. Load the code for evaluation later.
{
$scCode = $this->addedCodes[$code];
// $_path = print_a($this->backTrace,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];
@ -1040,6 +1044,7 @@ class e_parse_shortcode
global $db_debug;
$other = array();
if($_class)
{
$other['class'] = $_class;
@ -1060,7 +1065,9 @@ class e_parse_shortcode
$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);
}