Completed
Push — master ( bb267d...fbe197 )
by Alexey
05:29
created
system/modules/Widgets/appAdminControllers/WidgetsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $widget = false; //Widget::get($widgetCode[0], 'widget_filename');
31 31
 
32 32
             if ($widget) {
33
-                $text .= $widget->widget_name . "\n";
33
+                $text .= $widget->widget_name."\n";
34 34
                 $i = 1;
35 35
                 if (isset($widgetCode[$i]) && $widget->widget_params) {
36 36
                     $params = json_decode($widget->widget_params, true);
@@ -41,28 +41,28 @@  discard block
 block discarded – undo
41 41
                             if ($param['type'] == 'select') {
42 42
                                 $item = $param['model']::get($widgetCode[$i++]);
43 43
                                 if ($item) {
44
-                                    $text .= $param['name'] . ': ' . $item->$param['showCol'] . "\n";
44
+                                    $text .= $param['name'].': '.$item->$param['showCol']."\n";
45 45
                                 } else {
46 46
                                     $text .= $widgetCode[$i - 1];
47 47
                                 }
48 48
                             } else {
49 49
                                 $value = $widgetCode[$i++];
50 50
                                 if (mb_strlen($value, 'utf-8') > 50) {
51
-                                    $value = mb_substr($value, 0, 50) . '...';
51
+                                    $value = mb_substr($value, 0, 50).'...';
52 52
                                 }
53
-                                $text .= $param['name'] . ': ' . $value . "\n";
53
+                                $text .= $param['name'].': '.$value."\n";
54 54
                             }
55 55
                         }
56 56
                     }
57 57
                 } else {
58 58
                     unset($widgetCode[0]);
59 59
                     foreach ($widgetCode as $item) {
60
-                        $text .= $item . "\n";
60
+                        $text .= $item."\n";
61 61
                     }
62 62
                 }
63 63
             } else {
64 64
                 foreach ($widgetCode as $item) {
65
-                    $text .= $item . "\n";
65
+                    $text .= $item."\n";
66 66
                 }
67 67
             }
68 68
         } else {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         header('Content-type: image/png');
73 73
         // шрифт
74
-        $font = dirname(__FILE__) . '/../fonts/Cousine/Cousine-Regular.ttf';
74
+        $font = dirname(__FILE__).'/../fonts/Cousine/Cousine-Regular.ttf';
75 75
         // вычисляем сколько места займёт текст
76 76
         $bbox = imageftbbox(10, 0, $font, $text);
77 77
 
Please login to merge, or discard this patch.
system/modules/Callbacks/install_script.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
     //Категории
5 5
     App::$cur->db->createTable('callbacks_category', [
6 6
         'category_id' => 'pk',
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         'category_weight' => 'int(11) UNSIGNED NOT NULL',
20 20
         'category_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
21 21
             ], [
22
-        'INDEX ' . App::$cur->db->table_prefix . '_callbacks_category_category_parent_id (category_parent_id)',
23
-        'INDEX ' . App::$cur->db->table_prefix . '_callbacks_category_category_tree_path (category_tree_path(255))',
22
+        'INDEX '.App::$cur->db->table_prefix.'_callbacks_category_category_parent_id (category_parent_id)',
23
+        'INDEX '.App::$cur->db->table_prefix.'_callbacks_category_category_tree_path (category_tree_path(255))',
24 24
     ]);
25 25
     App::$cur->db->createTable('callbacks_callback', [
26 26
         'callback_id' => 'pk',
Please login to merge, or discard this patch.
system/modules/Callbacks/appControllers/content/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
   $callbacks = Callbacks\Callback::getList(['where' => ['view', '1'], 'order' => ['weight', 'asc']]);
5 5
   foreach ($callbacks as $callback) {
6 6
       echo "<h3>{$callback->name}<div class = 'time'>{$callback->date_create}</div></h3>";
7
-      echo "<p>" . nl2br($callback->text) . "</p>";
7
+      echo "<p>".nl2br($callback->text)."</p>";
8 8
   }
9 9
   ?>
10 10
 </div>
Please login to merge, or discard this patch.
system/modules/Callbacks/appControllers/CallbacksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             Tools::header(404);
40 40
             Tools::redirect('/', 'Отзыв не найден', 'danger');
41 41
         }
42
-        $this->view->setTitle('Отзыв: ' . $callback->name);
42
+        $this->view->setTitle('Отзыв: '.$callback->name);
43 43
         $this->view->page(['data' => compact('callback')]);
44 44
     }
45 45
 
Please login to merge, or discard this patch.
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/Files/Files.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
             }
47 47
         }
48 48
         $fileObject->name = $fileinfo['filename'];
49
-        $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension'];
50
-        if ($fileObject->id && file_exists($sitePath . $fileObject->path))
51
-            unlink($sitePath . $fileObject->path);
49
+        $fileObject->path = $type->type_dir.date('Y-m-d').'/'.microtime(true).'.'.$fileinfo['extension'];
50
+        if ($fileObject->id && file_exists($sitePath.$fileObject->path))
51
+            unlink($sitePath.$fileObject->path);
52 52
 
53
-        Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/');
53
+        Tools::createDir($sitePath.$type->type_dir.date('Y-m-d').'/');
54 54
 
55
-        if (!move_uploaded_file($file['tmp_name'], $sitePath . $fileObject->path))
55
+        if (!move_uploaded_file($file['tmp_name'], $sitePath.$fileObject->path))
56 56
             return false;
57 57
 
58 58
         $fileObject->type_id = $type->pk();
@@ -96,17 +96,17 @@  discard block
 block discarded – undo
96 96
             }
97 97
         }
98 98
         $fileObject->name = $fileinfo['filename'];
99
-        $fileObject->path = $type->type_dir . date('Y-m-d') . '/' . microtime(true) . '.' . $fileinfo['extension'];
100
-        if ($fileObject->id && file_exists($sitePath . $fileObject->path))
101
-            unlink($sitePath . $fileObject->path);
99
+        $fileObject->path = $type->type_dir.date('Y-m-d').'/'.microtime(true).'.'.$fileinfo['extension'];
100
+        if ($fileObject->id && file_exists($sitePath.$fileObject->path))
101
+            unlink($sitePath.$fileObject->path);
102 102
 
103
-        Tools::createDir($sitePath . $type->type_dir . date('Y-m-d') . '/');
103
+        Tools::createDir($sitePath.$type->type_dir.date('Y-m-d').'/');
104 104
 
105 105
         $file = @file_get_contents($url);
106 106
         if ($file === false) {
107 107
             return 0;
108 108
         }
109
-        file_put_contents($sitePath . $fileObject->path, $file);
109
+        file_put_contents($sitePath.$fileObject->path, $file);
110 110
 
111 111
         $fileObject->type_id = $type->pk();
112 112
         $fileObject->original_name = $fileinfo['basename'];
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/install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
     <?php
4 4
     $config = Config::app(App::$primary ? App::$primary : App::$cur);
5 5
     $modules = array_flip(Module::getInstalled(App::$cur));
6
-    $systemModules = array_slice(scandir(INJI_SYSTEM_DIR . '/modules'), 2);
6
+    $systemModules = array_slice(scandir(INJI_SYSTEM_DIR.'/modules'), 2);
7 7
     foreach ($systemModules as $module) {
8 8
         $info = Module::getInfo($module);
9 9
         if (!$info || isset($modules[$module]))
Please login to merge, or discard this patch.