mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 13:52:24 +09:00
Fixed condition group bug - if there are more condition groups and the first doesn't get displayed, the pipe of the next is printed even though it shouldn't have been.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8607 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ff679cc517
commit
0c63c32b10
4 changed files with 42 additions and 2 deletions
|
|
@ -190,8 +190,15 @@
|
|||
function getWhereString($with_values = true){
|
||||
$where = '';
|
||||
if(count($this->conditions) > 0){
|
||||
$condition_count = 0;
|
||||
foreach($this->conditions as $conditionGroup){
|
||||
$where .= $conditionGroup->toString($with_values);
|
||||
$condition_string = $conditionGroup->toString($with_values);
|
||||
if($condition_string !== '') $condition_count++;
|
||||
if($condition_count === 1){
|
||||
$conditionGroup->setPipe("");
|
||||
$condition_string = $conditionGroup->toString($with_values);
|
||||
}
|
||||
$where .= $condition_string;
|
||||
}
|
||||
if(trim($where) == '') return '';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue