Completed
Push — master ( 135fa8...4a5eb0 )
by Alexey
09:51 queued 04:36
created
system/modules/Callbacks/Callbacks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
                 $callback->save();
48 48
                 if (!empty(App::$cur->config['site']['email'])) {
49 49
                     $subject = 'Новый отзыв';
50
-                    $text = 'Вы можете его посмотреть по этому адресу: <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/callbacks">http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/callbacks</a>';
51
-                    Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, App::$cur->config['site']['email'], $subject, $text);
50
+                    $text = 'Вы можете его посмотреть по этому адресу: <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/callbacks">http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/callbacks</a>';
51
+                    Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, App::$cur->config['site']['email'], $subject, $text);
52 52
                 }
53 53
                 Tools::redirect('/', 'Ваш отзыв был получен и появится после обработки администратором', 'success');
54 54
             }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         if (!empty($conf['files']['aditionTemplateFiels'])) {
86 86
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
87
-                $return[$file['file']] = '- ' . $file['name'];
87
+                $return[$file['file']] = '- '.$file['name'];
88 88
             }
89 89
         }
90 90
         return $return;
Please login to merge, or discard this patch.
system/modules/Files/appAdminControllers/content/managerForEditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             if ($file->type->group == 'image') {
26 26
                 echo "<img class='img-responsive' src ='{$file->path}?resize=200x200' />";
27 27
             } else {
28
-                echo "<img class='img-responsive' src ='/static/moduleAsset/Files/images/formats/" . pathinfo($file->path, PATHINFO_EXTENSION) . ".png' />";
28
+                echo "<img class='img-responsive' src ='/static/moduleAsset/Files/images/formats/".pathinfo($file->path, PATHINFO_EXTENSION).".png' />";
29 29
             }
30 30
             ?>
31 31
 
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/editor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,22 +12,22 @@  discard block
 block discarded – undo
12 12
     'Операции'
13 13
 ]);
14 14
 $modulePath = Module::getModulePath($module);
15
-$path = $modulePath . '/models';
16
-$config = Config::custom(App::$primary->path . '/modules/' . $module . '/generatorHash.php');
15
+$path = $modulePath.'/models';
16
+$config = Config::custom(App::$primary->path.'/modules/'.$module.'/generatorHash.php');
17 17
 if (file_exists($path)) {
18 18
     $files = array_slice(scandir($path), 2);
19 19
     foreach ($files as $file) {
20
-        if (is_dir($path . '/' . $file)) {
20
+        if (is_dir($path.'/'.$file)) {
21 21
             continue;
22 22
         }
23 23
         $modelName = pathinfo($file, PATHINFO_FILENAME);
24 24
         $table->addRow([
25 25
             $modelName,
26
-            (!empty($config['models/' . $file]) && $config['models/' . $file] == md5(file_get_contents($path . '/' . $file))) ? '<b class="text-success">Нету</b>' : '<b class="text-danger">Есть</b>',
26
+            (!empty($config['models/'.$file]) && $config['models/'.$file] == md5(file_get_contents($path.'/'.$file))) ? '<b class="text-success">Нету</b>' : '<b class="text-danger">Есть</b>',
27 27
             [
28 28
                 'class' => 'actionTd',
29
-                'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/editModel/' . $module . '/' . $modelName . '"><i class="glyphicon glyphicon-edit"></i></a>'
30
-                . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delModel/' . $module . '/' . $modelName . '"><i class="glyphicon glyphicon-remove"></i></a>'
29
+                'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/editModel/'.$module.'/'.$modelName.'"><i class="glyphicon glyphicon-edit"></i></a>'
30
+                . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delModel/'.$module.'/'.$modelName.'"><i class="glyphicon glyphicon-remove"></i></a>'
31 31
             ]
32 32
         ]);
33 33
     }
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     'Controllers'
51 51
 ];
52 52
 foreach ($types as $type) {
53
-    if (file_exists($modulePath . '/' . $type)) {
54
-        $files = array_slice(scandir($modulePath . '/' . $type), 2);
53
+    if (file_exists($modulePath.'/'.$type)) {
54
+        $files = array_slice(scandir($modulePath.'/'.$type), 2);
55 55
         foreach ($files as $file) {
56 56
             $table->addRow([
57 57
                 pathinfo($file, PATHINFO_FILENAME),
58 58
                 $type,
59 59
                 [
60 60
                     'class' => 'actionTd',
61
-                    'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/controllerEditor/' . $module . '/' . $type . '/' . pathinfo($file, PATHINFO_FILENAME) . '"><i class="glyphicon glyphicon-edit"></i></a>'
62
-                    . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delController/' . $module . '/' . $type . '/' . pathinfo($file, PATHINFO_FILENAME) . '"><i class="glyphicon glyphicon-remove"></i></a>'
61
+                    'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/controllerEditor/'.$module.'/'.$type.'/'.pathinfo($file, PATHINFO_FILENAME).'"><i class="glyphicon glyphicon-edit"></i></a>'
62
+                    . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delController/'.$module.'/'.$type.'/'.pathinfo($file, PATHINFO_FILENAME).'"><i class="glyphicon glyphicon-remove"></i></a>'
63 63
                 ]
64 64
             ]);
65 65
         }
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/modelEditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 $form = new Ui\Form();
3
-$form->begin((!empty($modelFullName) ? 'Изменение' : 'Создание') . ' модели');
3
+$form->begin((!empty($modelFullName) ? 'Изменение' : 'Создание').' модели');
4 4
 $cols = [
5 5
     'label' => ['type' => 'text', 'label' => 'Название'],
6 6
     'code' => ['type' => 'text', 'label' => 'Код'],
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/controllerEditor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@
 block discarded – undo
10 10
     'href' => "/admin/modules/createControllerMethod/{$module}/{$type}/{$controller}",
11 11
     'text' => 'Создать'
12 12
 ]);
13
-$class = CodeGenerator::parseClass(Modules::getModulePath($module) . '/' . $type . '/' . $controller . '.php');
13
+$class = CodeGenerator::parseClass(Modules::getModulePath($module).'/'.$type.'/'.$controller.'.php');
14 14
 foreach ($class->methods as $method) {
15 15
     $name = str_replace('Action', '', $method->name);
16 16
     $table->addRow([
17 17
         $name,
18 18
         [
19 19
             'class' => 'actionTd',
20
-            'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/editControllerMethod/' . $module . '/' . $type . '/' . $controller . '/' . $name . '"><i class="glyphicon glyphicon-edit"></i></a>'
21
-            . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delControllerMethod/' . $module . '/' . $type . '/' . $controller . '/' . $name . '"><i class="glyphicon glyphicon-remove"></i></a>'
20
+            'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/editControllerMethod/'.$module.'/'.$type.'/'.$controller.'/'.$name.'"><i class="glyphicon glyphicon-edit"></i></a>'
21
+            . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delControllerMethod/'.$module.'/'.$type.'/'.$controller.'/'.$name.'"><i class="glyphicon glyphicon-remove"></i></a>'
22 22
         ]
23 23
     ]);
24 24
 }
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/ModulesController.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $config = App::$primary->config;
22 22
         $config['defaultModule'] = $module;
23 23
         Config::save('app', $config);
24
-        Tools::redirect('/admin/modules', 'Модулем по умолчанию установлен: ' . $module, 'success');
24
+        Tools::redirect('/admin/modules', 'Модулем по умолчанию установлен: '.$module, 'success');
25 25
     }
26 26
 
27 27
     public function installAction()
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             foreach ($_GET['modules'] as $module) {
31 31
                 $this->modules->install($module);
32 32
             }
33
-            Tools::redirect('/admin/modules', 'Моудли ' . implode(',', $_GET['modules']) . ' установлены');
33
+            Tools::redirect('/admin/modules', 'Моудли '.implode(',', $_GET['modules']).' установлены');
34 34
         }
35 35
         $this->view->page();
36 36
     }
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
         $codeName = filter_input(INPUT_POST, 'codeName');
41 41
         if ($codeName && filter_input(INPUT_POST, 'name')) {
42 42
             $codeName = ucfirst($codeName);
43
-            if (file_exists(App::$primary->path . '/modules/' . $codeName . '.php')) {
43
+            if (file_exists(App::$primary->path.'/modules/'.$codeName.'.php')) {
44 44
                 Msg::add('Модуль с таким именем уже существует');
45 45
             } else {
46 46
                 $this->modules->createBlankModule(filter_input(INPUT_POST, 'name'), $codeName);
47 47
                 $config = App::$primary->config;
48 48
                 $config['modules'][] = $codeName;
49 49
                 Config::save('app', $config);
50
-                Tools::redirect('/admin/modules', 'Моудль ' . $codeName . ' создан и установлен');
50
+                Tools::redirect('/admin/modules', 'Моудль '.$codeName.' создан и установлен');
51 51
             }
52 52
         }
53 53
         $this->view->page();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function editorAction($module)
57 57
     {
58
-        if (!file_exists(Module::getModulePath($module) . '/generatorHash.php')) {
58
+        if (!file_exists(Module::getModulePath($module).'/generatorHash.php')) {
59 59
             Msg::add('Этот модуль был создан без помощи генератора. Возможности его изменения ограничены и могут привести к порче модуля', 'danger');
60 60
         }
61 61
         $this->view->page(['data' => compact('module')]);
@@ -63,18 +63,18 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function editModelAction($module, $modelName)
65 65
     {
66
-        $path = Modules::getModulePath($module) . '/models/' . $modelName . '.php';
66
+        $path = Modules::getModulePath($module).'/models/'.$modelName.'.php';
67 67
         if (!file_exists($path)) {
68
-            Tools::redirect('/admin/modules/edit/' . $module, 'Модель ' . $modelName . ' не найдена', 'danger');
68
+            Tools::redirect('/admin/modules/edit/'.$module, 'Модель '.$modelName.' не найдена', 'danger');
69 69
         }
70
-        include_once Modules::getModulePath($module) . '/models/' . $modelName . '.php';
71
-        $modelFullName = $module . '\\' . $modelName;
70
+        include_once Modules::getModulePath($module).'/models/'.$modelName.'.php';
71
+        $modelFullName = $module.'\\'.$modelName;
72 72
         $model = new $modelFullName;
73 73
         if (filter_input(INPUT_POST, 'codeName') && filter_input(INPUT_POST, 'name')) {
74 74
             $this->modules->generateModel($module, filter_input(INPUT_POST, 'name'), filter_input(INPUT_POST, 'codeName'), [
75 75
                 'cols' => $_POST['cols']
76 76
             ]);
77
-            Tools::redirect('/admin/modules/editor/' . $module, 'Модель ' . filter_input(INPUT_POST, 'codeName') . ' была сохранена');
77
+            Tools::redirect('/admin/modules/editor/'.$module, 'Модель '.filter_input(INPUT_POST, 'codeName').' была сохранена');
78 78
         }
79 79
         $this->view->page(['content' => 'modelEditor', 'data' => compact('module', 'modelName', 'modelFullName', 'model')]);
80 80
     }
@@ -85,20 +85,20 @@  discard block
 block discarded – undo
85 85
             $this->modules->generateModel($module, filter_input(INPUT_POST, 'name'), filter_input(INPUT_POST, 'codeName'), [
86 86
                 'cols' => $_POST['cols']
87 87
             ]);
88
-            Tools::redirect('/admin/modules/editor/' . $module, 'Модель ' . filter_input(INPUT_POST, 'codeName') . ' была создана');
88
+            Tools::redirect('/admin/modules/editor/'.$module, 'Модель '.filter_input(INPUT_POST, 'codeName').' была создана');
89 89
         }
90 90
         $this->view->page(['content' => 'modelEditor', 'data' => compact('module')]);
91 91
     }
92 92
 
93 93
     public function delModelAction($module, $modelName)
94 94
     {
95
-        unlink(App::$primary->path . '/modules/' . $module . '/models/' . $modelName . '.php');
96
-        $config = Config::custom(App::$primary->path . '/modules/' . $module . '/generatorHash.php');
97
-        if (isset($config['models/' . $modelName . '.php'])) {
98
-            unset($config['models/' . $modelName . '.php']);
99
-            Config::save(App::$primary->path . '/modules/' . $module . '/generatorHash.php', $config);
95
+        unlink(App::$primary->path.'/modules/'.$module.'/models/'.$modelName.'.php');
96
+        $config = Config::custom(App::$primary->path.'/modules/'.$module.'/generatorHash.php');
97
+        if (isset($config['models/'.$modelName.'.php'])) {
98
+            unset($config['models/'.$modelName.'.php']);
99
+            Config::save(App::$primary->path.'/modules/'.$module.'/generatorHash.php', $config);
100 100
         }
101
-        Tools::redirect('/admin/modules/editor/' . $module, 'Модель ' . $modelName . ' была удалена');
101
+        Tools::redirect('/admin/modules/editor/'.$module, 'Модель '.$modelName.' была удалена');
102 102
     }
103 103
 
104 104
     public function createControllerAction($module)
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $controllerType = filter_input(INPUT_POST, 'type');
107 107
         if ($controllerType) {
108 108
             $this->modules->createController($module, $controllerType);
109
-            Tools::redirect('/admin/modules/editor/' . $module, 'Контроллер был создан');
109
+            Tools::redirect('/admin/modules/editor/'.$module, 'Контроллер был создан');
110 110
         }
111 111
         $this->view->page();
112 112
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $url = filter_input(INPUT_POST, 'url');
122 122
         if ($url) {
123 123
             $this->modules->addActionToController($module, $type, $controller, $url);
124
-            Tools::redirect('/admin/modules/editor/' . $module, 'Контроллер был изменен');
124
+            Tools::redirect('/admin/modules/editor/'.$module, 'Контроллер был изменен');
125 125
         }
126 126
         $this->view->page(['data' => compact('module', 'type', 'controller')]);
127 127
     }
Please login to merge, or discard this patch.
system/modules/Modules/tpls/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 class <?= $codeName; ?> extends \Model {
6 6
 //modelParams<?php
7 7
 if (!empty($name)) {
8
-    echo "\n    static " . '$objectName = \'' . $name . "';";
8
+    echo "\n    static ".'$objectName = \''.$name."';";
9 9
 }
10 10
 if (!empty($labels)) {
11
-    echo "\n    static " . '$labels = [' . CodeGenerator::genArray($labels, 1) . "\n    ];";
11
+    echo "\n    static ".'$labels = ['.CodeGenerator::genArray($labels, 1)."\n    ];";
12 12
 }
13 13
 if (!empty($cols)) {
14
-    echo "\n    static " . '$cols = [' . CodeGenerator::genArray($cols, 1) . "\n    ];";
14
+    echo "\n    static ".'$cols = ['.CodeGenerator::genArray($cols, 1)."\n    ];";
15 15
 }
16 16
 ?>
17 17
 //!modelParams
Please login to merge, or discard this patch.
system/modules/Money/models/Reward.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     public function checkBlocked()
64 64
     {
65 65
         $blocked = Wallet\Block::getList(['where' => [
66
-                        ['data', 'reward:' . $this->id],
66
+                        ['data', 'reward:'.$this->id],
67 67
                         [
68 68
                             ['date_expired', '0000-00-00 00:00:00'],
69 69
                             ['date_expired', date('Y-m-d H:i:s'), '>', 'OR']
Please login to merge, or discard this patch.
system/modules/Money/models/Transfer.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
     public static function itemName($item)
40 40
     {
41
-        return $item->pk() . '. ' . $item->name();
41
+        return $item->pk().'. '.$item->name();
42 42
     }
43 43
 
44 44
     public static $dataManagers = [
@@ -48,16 +48,16 @@  discard block
 block discarded – undo
48 48
             ],
49 49
             'name' => 'Переводы',
50 50
             'cols' => [
51
-                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create'
51
+                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create'
52 52
             ],
53 53
             'actions' => [
54 54
                 'Money\CancelTransfer', 'Money\CompleteTransfer'
55 55
             ],
56 56
             'sortable' => [
57
-                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create'
57
+                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create'
58 58
             ],
59 59
             'filters' => [
60
-                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create'
60
+                'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create'
61 61
             ]
62 62
         ]
63 63
     ];
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
     public function name()
184 184
     {
185
-        return 'Перевод на сумму ' . $this->amount . ' ' . $this->currency->name . ' от ' . $this->user->name() . ' для ' . $this->toUser->name();
185
+        return 'Перевод на сумму '.$this->amount.' '.$this->currency->name.' от '.$this->user->name().' для '.$this->toUser->name();
186 186
     }
187 187
 
188 188
     public function cancel()
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
         }
193 193
 
194 194
         $this->canceled = 1;
195
-        $block = \Money\Wallet\Block::get('Money\Transfer:' . $this->id, 'data');
195
+        $block = \Money\Wallet\Block::get('Money\Transfer:'.$this->id, 'data');
196 196
         if ($block) {
197 197
             $block->delete();
198 198
         }
199 199
         $wallets = \App::$cur->money->getUserWallets($this->user_id);
200 200
         $text = 'Отмена перевода средств';
201 201
         $wallets[$this->currency_id]->diff($this->amount, $text);
202
-        \App::$cur->users->AddUserActivity($this->user_id, 4, $text . '<br />' . (float) $this->amount . ' ' . $wallets[$this->currency_id]->currency->acronym());
202
+        \App::$cur->users->AddUserActivity($this->user_id, 4, $text.'<br />'.(float) $this->amount.' '.$wallets[$this->currency_id]->currency->acronym());
203 203
         $this->save();
204 204
         return true;
205 205
     }
@@ -211,14 +211,14 @@  discard block
 block discarded – undo
211 211
         }
212 212
 
213 213
         $this->complete = 1;
214
-        $block = \Money\Wallet\Block::get('Money\Transfer:' . $this->id, 'data');
214
+        $block = \Money\Wallet\Block::get('Money\Transfer:'.$this->id, 'data');
215 215
         if ($block) {
216 216
             $block->delete();
217 217
         }
218 218
         $wallets = \App::$cur->money->getUserWallets($this->to_user_id);
219
-        $text = 'Перевод средств от ' . $this->user->name() . '.' . ($this->comment ? ' Комментарий:' . $this->comment : '');
219
+        $text = 'Перевод средств от '.$this->user->name().'.'.($this->comment ? ' Комментарий:'.$this->comment : '');
220 220
         $wallets[$this->currency_id]->diff($this->amount, $text);
221
-        \App::$cur->users->AddUserActivity($this->to_user_id, 4, $text . '<br />' . (float) $this->amount . ' ' . $wallets[$this->currency_id]->currency->acronym());
221
+        \App::$cur->users->AddUserActivity($this->to_user_id, 4, $text.'<br />'.(float) $this->amount.' '.$wallets[$this->currency_id]->currency->acronym());
222 222
         $this->save();
223 223
         return true;
224 224
     }
Please login to merge, or discard this patch.