Proyectos de Subversion LeadersLinked - Services

Rev

Rev 293 | Rev 295 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 293 Rev 294
Línea 560... Línea 560...
560
                                break;
560
                                break;
561
                            }
561
                            }
562
                        }
562
                        }
563
                    }
563
                    }
Línea -... Línea 564...
-
 
564
                    
-
 
565
                    $extensions = ['mov', 'webm','mp4','mpeg','jpg','jpeg','png', 'pdf'];
-
 
566
                    $contentTypes =  ['video/quicktime', 'video/webm', 'video/mp4', 'video/mpeg', 'image/jpg', 'image/jpeg', 'image/png', 'application/pdf'];
-
 
567
                    
Línea 564... Línea 568...
564
                    
568
                    
565
                    
569
                    
566
                    
570
                    
567
                    $attachments = [];
571
                    $attachments = [];
568
                    if(!empty($email['attachment']) &&  is_array($email['attachment'])) {
572
                    if(!empty($email['attachment']) &&  is_array($email['attachment'])) {
569
                        foreach($email['attachment'] as $filename => $attachment)
573
                        foreach($email['attachment'] as $filename => $attachment)
570
                        {
574
                        {
-
 
575
                            $i = 0;
-
 
576
                            foreach($attachment as $contentType => $value)
-
 
577
                            {
-
 
578
                                $pos = strrpos($filename, '.');
-
 
579
                                $extension = trim(substr($filename, $pos + 1));
-
 
580
                                
-
 
581
                               for($j = 0; $max = count($extensions), $j < $max; $j++)
-
 
582
                               {
-
 
583
                                   if($extension == $extensions[$j]) {
-
 
584
                                       $contentType = $contentTypes[$j];
-
 
585
                                   }
-
 
586
                               }
-
 
587
                                
571
                            $i = 0;
588
                                
572
                            foreach($attachment as $contentType => $value)
589
                                
573
                            {
590
                                
574
                                array_push($attachments, [
591
                                array_push($attachments, [
575
                                    'filename' => $filename,
592
                                    'filename' => $filename,