From 6dd2f86e99331e4e290e9b7449b0cdc78d9054fe Mon Sep 17 00:00:00 2001 From: everyx Date: Sat, 5 Nov 2016 16:33:12 +0800 Subject: [PATCH] when code is empty, we shoudl return true if any operator is online --- archive/mibew-operator-status-plugin.tar.gz | Bin 1850 -> 1937 bytes archive/mibew-operator-status-plugin.zip | Bin 4104 -> 4196 bytes src/Controller/OperatorStatusController.php | 10 ++++++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/archive/mibew-operator-status-plugin.tar.gz b/archive/mibew-operator-status-plugin.tar.gz index 4cd487dc8773a1a349f799b215518e428e8d8df5..aeea410129e96a365199239ac1440433dd0f77a8 100644 GIT binary patch literal 1937 zcmV;C2X6QuiwFP*nH^XF1MOLRZ{kQ2pTGGOB{Wh<1O&)S%3N~mNt}sw1S3OcZnUf- z$8LgG#_el2n_*Y^?pxJuCp?mwFw3wjUH=rtxVyR@UDef9VE@L%^vmv>ABhIy=-_~! z&7*^cdT;LUt7nck%{`>q!_mgkn?|#Fh(mDjL$%5=$)qm;-Y~ThU!!9p+k`@!g{}R6 z72UG?9~A|w`@eO#zi0fv3C#Jw8&B?{WbI+Fy8ri^ji&McCh(m9-INJma?z8%oMeAJ z99H-LQPbrA&EOUO5BNCcXnpo)c|{Ga>( zj}kyR@yD!u3}w9syJHH58qcGkmZ>nPr7AeeRay|TED%vDBc9MYD}jOrxX5tqXM6?tL;YV;O%bbcHuj^KCgMpV>+yvDbVnm~ z4A!!udBFd_6uf!N{Sc`&+j5$TT7zE8I{XI%rQ=|r55QnBe*y*r5>zIR4~ip3%pH@p zFcLKJ?ITn!J(T`#N56nqoc}YPNWtTniSN7$R?h#eW~*iDzl~ru|Ig1nP1Ms-`m&5~ zrTl-?XtYfJ-vs{kZ**O0cc-)in2e#Vb90H_&v-f&(cMTwCD?{mqj?B=lc2Jk zbhp)#E)(M@%kWx&D1#9b>~;!w!cQa%t1uLd0UtszqWoC}$-z&ifH8%I1@K$xM@f|2 zfe!(SMs`RmN60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xI0HFXjeC=>Br(Jg9_I$L^uFAuZN{R^pi4y;_avT%HA3H6`=X#H-|8 zOSJ3p`SPY#!;_|&Q(*Pm?%Rl6Wv%T1lzumn;y$49ckCmC#?RS)nXJ z6()X3BkbJ~WWf#f0&L%DDZHmHs=0;OY*H0C9{7lTw$=B>vXPwyLJ#mN&aX;W-$Gpl zRmY8enC4l?Bbuue?EZ`waku+3a_+`9O>Q^!X6(F~Tc%WARU49{0+hd69&XI7!Iu*j zgi~ldT^!`-r)0C8ImZd{1f^->SMA7e@b+!x^0MsHU@4RJHw!}dwWr_8bfoy!RHdZx zsHhC!em(CLFW`TA^y?JwtN0fGvks1z`F|TPhW~8<5Bv`n2_UGE6)B)zv{n)b>t=zl zW*P|V!o2w~ln5Z28JVV)Gis;sc& zVAQU#Q&j(FRIE#D(*#VfeV|*58Y}Wu3dOT5VbnpE<@CkH#w8}`UCGcg!6hCdtnF9W zs;G$L|KiPCMbt_rQ?a=6AkD~CG$63i@i>)K>_O>!s}y{mS&1TT%rmI_C;BUzh&van zqgWoKMeUVz#r3Ec;knllZmZR__*rM@U%K-?A+P$N#T(1yuGGHWZdtAN_F9>W!H>WT z_@BUsAJ$6iZkBwXjc@(_)7d{*=70NE$MC;RK>gNpb@~ diff --git a/archive/mibew-operator-status-plugin.zip b/archive/mibew-operator-status-plugin.zip index 0706fc5d0f5d10614d5d992f4cb656b4f63623eb..190525040d8cc3cd744bf3f7886a5c2d3eccff45 100644 GIT binary patch delta 1596 zcmZXVdpOg39LJ}PiEVCa<#I?DwKC1v%%vnI7Lm(Q4=u4ShovW+VVq&Z>@e1^DNz!$ z6mqPbx#rT-1qUgYBe@(Ji9&8q&**H*IZyTdKHopSulMKkeLjD^zHGx$L%2H$3{e5e z7lcLO!S$igEPY?u;bC;Za^kl2d%{P3Peus;lMTSoIwg50V5dM_!$6wC%qojt=di|j znAK7ZS*i17BUIaI2nh6683c0S&Fld5!Fw2A2l0)FR0SzO#=)`)gJff-c~e94iRvrw z$(V9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Xz6SW47v;wpwgFt5r~&G sX0bC&p2(y!c?Ul~Ob6Jqm;BPqLEI3z_uRZ}tPEgjI{^hYJsyyD0GEGhuK)l5 diff --git a/src/Controller/OperatorStatusController.php b/src/Controller/OperatorStatusController.php index c430dfb..314ddf6 100644 --- a/src/Controller/OperatorStatusController.php +++ b/src/Controller/OperatorStatusController.php @@ -46,9 +46,15 @@ class OperatorStatusController extends AbstractController $opcode = $request->query->get('code', false); $online_operators = get_online_operators(); - foreach ($online_operators as $item) { - if ($item['code'] == $opcode) { + if (count($online_operators) > 0) { + if (empty($opcode)) { $is_online = "true"; + } else { + foreach ($online_operators as $item) { + if ($item['code'] == $opcode) { + $is_online = "true"; + } + } } } $response = new Response($is_online);