@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $freeExtension = '2200100'; |
113 | 113 | for ($i = 100; ; $i++) { |
114 | 114 | $freeExtension = "2200{$i}"; |
115 | - if ( ! in_array(['number' => $freeExtension], $result, false)) { |
|
115 | + if (!in_array(['number' => $freeExtension], $result, false)) { |
|
116 | 116 | break; |
117 | 117 | } |
118 | 118 | } |
@@ -421,8 +421,8 @@ discard block |
||
421 | 421 | $relatedModel = $relation->getReferencedModel(); |
422 | 422 | $referencedFields = is_array($referencedFields) ? $referencedFields : [$referencedFields]; |
423 | 423 | foreach ($referencedFields as $referencedField) { |
424 | - $parameters = [ |
|
425 | - 'conditions' => $referencedField . '= :oldNumber:', |
|
424 | + $parameters = [ |
|
425 | + 'conditions' => $referencedField.'= :oldNumber:', |
|
426 | 426 | 'bind' => ['oldNumber' => $snapShotData['number']], |
427 | 427 | ]; |
428 | 428 | $relatedRecords = $relatedModel::find($parameters); |
@@ -476,8 +476,8 @@ discard block |
||
476 | 476 | $relatedModel = $relation->getReferencedModel(); |
477 | 477 | $referencedFields = is_array($referencedFields) ? $referencedFields : [$referencedFields]; |
478 | 478 | foreach ($referencedFields as $referencedField) { |
479 | - $parameters = [ |
|
480 | - 'conditions' => $referencedField . '= :Number:', |
|
479 | + $parameters = [ |
|
480 | + 'conditions' => $referencedField.'= :Number:', |
|
481 | 481 | 'bind' => ['Number' => $this->number], |
482 | 482 | ]; |
483 | 483 | $relatedRecords = $relatedModel::find($parameters); |
@@ -32,32 +32,32 @@ discard block |
||
32 | 32 | |
33 | 33 | $from = $this->generalSettings['MailSMTPSenderAddress']; |
34 | 34 | if (empty($from)) { |
35 | - $from = $this->generalSettings['MailSMTPUsername']; |
|
35 | + $from = $this->generalSettings['MailSMTPUsername']; |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | $timezone = $this->generalSettings['PBXTimezone']; |
39 | 39 | $msmtpPath = Util::which('msmtp'); |
40 | 40 | |
41 | - $conf = "[general]\n" . |
|
42 | - "format=wav49|gsm|wav\n" . |
|
43 | - "attach=yes\n" . |
|
44 | - "maxmsg=100\n" . |
|
45 | - "maxsecs=120\n" . |
|
46 | - "maxgreet=60\n" . |
|
47 | - "maxsilence=10\n" . |
|
48 | - "silencethreshold=128\n" . |
|
49 | - "maxlogins=3\n" . |
|
50 | - "moveheard=yes\n" . |
|
51 | - "charset=UTF-8\n" . |
|
52 | - "pbxskip=yes\n" . |
|
53 | - "fromstring=VoiceMail\n" . |
|
54 | - "emailsubject={$emailsubject}\n" . |
|
55 | - "emailbody={$emailbody}\n\n{$emailfooter}\n" . |
|
56 | - "emaildateformat=%A, %d %B %Y в %H:%M:%S\n" . |
|
57 | - "pagerdateformat=%T %D\n" . |
|
58 | - "mailcmd={$msmtpPath} --file=/etc/msmtp.conf -t\n" . |
|
59 | - "serveremail={$from}\n\n" . |
|
60 | - "[zonemessages]\n" . |
|
41 | + $conf = "[general]\n". |
|
42 | + "format=wav49|gsm|wav\n". |
|
43 | + "attach=yes\n". |
|
44 | + "maxmsg=100\n". |
|
45 | + "maxsecs=120\n". |
|
46 | + "maxgreet=60\n". |
|
47 | + "maxsilence=10\n". |
|
48 | + "silencethreshold=128\n". |
|
49 | + "maxlogins=3\n". |
|
50 | + "moveheard=yes\n". |
|
51 | + "charset=UTF-8\n". |
|
52 | + "pbxskip=yes\n". |
|
53 | + "fromstring=VoiceMail\n". |
|
54 | + "emailsubject={$emailsubject}\n". |
|
55 | + "emailbody={$emailbody}\n\n{$emailfooter}\n". |
|
56 | + "emaildateformat=%A, %d %B %Y в %H:%M:%S\n". |
|
57 | + "pagerdateformat=%T %D\n". |
|
58 | + "mailcmd={$msmtpPath} --file=/etc/msmtp.conf -t\n". |
|
59 | + "serveremail={$from}\n\n". |
|
60 | + "[zonemessages]\n". |
|
61 | 61 | "local={$timezone}|'vm-received' q 'digits/at' H 'hours' M 'minutes'\n\n"; |
62 | 62 | |
63 | 63 | $conf .= "[voicemailcontext]\n"; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if (empty($mail_box)) { |
67 | 67 | $mail_box = $this->generalSettings['SystemNotificationsEmail']; |
68 | 68 | } |
69 | - $conf .= "admin => admin," . Util::translate("user") . ",{$mail_box},,attach=yes|tz=local\n"; |
|
69 | + $conf .= "admin => admin,".Util::translate("user").",{$mail_box},,attach=yes|tz=local\n"; |
|
70 | 70 | /* |
71 | 71 | $peers = Sip::find('type="peer"'); |
72 | 72 | foreach ($peers as $peer){ |
@@ -86,6 +86,6 @@ discard block |
||
86 | 86 | } |
87 | 87 | //*/ |
88 | 88 | |
89 | - Util::fileWriteContent($this->config->path('asterisk.astetcdir') . '/voicemail.conf', $conf); |
|
89 | + Util::fileWriteContent($this->config->path('asterisk.astetcdir').'/voicemail.conf', $conf); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | \ No newline at end of file |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $record = ConferenceRooms::findFirstByUniqid($uniqid); |
38 | 38 | if ($record === null) { |
39 | 39 | $record = new ConferenceRooms(); |
40 | - $record->uniqid = Extensions::TYPE_CONFERENCE.strtoupper('-' . md5(time())); |
|
40 | + $record->uniqid = Extensions::TYPE_CONFERENCE.strtoupper('-'.md5(time())); |
|
41 | 41 | $record->extension = Extensions::getNextFreeApplicationNumber(); |
42 | 42 | } |
43 | 43 | $this->view->form = new ConferenceRoomEditForm($record); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function saveAction(): void |
53 | 53 | { |
54 | - if ( ! $this->request->isPost()) { |
|
54 | + if (!$this->request->isPost()) { |
|
55 | 55 | return; |
56 | 56 | } |
57 | 57 | $this->db->begin(); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | // Заполним параметры внутреннего номера |
74 | - if ( ! $this->updateExtension($extension, $data)) { |
|
74 | + if (!$this->updateExtension($extension, $data)) { |
|
75 | 75 | $this->view->success = false; |
76 | 76 | $this->db->rollback(); |
77 | 77 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | // Заполним параметры участников очереди |
82 | - if ( ! $this->updateConferenceRoom($room, $data)) { |
|
82 | + if (!$this->updateConferenceRoom($room, $data)) { |
|
83 | 83 | $this->view->success = false; |
84 | 84 | $this->db->rollback(); |
85 | 85 | |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $room->$name = $data[$name]; |
136 | 136 | break; |
137 | 137 | default: |
138 | - if ( ! array_key_exists($name, $data)) { |
|
138 | + if (!array_key_exists($name, $data)) { |
|
139 | 139 | continue 2; |
140 | 140 | } |
141 | 141 | $room->$name = $data[$name]; |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function indexAction(): void |
22 | 22 | { |
23 | - $this->view->mohFiles = SoundFiles::find('category="' . SoundFiles::CATEGORY_MOH . '"'); |
|
24 | - $this->view->customFiles = SoundFiles::find('category="' . SoundFiles::CATEGORY_CUSTOM . '"'); |
|
23 | + $this->view->mohFiles = SoundFiles::find('category="'.SoundFiles::CATEGORY_MOH.'"'); |
|
24 | + $this->view->customFiles = SoundFiles::find('category="'.SoundFiles::CATEGORY_CUSTOM.'"'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function saveAction(): void |
59 | 59 | { |
60 | - if ( ! $this->request->isPost()) { |
|
60 | + if (!$this->request->isPost()) { |
|
61 | 61 | return; |
62 | 62 | } |
63 | 63 | $data = $this->request->getPost(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | case "id": |
73 | 73 | break; |
74 | 74 | default: |
75 | - if ( ! array_key_exists($name, $data)) { |
|
75 | + if (!array_key_exists($name, $data)) { |
|
76 | 76 | continue 2; |
77 | 77 | } |
78 | 78 | $soundFile->$name = $data[$name]; |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | return; |
105 | 105 | } |
106 | 106 | $soundFile = SoundFiles::findFirstById($id); |
107 | - if ($soundFile === null){ |
|
107 | + if ($soundFile === null) { |
|
108 | 108 | return; |
109 | 109 | } |
110 | - $errors = false; |
|
111 | - if (! $soundFile->delete()) { |
|
110 | + $errors = false; |
|
111 | + if (!$soundFile->delete()) { |
|
112 | 112 | $errors = $soundFile->getMessages(); |
113 | 113 | } |
114 | 114 | if ($errors) { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | ], |
75 | 75 | ], |
76 | 76 | ]; |
77 | - $extensions = Extensions::find($parameters); |
|
77 | + $extensions = Extensions::find($parameters); |
|
78 | 78 | foreach ($extensions as $record) { |
79 | 79 | $forwardingExtensions[$record->number] = $record ? $record->getRepresent() : ''; |
80 | 80 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function modifyAction(string $ruleId = '') :void |
95 | 95 | { |
96 | - if ((int)$ruleId === 1) { |
|
96 | + if ((int) $ruleId === 1) { |
|
97 | 97 | $this->forward('incoming-routes/index'); |
98 | 98 | } // Первая строка маршрут по умолчанию, ее не трогаем. |
99 | 99 | |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | ], |
124 | 124 | ], |
125 | 125 | ]; |
126 | - $extensions = Extensions::find($parameters); |
|
126 | + $extensions = Extensions::find($parameters); |
|
127 | 127 | foreach ($extensions as $record) { |
128 | 128 | $forwardingExtensions[$record->number] = $record ? $record->getRepresent() : ''; |
129 | 129 | } |
130 | - $form = new IncomingRouteEditForm( |
|
130 | + $form = new IncomingRouteEditForm( |
|
131 | 131 | $rule, |
132 | 132 | ['extensions' => $forwardingExtensions, 'providers' => $providersList] |
133 | 133 | ); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function saveAction(): void |
143 | 143 | { |
144 | - if ( ! $this->request->isPost()) { |
|
144 | + if (!$this->request->isPost()) { |
|
145 | 145 | return; |
146 | 146 | } |
147 | 147 | $this->db->begin(); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | case 'priority': |
164 | 164 | if (empty($data[$name])) { |
165 | 165 | // Найдем строчку с самым высоким приоиртетом, кроме 9999 |
166 | - $params = [ |
|
166 | + $params = [ |
|
167 | 167 | 'column' => 'priority', |
168 | 168 | 'conditions' => 'priority != 9999', |
169 | 169 | ]; |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | public function deleteAction(string $ruleId) |
209 | 209 | { |
210 | - if ((int)$ruleId === 1) { |
|
210 | + if ((int) $ruleId === 1) { |
|
211 | 211 | $this->forward('incoming-routes/index'); // Первая строка маршрут по умолчанию, ее не трогаем. |
212 | 212 | } |
213 | 213 | |
@@ -226,20 +226,20 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function changePriorityAction(string $ruleId = '') |
228 | 228 | { |
229 | - if ((int)$ruleId === 1 || $ruleId==='') { |
|
229 | + if ((int) $ruleId === 1 || $ruleId === '') { |
|
230 | 230 | return; |
231 | 231 | } // Первая строка маршрут по умолчанию, ее не трогаем. |
232 | 232 | |
233 | 233 | $this->view->disable(); |
234 | 234 | $result = false; |
235 | 235 | |
236 | - if ( ! $this->request->isPost()) { |
|
236 | + if (!$this->request->isPost()) { |
|
237 | 237 | return; |
238 | 238 | } |
239 | 239 | $data = $this->request->getPost(); |
240 | 240 | $rule = IncomingRoutingTable::findFirstById($ruleId); |
241 | 241 | if ($rule !== null) { |
242 | - $rule->priority = (int)$data['newPriority']; |
|
242 | + $rule->priority = (int) $data['newPriority']; |
|
243 | 243 | $result = $rule->update(); |
244 | 244 | } |
245 | 245 | echo json_encode($result); |
@@ -93,9 +93,9 @@ |
||
93 | 93 | |
94 | 94 | $form = new CallQueueEditForm( |
95 | 95 | $queue, [ |
96 | - 'extensions' => $extensionList, |
|
97 | - 'soundfiles' => $soundfilesList, |
|
98 | - ] |
|
96 | + 'extensions' => $extensionList, |
|
97 | + 'soundfiles' => $soundfilesList, |
|
98 | + ] |
|
99 | 99 | ); |
100 | 100 | $this->view->form = $form; |
101 | 101 | $this->view->extensionsTable = $queueMembersList; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $extensionList = []; |
39 | 39 | if ($queue === null) { |
40 | 40 | $queue = new CallQueues(); |
41 | - $queue->uniqid = Extensions::TYPE_QUEUE . strtoupper('-' . md5($queue->id . time())); |
|
41 | + $queue->uniqid = Extensions::TYPE_QUEUE.strtoupper('-'.md5($queue->id.time())); |
|
42 | 42 | $queue->caller_hear = 'moh'; |
43 | 43 | $queue->seconds_to_ring_each_member = 20; |
44 | 44 | $queue->seconds_for_wrapup = 15; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | 'queue' => $queue->uniqid, |
56 | 56 | ], |
57 | 57 | ]; |
58 | - $members = CallQueueMembers::find($parameters); |
|
58 | + $members = CallQueueMembers::find($parameters); |
|
59 | 59 | foreach ($members as $member) { |
60 | 60 | $queueMembersList[] = [ |
61 | 61 | 'id' => $member->id, |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $soundfilesList[$soundFile->id] = $soundFile->name; |
92 | 92 | } |
93 | 93 | |
94 | - $form = new CallQueueEditForm( |
|
94 | + $form = new CallQueueEditForm( |
|
95 | 95 | $queue, [ |
96 | 96 | 'extensions' => $extensionList, |
97 | 97 | 'soundfiles' => $soundfilesList, |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function saveAction(): void |
111 | 111 | { |
112 | - if ( ! $this->request->isPost()) { |
|
112 | + if (!$this->request->isPost()) { |
|
113 | 113 | return; |
114 | 114 | } |
115 | 115 | $this->db->begin(); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | // Заполним параметры внутреннего номера |
133 | - if ( ! $this->updateExtension($extension, $data)) { |
|
133 | + if (!$this->updateExtension($extension, $data)) { |
|
134 | 134 | $this->view->success = false; |
135 | 135 | $this->db->rollback(); |
136 | 136 | |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | // Заполним параметры пользователя |
141 | - if ( ! $this->updateQueue($queue, $data)) { |
|
141 | + if (!$this->updateQueue($queue, $data)) { |
|
142 | 142 | $this->view->success = false; |
143 | 143 | $this->db->rollback(); |
144 | 144 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } |
147 | 147 | |
148 | 148 | // Заполним параметры участников очереди |
149 | - if ( ! $this->updateQueueMembers($data)) { |
|
149 | + if (!$this->updateQueueMembers($data)) { |
|
150 | 150 | $this->view->success = false; |
151 | 151 | $this->db->rollback(); |
152 | 152 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | case "periodic_announce_sound_id": |
215 | 215 | case "redirect_to_extension_if_repeat_exceeded": |
216 | 216 | case "redirect_to_extension_if_empty": |
217 | - if ( ! array_key_exists($name, $data) || empty($data[$name])) { |
|
217 | + if (!array_key_exists($name, $data) || empty($data[$name])) { |
|
218 | 218 | $queue->$name = null; |
219 | 219 | continue 2; |
220 | 220 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | break; |
224 | 224 | case "timeout_to_redirect_to_extension": |
225 | 225 | case "number_unanswered_calls_to_redirect": |
226 | - if ( ! array_key_exists($name, $data)) { |
|
226 | + if (!array_key_exists($name, $data)) { |
|
227 | 227 | continue 2; |
228 | 228 | } |
229 | 229 | if (empty($data[$name])) { |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | break; |
235 | 235 | case "timeout_extension": |
236 | - if ( ! array_key_exists($name, $data) |
|
236 | + if (!array_key_exists($name, $data) |
|
237 | 237 | || empty($data[$name]) |
238 | 238 | || (array_key_exists('timeout_to_redirect_to_extension', $data) |
239 | 239 | && intval($data['timeout_to_redirect_to_extension']) === 0)) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | break; |
246 | 246 | case "redirect_to_extension_if_unanswered": |
247 | - if ( ! array_key_exists($name, $data) |
|
247 | + if (!array_key_exists($name, $data) |
|
248 | 248 | || empty($data[$name]) |
249 | 249 | || (array_key_exists('number_unanswered_calls_to_redirect', $data) |
250 | 250 | && intval($data['number_unanswered_calls_to_redirect']) === 0)) { |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | |
256 | 256 | break; |
257 | 257 | default: |
258 | - if ( ! array_key_exists($name, $data)) { |
|
258 | + if (!array_key_exists($name, $data)) { |
|
259 | 259 | continue 2; |
260 | 260 | } |
261 | 261 | $queue->$name = $data[$name]; |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | // Обновим настройки у существующих членов очереди |
286 | 286 | $membersTable = json_decode($data['members']); |
287 | 287 | foreach ($membersTable as $member) { |
288 | - $parameters = [ |
|
288 | + $parameters = [ |
|
289 | 289 | 'conditions' => 'extension = :number: AND queue=:uniqid:', |
290 | 290 | 'bind' => [ |
291 | 291 | 'number' => $member->number, |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | |
360 | 360 | $this->db->begin(); |
361 | 361 | $extension = $queue->Extensions; |
362 | - if ( ! $extension->delete()) { |
|
362 | + if (!$extension->delete()) { |
|
363 | 363 | $errors = $extension->getMessages(); |
364 | 364 | } |
365 | 365 | if ($errors) { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $provider = Providers::findFirstByUniqid($uniqid); |
51 | 51 | |
52 | 52 | if ($provider === null) { |
53 | - $uniqid = strtoupper('SIP-' . time()); |
|
53 | + $uniqid = strtoupper('SIP-'.time()); |
|
54 | 54 | $provider = new Providers(); |
55 | 55 | $provider->type = 'SIP'; |
56 | 56 | $provider->uniqid = $uniqid; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $provider = Providers::findFirstByUniqid($uniqid); |
79 | 79 | |
80 | 80 | if ($provider === null) { |
81 | - $uniqid = strtoupper('IAX-' . time()); |
|
81 | + $uniqid = strtoupper('IAX-'.time()); |
|
82 | 82 | $provider = new Providers(); |
83 | 83 | $provider->type = 'IAX'; |
84 | 84 | $provider->uniqid = $uniqid; |
@@ -163,14 +163,14 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function saveAction(string $type): void |
165 | 165 | { |
166 | - if ( ! $this->request->isPost()) { |
|
166 | + if (!$this->request->isPost()) { |
|
167 | 167 | $this->forward('network/index'); |
168 | 168 | } |
169 | 169 | $this->db->begin(); |
170 | 170 | $data = $this->request->getPost(); |
171 | 171 | |
172 | 172 | // Заполним параметры провайдера и его SIP IAX записей |
173 | - if ( ! $this->saveProvider($data, $type)) { |
|
173 | + if (!$this->saveProvider($data, $type)) { |
|
174 | 174 | $this->view->success = false; |
175 | 175 | $this->db->rollback(); |
176 | 176 | |
@@ -291,14 +291,14 @@ discard block |
||
291 | 291 | $errors = false; |
292 | 292 | if ($provider->Iax) { |
293 | 293 | $iax = $provider->Iax; |
294 | - if ( ! $iax->delete()) { |
|
294 | + if (!$iax->delete()) { |
|
295 | 295 | $errors = $iax->getMessages(); |
296 | 296 | } |
297 | 297 | } |
298 | 298 | |
299 | 299 | if ($errors === false && $provider->Sip) { |
300 | 300 | $sip = $provider->Sip; |
301 | - if ( ! $sip->delete()) { |
|
301 | + if (!$sip->delete()) { |
|
302 | 302 | $errors = $sip->getMessages(); |
303 | 303 | } |
304 | 304 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $app = DialplanApplications::findFirstByUniqid($uniqid); |
38 | 38 | if ($app === null) { |
39 | 39 | $app = new DialplanApplications(); |
40 | - $app->uniqid = strtoupper('DIALPLAN-APP-' . md5($app->id . time())); |
|
40 | + $app->uniqid = strtoupper('DIALPLAN-APP-'.md5($app->id.time())); |
|
41 | 41 | $app->type = 'php'; |
42 | 42 | $app->extension = Extensions::getNextFreeApplicationNumber(); |
43 | 43 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function saveAction(): void |
57 | 57 | { |
58 | - if ( ! $this->request->isPost()) { |
|
58 | + if (!$this->request->isPost()) { |
|
59 | 59 | return; |
60 | 60 | } |
61 | 61 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | // Заполним параметры внутреннего номера |
81 | - if ( ! $this->updateExtension($extension, $data)) { |
|
81 | + if (!$this->updateExtension($extension, $data)) { |
|
82 | 82 | $this->view->success = false; |
83 | 83 | $this->db->rollback(); |
84 | 84 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | // Заполним параметры пользователя |
89 | - if ( ! $this->updateDialplanApplication($appRecord, $data)) { |
|
89 | + if (!$this->updateDialplanApplication($appRecord, $data)) { |
|
90 | 90 | $this->view->success = false; |
91 | 91 | $this->db->rollback(); |
92 | 92 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $this->db->begin(); |
182 | 182 | $errors = false; |
183 | 183 | $extension = $appRecord->Extensions; |
184 | - if ( ! $extension->delete()) { |
|
184 | + if (!$extension->delete()) { |
|
185 | 185 | $errors = $extension->getMessages(); |
186 | 186 | } |
187 | 187 |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | } |
92 | 92 | $newResult = $this->$currentAdvice(); |
93 | - if ( ! empty($newResult)) { |
|
93 | + if (!empty($newResult)) { |
|
94 | 94 | $arrMessages[] = $newResult; |
95 | 95 | } |
96 | 96 | $managedCache->set( |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $result = []; |
109 | 109 | foreach ($arrMessages as $message) { |
110 | 110 | foreach ($message as $key => $value) { |
111 | - if ( ! empty($value)) { |
|
111 | + if (!empty($value)) { |
|
112 | 112 | $result[$key][] = $value; |
113 | 113 | } |
114 | 114 | } |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | { |
247 | 247 | $messages = []; |
248 | 248 | $licKey = PbxSettings::getValueByKey('PBXLicense'); |
249 | - $language = PbxSettings::getValueByKey('WebAdminLanguage'); |
|
249 | + $language = PbxSettings::getValueByKey('WebAdminLanguage'); |
|
250 | 250 | |
251 | - if ( ! empty($licKey)) { |
|
251 | + if (!empty($licKey)) { |
|
252 | 252 | $checkBaseFeature = $this->license->featureAvailable(33); |
253 | 253 | if ($checkBaseFeature['success'] === false) { |
254 | 254 | if ($language === 'ru') { |