Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev 234 Rev 240
Línea 141... Línea 141...
141
    
141
    
142
            $contentReactionMapper = ContentReactionMapper::getInstance($this->adapter);
142
            $contentReactionMapper = ContentReactionMapper::getInstance($this->adapter);
143
            $reactions = $contentReactionMapper->fetchCountByPostId($post->id);
143
            $reactions = $contentReactionMapper->fetchCountByPostId($post->id);
Línea -... Línea 144...
-
 
144
            $reaction = $contentReactionMapper->fetchOneByPostIdAndUserId($post->id, $currentUser->id);
-
 
145
               
-
 
146
            
144
            $reaction = $contentReactionMapper->fetchOneByPostIdAndUserId($post->id, $currentUser->id);
147
            
-
 
148
            
145
               
149
            $type = '';
146
            $type = '';
150
        
147
            if($post->file) {
151
            if($post->file) {
-
 
152
                $filename = trim(strtolower(basename($post->file)));
-
 
153
                $parts = explode('.', $filename);
-
 
154
                
-
 
155
                
-
 
156
                $max = is_array($parts) ? count($parts) : 0;
148
                $filename = basename($post->file);
157
                
149
                $parts = explode(',', $filename);
158
                
150
                if(count($parts > 1)) {
159
                if($max > 1) {
151
                    $extension = $parts[ count($parts) -1 ];
160
                    $extension = $parts[ $max -1 ];
152
                    if(in_array($extension, ['mov', 'webm','mp4','mpeg'] )) {
161
                    if(in_array($extension, ['mov', 'webm','mp4','mpeg'] )) {
153
                        $type = 'video';
162
                        $type = 'video';
154
                    } else if(in_array($extension, ['jpg','jpeg','png'] )) {
163
                    } else if(in_array($extension, ['jpg','jpeg','png'] )) {
Línea 158... Línea 167...
158
                    }
167
                    }
159
                }
168
                }
Línea 160... Línea 169...
160
                
169
                
Línea -... Línea 170...
-
 
170
            }
-
 
171
            
-
 
172
         
Línea 161... Línea 173...
161
            }
173