reverse merge from 1.6.0 (r10369)

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10707 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-05-17 00:24:30 +00:00
parent 826878c104
commit 8f11300f70
2 changed files with 10 additions and 9 deletions

View file

@ -15,7 +15,6 @@
}
function getExpressionString(){
var_dump($this->name);
return sprintf('new Expression(\'%s\')', $this->name);
}

View file

@ -12,15 +12,15 @@
var $click_count;
function SelectColumnTag($column){
if ($column == "*" || $column->attrs->name == '*')
{
parent::ColumnTag(NULL);
$this->name = "*";
parent::ColumnTag($column->attrs->name);
if(!$this->name) {
if($column->attrs->var)
$this->name = '$' . $column->attrs->var;
else
$this->name = "*";
}
else
{
parent::ColumnTag($column->attrs->name);
$dbParser = new DB(); $dbParser = &$dbParser->getParser();
if($this->name != "*" && substr($this->name, 0, 1) != '$') {
$dbParser = DB::getParser();
$this->name = $dbParser->parseExpression($this->name);
$this->alias = $column->attrs->alias;
@ -32,6 +32,8 @@
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);
if(strpos($this->name, '$') === 0)
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) .'\'': '');
}