mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 11:44:16 +02:00
- bugfix $smarty->debugging_ctrl = 'URL' did not work (forum topic 25811)
This commit is contained in:
@@ -399,31 +399,31 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
|
||||
/**
|
||||
* handle 'URL' debugging mode
|
||||
*
|
||||
* @param Smarty_Internal_Template $_template
|
||||
* @param Smarty $smarty
|
||||
*/
|
||||
public function debugUrl(Smarty_Internal_Template $_template)
|
||||
public function debugUrl(Smarty $smarty)
|
||||
{
|
||||
if (isset($_SERVER['QUERY_STRING'])) {
|
||||
$_query_string = $_SERVER['QUERY_STRING'];
|
||||
} else {
|
||||
$_query_string = '';
|
||||
}
|
||||
if (false !== strpos($_query_string, $_template->smarty->smarty_debug_id)) {
|
||||
if (false !== strpos($_query_string, $_template->smarty->smarty_debug_id . '=on')) {
|
||||
if (false !== strpos($_query_string, $smarty->smarty_debug_id)) {
|
||||
if (false !== strpos($_query_string, $smarty->smarty_debug_id . '=on')) {
|
||||
// enable debugging for this browser session
|
||||
setcookie('SMARTY_DEBUG', true);
|
||||
$_template->smarty->debugging = true;
|
||||
} elseif (false !== strpos($_query_string, $_template->smarty->smarty_debug_id . '=off')) {
|
||||
$smarty->debugging = true;
|
||||
} elseif (false !== strpos($_query_string, $smarty->smarty_debug_id . '=off')) {
|
||||
// disable debugging for this browser session
|
||||
setcookie('SMARTY_DEBUG', false);
|
||||
$_template->smarty->debugging = false;
|
||||
$smarty->debugging = false;
|
||||
} else {
|
||||
// enable debugging for this page
|
||||
$_template->smarty->debugging = true;
|
||||
$smarty->debugging = true;
|
||||
}
|
||||
} else {
|
||||
if (isset($_COOKIE['SMARTY_DEBUG'])) {
|
||||
$_template->smarty->debugging = true;
|
||||
$smarty->debugging = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user