Changeset 588 for trunk/calendar


Ignore:
Timestamp:
01/12/09 11:28:22 (15 years ago)
Author:
eduardoalex
Message:

Ticket #386

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.bocalendar.inc.php

    r583 r588  
    758758                function update($params='') 
    759759                { 
     760                         
     761                        if($params['from_mobile']) { 
     762                                $ui_return = "mobile.ui_mobilecalendar.edit"; 
     763                                $ui_index = "mobile.ui_mobilecalendar.index"; 
     764                                $ui_overlap = "mobile.ui_mobilecalendar.overlap"; 
     765                        } 
     766                        else { 
     767                                $ui_return = "calendar.uicalendar.edit"; 
     768                                $ui_index = "calendar.uicalendar.index";                 
     769                                $ui_overlap = "calendar.uicalendar.overlap"; 
     770                        } 
     771                         
    760772                        if(!is_object($GLOBALS['phpgw']->datetime)) 
    761773                        { 
     
    769781                        $l_end = (@isset($params['end']) && $params['end']?$params['end']:$_POST['end']); 
    770782                        $l_recur_enddate = (@isset($params['recur_enddate']) && $params['recur_enddate']?$params['recur_enddate']:$_POST['recur_enddate']); 
     783 
    771784                         
    772785                        $send_to_ui = True; 
     
    837850                                if($datetime_check) 
    838851                                { 
    839                                         ExecMethod('calendar.uicalendar.edit', 
     852                                        ExecMethod($ui_return, 
    840853                                                Array( 
    841854                                                        'cd'            => $datetime_check, 
     
    843856                                                ) 
    844857                                        ); 
    845                                         $GLOBALS['phpgw']->common->phpgw_exit(True); 
     858                                        if(!$params['from_mobile']) 
     859                                                $GLOBALS['phpgw']->common->phpgw_exit(True); 
     860                                        else 
     861                                                return; 
    846862                                } 
    847863                                $overlapping_events = False; 
     
    860876                                                return array(($l_cal['id']?1:2) => 'permission denied'); 
    861877                                        } 
    862                                         ExecMethod('calendar.uicalendar.index'); 
    863                                         $GLOBALS['phpgw']->common->phpgw_exit(); 
     878                                        ExecMethod($ui_index); 
     879                                        if(!$params['from_mobile']) 
     880                                                $GLOBALS['phpgw']->common->phpgw_exit(); 
     881                                        else 
     882                                                return; 
    864883                                } 
    865884 
     
    11411160                                                return array($datetime_check => 'invalid input data'); 
    11421161                                        } 
    1143                                         ExecMethod('calendar.uicalendar.edit', 
     1162                                        ExecMethod($ui_return, 
    11441163                                                Array( 
    11451164                                                        'cd'            => $datetime_check, 
     
    11471166                                                ) 
    11481167                                        ); 
    1149                                         $GLOBALS['phpgw']->common->phpgw_exit(True); 
     1168                                        if(!$params['from_mobile']) 
     1169                                                $GLOBALS['phpgw']->common->phpgw_exit(True); 
     1170                                        else 
     1171                                                return; 
    11501172                                } 
    11511173 
     
    11761198                                        unset($GLOBALS['phpgw_info']['flags']['noheader']); 
    11771199                                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']); 
    1178                                         ExecMethod('calendar.uicalendar.overlap', 
     1200                                        ExecMethod($ui_overlap, 
    11791201                                                Array( 
    11801202                                                        'o_events'      => $overlapping_events, 
     
    11821204                                                ) 
    11831205                                        ); 
    1184                                         $GLOBALS['phpgw']->common->phpgw_exit(True); 
     1206                                        if(!$params['from_mobile']) 
     1207                                                $GLOBALS['phpgw']->common->phpgw_exit(True); 
     1208                                        else 
     1209                                                return; 
    11851210                                } 
    11861211                                else 
     
    12291254                                                $GLOBALS['phpgw']->common->phpgw_exit(); 
    12301255                                        } 
    1231                                         Execmethod('calendar.uicalendar.index'); 
     1256                                        Execmethod($ui_index); 
    12321257                                } 
    12331258                                else 
Note: See TracChangeset for help on using the changeset viewer.