Issue 1431: xml query click_count error - fixed missing class error, added unit tests

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@12017 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-10-31 09:54:57 +00:00
parent bbcef7ad51
commit f93d0d289d
10 changed files with 112 additions and 45 deletions

View file

@ -44,9 +44,9 @@
function getExpressionString(){
if($this->name == '*') return "new StarExpression()";
if($this->click_count)
return sprintf('new ClickCountExpression(%s, %s, $args->%s)', $this->name, $this->alias,$this->click_count);
return sprintf('new ClickCountExpression(\'%s\', %s, $args->%s)', $this->name, $this->alias ? '\'' . $this->alias . '\'' : "''",$this->click_count);
if(strpos($this->name, '$') === 0)
return sprintf('new SelectExpression($args->%s)', substr($this->name, 1));
return sprintf('new SelectExpression($args->%s)', substr($this->name, 1));
$dbParser = DB::getParser();
return sprintf('new SelectExpression(\'%s\'%s)', $this->name, $this->alias ? ', \''.$dbParser->escape($this->alias) .'\'': '');
}