Changeset 1385


Ignore:
Timestamp:
09/03/09 10:06:31 (15 years ago)
Author:
viani
Message:

Ticket #641 - Correcao de bug no metodo getByUser da classe wf_instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/workflow/inc/local/classes/class.wf_instance.php

    r795 r1385  
    358358                                if (!in_array($currentStatus, $statusPossibleValues)) 
    359359                                        trigger_error('wf_engine::getUserInstances: O status "' . $currentStatus . '" é inválido', E_USER_ERROR); 
    360                         array_walk($status, create_function('&$a', '$a = "\'$a\'";')); 
    361360                } 
    362361 
     
    375374                if ($restrictToStatus) 
    376375                { 
    377                         $query .= ' AND (i.wf_status IN (?))'; 
    378                         $values[] = '{' . implode(', ', $status) . '}'; 
     376                        $aux = ' AND (i.wf_status IN ('; 
     377                        foreach($status as $id){ 
     378                                $values[] = $id; 
     379                                $query .= $aux.' ?'; 
     380                                $aux = ', '; 
     381                        } 
     382                        $query .= ' ))'; 
    379383                } 
    380384 
Note: See TracChangeset for help on using the changeset viewer.