fix Argument and Condition argument type

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8562 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
lickawtl 2011-07-05 08:15:27 +00:00
parent 909276e16b
commit 013ada255d
5 changed files with 61 additions and 41 deletions

View file

@ -49,8 +49,13 @@
return $this->argument_validator->toString();
}
function isConditionArgument(){
if($this->operation) return true;
return false;
}
function toString(){
if($this->operation)
if($this->isConditionArgument())
$arg = sprintf("\n$%s_argument = new ConditionArgument('%s', %s, '%s');\n"
, $this->argument_name
, $this->argument_name
@ -67,7 +72,7 @@
$arg .= $this->argument_validator->toString();
if($this->operation){
if($this->isConditionArgument()){
$arg .= sprintf("$%s_argument->createConditionValue();\n"
, $this->argument_name
);