Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 1 Rev 3163
Línea 1821... Línea 1821...
1821
                            'success'   => false,
1821
                            'success'   => false,
1822
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1822
                            'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
1823
                        ]);
1823
                        ]);
1824
                    }
1824
                    }
Línea 1825... Línea 1825...
1825
                    
1825
                    
1826
                    if($userProfile->public == UserProfile::PUBLIC_YES && !$currentUser->image) {
-
 
1827
                        
-
 
1828
                    /*    $target_filename    = 'user-' . uniqid() . '.png';
-
 
1829
                        if(!copy($target_path . DIRECTORY_SEPARATOR . $userProfile->image, $target_path . DIRECTORY_SEPARATOR . $target_filename)) {
-
 
1830
                            return new JsonModel([
-
 
1831
                                'success'   => false,
-
 
1832
                                'data'   =>  'ERROR_THERE_WAS_AN_ERROR'
-
 
1833
                            ]);
-
 
1834
                        }
-
 
Línea 1835... Línea 1826...
1835
                            
1826
                    if($userProfile->public == UserProfile::PUBLIC_YES) {
Línea 1836... Línea 1827...
1836
                        
1827
                        
1837
                        $currentUser->image = $target_filename;
1828
                        $currentUser->image = $target_filename;
-
 
1829
                        
1838
                        
1830
                        $userMapper = UserMapper::getInstance($this->adapter);
Línea 1839... Línea 1831...
1839
                        $userMapper = UserMapper::getInstance($this->adapter);
1831
                        $userMapper->updateImage($currentUser);
Línea 1840... Línea 1832...
1840
                        $userMapper->updateImage($currentUser);*/
1832
 
Línea 1859... Línea 1851...
1859
            return new JsonModel([
1851
            return new JsonModel([
1860
                'success'   => true,
1852
                'success'   => true,
1861
                'data' => [ 
1853
                'data' => [ 
1862
                    'user' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $currentUser->uuid, 'filename' => $currentUser->image]),
1854
                    'user' => $this->url()->fromRoute('storage', ['type' => 'user', 'code' => $currentUser->uuid, 'filename' => $currentUser->image]),
1863
                    'profile' => $this->url()->fromRoute('storage', ['type' => 'user-profile', 'code' => $currentUser->uuid, 'filename' => $userProfile->image]),
1855
                    'profile' => $this->url()->fromRoute('storage', ['type' => 'user-profile', 'code' => $currentUser->uuid, 'filename' => $userProfile->image]),
1864
                    
-
 
-
 
1856
                    'update_navbar' =>  $userProfile->public == UserProfile::PUBLIC_YES ? 1 : 0,
Línea 1865... Línea 1857...
1865
                    
1857
                    
1866
                ]
1858
                ]
1867
            ]);
1859
            ]);