Commit 1e5416f2 by Seldaek

* Fixed a bug with parsing AND/OR keywords in conditionals when they were…

* Fixed a bug with parsing AND/OR keywords in conditionals when they were followed by round brackets git-svn-id: svn://dwoo.org/dwoo/trunk@236 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent e55d5ef4
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
+ Added {load_templates} to load external sub-templates into your file + Added {load_templates} to load external sub-templates into your file
* Many new unit tests to improve code coverage and a bunch of bug fixes * Many new unit tests to improve code coverage and a bunch of bug fixes
that resulted, but I didn't really keep track of them that resulted, but I didn't really keep track of them
* Fixed a bug with parsing AND/OR keywords in conditionals when they were
followed by round brackets
[2008-12-24] 1.0.1 [2008-12-24] 1.0.1
* Direct assignments like {$foo = 5} now allow spaces around the operator * Direct assignments like {$foo = 5} now allow spaces around the operator
......
...@@ -1487,6 +1487,13 @@ class Dwoo_Compiler implements Dwoo_ICompiler ...@@ -1487,6 +1487,13 @@ class Dwoo_Compiler implements Dwoo_ICompiler
return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer); return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer);
} }
} else { } else {
if ($curBlock === 'condition') {
// load if plugin
$this->getPluginType('if');
if (Dwoo_Plugin_if::replaceKeywords(array($func), $this) !== array($func)) {
return $this->parseOthers($in, $from, $to, $parsingParams, $curBlock, $pointer);
}
}
$whitespace = strlen(substr($cmdstr, strlen($func), $paramspos-strlen($func))); $whitespace = strlen(substr($cmdstr, strlen($func), $paramspos-strlen($func)));
$paramstr = substr($cmdstr, $paramspos+1); $paramstr = substr($cmdstr, $paramspos+1);
if (substr($paramstr, -1, 1) === $paramsep) { if (substr($paramstr, -1, 1) === $paramsep) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment