access style path parmiter from kleeja style

This commit is contained in:
Mitan Omar
2019-08-03 16:29:19 +02:00
parent 407856d19c
commit affc464f13

View File

@@ -148,7 +148,7 @@ class kleeja_style
$rep =
[
'/<\/(LOOP|IF|END|IS_BROWSER|UNLESS)>/i' => '<?php } ?>',
'/<INCLUDE(\s+NAME|)\s*=*\s*"(.+)"\s*>/iU' => '<?php echo $this->display("\\2"); ?>',
'/<INCLUDE(\s+NAME|)\s*=*\s*"(.+)"\s*(PATH=\s*=*\s*"(.+)")?>/iU' => '<?php echo $this->display("\\2", empty("\\4") ? null : "\\4"); ?>',
'/<IS_BROWSER\s*=\s*"([a-z0-9,]+)"\s*>/iU' => '<?php if(is_browser("\\1")){ ?>',
'/<IS_BROWSER\s*\!=\s*"([a-z0-9,]+)"\s*>/iU' => '<?php if(!is_browser("\\1")){ ?>',
'/(<ELSE>|<ELSE\s?\/>)/i' => '<?php }else{ ?>',
@@ -196,7 +196,7 @@ class kleeja_style
$char = [' eq ', ' lt ', ' gt ', ' lte ', ' gte ', ' neq ', '==', '!=', '>=', '<=', '<', '>'];
$reps = ['==', '<', '>', '<=', '>=', '!=', '==', '!=', '>=', '<=', '<', '>'];
if(trim($condition) == '')
if (trim($condition) == '')
{
return '';
}
@@ -259,7 +259,7 @@ class kleeja_style
$var = trim(! empty($matches[2]) ? str_replace('.', '\'][\'', $matches[2]) : '');
if(empty($var))
if (empty($var))
{
return '';
}