Changeset 6099


Ignore:
Timestamp:
05/04/12 12:39:09 (12 years ago)
Author:
marcieli
Message:

Ticket #2692 - Corrigido problema ao editar marcador, alterar nome e alterar cor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/mail/interceptors/Helpers.php

    r6076 r6099  
    355355 
    356356        //label:before.create  
     357        //label:before.update 
    357358        public function verifyNameLabel(&$uri , &$params , &$criteria , $original){  
    358  
    359                         if( !!Controller::find( array('concept' => 'label'), false, array('filter' => array('i=', 'name', $params['name'])) ) )  
     359                        $labels = Controller::find( array('concept' => 'label'), false, array('filter' => array('i=', 'name', $params['name']))); 
     360 ob_start(); 
     361print_r("labels \n"); 
     362print_r($labels); 
     363print_r("params \n"); 
     364print_r($params); 
     365 
     366$output = ob_get_clean(); 
     367file_put_contents( "/tmp/marci.log", $output , FILE_APPEND);  
     368$key = 'id'; 
     369                        if (!empty($labels)){ 
     370                                foreach ($labels as $i => $v){ 
     371                                        if(!isset($params['id']) || $v['id'] != $params['id']){ 
     372/*                                              ob_start(); 
     373                                                print_r($v['id']); 
     374                                                print_r($params['id']); 
     375 
     376                                                $output = ob_get_clean(); 
     377                                                file_put_contents( "/tmp/marci.log", $output , FILE_APPEND); */ 
     378                                                throw new Exception('#LabelNameError');  
     379                                        } 
     380                                } 
     381                        }  
     382/*                      if( !!Controller::find( array('concept' => 'label'), false, array('filter' => array('i=', 'name', $params['name'])) ) )  
    360383                        {  
    361384                                throw new Exception('#LabelNameError');  
    362                         }  
     385                        }  */ 
    363386        } 
    364387 
Note: See TracChangeset for help on using the changeset viewer.