Completed
Push — master ( bb267d...fbe197 )
by Alexey
05:29
created
system/modules/Dashboard/Dashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         $modelName = $item->model;
16 16
         $relItem = $modelName::get($item->$col);
17 17
         if ($relItem) {
18
-            return "<a href='/admin/" . str_replace('\\', '/view/', $modelName) . "/" . $item->$col . "'>" . $relItem->name() . "</a>";
18
+            return "<a href='/admin/".str_replace('\\', '/view/', $modelName)."/".$item->$col."'>".$relItem->name()."</a>";
19 19
         }
20 20
         return 'Ресурс удален';
21 21
     }
Please login to merge, or discard this patch.
system/modules/Chats/widgets/chat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     echo 'Чат не найден';
12 12
     return;
13 13
 }
14
-$id = 'chat-' . Tools::randomString();
14
+$id = 'chat-'.Tools::randomString();
15 15
 $msgTemplate = '<div class="chats-chat-message"><b title="message-date_create user-fullName">user-firstName</b>: message-text</div>';
16 16
 $events = $chat->events(['order' => ['date_create', 'DESC'], 'key' => false]);
17 17
 $lastDate = $events ? $events[0]->date_create : 0;
Please login to merge, or discard this patch.
system/modules/Recaptcha/Recaptcha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         $data['secret'] = $this->config['secret'];
30 30
         $data['response'] = $gResponse;
31
-        $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?' . http_build_query($data));
31
+        $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?'.http_build_query($data));
32 32
         if ($response) {
33 33
             return json_decode($response);
34 34
         }
Please login to merge, or discard this patch.
system/modules/Migrations/appAdminControllers/content/Map/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 $form->begin('Карта миграции');
5 5
 function drawPath($path, $form, $models, $objects)
6 6
 {
7
-    $form->input('select', 'type[' . $path->id . ']', $path->item, [
7
+    $form->input('select', 'type['.$path->id.']', $path->item, [
8 8
         'values' => [
9 9
     '' => 'Выберите',
10 10
     'continue' => 'Пропустить',
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     'object' => [
13 13
         'text' => 'Объект',
14 14
         'input' => [
15
-            'name' => 'typeOptions[' . $path->id . ']',
15
+            'name' => 'typeOptions['.$path->id.']',
16 16
             'type' => 'select',
17 17
             'source' => 'array',
18 18
             'sourceArray' => $models
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     if (empty($objectsCols[$param->object_id])) {
50 50
         $modelName = $param->object->model;
51 51
         foreach (array_keys($modelName::$cols) as $colName) {
52
-            $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName])?$modelName::$labels[$colName]:$colName;
52
+            $objectsCols[$param->object_id][$colName] = !empty($modelName::$labels[$colName]) ? $modelName::$labels[$colName] : $colName;
53 53
         }
54 54
     }
55 55
     $modelName = $param->object->model;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $relations[$relName] = $relName;
59 59
     }
60 60
     if ($parent) {
61
-        $parserName = '\Migrations\Parser\Object\\' . ucfirst($parent->type);
61
+        $parserName = '\Migrations\Parser\Object\\'.ucfirst($parent->type);
62 62
         $parser = new $parserName;
63 63
         $parser->param = $parent;
64 64
         $values = $parser->editor();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             'value' => [
73 73
                 'text' => 'Значение',
74 74
                 'input' => [
75
-                    'name' => 'paramOptions[' . $param->id . ']',
75
+                    'name' => 'paramOptions['.$param->id.']',
76 76
                     'type' => 'select',
77 77
                     'source' => 'array',
78 78
                     'sourceArray' => $objectsCols[$param->object_id],
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             'relation' => [
85 85
                 'text' => 'Зависимость',
86 86
                 'input' => [
87
-                    'name' => 'paramOptions[' . $param->id . ']',
87
+                    'name' => 'paramOptions['.$param->id.']',
88 88
                     'type' => 'select',
89 89
                     'source' => 'array',
90 90
                     'sourceArray' => $relations,
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             'object' => [
97 97
                 'text' => 'Объект',
98 98
                 'input' => [
99
-                    'name' => 'paramOptions[' . $param->id . ']',
99
+                    'name' => 'paramOptions['.$param->id.']',
100 100
                     'type' => 'select',
101 101
                     'source' => 'array',
102 102
                     'sourceArray' => $selectArrays[$param->object->migration_id],
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             'objectLink' => [
109 109
                 'text' => 'Ссылка на объект',
110 110
                 'input' => [
111
-                    'name' => 'paramOptions[' . $param->id . ']',
111
+                    'name' => 'paramOptions['.$param->id.']',
112 112
                     'type' => 'select',
113 113
                     'source' => 'array',
114 114
                     'sourceArray' => $selectArrays[$param->object->migration_id],
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             'newObject' => [
121 121
                 'text' => 'Новый объект',
122 122
                 'input' => [
123
-                    'name' => 'paramOptions[' . $param->id . ']',
123
+                    'name' => 'paramOptions['.$param->id.']',
124 124
                     'type' => 'select',
125 125
                     'source' => 'array',
126 126
                     'sourceArray' => $models,
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             'custom' => [
133 133
                 'text' => 'Свой класс обработки',
134 134
                 'input' => [
135
-                    'name' => 'paramOptions[' . $param->id . ']',
135
+                    'name' => 'paramOptions['.$param->id.']',
136 136
                     'type' => 'text',
137 137
                     'options' => [
138 138
                         'value' => $param->value
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             ]
142 142
         ];
143 143
     }
144
-    $form->input('select', 'param[' . $param->id . ']', $param->code, ['values' => $values,
144
+    $form->input('select', 'param['.$param->id.']', $param->code, ['values' => $values,
145 145
         'value' => $param->type
146 146
     ]);
147 147
     foreach ($param->childs as $child) {
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Walker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                     $walker->migration = $this->migration;
34 34
                     $walker->map = $this->map;
35 35
                     $walker->data = &$this->data[$path->item];
36
-                    $walker->curPath = $this->curPath . $path->item . '/';
36
+                    $walker->curPath = $this->curPath.$path->item.'/';
37 37
                     $walker->mapPath = $path;
38 38
                     $walker->mapPathParent = $this->mapPath;
39 39
                     $walker->migtarionLog = $this->migtarionLog;
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Parser/Object.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@
 block discarded – undo
62 62
                         if ($param->type == 'custom') {
63 63
                             $parserName = $param->value;
64 64
                         } else {
65
-                            $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type);
65
+                            $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type);
66 66
                         }
67
-                        if (!in_array($parserName, ['\Migrations\Parser\Object\ObjectLink','Exchange1c\Parser\Item\Images', '\Migrations\Parser\Object\Value', '\Migrations\Parser\Object\Relation', '\Migrations\Parser\Object\ParamsList'])) {
67
+                        if (!in_array($parserName, ['\Migrations\Parser\Object\ObjectLink', 'Exchange1c\Parser\Item\Images', '\Migrations\Parser\Object\Value', '\Migrations\Parser\Object\Relation', '\Migrations\Parser\Object\ParamsList'])) {
68 68
                             var_dump($parserName);
69 69
                             exit();
70 70
                         }
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Parser/Object/ParamsList.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 ($param->type == 'custom') {
26 26
                     $parserName = $param->value;
27 27
                 } else {
28
-                    $parserName = '\Migrations\Parser\Object\\' . ucfirst($param->type);
28
+                    $parserName = '\Migrations\Parser\Object\\'.ucfirst($param->type);
29 29
                 }
30 30
                 if (!\Tools::isAssoc($this->data)) {
31 31
                     foreach ($this->data as $data) {
Please login to merge, or discard this patch.
system/modules/Migrations/objects/Parser/Object/Value.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 $dir = pathinfo($this->object->walker->migtarionLog->source, PATHINFO_DIRNAME);
73 73
                 if ($this->model->{$this->param->value}) {
74 74
                     $file = \Files\File::get($this->model->{$this->param->value});
75
-                    if ($file && $value && file_exists($dir . '/' . $value) && file_exists(\App::$primary->path . $file->path) && md5_file($dir . '/' . $value) == md5_file(\App::$primary->path . $file->path)) {
75
+                    if ($file && $value && file_exists($dir.'/'.$value) && file_exists(\App::$primary->path.$file->path) && md5_file($dir.'/'.$value) == md5_file(\App::$primary->path.$file->path)) {
76 76
                         $notEq = false;
77 77
                     }
78 78
                     if ($file && $notEq) {
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
                     }
82 82
                 }
83 83
                 if ($notEq) {
84
-                    $this->model->{$this->param->value} = \App::$primary->files->uploadFromUrl($dir . '/' . $value, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
84
+                    $this->model->{$this->param->value} = \App::$primary->files->uploadFromUrl($dir.'/'.$value, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
85 85
                 }
86 86
                 break;
87 87
             default:
88
-                if(is_array($value)){
88
+                if (is_array($value)) {
89 89
                     $value = implode(' ', $value);
90 90
                 }
91 91
                 $this->model->{$this->param->value} = $value;
Please login to merge, or discard this patch.
system/modules/StaticLoader/StaticLoader.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
             $path = substr($path, 1);
26 26
         }
27 27
         $app = substr($path, 0, strpos($path, '/'));
28
-        if (file_exists(INJI_SYSTEM_DIR . '/program/' . $app)) {
28
+        if (file_exists(INJI_SYSTEM_DIR.'/program/'.$app)) {
29 29
             $path = substr($path, strpos($path, '/') + 1);
30 30
             if (\App::$cur->name != $app) {
31 31
                 $scriptApp = new App();
32 32
                 $scriptApp->name = $app;
33 33
                 $scriptApp->system = true;
34
-                $scriptApp->staticPath = "/" . $scriptApp->name . "/static";
35
-                $scriptApp->templatesPath = "/" . $scriptApp->name . "/static/templates";
36
-                $scriptApp->path = INJI_SYSTEM_DIR . '/program/' . $scriptApp->name;
37
-                $scriptApp->type = 'app' . ucfirst(strtolower($scriptApp->name));
34
+                $scriptApp->staticPath = "/".$scriptApp->name."/static";
35
+                $scriptApp->templatesPath = "/".$scriptApp->name."/static/templates";
36
+                $scriptApp->path = INJI_SYSTEM_DIR.'/program/'.$scriptApp->name;
37
+                $scriptApp->type = 'app'.ucfirst(strtolower($scriptApp->name));
38 38
                 $scriptApp->installed = true;
39 39
                 $scriptApp->params = [];
40 40
                 $scriptApp->config = Config::app($scriptApp);
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
         $type = substr($path, 0, strpos($path, '/'));
53 53
         switch ($type) {
54 54
             case 'libs':
55
-                return App::$cur->Libs->getPath(array_slice(explode('/', $path),2));
55
+                return App::$cur->Libs->getPath(array_slice(explode('/', $path), 2));
56 56
             case 'templates':
57 57
                 $path = substr($path, strpos($path, '/') + 1);
58
-                return $scriptApp->view->templatesPath . '/' . $path;
58
+                return $scriptApp->view->templatesPath.'/'.$path;
59 59
             case 'system':
60 60
                 $path = substr($path, strpos($path, '/') + 1);
61
-                return INJI_SYSTEM_DIR . '/static/' . $path;
61
+                return INJI_SYSTEM_DIR.'/static/'.$path;
62 62
             case 'moduleAsset':
63 63
                 $path = substr($path, strpos($path, '/') + 1);
64 64
                 if (!strpos($path, '/')) {
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
                 }
72 72
                 $path = substr($path, strpos($path, '/') + 1);
73 73
                 if (is_callable([$module, 'staticCalled'])) {
74
-                    return $scriptApp->$module->staticCalled($path, $scriptApp->$module->path . '/static/');
74
+                    return $scriptApp->$module->staticCalled($path, $scriptApp->$module->path.'/static/');
75 75
                 }
76
-                return $scriptApp->$module->path . '/static/' . $path;
76
+                return $scriptApp->$module->path.'/static/'.$path;
77 77
             default:
78
-                return $scriptApp->path . '/static/' . $path;
78
+                return $scriptApp->path.'/static/'.$path;
79 79
         }
80 80
     }
81 81
 
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
                         $pos = $_GET['resize_pos'];
139 139
                     }
140 140
                     $dirnoslash = str_replace('/', '', substr($fileinfo['dirname'], strpos($fileinfo['dirname'], '/static')));
141
-                    $path = $dir . '/static/cache/' . $dirnoslash . $fileinfo['filename'] . '.' . $sizes[0] . 'x' . $sizes[1] . $crop . $pos . '.' . $fileinfo['extension'];
141
+                    $path = $dir.'/static/cache/'.$dirnoslash.$fileinfo['filename'].'.'.$sizes[0].'x'.$sizes[1].$crop.$pos.'.'.$fileinfo['extension'];
142 142
                     if (!file_exists($path)) {
143
-                        Tools::createDir($dir . '/static/cache/');
143
+                        Tools::createDir($dir.'/static/cache/');
144 144
                         copy($file, $path);
145 145
                         Tools::resizeImage($path, $sizes[0], $sizes[1], $crop, $pos);
146 146
                     }
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
         header("Cache-control: public");
166 166
         header("Accept-Ranges: bytes");
167 167
         header("Pragma: public");
168
-        header("Content-Length: " . filesize($file));
169
-        header('Last-Modified: ' . gmdate('D, d M Y H:i:s', filemtime($file)) . ' GMT');
170
-        header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 60 * 60 * 24 * 256) . ' GMT');
168
+        header("Content-Length: ".filesize($file));
169
+        header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($file)).' GMT');
170
+        header('Expires: '.gmdate('D, d M Y H:i:s', time() + 60 * 60 * 24 * 256).' GMT');
171 171
         if (filemtime($file) <= $modifiedSince && (!isset($_SERVER['HTTP_CACHE_CONTROL']) || $_SERVER['HTTP_CACHE_CONTROL'] != 'no-cache')) {
172 172
             // Разгружаем канал передачи данных!
173 173
             header('HTTP/1.1 304 Not Modified');
@@ -178,19 +178,19 @@  discard block
 block discarded – undo
178 178
         header('Content-Description: File Transfer');
179 179
         //}
180 180
         if (isset($this->mimes[strtolower($fileinfo['extension'])])) {
181
-            header("Content-Type: " . $this->mimes[strtolower($fileinfo['extension'])]);
181
+            header("Content-Type: ".$this->mimes[strtolower($fileinfo['extension'])]);
182 182
         }
183 183
 
184 184
         if (isset($_GET['frustrate_dl']) || in_array($fileinfo['extension'], array('doc', 'docx', 'xls', 'xlsx'))) {
185 185
 
186
-            $fileName = $fileinfo['filename'] . '.' . $fileinfo['extension'];
186
+            $fileName = $fileinfo['filename'].'.'.$fileinfo['extension'];
187 187
             if (App::$cur->db->connect) {
188
-                $fileObj = Files\File::get([ 'path', '%/' . $fileinfo['filename'] . '.' . $fileinfo['extension'], 'LIKE']);
188
+                $fileObj = Files\File::get(['path', '%/'.$fileinfo['filename'].'.'.$fileinfo['extension'], 'LIKE']);
189 189
                 if ($fileObj) {
190 190
                     $fileName = $fileObj->original_name;
191 191
                 }
192 192
             }
193
-            header('Content-Disposition: attachment; filename="' . $fileName . '"');
193
+            header('Content-Disposition: attachment; filename="'.$fileName.'"');
194 194
         }
195 195
 
196 196
         header('Content-Transfer-Encoding: binary');
Please login to merge, or discard this patch.