mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
add zindex to popup init, fix error message for eval.
This commit is contained in:
1
TODO
1
TODO
@@ -9,3 +9,4 @@
|
||||
* caching all but parts of the template
|
||||
* change plugins so $smarty variable always comes first
|
||||
* being able to load config files from PHP scripts
|
||||
* get cache ttl with function call
|
||||
|
@@ -12,8 +12,8 @@ function smarty_function_eval($params, &$this)
|
||||
{
|
||||
extract($params);
|
||||
|
||||
if (empty($var)) {
|
||||
$this->trigger_error("assign: missing 'var' parameter");
|
||||
if (!isset($var)) {
|
||||
$this->trigger_error("eval: missing 'var' parameter");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -10,8 +10,14 @@
|
||||
*/
|
||||
function smarty_function_popup_init($params, &$smarty)
|
||||
{
|
||||
$zindex = 1000;
|
||||
|
||||
if (!empty($params['zindex'])) {
|
||||
$zindex = $params['zindex'];
|
||||
}
|
||||
|
||||
if (!empty($params['src'])) {
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n";
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n";
|
||||
echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n";
|
||||
} else {
|
||||
$smarty->trigger_error("popup_init: missing src parameter");
|
||||
|
@@ -12,8 +12,8 @@ function smarty_function_eval($params, &$this)
|
||||
{
|
||||
extract($params);
|
||||
|
||||
if (empty($var)) {
|
||||
$this->trigger_error("assign: missing 'var' parameter");
|
||||
if (!isset($var)) {
|
||||
$this->trigger_error("eval: missing 'var' parameter");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -10,8 +10,14 @@
|
||||
*/
|
||||
function smarty_function_popup_init($params, &$smarty)
|
||||
{
|
||||
$zindex = 1000;
|
||||
|
||||
if (!empty($params['zindex'])) {
|
||||
$zindex = $params['zindex'];
|
||||
}
|
||||
|
||||
if (!empty($params['src'])) {
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n";
|
||||
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n";
|
||||
echo '<script language="JavaScript" src="'.$params['src'].'"></script>'."\n";
|
||||
} else {
|
||||
$smarty->trigger_error("popup_init: missing src parameter");
|
||||
|
Reference in New Issue
Block a user