Ignore:
Timestamp:
04/04/12 15:36:26 (12 years ago)
Author:
marcieli
Message:

Ticket #2593 - Solução para impedir marcadores duplicados, entretanto preve melhorias.

File:
1 edited

Legend:

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

    r5817 r5881  
    298298                //$result = Controller::update($imap_uri, $params, $criteria); 
    299299        } 
     300         
     301                 
     302        //label:before.create 
     303        public function verifyNameLabel(&$uri , &$params , &$criteria , $original){ 
     304                $nameLabel = $params['name']; 
     305                $Labels = Controller::find(array('concept' => 'label'), false, array('filter' => array('=', 'name', $nameLabel) )); 
     306                if($Labels){ 
     307                        //Throw new Exception('Marcador existe'); 
     308                        //$params['id'] = 'Marcador existe'; 
     309                        return false; 
     310                } 
     311        } 
    300312 
    301313} 
Note: See TracChangeset for help on using the changeset viewer.