Skip to content

Commit 236e037

Browse files
fix buld did destination
1 parent ac71249 commit 236e037

26 files changed

+219
-208
lines changed

build/MagnusBilling-current.tar.gz

-488 Bytes
Binary file not shown.

classic/src/view/did/Bulk.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Ext.define('MBilling.view.did.Bulk', {
141141
if (!me.down('form').isValid()) {
142142
return;
143143
}
144+
me.down('form').setLoading(true);
144145
Ext.Ajax.setTimeout(1000000);
145146
me.down('form').submit({
146147
url: 'index.php/diddestination/bulkdestinatintion',
@@ -156,13 +157,14 @@ Ext.define('MBilling.view.did.Bulk', {
156157
Ext.ux.Alert.alert(t('Error'), obj.errors, 'error');
157158
}
158159
btn.enable();
159-
me.list.setLoading(false);
160+
me.down('form').setLoading(false);
160161
store.load();
161162
me.close();
162163
},
163164
failure: function(form, action) {
164165
var obj = Ext.decode(action.response.responseText),
165166
errors = Helper.Util.convertErrorsJsonToString(obj.errors);
167+
me.down('form').setLoading(false);
166168
if (!Ext.isObject(obj.errors)) {
167169
Ext.ux.Alert.alert(me.titleError, t(errors), 'error');
168170
} else {

classic/src/view/did/List.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Ext.define('MBilling.view.did.List', {
3434
disabled: false
3535
}, {
3636
text: t('Bulk DID'),
37-
iconCls: 'icon-delete',
37+
iconCls: '',
3838
handler: 'onBulk',
3939
hidden: !App.user.isAdmin || window.isTablet
4040
}];

protected/components/AccessManager.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function getInstance($module)
4545

4646
private function getResult($canDoIt)
4747
{
48-
if (in_array($this->module, self::$config['only_admin']) && !Yii::app()->session['isAdmin']) {
48+
if (in_array($this->module, self::$config['only_admin']) && ! Yii::app()->session['isAdmin']) {
4949
return false;
5050
}
5151

@@ -86,14 +86,14 @@ public function checkAccess($user, $pass)
8686
$filterUser = '((s.username COLLATE utf8_bin = :key OR s.email COLLATE utf8_bin LIKE :key) AND UPPER(MD5(s.password)) = :key1)';
8787
$filterSip = '(t.name COLLATE utf8_bin = :key AND UPPER(MD5(t.secret)) = :key1 )';
8888
$modelSip = Sip::model()->find(
89-
array(
89+
[
9090
'condition' => $filterUser . ' OR ' . $filterSip,
9191
'join' => 'LEFT JOIN pkg_user s ON t.id_user = s.id',
92-
'params' => array(
92+
'params' => [
9393
':key' => trim($user),
9494
':key1' => trim(strtoupper($pass)),
95-
),
96-
));
95+
],
96+
]);
9797
return $modelSip;
9898
}
9999

@@ -102,14 +102,14 @@ public function checkAccessLogin($user, $pass)
102102
$filterUser = '((s.username COLLATE utf8_bin = :key OR s.email COLLATE utf8_bin LIKE :key) AND UPPER(SHA1(s.password)) = :key1)';
103103
$filterSip = '(t.name COLLATE utf8_bin = :key AND UPPER(SHA1(t.secret)) = :key1 )';
104104
$modelSip = Sip::model()->find(
105-
array(
105+
[
106106
'condition' => $filterUser . ' OR ' . $filterSip,
107107
'join' => 'LEFT JOIN pkg_user s ON t.id_user = s.id',
108-
'params' => array(
108+
'params' => [
109109
':key' => trim($user),
110110
':key1' => trim(strtoupper($pass)),
111-
),
112-
));
111+
],
112+
]);
113113
return $modelSip;
114114
}
115115
}

protected/components/CCJSON.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ public static function encode($var)
5959
case $ord_var_c == 0x2F:
6060
case $ord_var_c == 0x5C:
6161
// double quote, slash, slosh
62-
$ascii .= '\\' . $var{$c};
62+
$ascii .= '\\' . $var{$c}
6363
break;
6464

6565
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
6666
// characters U-00000000 - U-0000007F (same as ASCII)
67-
$ascii .= $var{$c};
67+
$ascii .= $var{$c}
6868
break;
6969

7070
case (($ord_var_c & 0xE0) == 0xC0):
@@ -152,19 +152,19 @@ public static function encode($var)
152152
// treat as a JSON object
153153
if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
154154
return '{' .
155-
join(',', array_map(array('CJSON', 'nameValue'),
155+
join(',', array_map(['CJSON', 'nameValue'],
156156
array_keys($var),
157157
array_values($var)))
158158
. '}';
159159
}
160160

161161
// treat it like a regular array
162-
return '[' . join(',', array_map(array('CJSON', 'encode'), $var)) . ']';
162+
return '[' . join(',', array_map(['CJSON', 'encode'], $var)) . ']';
163163

164164
case 'object':
165165
if ($var instanceof Traversable) {
166166
$var = get_parent_class($var) === 'Model' ? $var->getAttributes() : $var;
167-
$vars = array();
167+
$vars = [];
168168
foreach ($var as $k => $v) {
169169
$vars[$k] = $v;
170170
}
@@ -174,7 +174,7 @@ public static function encode($var)
174174
}
175175

176176
return '{' .
177-
join(',', array_map(array('CJSON', 'nameValue'),
177+
join(',', array_map(['CJSON', 'nameValue'],
178178
array_keys($vars),
179179
array_values($vars)))
180180
. '}';

protected/components/CSVActiveRecorder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ class CSVActiveRecorder
88
private $translations;
99
private $data;
1010
private $model;
11-
private $errors = array();
11+
private $errors = [];
1212
private $aditionalParams;
1313

14-
public function __construct(array $data, $model, $additionalParams = array())
14+
public function __construct(array $data, $model, $additionalParams = [])
1515
{
1616

1717
$this->model = $model;
@@ -101,7 +101,7 @@ public function translateColumns()
101101
$foundTranslation = true;
102102
}
103103
}
104-
if (!$foundTranslation) {
104+
if ( ! $foundTranslation) {
105105
$resultColumns[$csvColumn] = $csvColumn;
106106
}
107107

protected/components/CSVInterpreter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class CSVInterpreter
77
{
88
private $filename;
9-
private $errors = array();
9+
private $errors = [];
1010
private $delimiter;
1111
private $enclosure;
1212
private $escape;

protected/components/ConsoleCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function init()
3030

3131
define('LOGFILE', 'protected/runtime/' . $this->getName() . '.log');
3232

33-
if (!defined('PID')) {
33+
if ( ! defined('PID')) {
3434
define("PID", '/var/run/magnus/' . $this->getName() . 'Pid.php');
3535
}
3636

protected/components/Controller.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
class Controller extends BaseController
99
{
10-
public $nofilterPerAdminGroup = array(
10+
public $nofilterPerAdminGroup = [
1111
'offer',
1212
'module',
1313
'methodpay',
@@ -31,18 +31,18 @@ class Controller extends BaseController
3131
'invoices',
3232
'statusSystem',
3333
'firewall',
34-
);
34+
];
3535

3636
//Allowed controllers to no admin users use updateall
37-
public $controllerAllowUpdateAll = array(
37+
public $controllerAllowUpdateAll = [
3838
'rateCallshop',
3939
'sendCreditRates',
40-
);
40+
];
4141

4242
public function authorizedNoSession($value = false)
4343
{
4444

45-
$allow = array(
45+
$allow = [
4646
'site',
4747
'authentication',
4848
'overrides/authenticationOR',
@@ -66,7 +66,7 @@ public function authorizedNoSession($value = false)
6666
'mercadoPago',
6767
'molPay',
6868
'sms',
69-
);
69+
];
7070

7171
if ($value) {
7272

protected/components/LinuxAccess.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ class LinuxAccess
1111

1212
public static function exec($command)
1313
{
14-
Yii::log($command, 'error');
15-
return exec($command, $output);
14+
Yii::log('LinuxAccess::exec -> ' . $command, 'error');
15+
exec($command, $output);
16+
return $output;
1617
}
1718

1819
public static function getDirectoryDiskSpaceUsed($filter = '*', $directory = '/var/spool/asterisk/monitor/')

0 commit comments

Comments
 (0)