Smarty test, Basic class debug function upate
Write out debug data had two nested ifs that are combined into one if Smarty test update with loop
This commit is contained in:
@@ -52,6 +52,7 @@ $options = array (
|
|||||||
|
|
||||||
if (is_object($smarty)) {
|
if (is_object($smarty)) {
|
||||||
$smarty->DATA['drop_down_test'] = $options;
|
$smarty->DATA['drop_down_test'] = $options;
|
||||||
|
$smarty->DATA['loop_start'] = 2;
|
||||||
// require BASE.INCLUDES.'admin_smarty.php';
|
// require BASE.INCLUDES.'admin_smarty.php';
|
||||||
$smarty->setSmartyVarsAdmin();
|
$smarty->setSmartyVarsAdmin();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,13 +12,19 @@
|
|||||||
<div class="jq-container">
|
<div class="jq-container">
|
||||||
<div id="jq-test" class="jp-test">
|
<div id="jq-test" class="jp-test">
|
||||||
<div id="test-div" class="test-div">
|
<div id="test-div" class="test-div">
|
||||||
Some content ehre or asdfasdfasf
|
Some content here or asdfasdfasf
|
||||||
</div>
|
</div>
|
||||||
<div id="translate-div">
|
<div id="translate-div">
|
||||||
TRANSLATION SMARTY: {t}I should be translated{/t}
|
TRANSLATION SMARTY: {t}I should be translated{/t}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="loop-test">
|
||||||
|
<div>LOOP TEST</div>
|
||||||
|
{section name=page_list start=1 loop=$loop_start+1}
|
||||||
|
<div>LOOP OUTPUT: {$smarty.section.page_list.index}</div>
|
||||||
|
{/section}
|
||||||
|
</div>
|
||||||
{* progresss indicator *}
|
{* progresss indicator *}
|
||||||
<div id="indicator"></div>
|
<div id="indicator"></div>
|
||||||
{* the action confirm box *}
|
{* the action confirm box *}
|
||||||
|
|||||||
@@ -866,9 +866,10 @@ class Basic
|
|||||||
*/
|
*/
|
||||||
private function writeErrorMsg(string $level, string $error_string): void
|
private function writeErrorMsg(string $level, string $error_string): void
|
||||||
{
|
{
|
||||||
if ($this->doDebugTrigger('debug', $level)) {
|
|
||||||
// only write if write is requested
|
// only write if write is requested
|
||||||
if ($this->doDebugTrigger('print', $level)) {
|
if ($this->doDebugTrigger('debug', $level) &&
|
||||||
|
$this->doDebugTrigger('print', $level)
|
||||||
|
) {
|
||||||
// replace all html tags
|
// replace all html tags
|
||||||
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "##\\2##", $error_string);
|
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "##\\2##", $error_string);
|
||||||
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "", $error_string);
|
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "", $error_string);
|
||||||
@@ -924,7 +925,6 @@ class Basic
|
|||||||
}
|
}
|
||||||
} // do write to file
|
} // do write to file
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* unsests the error message array
|
* unsests the error message array
|
||||||
|
|||||||
Reference in New Issue
Block a user