Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11399 Rev 11401
Línea 1021... Línea 1021...
1021
                    ]
1021
                    ]
1022
                ];
1022
                ];
Línea 1023... Línea 1023...
1023
 
1023
 
Línea 1024... Línea 1024...
1024
            }
1024
            }
Línea 1025... Línea 1025...
1025
 
1025
 
1026
            if($feed->type=='hptg'){
1026
            // if($feed->type=='hptg'){
Línea 1027... Línea 1027...
1027
 
1027
 
Línea 1028... Línea 1028...
1028
                $group_uuid =  $this->params()->fromRoute('group_id');
1028
            //     $group_uuid =  $this->params()->fromRoute('group_id');
1029
                $topic_uuid   = $this->params()->fromRoute('topic_id');
1029
            //     $topic_uuid   = $this->params()->fromRoute('topic_id');
1030
 
1030
 
1031
                if(!isset($topic_uuid)){
1031
            //     if(!isset($topic_uuid)){
Línea 1032... Línea 1032...
1032
                
1032
                
1033
                    $data = [
1033
            //         $data = [
1034
                        'success'   => false,
1034
            //             'success'   => false,
Línea 1035... Línea 1035...
1035
                        'data'   => 'ERROR_INVALID_PARAMETER'
1035
            //             'data'   => 'ERROR_INVALID_PARAMETER'
1036
                    ];
1036
            //         ];
1037
                    
1037
                    
1038
                    return new JsonModel($data);
1038
            //         return new JsonModel($data);
Línea 1039... Línea 1039...
1039
                }
1039
            //     }
1040
                if(!isset($group_uuid)){
1040
            //     if(!isset($group_uuid)){
1041
                
1041
                
1042
                    $data = [
1042
            //         $data = [
Línea 1043... Línea 1043...
1043
                        'success'   => false,
1043
            //             'success'   => false,
1044
                        'data'   => 'ERROR_INVALID_PARAMETER'
1044
            //             'data'   => 'ERROR_INVALID_PARAMETER'
1045
                    ];
1045
            //         ];
1046
                    
1046
                    
1047
                    return new JsonModel($data);
1047
            //         return new JsonModel($data);
Línea 1048... Línea 1048...
1048
                }
1048
            //     }
1049
                $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
1049
            //     $highPerformanceTeamsGroupsMapper = HighPerformanceTeamsGroupsMapper::getInstance($this->adapter);
Línea 1050... Línea 1050...
1050
                $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
1050
            //     $highPerformanceTeamsGroups = $highPerformanceTeamsGroupsMapper->fetchOneByUuid($group_uuid);
Línea 1051... Línea 1051...
1051
                        
1051
                        
1052
                if (!$highPerformanceTeamsGroups) {
1052
            //     if (!$highPerformanceTeamsGroups) {
1053
                    $data = [
1053
            //         $data = [
1054
                        'success' => false,
1054
            //             'success' => false,
1055
                        'data' => 'ERROR_RECORD_NOT_FOUND'
1055
            //             'data' => 'ERROR_RECORD_NOT_FOUND'
1056
                    ];
1056
            //         ];
1057
            
1057
            
1058
                    return new JsonModel($data);
1058
            //         return new JsonModel($data);
1059
                }
1059
            //     }
1060
 
1060
 
1061
                       
1061
                       
1062
                if($highPerformanceTeamsGroups->status != HighPerformanceTeamsGroups::STATUS_ACTIVE) {
1062
            //     if($highPerformanceTeamsGroups->status != HighPerformanceTeamsGroups::STATUS_ACTIVE) {
1063
            
1063
            
Línea 1064... Línea 1064...
1064
                    return new JsonModel([
1064
            //         return new JsonModel([
1065
                        'success' => false,
1065
            //             'success' => false,
Línea 1066... Línea 1066...
1066
                        'data' => 'ERROR_UNAUTHORIZED'
1066
            //             'data' => 'ERROR_UNAUTHORIZED'
1067
                    ]);
1067
            //         ]);
1068
            
1068
            
1069
                } 
1069
            //     } 
1070
 
1070
 
1071
                if($feed->high_performance_group_id!=$highPerformanceTeamsGroups->id){
1071
            //     if($feed->high_performance_group_id!=$highPerformanceTeamsGroups->id){
1072
                    return new JsonModel([
1072
            //         return new JsonModel([
1073
                        'success' => false,
1073
            //             'success' => false,
1074
                        'data' => 'ERROR_METHOD_NOT_ALLOWED'
1074
            //             'data' => 'ERROR_METHOD_NOT_ALLOWED'
1075
                    ]);
1075
            //         ]);
1076
                }
1076
            //     }
1077
                
1077
                
1078
                $topicMapper = TopicMapper::getInstance($this->adapter);
1078
            //     $topicMapper = TopicMapper::getInstance($this->adapter);
1079
                $topic = $topicMapper->fetchOneByUuid($topic_uuid);
1079
            //     $topic = $topicMapper->fetchOneByUuid($topic_uuid);
1080
 
1080
 
1081
                if (!$topic) {
1081
            //     if (!$topic) {
1082
                    $data = [
1082
            //         $data = [
1083
                        'success' => false,
1083
            //             'success' => false,
1084
                        'data' => 'ERROR_RECORD_NOT_FOUND'
1084
            //             'data' => 'ERROR_RECORD_NOT_FOUND'
1085
                    ];
1085
            //         ];
1086
            
1086
            
1087
                    return new JsonModel($data);
1087
            //         return new JsonModel($data);
1088
                }    
1088
            //     }    
1089
 
1089
 
1090
                if($feed->topic_id!=$topic->id){
1090
            //     if($feed->topic_id!=$topic->id){
1091
                    return new JsonModel([
-
 
1092
                        'success' => false,
-
 
1093
                        'data' => 'ERROR_METHOD_NOT_ALLOWED'
-
 
1094
                    ]);
-
 
1095
                }  
-
 
1096
 
1091
            //         return new JsonModel([
1097
                $items = $this->renderFeed($feed->id,$group_uuid);   
1092
            //             'success' => false,
Línea 1098... Línea 1093...
1098
            
1093
            //             'data' => 'ERROR_METHOD_NOT_ALLOWED'
1099
                $response = [
1094
            //         ]);
1100
                    'success' => true,
1095
            //     }  
1101
                    'data' => [
1096