Changeset 6099 for trunk/prototype/modules/mail/interceptors
- Timestamp:
- 05/04/12 12:39:09 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/mail/interceptors/Helpers.php
r6076 r6099 355 355 356 356 //label:before.create 357 //label:before.update 357 358 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(); 361 print_r("labels \n"); 362 print_r($labels); 363 print_r("params \n"); 364 print_r($params); 365 366 $output = ob_get_clean(); 367 file_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'])) ) ) 360 383 { 361 384 throw new Exception('#LabelNameError'); 362 } 385 } */ 363 386 } 364 387
Note: See TracChangeset
for help on using the changeset viewer.