Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 5579 Rev 5581
Línea 244... Línea 244...
244
               
244
               
245
                
245
                
246
                $topicMapper = CompanyMicrolearningTopicMapper::getInstance($this->adapter);
246
                $topicMapper = CompanyMicrolearningTopicMapper::getInstance($this->adapter);
247
                if($topicMapper->insert($topic)) {
-
 
-
 
247
                if($topicMapper->insert($topic)) {
248
                    $topic = $topicMapper->fetchOne($topic->id);
248
                    $topic = $topicMapper->fetchOne($topic->id);
249
                    
249
                    $fileBase64Content = $this->params()->fromPost('file');
250
                    //leaderslinked.fullpath.recruitment_selection/uuid vacante/uuid candidato 
-
 
251
                    try {
-
 
252
                        $fileBase64Name = 'rodolfo';
250
                    //leaderslinked.fullpath.recruitment_selection/uuid vacante/uuid candidato 
253
                        $fileBase64Content = $this->params()->fromPost('file');
251
                    try {
254
 
252
                       
-
 
253
                        $fileBase64Content = base64_decode($fileBase64Content);
-
 
254
                        $target_path = $this->config['leaderslinked.fullpath.microlearning_topic'] . $topic->uuid;
255
                        $feed_filename      = $this->normalizeString($fileBase64Name);
255
                        $topic_filename      = 'topic-' .uniqid() . '.png';
256
                        $target_path = $this->config['leaderslinked.fullpath.microlearning_topic'] . $topic->uuid;
256
                        $topic_tmp_filename = 'data' . DIRECTORY_SEPARATOR . 'tmp';
257
                        if(!file_exists($target_path)) {
257
                        if(!file_exists($topic_tmp_filename)) {
-
 
258
                            mkdir($topic_tmp_filename, 0755, true);
-
 
259
                        }
Línea 258... Línea 260...
258
                            mkdir($target_path, 0755, true);
260
                        $feed_tmp_filename = 'data' . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . $feed_filename;
Línea 259... Línea 261...
259
                        }
261
                            file_put_contents($topic_tmp_filename, $fileBase64Content);
260
                        
262