Changeset 5998
- Timestamp:
- 04/23/12 15:34:17 (12 years ago)
- Location:
- trunk/prototype
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/prototype/modules/calendar/interceptors/DBMapping.php
r5953 r5998 761 761 762 762 $calendarsToSchedulable = self::schedulable2calendarToObject($uri['id']); 763 if( !self::ownerSchedulable($uri['id']) ) 764 { 763 764 if( !self::ownerSchedulable($uri['id']) && !self::isAllowDeleteInCalendar($calendarsToSchedulable[0]['calendar_id'])) 765 { 766 765 767 foreach ($calendarsToSchedulable as $i => $v) 766 768 { … … 1038 1040 .' AND calendar_to_calendar_object.calendar_object_id = '.addslashes($Schedulable)); 1039 1041 } 1040 1042 1043 protected static function isAllowDeleteInCalendar( $calendar ) { 1044 $f = Controller::find(array('concept' => 'calendarToPermission') , false , array('filter' => array('AND' , array('=', 'user' , Config::me('uidNumber') ) , array('=', 'calendar' , $calendar)))); 1045 return (strpos($f[0]['acl'], CALENDAR_ACL_REMOVE) === false) ? false : true; 1046 } 1047 1041 1048 } 1042 1049 -
trunk/prototype/services/PostgreSQL.php
r5971 r5998 34 34 35 35 public function delete ( $uri, $justthese = false, $criteria = false ){ 36 if(!isset($uri['id']) && !is_int($uri['id'])) return false; //Delete chamado apenas passando id inteiros 36 37 $map = Config::get($uri['concept'], 'PostgreSQL.mapping'); 37 if(!self::parseCriteria ( $criteria , $map)) return false; //Validador para não apagar tabela inteira38 38 $criteria = ($criteria !== false) ? $this->parseCriteria ( $criteria , $map , ' WHERE '.$map['id'].' = \''.addslashes( $uri['id'] ).'\'') : ' WHERE '.$map['id'].' = \''.addslashes( $uri['id'] ).'\''; 39 39 return $this->execSql('DELETE FROM '.(Config::get($uri['concept'],'PostgreSQL.concept')).$criteria); -
trunk/prototype/services/iCal.php
r5947 r5998 62 62 if($rv) 63 63 { 64 if($ir == 'frequency' )64 if($ir == 'frequency' && $rv !== 'none') 65 65 $repeat['FREQ'] = $rv; 66 66 else if($ir == 'endTime' ) … … 76 76 } 77 77 } 78 79 $vevent->setProperty('rrule' , $repeat); 78 79 if(isset($repeat['FREQ'])) 80 $vevent->setProperty('rrule' , $repeat); 80 81 } 81 82 … … 135 136 $isResponseDelegated = false; 136 137 if(isset($pv['delegatedFrom']) && $pv['delegatedFrom'] == 0){ 137 if($pv['isOrganizer'] == 1) 138 $vevent->setProperty( 'organizer' , $pv['user']['mail'], array( 'CN' => $pv['user']['name'] )); 138 if($pv['isOrganizer'] == 1){ 139 if($pv['user']['id'] == Config::me('uidNumber')) 140 $pv['user']['mail'] = str_replace('@correiolivre.caixa','@caixa.gov.br',$pv['user']['mail']); 141 142 $vevent->setProperty( 'organizer' , $pv['user']['mail'], array( 'CN' => $pv['user']['name'])); 143 } 144 139 145 else 140 146 { … … 1073 1079 } 1074 1080 ?> 1081 1082 ?>
Note: See TracChangeset
for help on using the changeset viewer.