@@ -693,7 +693,7 @@ public function run($args)
693693 $ sql = "INSERT INTO pkg_trunk_group_trunk (id_trunk_group, id_trunk) VALUES ( $ id_trunk_group, " . $ modelTrunk [0 ]['id ' ] . " ) " ;
694694 Yii::app ()->db ->createCommand ($ sql )->execute ();
695695
696- if (! is_numeric ($ modelTrunk [0 ]['failover_trunk ' ])) {
696+ if ( ! is_numeric ($ modelTrunk [0 ]['failover_trunk ' ])) {
697697 break ;
698698 }
699699 $ sql = "SELECT * FROM pkg_trunk WHERE id = " . $ modelTrunk [0 ]['failover_trunk ' ];
@@ -806,7 +806,7 @@ public function run($args)
806806
807807 $ sql = "SELECT * FROM pkg_module WHERE module = 'backup' " ;
808808 $ result = Yii::app ()->db ->createCommand ($ sql )->queryAll ();
809- if (! isset ($ result [0 ])) {
809+ if ( ! isset ($ result [0 ])) {
810810
811811 $ sql = "INSERT INTO pkg_module VALUES (NULL, 't(''Backup'')', 'backup', 'x-fa fa-desktop', 12,15) " ;
812812 $ this ->executeDB ($ sql );
@@ -839,7 +839,7 @@ public function run($args)
839839
840840 $ sql = "SELECT * FROM pkg_module WHERE module = 'campaignreport' " ;
841841 $ result = Yii::app ()->db ->createCommand ($ sql )->queryAll ();
842- if (! isset ($ result [0 ])) {
842+ if ( ! isset ($ result [0 ])) {
843843 $ sql = "INSERT INTO pkg_module VALUES (NULL, 't(''Campaign Report'')', 'campaignreport', 'x-fa fa-desktop', 13,12) " ;
844844 $ this ->executeDB ($ sql );
845845 $ idServiceModule = Yii::app ()->db ->lastInsertID ;
@@ -1335,11 +1335,11 @@ public function run($args)
13351335
13361336 $ select = 'trunkcode, user, secret, disallow, allow, directmedia, context, dtmfmode, insecure, nat, qualify, type, host, fromdomain,fromuser, register_string,port,transport,encryption,sendrpid,maxuse ' ;
13371337 $ model = Trunk::model ()->findAll (
1338- array (
1338+ [
13391339 'select ' => $ select ,
13401340 'condition ' => 'providertech = :key AND status = 1 ' ,
1341- 'params ' => array ( ':key ' => 'sip ' ) ,
1342- ) );
1341+ 'params ' => [ ':key ' => 'sip ' ] ,
1342+ ] );
13431343
13441344 if (count ($ model )) {
13451345 AsteriskAccess::instance ()->writeAsteriskFile ($ model , '/etc/asterisk/sip_magnus.conf ' , 'trunkcode ' );
@@ -1631,7 +1631,7 @@ public function run($args)
16311631 if ($ version == '7.8.1.3 ' ) {
16321632 $ sql = "SELECT * FROM pkg_module WHERE module = 'providercnl' " ;
16331633 $ result = Yii::app ()->db ->createCommand ($ sql )->queryAll ();
1634- if (! isset ($ result [0 ]['id ' ])) {
1634+ if ( ! isset ($ result [0 ]['id ' ])) {
16351635 $ sql = "INSERT INTO pkg_module VALUES (NULL, 't(''Provider CNL'')', 'providercnl', 'x-fa fa-desktop', 10,7) " ;
16361636 $ this ->executeDB ($ sql );
16371637 }
@@ -1959,6 +1959,18 @@ public function run($args)
19591959 $ version = '7.8.4.1 ' ;
19601960 $ this ->update ($ version );
19611961 }
1962+
1963+ //2023-11-08
1964+ if ($ version == '7.8.4.1 ' ) {
1965+ $ sql = "INSERT INTO pkg_configuration VALUES
1966+ (NULL, 'Disable CDR count', 'remove_count_cdr', '0', 'It will make the CDR more efficiency, particularly when utilizing filters', 'global', '1');
1967+ " ;
1968+ $ this ->executeDB ($ sql );
1969+
1970+ $ version = '7.8.4.2 ' ;
1971+ $ this ->update ($ version );
1972+ }
1973+
19621974 }
19631975
19641976 public function executeDB ($ sql )
0 commit comments