mirror of
				https://github.com/Mibew/mibew-operator-status-plugin.git
				synced 2025-11-04 04:05:09 +03:00 
			
		
		
		
	when code is empty, we shoudl return true if any operator is online
This commit is contained in:
		
							parent
							
								
									02c3e71dd9
								
							
						
					
					
						commit
						6dd2f86e99
					
				
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@ -46,9 +46,15 @@ class OperatorStatusController extends AbstractController
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        $opcode = $request->query->get('code', false);
 | 
					        $opcode = $request->query->get('code', false);
 | 
				
			||||||
        $online_operators = get_online_operators();
 | 
					        $online_operators = get_online_operators();
 | 
				
			||||||
        foreach ($online_operators as $item) {
 | 
					        if (count($online_operators) > 0) {
 | 
				
			||||||
            if ($item['code'] == $opcode) {
 | 
					            if (empty($opcode)) {
 | 
				
			||||||
                $is_online = "true";
 | 
					                $is_online = "true";
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                foreach ($online_operators as $item) {
 | 
				
			||||||
 | 
					                    if ($item['code'] == $opcode) {
 | 
				
			||||||
 | 
					                        $is_online = "true";
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        $response = new Response($is_online);
 | 
					        $response = new Response($is_online);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user