Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r9932 -r10027 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 9932) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 10027) @@ -864,10 +864,12 @@ function PrintCompileErrors($params) { $errors = unserialize($this->Application->RecallVar('compile_errors')); - $o = ''; + $o = '
FileLineMessage
'; + $class = 'table-color1'; foreach ($errors as $an_error) { $f = str_replace(FULL_PATH, '', $an_error['file']); - $o .= ""; + $o .= ""; + $class = $class == 'table-color1' ? 'table-color2' : 'table-color1'; } $o .= '
FileLineMessage
{$f}{$an_error['line']}{$an_error['msg']}
{$f}{$an_error['line']}{$an_error['msg']}
'; $this->Application->RemoveVar('compile_errors'); Index: branches/RC/core/kernel/nparser/compiler.php =================================================================== diff -u -N -r8953 -r10027 --- branches/RC/core/kernel/nparser/compiler.php (.../compiler.php) (revision 8953) +++ branches/RC/core/kernel/nparser/compiler.php (.../compiler.php) (revision 10027) @@ -52,6 +52,7 @@ function SaveError($errno, $errstr, $errfile, $errline, $errcontext) { $this->Errors[] = array('msg'=>$errstr, 'file'=>$errfile, 'line'=>$errline); + return true; } function FindTemplates() Index: branches/RC/core/admin_templates/tools/compile_complete.tpl =================================================================== diff -u -N -r8953 -r10027 --- branches/RC/core/admin_templates/tools/compile_complete.tpl (.../compile_complete.tpl) (revision 8953) +++ branches/RC/core/admin_templates/tools/compile_complete.tpl (.../compile_complete.tpl) (revision 10027) @@ -8,13 +8,6 @@ - - - "> - -
- " class="button" onclick="window.close();"/> -
\ No newline at end of file Index: branches/RC/core/kernel/nparser/nparser.php =================================================================== diff -u -N -r9286 -r10027 --- branches/RC/core/kernel/nparser/nparser.php (.../nparser.php) (revision 9286) +++ branches/RC/core/kernel/nparser/nparser.php (.../nparser.php) (revision 10027) @@ -53,9 +53,13 @@ // appending any text/html data found before tag $this->Buffers[$this->Level] .= $tag_data[1][0]; if (!$this->InsideComment) { + $tmp_tag = $this->Application->CurrentNTag; + $this->Application->CurrentNTag = $tag; if ($this->ProcessTag($tag) === false) { + $this->Application->CurrentNTag = $tmp_tag; return false; } + $this->Application->CurrentNTag = $tmp_tag; } else { $this->Buffers[$this->Level] .= $tag_data[2][0].$tag_data[3][0].$tag_data[4][0]; @@ -205,7 +209,7 @@ } if ($prefix && strpos($prefix, '$') === false) { $p =& $this->GetProcessor($prefix); - if (!$p->CheckTag($tag['name'], $tag['prefix'])) { + if (!is_object($p) || !$p->CheckTag($tag['name'], $tag['prefix'])) { $this->Application->handleError(E_USER_ERROR, 'Unknown tag: '.$this->TagInfo($tag).' - incorrect tag name or prefix ', $tag['file'], $tag['line']); return false; } Index: branches/RC/core/kernel/application.php =================================================================== diff -u -N -r9639 -r10027 --- branches/RC/core/kernel/application.php (.../application.php) (revision 9639) +++ branches/RC/core/kernel/application.php (.../application.php) (revision 10027) @@ -169,6 +169,13 @@ var $CachedProcessors = array(); //used when running compiled templates var $LambdaElements = 1; // for autonumbering unnamed RenderElements [any better place for this prop? KT] + + /** + * Holds current NParser tag while parsing, can be used in error messages to display template file and line + * + * @var unknown_type + */ + var $CurrentNTag = null; /** * Returns kApplication instance anywhere in the script. @@ -2161,6 +2168,7 @@ return true; } + $res = false; $i = 0; // while (not foreach) because it is array of references in some cases $eh_count = count($this->errorHandlers); while($i < $eh_count) @@ -2169,7 +2177,7 @@ { $object =& $this->errorHandlers[$i][0]; $method = $this->errorHandlers[$i][1]; - $object->$method($errno, $errstr, $errfile, $errline, $errcontext); + $res = $object->$method($errno, $errstr, $errfile, $errline, $errcontext); } else { @@ -2178,6 +2186,7 @@ } $i++; } + return $res; } /**