Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15371 Rev 15448
Línea 156... Línea 156...
156
        \Laminas\Validator\AbstractValidator::setDefaultTranslator($translator);
156
        \Laminas\Validator\AbstractValidator::setDefaultTranslator($translator);
Línea 157... Línea 157...
157
        
157
        
158
        
158
        
159
        $this->currentNetworkPlugin = new CurrentNetworkPlugin($adapter);
-
 
160
        if(!$this->currentNetworkPlugin->hasNetwork()) {
-
 
161
            echo '2';
159
        $this->currentNetworkPlugin = new CurrentNetworkPlugin($adapter);
162
            exit;
160
        if(!$this->currentNetworkPlugin->hasNetwork()) {
163
            header("HTTP/1.1 401 Unauthorized - Private network - not found");
161
            header("HTTP/1.1 401 Unauthorized - Private network - not found");
Línea 164... Línea 162...
164
            exit;
162
            exit;
165
        }
-
 
166
        
-
 
167
        if($this->currentNetworkPlugin->getNetwork()->status == Network::STATUS_INACTIVE) {
163
        }
168
            echo '3';
164
        
169
            exit;
165
        if($this->currentNetworkPlugin->getNetwork()->status == Network::STATUS_INACTIVE) {
Línea 272... Línea 268...
272
                if(!in_array($resourceName, $resources)) {
268
                if(!in_array($resourceName, $resources)) {
273
                    array_push($resources, $resourceName);
269
                    array_push($resources, $resourceName);
274
                }
270
                }
275
            }
271
            }
Línea 276... Línea -...
276
            
-
 
277
         
-
 
278
            
-
 
279
            
-
 
280
            
-
 
281
            
-
 
282
            
-
 
283
            
-
 
284
            
-
 
285
            
-
 
Línea 286... Línea 272...
286
            
272
            
287
            
-
 
288
            $servicesActive = [];
-
 
289
            
273
            
-
 
274
            $servicesActive = [];
290
            
275
            $now = date('Y-m-d');
291
            $now = date('Y-m-d');
276
           
Línea 292... Línea 277...
292
            $companyServiceMapper = CompanyServiceMapper::getInstance($adapter);
277
            $companyServiceMapper = CompanyServiceMapper::getInstance($adapter);
293
            $companyServices = $companyServiceMapper->fetchAllByCompanyId($company->id);            
278
            $companyServices = $companyServiceMapper->fetchAllByCompanyId($company->id);            
294
            
279
            
-
 
280
            foreach($companyServices as $companyService) 
295
            foreach($companyServices as $companyService) 
281
            {
296
            {
282
                if($companyService->status == CompanyService::ACTIVE) {
Línea -... Línea 283...
-
 
283
                    
297
                if($companyService->status == CompanyService::ACTIVE &&
284
                    $paid_from = trim(substr($companyService->paid_from, 0, 10));
298
                    $companyService->paid_from >= $now &&     
285
                    $paid_to = trim(substr($companyService->paid_to, 0, 10));
-
 
286
                    
299
                    $companyService->paid_to <= $now) {
287
                    if($now >= $paid_from   && $now <= $paid_to) {
300
                    
288
                        if(!in_array($companyService->id, $servicesActive)) {
301
                    if(!in_array($companyService->id, $servicesActive)) {
-
 
302
                        array_push($servicesActive, $companyService->id);
-
 
303
                    }
-
 
304
                }
289
                            array_push($servicesActive, $companyService->service_id);
Línea 305... Línea -...
305
                
-
 
306
                
290
                        }
307
                array_push($servicesActive, $companyService->service_id);
-
 
308
            }
-
 
309
            
-
 
310
            
-
 
311
            $rolesForCompany = getAclRolesCompany(); 
291
                    }
312
 
292
                } 
Línea 313... Línea 293...
313
            
293
            }
314
          
-
 
315
 
-
 
316
            $companyUserMapper = CompanyUserMapper::getInstance($adapter);
-
 
317
            $companyUser = $companyUserMapper->fetchOneByCompanyIdAndUserId($company->id, $user->id);
294
            
Línea 318... Línea 295...
318
 
295
            $rolesForCompany = getAclRolesCompany();