Changeset 5916


Ignore:
Timestamp:
04/11/12 14:15:00 (12 years ago)
Author:
acoutinho
Message:

Ticket #2612 - Evento com erro ao importar via ExpressoMail?

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/templates/default/assing_calendar.css

    r5804 r5916  
    11div.assing-calendar fieldset.remove-border{border: 0px !important; padding: 0px;} 
     2 
    23div.assing-calendar dd{margin: 0 0 0 0 !important;} 
     4 
     5div.user-acls-shared-calendar{margin: -15px 0 0 0;} 
     6 
     7div.assing-calendar dd.calendar-list{ overflow-y: auto; overflow-x: hidden;} 
     8 
    39div.assing-calendar dl{margin: 5px !important;} 
    410 
  • trunk/expressoMail1_2/inc/class.db_functions.inc.php

    r5821 r5916  
    447447                                $output = ob_get_clean();                        
    448448                                $valid = json_decode($output, true); 
     449 
    449450                                if($_REQUEST['readable']){       
    450451                                        if(!is_array($valid)) 
    451452                                        { 
    452453                                                $output = unserialize($output);  
    453                                                 foreach($output as $key => $value) 
    454                                                     return $value; 
     454                                                foreach($output as $key => $value) 
     455                                                        return $value; 
    455456                                        } 
    456457                                        return false; 
    457                                 } 
    458  
    459                                 if(empty($valid)) 
     458                                }                                
     459                                if(empty($output)) 
    460460                                        return "error";  
    461461                                return "ok"; 
  • trunk/expressoMail1_2/js/main.js

    r5911 r5916  
    34113411                                                switch(parseInt(typeImport)){ 
    34123412                                                case 1: 
    3413                                                 case 7: 
     3413                                                case 7: 
    34143414                                                        $("#select-agenda").html(''); 
    34153415                                                                for(var id in Calendar.calendars){ 
     
    34753475                                                        return; 
    34763476                                                        break; 
     3477                                                case 9: 
     3478                                                        alert('Seu evento não possui alterações!'); 
     3479                                                        return; 
     3480                                                        break; 
    34773481                                                default: 
    34783482                                                        up = true; 
  • trunk/prototype/config/SMTP.srv

    r5399 r5916  
    33[config] 
    44host = 127.0.0.1 
    5 prot = 25 
     5port = 25 
    66auth = false 
    77;username = 
  • trunk/prototype/converter.php

    r5903 r5916  
    2424                $args = array('Error' => 'No source file'); 
    2525 
    26 if( !isset($_REQUEST['readable']) || !$_REQUEST['readable']){ 
    27         require_once 'Sync.php'; 
     26        if( isset($args[0]) && empty($args[0]) ) 
     27                echo json_encode($args); 
     28        else{ 
     29                if(!isset($_REQUEST['readable']) || !$_REQUEST['readable']){ 
     30                        require_once 'Sync.php';                         
     31                        $args = toUtf8($args); 
     32                        echo json_encode($args); 
     33                }else 
     34                        print_r(serialize($args)); 
     35        } 
    2836 
    29         echo json_encode($args); 
    30 }else 
    31         print_r(serialize($args)); 
     37        function srtToUtf8($data){ 
     38                return mb_convert_encoding( $data , 'UTF-8' , 'UTF-8 , ISO-8859-1' ); 
     39        } 
    3240 
     41        function toUtf8($data){ 
     42                if(is_array($data)){    
     43                        $return = array(); 
     44                        foreach ($data as $i => $v) 
     45                           $return[srtToUtf8($i)] = (is_array($v)) ? toUtf8($v) : srtToUtf8($v); 
     46                         
     47                        return $return; 
     48                }else 
     49                   return srtToUtf8($data); 
     50        } 
     51         
     52         
    3353?> 
  • trunk/prototype/modules/calendar/templates/event_add.ejs

    r5729 r5916  
    164164                <!-- The fileinput-button span is used to style the file input field as button --> 
    165165                <%if(data.event.acl.organization || data.event.acl.write){%> 
    166                                 <span class="button btn-success fileinput-button"> 
     166                    <span class="button btn-success fileinput-button"> 
    167167                    <span><i class="icon-plus icon-white"></i> Adicionar</span> 
    168168                    <input type="file" name="files[]" multiple> 
  • trunk/prototype/services/iCal.php

    r5903 r5916  
    226226                                        //Aparentemente é para retornar um ical com o evento atualizado para o attende 
    227227                                    }  
    228                                     if(isset($params['status'])) 
     228 
     229                                                                        if(isset($params['status'])) 
    229230                                    { 
    230                                         $pID = self::_getParticipantByMail( Config::me('mail') , $schedulable['participants'] ); 
    231                                         $interation['participant://'.$pID]['status'] = $params['status']; 
    232                                     } 
     231                                                                                $pID = self::_getParticipantByMail( Config::me('mail') , $schedulable['participants'] ); 
     232                                                                                //Verifica a importação de eventos em que não participo 
     233                                                                                if($pID){ 
     234                                                                                        $interation['participant://'.$pID]['status'] = $params['status']; 
     235                                                                                } 
     236                                                                        } 
    233237                                } 
    234238     
     
    478482        } 
    479483                 
    480          return $return;    
     484                return $return;    
    481485    } 
    482486     
     
    506510                             case 'REQUEST': 
    507511                                 $schedulable = self::_getSchedulable($uid); 
    508  
    509512                                 if($schedulable ) //Caso o evento exista 
    510513                                 { 
    511                                      $isOrganizer = false; 
    512                                       
    513                                       foreach($schedulable['participants'] as $value) 
    514                                         if($value['user']['id'] == Config::me('uidNumber')){ 
    515                                             if($value['isOrganizer']) 
    516                                                 $isOrganizer = true; 
    517  
    518                                     if(!self::_existInMyCalendars($schedulable['id'])){ 
    519                                             $interation = ICAL_ACTION_UPDATE;  
    520                                             $interation = ( strrpos($value['acl'], ATTENDEE_ACL_PARTICIPATION_REQUIRED) ) ? ICAL_ACTION_IMPORT_REQUIRED : ICAL_ACTION_IMPORT; 
    521                                             break; 
    522                                             }                                    
    523                                     }else 
     514                                                                 $isOrganizer = false; 
     515                                                                 $isParticipant = false; 
     516                                                                  
     517                                                                  foreach($schedulable['participants'] as $value) 
     518                                                                        if($value['user']['id'] == Config::me('uidNumber')){ 
     519                                                                                $isParticipant = true; 
     520                                                                                if($value['isOrganizer']) 
     521                                                                                        $isOrganizer = true; 
     522 
     523                                                                                if(!self::_existInMyCalendars($schedulable['id'])){ 
     524                                                                                        $interation = ICAL_ACTION_UPDATE;  
     525                                                                                        $interation = ( strrpos($value['acl'], ATTENDEE_ACL_PARTICIPATION_REQUIRED) ) ? ICAL_ACTION_IMPORT_REQUIRED : ICAL_ACTION_IMPORT; 
     526                                                                                        break; 
     527                                                                                }                                    
     528                                                                        }else 
    524529                                    { 
    525530                                        if( self::_getTime($component , 'dtstamp') > $schedulable['dtstamp'] || $component->getProperty( 'sequence' , false , false ) > $schedulable['sequence']) //Organizador esta requisitando que você atualize o evento 
     
    528533                                           $interation = ($isOrganizer) ? ICAL_ACTION_ORGANIZER_NONE : ICAL_ACTION_NONE;     
    529534                                    } 
     535                                                                        if(!$isParticipant) 
     536                                                                                $interation = ICAL_ACTION_ORGANIZER_NONE; 
    530537                                 }else 
    531538                                   $interation =  ICAL_ACTION_IMPORT; 
Note: See TracChangeset for help on using the changeset viewer.