8eec80c5 by G Manojkumar

removed once from include

1 parent bcc38ddb
...@@ -959,8 +959,7 @@ public function show($id) ...@@ -959,8 +959,7 @@ public function show($id)
959 $didlinestrArr=explode(":",$didlinestr); 959 $didlinestrArr=explode(":",$didlinestr);
960 $udidlinesstr[] = substr($didlinestrArr[0], env('didnumber')); 960 $udidlinesstr[] = substr($didlinestrArr[0], env('didnumber'));
961 } 961 }
962 //include( app_path() . '/Hacks/DisabledDIDs.php'); 962
963
964 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>','2018-09-11 00:00:00')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60))); 963 $mc=CRMCall::where('userstatus','=','InboundDROP')->where('created_at','>','2018-09-11 00:00:00')->where('created_at','>',date('Y-m-d H:i:s',time()-(7*24*60*60)));
965 964
966 $mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){ 965 $mc=$mc->where(function ($query) use($roclientlst,$udidlinesstr){
...@@ -971,10 +970,10 @@ public function show($id) ...@@ -971,10 +970,10 @@ public function show($id)
971 970
972 foreach($mc as $key=>$tcall){ 971 foreach($mc as $key=>$tcall){
973 //Log::info($tcall); 972 //Log::info($tcall);
974 include( app_path() . '/Hacks/DisabledDIDs.php'); 973 include_once( app_path() . '/Hacks/DisabledDIDs.php');
975 if( in_array(substr($tcall->number,-10),$DisableNumbersArray) ){ 974 if( in_array(substr($tcall->number,-10),$DisableNumbersArray) ){
976 //Log::info("Disabled Number".$tcall->number); 975 //Log::info("Disabled Number".$tcall->number);
977 continue; 976 continue;
978 } 977 }
979 $tccal=substr($tcall->number,-10); 978 $tccal=substr($tcall->number,-10);
980 $mc_number=CRMCall::where('userstatus','!=','InboundDROP')->where ('created_at','>',$tcall->created_at)->where('number','like',"%".$tccal."%")->orderBy("id","DESC")->first(); 979 $mc_number=CRMCall::where('userstatus','!=','InboundDROP')->where ('created_at','>',$tcall->created_at)->where('number','like',"%".$tccal."%")->orderBy("id","DESC")->first();
...@@ -983,12 +982,7 @@ public function show($id) ...@@ -983,12 +982,7 @@ public function show($id)
983 982
984 $mccount= count($mc_number); 983 $mccount= count($mc_number);
985 if($mccount==0){ 984 if($mccount==0){
986 //include( app_path() . '/Hacks/DisabledDIDs.php'); 985 $number_list[] = $tcall->number;
987 //if( in_array(substr($tcall->number,-10),$DisableNumbersArray) ){
988 // Log::info("Disabled Number".$tcall->number);
989 // }else{
990 $number_list[] = $tcall->number;
991 // }
992 } 986 }
993 } 987 }
994 988
...@@ -1509,13 +1503,7 @@ public function show($id) ...@@ -1509,13 +1503,7 @@ public function show($id)
1509 1503
1510 $mccount= count($mc_number); 1504 $mccount= count($mc_number);
1511 if($mccount==0){ 1505 if($mccount==0){
1512 include( app_path() . '/Hacks/DisabledDIDs.php'); 1506 $number_list[] = $tcall->number;
1513 if( in_array(substr($tcall->number,-10),$DisableNumbersArray) ){
1514 Log::info("Disabled Number".$tcall->number);
1515 }else{
1516 $number_list[] = $tcall->number;
1517 }
1518 //$number_list[] = $tcall->number;
1519 } 1507 }
1520 } 1508 }
1521 1509
......
...@@ -305,7 +305,7 @@ class KPAMIListen implements IEventListener ...@@ -305,7 +305,7 @@ class KPAMIListen implements IEventListener
305 305
306 $crmcall->data=json_encode($tdata); 306 $crmcall->data=json_encode($tdata);
307 $crmcall->save(); 307 $crmcall->save();
308 308 $DisableNumbersArray = array();
309 include( app_path() . '/Hacks/DisabledDIDs.php'); 309 include( app_path() . '/Hacks/DisabledDIDs.php');
310 if( in_array(substr($crmcall->number,-10),$DisableNumbersArray) ){ 310 if( in_array(substr($crmcall->number,-10),$DisableNumbersArray) ){
311 Log::info("Disabled Number".$crmcall->number); }else{ 311 Log::info("Disabled Number".$crmcall->number); }else{
...@@ -1025,6 +1025,7 @@ class KPAMIListen implements IEventListener ...@@ -1025,6 +1025,7 @@ class KPAMIListen implements IEventListener
1025 1025
1026 $crmcall->data=json_encode($tdata); 1026 $crmcall->data=json_encode($tdata);
1027 $crmcall->save(); 1027 $crmcall->save();
1028 $DisableNumbersArray = array();
1028 include( app_path() . '/Hacks/DisabledDIDs.php'); 1029 include( app_path() . '/Hacks/DisabledDIDs.php');
1029 if( in_array(substr($crmcall->number,-10),$DisableNumbersArray) ){ Log::info("Disabled Number".$crmcall->number); }else{ 1030 if( in_array(substr($crmcall->number,-10),$DisableNumbersArray) ){ Log::info("Disabled Number".$crmcall->number); }else{
1030 $newqueue=new Kqueue(); 1031 $newqueue=new Kqueue();
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!