diff --git a/includes/style.php b/includes/style.php index 0c0cb16..04beb43 100755 --- a/includes/style.php +++ b/includes/style.php @@ -147,15 +147,15 @@ class kleeja_style $rep = [ - '/<\/(LOOP|IF|END|IS_BROWSER|UNLESS)>/i' => '', - '//iU' => 'display("\\2"); ?>', - '//iU' => '', - '//iU' => '', - '/(|)/i' => '', - '/(.*?)<\/ODD\>/is' => " \\2 ", - '/(.*?)<\/EVEN>/is' => " \\2 ", - '//is' => "", - '/\{%(key|value)%\}/i' => '', + '/<\/(LOOP|IF|END|IS_BROWSER|UNLESS)>/i' => '', + '//iU' => 'display("\\2", empty("\\4") ? null : "\\4"); ?>', + '//iU' => '', + '//iU' => '', + '/(|)/i' => '', + '/(.*?)<\/ODD\>/is' => " \\2 ", + '/(.*?)<\/EVEN>/is' => " \\2 ", + '//is' => "", + '/\{%(key|value)%\}/i' => '', ]; return preg_replace(array_keys($rep), array_values($rep), $html); @@ -172,8 +172,8 @@ class kleeja_style $condition = ''; foreach ([ - 'NAME' => '', 'LOOP' => '', 'AND' => ' && ', 'OR' => ' || ', 'ISSET' => ' isset', 'EMPTY' => ' empty' - ] as $attribute=>$separator) + 'NAME' => '', 'LOOP' => '', 'AND' => ' && ', 'OR' => ' || ', 'ISSET' => ' isset', 'EMPTY' => ' empty' + ] as $attribute=>$separator) { if (isset($atts[$attribute])) { @@ -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 ''; }