Changeset 1555
- Timestamp:
- 10/29/09 14:02:11 (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/inc/class.bocalendar.inc.php
r1500 r1555 936 936 $this->so->add_attribute('reference',(@isset($l_cal['reference']) && $l_cal['reference']?$l_cal['reference']:0)); 937 937 $this->so->add_attribute('location',(@isset($l_cal['location']) && $l_cal['location']?$l_cal['location']:'')); 938 $this->so->add_attribute('repeat',(@isset($l_cal['recur_type']) && $l_cal['recur_type']?$l_cal['recur_type']:'')); 939 $this->so->add_attribute('alarmd',(@isset($l_cal['alarmdays'])?$l_cal['alarmdays']:0)); 940 $this->so->add_attribute('alarmh',(@isset($l_cal['alarmhours'])?$l_cal['alarmhours']:0)); 941 $this->so->add_attribute('alarmm',(@isset($l_cal['alarmminutes'])?$l_cal['alarmminutes']:0)); 938 942 if($l_cal['id']) 939 943 { … … 958 962 959 963 $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 964 $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); 965 $this->so->add_attribute('rpt_end_use',(@isset($l_cal['rpt_use_end']) && $l_cal['rpt_use_end']?$l_cal['rpt_use_end']:'')); 960 966 961 967 break; … … 964 970 965 971 $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 972 $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); 966 973 967 974 $tmp_init = explode("/",$_POST['start']['str']); // recebe a data inicial da repeticao; … … 970 977 if($l_cal['rpt_use_end'] == 'y') // verifica se foi indicada data final da repeticao, se sim: 971 978 { 972 979 $this->so->add_attribute('rpt_end_use',(@isset($l_cal['rpt_use_end']) && $l_cal['rpt_use_end']?$l_cal['rpt_use_end']:'')); 980 973 981 $tmp_end = explode("/",$_POST['recur_enddate']['str']); // recebe data final da repeticao; 974 982 $end_rept = mktime($_POST['start']['hour'],$_POST['start']['min'],0,intval($tmp_end[1]),$tmp_end[0],$tmp_end[2]); // transforma a data inicial + hora e minuto de inicio da repeticao em UNIX timestamp; … … 982 990 983 991 $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 992 $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); 984 993 985 994 $tmp_init = explode("/",$_POST['start']['str']); // recebe a data inicial da repeticao; … … 989 998 { 990 999 1000 $this->so->add_attribute('rpt_end_use',(@isset($l_cal['rpt_use_end']) && $l_cal['rpt_use_end']?$l_cal['rpt_use_end']:'')); 991 1001 $tmp_end = explode("/",$_POST['recur_enddate']['str']); // recebe data final da repeticao; 992 1002 $end_rept = mktime($_POST['start']['hour'],$_POST['start']['min'],0,intval($tmp_end[1]),$tmp_end[0],$tmp_end[2]); // transforma a data inicial + hora e minuto de inicio da repeticao em UNIX timestamp; … … 1009 1019 } 1010 1020 } 1021 $this->so->add_attribute('rpt_wdays',(@isset($rpt_wdays) && $rpt_wdays?$rpt_wdays:'')); 1011 1022 $this->so->set_recur_weekly((int)$l_recur_enddate['year'],(int)$l_recur_enddate['month'],(int)$l_recur_enddate['mday'],(int)$l_cal['recur_interval'],$l_cal['recur_data']); 1012 1023 break; … … 1015 1026 1016 1027 $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 1028 $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); 1017 1029 1018 1030 $tmp_init = explode("/",$_POST['start']['str']); // recebe a data inicial da repeticao; … … 1021 1033 if($l_cal['rpt_use_end'] == 'y') // verifica se foi indicada data final da repeticao, se sim: 1022 1034 { 1023 1035 $this->so->add_attribute('rpt_end_use',(@isset($l_cal['rpt_use_end']) && $l_cal['rpt_use_end']?$l_cal['rpt_use_end']:'')); 1024 1036 $tmp_end = explode("/",$_POST['recur_enddate']['str']); // recebe data final da repeticao; 1025 1037 $end_rept = mktime($_POST['start']['hour'],$_POST['start']['min'],0,intval($tmp_end[1]),$tmp_end[0],$tmp_end[2]); // transforma a data inicial + hora e minuto de inicio da repeticao em UNIX timestamp; … … 1037 1049 1038 1050 $repetido = (int)$l_cal['recur_type']; // recebe o tipo de repeticao; 1051 $this->so->add_attribute('recur_type',(@isset($repetido) && $repetido?$repetido:0)); 1039 1052 1040 1053 $tmp_init = explode("/",$_POST['start']['str']); // recebe a data inicial da repeticao; … … 1043 1056 if($l_cal['rpt_use_end'] == 'y') // verifica se foi indicada data final da repeticao, se sim: 1044 1057 { 1045 1058 $this->so->add_attribute('rpt_end_use',(@isset($l_cal['rpt_use_end']) && $l_cal['rpt_use_end']?$l_cal['rpt_use_end']:'')); 1046 1059 $tmp_end = explode("/",$_POST['recur_enddate']['str']); // recebe data final da repeticao; 1047 1060 $end_rept = mktime($_POST['start']['hour'],$_POST['start']['min'],0,intval($tmp_end[1]),$tmp_end[0],$tmp_end[2]); // transforma a data inicial + hora e minuto de inicio da repeticao em UNIX timestamp; … … 1408 1421 $error = 40; 1409 1422 } 1423 elseif ($event['repeat'] != 0) 1424 { 1425 if( $event['rpt_end_use'] != 'y') 1426 { 1427 $error = 46; 1428 } 1429 //} 1430 if ($event['repeat'] == 2) 1431 { 1432 if($event['rpt_wdays'] == '') { 1433 $error = 44; 1434 } 1435 if( $event['rpt_end_use'] != 'y') 1436 { 1437 $error = 46; 1438 } 1439 1440 if ( ( isset($event['alarmd']) && ($event['alarmd'] != 0) ) || ( isset($event['alarmh']) && ($event['alarmh'] != 0) ) || ( isset($event['alarmm']) && ($event['alarmm'] != 0) ) ) 1441 { 1442 if( isset($event['recur_type']) && ($event['recur_type'] != 0) ) 1443 { 1444 if( $event['rpt_end_use'] != 'y') 1445 { 1446 $error = 45; 1447 } 1448 } 1449 } 1450 } 1451 1452 //} 1453 if ( ( isset($event['alarmd']) && ($event['alarmd'] != 0) ) || ( isset($event['alarmh']) && ($event['alarmh'] != 0) ) || ( isset($event['alarmm']) && ($event['alarmm'] != 0) ) ) 1454 { 1455 if( isset($event['recur_type']) && ($event['recur_type'] != 0) ) 1456 { 1457 if( $event['rpt_end_use'] != 'y') 1458 { 1459 $error = 45; 1460 } 1461 } 1462 } 1463 } 1410 1464 elseif (($GLOBALS['phpgw']->datetime->time_valid($event['start']['hour'],$event['start']['min'],0) == False) || ($GLOBALS['phpgw']->datetime->time_valid($event['end']['hour'],$event['end']['min'],0) == False)) 1411 1465 { -
trunk/phpgwapi/inc/class.common.inc.php
r1414 r1555 1813 1813 case 43: $s .= lang('You have not entered participants').'.'; 1814 1814 break; 1815 case 44: $s .= lang('You must choose the days of the week for the appointment to repeat').'.'; 1816 break; 1817 case 45: $s .= lang('Recurrent appointments with alarms must have a final date').'.'; 1818 break; 1819 case 46: $s .= lang('Recurrent appointments must have a final date').'.'; 1820 break; 1815 1821 default: return ''; 1816 1822 }
Note: See TracChangeset
for help on using the changeset viewer.