Completed
Push — master ( 0afdc4...0e57e6 )
by Alexey
04:27
created
system/modules/View/appAdminControllers/content/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
     foreach ($templates['app']['installed'] as $template => $name) {
16 16
         $table->addRow([
17 17
             $name,
18
-            (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию',
19
-            '<a href = "/admin/view/template/editFile/' . $template . '">Файлы</a> <a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>'
18
+            (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/'.$template.'">Установить по умолчанию</a>' : 'Тема по умолчанию',
19
+            '<a href = "/admin/view/template/editFile/'.$template.'">Файлы</a> <a href = "/admin/view/editTemplate/'.$template.'">Редактировать</a>'
20 20
         ]);
21 21
     }
22 22
 $table->draw();
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
system/modules/View/appAdminControllers/TemplateController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@
 block discarded – undo
22 22
     function editFileAction($templateName)
23 23
     {
24 24
         $template = \View\Template::get($templateName, \App::$primary);
25
-        if (!empty($_GET['path']) && file_exists($template->path . '/' . Tools::parsePath($_GET['path']))) {
25
+        if (!empty($_GET['path']) && file_exists($template->path.'/'.Tools::parsePath($_GET['path']))) {
26 26
             $code = file_get_contents("php://input");
27 27
             if (!empty($code)) {
28 28
                 $result = new Server\Result();
29 29
                 $result->successMsg = 'Файл сохранен';
30
-                $content = file_put_contents($template->path . '/' . Tools::parsePath($_GET['path']), $code);
30
+                $content = file_put_contents($template->path.'/'.Tools::parsePath($_GET['path']), $code);
31 31
                 $result->send();
32 32
             }
33
-            $content = file_get_contents($template->path . '/' . Tools::parsePath($_GET['path']));
33
+            $content = file_get_contents($template->path.'/'.Tools::parsePath($_GET['path']));
34 34
             $this->libs->loadLib('Ace');
35 35
             $this->view->page(['content' => 'template/edit', 'data' => compact('template', 'content')]);
36 36
         } else {
Please login to merge, or discard this patch.
system/Inji/Module.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $this->info = $this->getInfo();
73 73
         $this->config = Config::module($this->moduleName, !empty($this->info['systemConfig']));
74 74
         $that = $this;
75
-        Inji::$inst->listen('Config-change-module-' . $this->app->name . '-' . $this->moduleName, $this->app->name . '-' . $this->moduleName . 'config', function($event) use ($that) {
75
+        Inji::$inst->listen('Config-change-module-'.$this->app->name.'-'.$this->moduleName, $this->app->name.'-'.$this->moduleName.'config', function($event) use ($that) {
76 76
             $that->config = $event['eventObject'];
77 77
         });
78 78
     }
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
         $moduleName = ucfirst($moduleName);
89 89
         $paths = [];
90 90
         if (App::$cur !== App::$primary) {
91
-            $paths['primaryAppPath'] = App::$primary->path . '/modules/' . $moduleName;
91
+            $paths['primaryAppPath'] = App::$primary->path.'/modules/'.$moduleName;
92 92
         }
93
-        $paths['curAppPath'] = App::$cur->path . '/modules/' . $moduleName;
94
-        $paths['systemPath'] = INJI_SYSTEM_DIR . '/modules/' . $moduleName;
93
+        $paths['curAppPath'] = App::$cur->path.'/modules/'.$moduleName;
94
+        $paths['systemPath'] = INJI_SYSTEM_DIR.'/modules/'.$moduleName;
95 95
         return $paths;
96 96
     }
97 97
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $moduleName = ucfirst($moduleName);
107 107
         $paths = Module::getModulePaths($moduleName);
108 108
         foreach ($paths as $path) {
109
-            if (file_exists($path . '/' . $moduleName . '.php')) {
109
+            if (file_exists($path.'/'.$moduleName.'.php')) {
110 110
                 return $path;
111 111
             }
112 112
         }
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
         foreach ($moduleDirs as $moduleDir) {
160 160
             if (is_dir($moduleDir)) {
161 161
                 foreach (scandir($moduleDir) as $dir) {
162
-                    if (preg_match('!Controllers$!', $dir) && is_dir($moduleDir . '/' . $dir)) {
163
-                        $path = $moduleDir . '/' . $dir;
162
+                    if (preg_match('!Controllers$!', $dir) && is_dir($moduleDir.'/'.$dir)) {
163
+                        $path = $moduleDir.'/'.$dir;
164 164
                         foreach (scandir($path) as $file) {
165
-                            if (preg_match('!Controller\.php$!', $file) && is_file($path . '/' . $file)) {
165
+                            if (preg_match('!Controller\.php$!', $file) && is_file($path.'/'.$file)) {
166 166
                                 $controllerName = preg_replace('!Controller\.php$!', '', $file);
167
-                                $controllers[preg_replace('!Controllers$!', '', $dir)][$controllerName] = $path . '/' . $file;
167
+                                $controllers[preg_replace('!Controllers$!', '', $dir)][$controllerName] = $path.'/'.$file;
168 168
                             }
169 169
                         }
170 170
                     }
@@ -211,31 +211,31 @@  discard block
 block discarded – undo
211 211
         $paths = [];
212 212
         if (App::$cur != App::$primary) {
213 213
             if (!empty($this->params[0]) && strtolower($this->params[0]) != strtolower($this->moduleName)) {
214
-                $paths['primaryAppAppTypePath_slice'] = App::$primary->path . '/modules/' . $this->moduleName . '/' . $this->app->type . 'Controllers/' . ucfirst($this->params[0]) . 'Controller.php';
214
+                $paths['primaryAppAppTypePath_slice'] = App::$primary->path.'/modules/'.$this->moduleName.'/'.$this->app->type.'Controllers/'.ucfirst($this->params[0]).'Controller.php';
215 215
                 if (App::$primary->{$this->moduleName}) {
216
-                    $paths['primaryAppAppTypePath_slice'] = App::$primary->{$this->moduleName}->path . '/' . $this->app->type . 'Controllers/' . ucfirst($this->params[0]) . 'Controller.php';
216
+                    $paths['primaryAppAppTypePath_slice'] = App::$primary->{$this->moduleName}->path.'/'.$this->app->type.'Controllers/'.ucfirst($this->params[0]).'Controller.php';
217 217
                 }
218 218
             }
219
-            $paths['primaryAppAppAppTypePath'] = App::$primary->path . '/modules/' . $this->moduleName . '/' . $this->app->type . 'Controllers/' . $this->moduleName . 'Controller.php';
219
+            $paths['primaryAppAppAppTypePath'] = App::$primary->path.'/modules/'.$this->moduleName.'/'.$this->app->type.'Controllers/'.$this->moduleName.'Controller.php';
220 220
             if (App::$primary->{$this->moduleName}) {
221
-                $paths['primaryAppAppTypePath'] = App::$primary->{$this->moduleName}->path . '/' . $this->app->type . 'Controllers/' . $this->moduleName . 'Controller.php';
221
+                $paths['primaryAppAppTypePath'] = App::$primary->{$this->moduleName}->path.'/'.$this->app->type.'Controllers/'.$this->moduleName.'Controller.php';
222 222
             }
223
-            $paths['curAppAppTypePath'] = $this->app->{$this->moduleName}->path . '/' . $this->app->type . 'Controllers/' . $this->moduleName . 'Controller.php';
223
+            $paths['curAppAppTypePath'] = $this->app->{$this->moduleName}->path.'/'.$this->app->type.'Controllers/'.$this->moduleName.'Controller.php';
224 224
         }
225 225
 
226 226
         if (!empty($this->params[0]) && strtolower($this->params[0]) != strtolower($this->moduleName)) {
227
-            $paths['appAppTypePath_slice'] = $this->app->path . '/modules/' . $this->moduleName . '/' . $this->app->type . 'Controllers/' . ucfirst($this->params[0]) . 'Controller.php';
228
-            $paths['appTypePath_slice'] = $this->path . '/' . $this->app->type . 'Controllers/' . ucfirst($this->params[0]) . 'Controller.php';
227
+            $paths['appAppTypePath_slice'] = $this->app->path.'/modules/'.$this->moduleName.'/'.$this->app->type.'Controllers/'.ucfirst($this->params[0]).'Controller.php';
228
+            $paths['appTypePath_slice'] = $this->path.'/'.$this->app->type.'Controllers/'.ucfirst($this->params[0]).'Controller.php';
229 229
         }
230
-        $paths['appAppTypePath'] = $this->app->path . '/modules/' . $this->moduleName . '/' . $this->app->type . 'Controllers/' . $this->moduleName . 'Controller.php';
231
-        $paths['appTypePath'] = $this->path . '/' . $this->app->type . 'Controllers/' . $this->moduleName . 'Controller.php';
230
+        $paths['appAppTypePath'] = $this->app->path.'/modules/'.$this->moduleName.'/'.$this->app->type.'Controllers/'.$this->moduleName.'Controller.php';
231
+        $paths['appTypePath'] = $this->path.'/'.$this->app->type.'Controllers/'.$this->moduleName.'Controller.php';
232 232
 
233 233
         if (!empty($this->params[0]) && strtolower($this->params[0]) != strtolower($this->moduleName)) {
234
-            $paths['appUniversalPath_slice'] = $this->app->path . '/modules/' . $this->moduleName . '/Controllers/' . ucfirst($this->params[0]) . 'Controller.php';
235
-            $paths['universalPath_slice'] = $this->path . '/Controllers/' . ucfirst($this->params[0]) . 'Controller.php';
234
+            $paths['appUniversalPath_slice'] = $this->app->path.'/modules/'.$this->moduleName.'/Controllers/'.ucfirst($this->params[0]).'Controller.php';
235
+            $paths['universalPath_slice'] = $this->path.'/Controllers/'.ucfirst($this->params[0]).'Controller.php';
236 236
         }
237
-        $paths['appUniversalPath'] = $this->app->path . '/modules/' . $this->moduleName . '/Controllers/' . $this->moduleName . 'Controller.php';
238
-        $paths['universalPath'] = $this->path . '/Controllers/' . $this->moduleName . 'Controller.php';
237
+        $paths['appUniversalPath'] = $this->app->path.'/modules/'.$this->moduleName.'/Controllers/'.$this->moduleName.'Controller.php';
238
+        $paths['universalPath'] = $this->path.'/Controllers/'.$this->moduleName.'Controller.php';
239 239
 
240 240
         return $paths;
241 241
     }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                     $controllerName = $this->moduleName;
259 259
                     $params = $this->params;
260 260
                 }
261
-                $fullControllerName = $controllerName . 'Controller';
261
+                $fullControllerName = $controllerName.'Controller';
262 262
                 $controller = new $fullControllerName();
263 263
                 $controller->params = $params;
264 264
                 $controller->module = $this;
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
         }
285 285
         $paths = Module::getModulePaths($moduleName);
286 286
         foreach ($paths as $path) {
287
-            if (file_exists($path . '/info.php')) {
288
-                return include $path . '/info.php';
287
+            if (file_exists($path.'/info.php')) {
288
+                return include $path.'/info.php';
289 289
             }
290 290
         }
291 291
         return [];
@@ -304,16 +304,16 @@  discard block
 block discarded – undo
304 304
     {
305 305
         $moduleName = $moduleName ? $moduleName : $this->moduleName;
306 306
         $modulePaths = Module::getModulePaths($moduleName);
307
-        $modulePaths['templatePath'] = App::$cur->view->template->path . '/modules/' . ucfirst($moduleName);
307
+        $modulePaths['templatePath'] = App::$cur->view->template->path.'/modules/'.ucfirst($moduleName);
308 308
         $snippets = [];
309 309
         foreach ($modulePaths as $path) {
310
-            if (file_exists($path . $dir . '/' . $snippetsPath)) {
311
-                $snippetsPaths = array_slice(scandir($path . $dir . '/' . $snippetsPath), 2);
310
+            if (file_exists($path.$dir.'/'.$snippetsPath)) {
311
+                $snippetsPaths = array_slice(scandir($path.$dir.'/'.$snippetsPath), 2);
312 312
                 foreach ($snippetsPaths as $snippetPath) {
313
-                    if (is_dir($path . $dir . '/' . $snippetsPath . '/' . $snippetPath)) {
314
-                        $snippets[$snippetPath] = include $path . $dir . '/' . $snippetsPath . '/' . $snippetPath . '/info.php';
313
+                    if (is_dir($path.$dir.'/'.$snippetsPath.'/'.$snippetPath)) {
314
+                        $snippets[$snippetPath] = include $path.$dir.'/'.$snippetsPath.'/'.$snippetPath.'/info.php';
315 315
                     } else {
316
-                        $snippets[pathinfo($snippetPath, PATHINFO_FILENAME)] = include $path . $dir . '/' . $snippetsPath . '/' . $snippetPath;
316
+                        $snippets[pathinfo($snippetPath, PATHINFO_FILENAME)] = include $path.$dir.'/'.$snippetsPath.'/'.$snippetPath;
317 317
                     }
318 318
                 }
319 319
             }
@@ -335,9 +335,9 @@  discard block
 block discarded – undo
335 335
     {
336 336
         $extensions = [];
337 337
         $modules = Module::getInstalled(App::$cur);
338
-        $method = 'get' . ucfirst($extensionType);
338
+        $method = 'get'.ucfirst($extensionType);
339 339
         foreach ($modules as $module) {
340
-            $extensions = array_merge($extensions, $this->{$method}($request, false, "/extensions/{$this->moduleName}/" . $extensionType, $module));
340
+            $extensions = array_merge($extensions, $this->{$method}($request, false, "/extensions/{$this->moduleName}/".$extensionType, $module));
341 341
         }
342 342
         return $extensions;
343 343
     }
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item/Offer/Param.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
     public function realType()
57 57
     {
58
-        if ($this->option && $this->option->type)  {
58
+        if ($this->option && $this->option->type) {
59 59
             $type = $this->option->type;
60 60
 
61 61
             if ($type == 'select') {
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item/Offer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 'col' => 'item_offer_id',
77 77
                 //'resultKey' => 'code',
78 78
                 'resultKey' => 'item_offer_option_id',
79
-                'join' => [Offer\Option::table(), Offer\Option::index() . ' = ' . Offer\Param::colPrefix() . Offer\Option::index()]
79
+                'join' => [Offer\Option::table(), Offer\Option::index().' = '.Offer\Param::colPrefix().Offer\Option::index()]
80 80
             ],
81 81
             'item' => [
82 82
                 'model' => 'Ecommerce\Item',
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $warehouse = Offer\Warehouse::get([['count', '0', '>'], ['item_offer_id', $this->id]]);
91 91
         if ($warehouse) {
92
-            $warehouse->count +=(float) $count;
92
+            $warehouse->count += (float) $count;
93 93
             $warehouse->save();
94 94
         } else {
95 95
             $warehouse = Offer\Warehouse::get([['item_offer_id', $this->id]]);
96 96
             if ($warehouse) {
97
-                $warehouse->count +=(float) $count;
97
+                $warehouse->count += (float) $count;
98 98
                 $warehouse->save();
99 99
             }
100 100
         }
@@ -112,21 +112,21 @@  discard block
 block discarded – undo
112 112
             }
113 113
         }
114 114
         if ($warehouseIds) {
115
-            \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Warehouse::index(), $warehouseIds, 'IN');
115
+            \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Warehouse::index(), $warehouseIds, 'IN');
116 116
         }
117
-        \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Item\Offer::index(), $this->id);
118
-        \App::$cur->db->cols = 'COALESCE(sum(' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . 'count),0) as `sum` ';
117
+        \App::$cur->db->where(\Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Item\Offer::index(), $this->id);
118
+        \App::$cur->db->cols = 'COALESCE(sum('.\Ecommerce\Item\Offer\Warehouse::colPrefix().'count),0) as `sum` ';
119 119
         $warehouse = \App::$cur->db->select(\Ecommerce\Item\Offer\Warehouse::table())->fetch();
120 120
 
121
-        \App::$cur->db->cols = 'COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix() . 'count) ,0) as `sum` ';
122
-        \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Item\Offer::index(), $this->id);
121
+        \App::$cur->db->cols = 'COALESCE(sum('.\Ecommerce\Warehouse\Block::colPrefix().'count) ,0) as `sum` ';
122
+        \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Item\Offer::index(), $this->id);
123 123
         if ($cart_id) {
124
-            \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index(), (int) $cart_id, '!=');
124
+            \App::$cur->db->where(\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index(), (int) $cart_id, '!=');
125 125
         }
126 126
         $on = '
127
-            ' . \Ecommerce\Cart::index() . ' = ' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index() . ' AND (
128
-            (`' . \Ecommerce\Cart::colPrefix() . 'warehouse_block` = 1 and `' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(2,3,6)) || 
129
-            (`' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(0,1) and `' . \Ecommerce\Cart::colPrefix() . 'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
127
+            ' . \Ecommerce\Cart::index().' = '.\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index().' AND (
128
+            (`' . \Ecommerce\Cart::colPrefix().'warehouse_block` = 1 and `'.\Ecommerce\Cart::colPrefix().'cart_status_id` in(2,3,6)) || 
129
+            (`' . \Ecommerce\Cart::colPrefix().'cart_status_id` in(0,1) and `'.\Ecommerce\Cart::colPrefix().'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
130 130
             )
131 131
         ';
132 132
         \App::$cur->db->join(\Ecommerce\Cart::table(), $on, 'inner');
Please login to merge, or discard this patch.
system/modules/Ui/Controllers/UiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,25 +38,25 @@
 block discarded – undo
38 38
             $return = new Server\Result();
39 39
             ob_start();
40 40
             $form->checkRequest($params, true);
41
-            $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : '');
41
+            $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : '');
42 42
             $get = $_GET;
43 43
             if (isset($get['notSave'])) {
44 44
                 unset($get['notSave']);
45 45
             }
46
-            $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($get);
46
+            $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($get);
47 47
             $form->draw($params, true);
48 48
             $return->content = ob_get_contents();
49 49
             ob_end_clean();
50 50
             $return->send();
51 51
         } else {
52 52
             $form->checkRequest($params);
53
-            $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : '');
53
+            $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : '');
54 54
             $get = $_GET;
55 55
             if (isset($get['notSave'])) {
56 56
                 unset($get['notSave']);
57 57
             }
58
-            $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($get);
59
-            $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ') . $form->header);
58
+            $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($get);
59
+            $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ').$form->header);
60 60
             $this->view->page(['content' => 'form', 'data' => compact('form', 'params')]);
61 61
         }
62 62
     }
Please login to merge, or discard this patch.
system/modules/Money/snippets/rewardType/currency.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     'procent' => 'Процент',
22 22
     'amount' => 'Сумма',
23 23
 ];
24
-return $levelTypes[$level->params['type']->value] . ': ' . $level->params['amount']->value . ' ' . ($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : ''));
24
+return $levelTypes[$level->params['type']->value].': '.$level->params['amount']->value.' '.($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : ''));
25 25
 },
26 26
     'rewarder' => function($reward, $sums, $user, $rootUser, $level, $rewardGet) {
27 27
 $wallets = \App::$cur->money->getUserWallets($user->id);
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
         return 0;
64 64
     }
65 65
 
66
-    $text = 'Вознаграждение по программе "' . $reward->name . '"';
66
+    $text = 'Вознаграждение по программе "'.$reward->name.'"';
67 67
     if ($rootUser->id != $user->id) {
68
-        $text .= ' от ' . $rootUser->name();
68
+        $text .= ' от '.$rootUser->name();
69 69
     }
70 70
 
71 71
     if (!$rewardGet && $reward->block) {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $block->wallet_id = $wallets[$level->params['currency_id']->value]->id;
74 74
         $block->amount = $amount;
75 75
         $block->comment = $text;
76
-        $block->data = 'reward:' . $reward->id;
76
+        $block->data = 'reward:'.$reward->id;
77 77
         $dateGenerators = \App::$cur->money->getSnippets('expiredDateGenerator');
78 78
         if ($reward->block_date_expired && !empty($dateGenerators[$reward->block_date_expired])) {
79 79
             $date = $dateGenerators[$reward->block_date_expired]($reward, $user);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     } else {
89 89
         $wallets[$level->params['currency_id']->value]->diff($amount, $text);
90 90
     }
91
-    \App::$cur->users->AddUserActivity($user->id, 4, $text . '<br />' . $amount . ' ' . $wallets[$level->params['currency_id']->value]->currency->acronym());
91
+    \App::$cur->users->AddUserActivity($user->id, 4, $text.'<br />'.$amount.' '.$wallets[$level->params['currency_id']->value]->currency->acronym());
92 92
 }
93 93
 return $amount;
94 94
 }
Please login to merge, or discard this patch.
system/modules/Widgets/appAdminControllers/content/widgetChooser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 </select>
38 38
 <?php
39 39
 foreach ($widgets as $code => $options) {
40
-    echo "<div id = 'params_" . str_replace('\\', '-', $code) . "' class = 'widgetParams' style='display:none;'>";
40
+    echo "<div id = 'params_".str_replace('\\', '-', $code)."' class = 'widgetParams' style='display:none;'>";
41 41
     if (isset($options['params']) && !is_array($options['params'])) {
42 42
         $options['params']();
43 43
     } elseif (isset($options['params'])) {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 if ($param['type'] == 'select') {
49 49
                     echo "<div class = 'form-group'>
50 50
                         <label>{$param['name']}</label>
51
-                        <select name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' >";
51
+                        <select name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' >";
52 52
                     foreach ($param['model']::get_list() as $item) {
53 53
                         echo "<option value = '{$item->pk()}'>{$item->$param['showCol']}</option>";
54 54
                     }
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
                 } elseif ($param['type'] == 'textarea') {
58 58
                     echo "<div class = 'form-group'>
59 59
                         <label>{$param['name']}</label>
60
-                        <textarea name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control'></textarea>
60
+                        <textarea name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control'></textarea>
61 61
                         </div>";
62 62
                 } else {
63 63
                     echo "<div class = 'form-group'>
64 64
                         <label>{$param['name']}</label>
65
-                        <input name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' />
65
+                        <input name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' />
66 66
                         </div>";
67 67
                 }
68 68
             }
Please login to merge, or discard this patch.
system/modules/View/View.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -37,17 +37,17 @@  discard block
 block discarded – undo
37 37
         if (!empty($this->config[$this->app->type]['current'])) {
38 38
             $templateName = $this->config[$this->app->type]['current'];
39 39
             if (!empty($this->config[$this->app->type]['installed'][$templateName]['location'])) {
40
-                $this->templatesPath = App::$primary->path . "/templates";
40
+                $this->templatesPath = App::$primary->path."/templates";
41 41
             }
42 42
         }
43 43
         if (!$this->templatesPath) {
44
-            $this->templatesPath = $this->app->path . "/templates";
44
+            $this->templatesPath = $this->app->path."/templates";
45 45
         }
46 46
         $this->template = \View\Template::get($templateName, $this->app, $this->templatesPath);
47 47
         if (!$this->template) {
48 48
             $this->template = new \View\Template([
49 49
                 'name' => 'default',
50
-                'path' => $this->templatesPath . '/default',
50
+                'path' => $this->templatesPath.'/default',
51 51
                 'app' => $this->app
52 52
             ]);
53 53
         }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 case 'WIDGET':
165 165
                     $source = $this->cutTag($source, $rawTag);
166 166
                     $params = array_slice($tag, 2);
167
-                    $this->widget($tag[1], ['params' => $params], ':' . implode(':', $params));
167
+                    $this->widget($tag[1], ['params' => $params], ':'.implode(':', $params));
168 168
                     break;
169 169
                 case 'HEAD':
170 170
                     $source = $this->cutTag($source, $rawTag);
@@ -187,18 +187,18 @@  discard block
 block discarded – undo
187 187
     {
188 188
         $pos = strpos($source, $rawTag) - 1;
189 189
         echo substr($source, 0, $pos);
190
-        return substr($source, ( $pos + strlen($rawTag) + 2));
190
+        return substr($source, ($pos + strlen($rawTag) + 2));
191 191
     }
192 192
 
193 193
     public function getHref($type, $params)
194 194
     {
195 195
         $href = '';
196 196
         if (is_string($params)) {
197
-            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params;
197
+            $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$params;
198 198
         } elseif (empty($params['template']) && !empty($params['file'])) {
199
-            $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $params['file'];
199
+            $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$params['file'];
200 200
         } elseif (!empty($params['template']) && !empty($params['file'])) {
201
-            $href = $this->app->templatesPath . "/{$this->template->name}/{$type}/{$params['file']}";
201
+            $href = $this->app->templatesPath."/{$this->template->name}/{$type}/{$params['file']}";
202 202
         }
203 203
         return $href;
204 204
     }
@@ -235,16 +235,16 @@  discard block
 block discarded – undo
235 235
 
236 236
         echo "<title>{$this->title}</title>\n";
237 237
 
238
-        if (!empty($this->template->config['favicon']) && file_exists($this->template->path . "/{$this->template->config['favicon']}")) {
238
+        if (!empty($this->template->config['favicon']) && file_exists($this->template->path."/{$this->template->config['favicon']}")) {
239 239
             echo "        <link rel='shortcut icon' href='/templates/{$this->template->name}/{$this->template->config['favicon']}' />";
240
-        } elseif (!empty($this->template->config['favicon']) && file_exists($this->app->path . "/static/images/{$this->template->config['favicon']}")) {
240
+        } elseif (!empty($this->template->config['favicon']) && file_exists($this->app->path."/static/images/{$this->template->config['favicon']}")) {
241 241
             echo "        <link rel='shortcut icon' href='/static/images/{$this->template->config['favicon']}' />";
242
-        } elseif (file_exists($this->app->path . '/static/images/favicon.ico')) {
242
+        } elseif (file_exists($this->app->path.'/static/images/favicon.ico')) {
243 243
             echo "        <link rel='shortcut icon' href='/static/images/favicon.ico' />";
244 244
         }
245 245
 
246 246
         foreach ($this->getMetaTags() as $meta) {
247
-            echo "\n        " . Html::el('meta', $meta, '', null);
247
+            echo "\n        ".Html::el('meta', $meta, '', null);
248 248
         }
249 249
 
250 250
         if (!empty(Inji::$config['assets']['js'])) {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         $this->checkNeedLibs();
257 257
         $this->parseCss();
258
-        echo "\n        <script src='" . Statics::file(($this->app->type != 'app' ? '/' . $this->app->name : '' ) . "/static/system/js/Inji.js") . "'></script>";
258
+        echo "\n        <script src='".Statics::file(($this->app->type != 'app' ? '/'.$this->app->name : '')."/static/system/js/Inji.js")."'></script>";
259 259
     }
260 260
 
261 261
     public function parseCss()
@@ -279,25 +279,25 @@  discard block
 block discarded – undo
279 279
             if (file_exists($path)) {
280 280
                 $this->loadedCss[$href] = $href;
281 281
                 $urls[$href] = $path;
282
-                $timeStr.=filemtime($path);
282
+                $timeStr .= filemtime($path);
283 283
             } else {
284 284
                 echo "\n        <link href='{$href}' rel='stylesheet' type='text/css' />";
285 285
             }
286 286
         }
287 287
         $timeMd5 = md5($timeStr);
288 288
         $cacheDir = Cache::getDir('static');
289
-        if (!file_exists($cacheDir . '/all' . $timeMd5 . '.css')) {
289
+        if (!file_exists($cacheDir.'/all'.$timeMd5.'.css')) {
290 290
             foreach ($urls as $primaryUrl => $url) {
291 291
                 $source = file_get_contents($url);
292 292
                 $rootPath = substr($primaryUrl, 0, strrpos($primaryUrl, '/'));
293 293
                 $levelUpPath = substr($rootPath, 0, strrpos($rootPath, '/'));
294
-                $source = preg_replace('!url\((\'?"?)[\.]{2}!isU', 'url($1' . $levelUpPath, $source);
295
-                $source = preg_replace('!url\((\'?"?)[\.]{1}!isU', 'url($1' . $rootPath, $source);
296
-                $source = preg_replace('#url\(([\'"]){1}(?!http|https|/|data\:)([^/])#isU', 'url($1' . $rootPath . '/$2', $source);
297
-                $source = preg_replace('#url\((?!http|https|/|data\:|\'|")([^/])#isU', 'url(' . $rootPath . '/$1$2', $source);
294
+                $source = preg_replace('!url\((\'?"?)[\.]{2}!isU', 'url($1'.$levelUpPath, $source);
295
+                $source = preg_replace('!url\((\'?"?)[\.]{1}!isU', 'url($1'.$rootPath, $source);
296
+                $source = preg_replace('#url\(([\'"]){1}(?!http|https|/|data\:)([^/])#isU', 'url($1'.$rootPath.'/$2', $source);
297
+                $source = preg_replace('#url\((?!http|https|/|data\:|\'|")([^/])#isU', 'url('.$rootPath.'/$1$2', $source);
298 298
                 $cssAll .= $source;
299 299
             }
300
-            file_put_contents($cacheDir . '/all' . $timeMd5 . '.css', $cssAll);
300
+            file_put_contents($cacheDir.'/all'.$timeMd5.'.css', $cssAll);
301 301
         }
302 302
         echo "\n        <link href='/{$cacheDir}/all{$timeMd5}.css' rel='stylesheet' type='text/css' />";
303 303
     }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                     if (strpos($css, '//') !== false)
330 330
                         $href = $css;
331 331
                     else
332
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
332
+                        $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$css;
333 333
                     $hrefs[$href] = $href;
334 334
                 }
335 335
                 break;
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
                     if (strpos($css, '://') !== false)
343 343
                         $href = $css;
344 344
                     else
345
-                        $href = $this->app->templatesPath . "/{$this->template->name}/css/{$css}";
345
+                        $href = $this->app->templatesPath."/{$this->template->name}/css/{$css}";
346 346
                     $hrefs[$href] = $href;
347 347
                 }
348 348
                 break;
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
                     if (strpos($css, '//') !== false)
356 356
                         $href = $css;
357 357
                     else
358
-                        $href = ($this->app->type != 'app' ? '/' . $this->app->name : '' ) . $css;
358
+                        $href = ($this->app->type != 'app' ? '/'.$this->app->name : '').$css;
359 359
                     $hrefs[$href] = $href;
360 360
                 }
361 361
                 break;
@@ -375,9 +375,9 @@  discard block
 block discarded – undo
375 375
         if (!empty($this->app->config['site']['metatags'])) {
376 376
             foreach ($this->app->config['site']['metatags'] as $meta) {
377 377
                 if (!empty($meta['name'])) {
378
-                    $metas['metaName:' . $meta['name']] = $meta;
378
+                    $metas['metaName:'.$meta['name']] = $meta;
379 379
                 } elseif (!empty($meta['property'])) {
380
-                    $metas['metaProperty:' . $meta['property']] = $meta;
380
+                    $metas['metaProperty:'.$meta['property']] = $meta;
381 381
                 }
382 382
             }
383 383
         }
@@ -390,9 +390,9 @@  discard block
 block discarded – undo
390 390
     public function addMetaTag($meta)
391 391
     {
392 392
         if (!empty($meta['name'])) {
393
-            $this->dynMetas['metaName:' . $meta['name']] = $meta;
393
+            $this->dynMetas['metaName:'.$meta['name']] = $meta;
394 394
         } elseif (!empty($meta['property'])) {
395
-            $this->dynMetas['metaProperty:' . $meta['property']] = $meta;
395
+            $this->dynMetas['metaProperty:'.$meta['property']] = $meta;
396 396
         }
397 397
     }
398 398
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
                 if (file_exists($path)) {
417 417
                     $nativeUrl[$script] = $script;
418 418
                     $urls[$script] = $path;
419
-                    $timeStr.=filemtime($path);
419
+                    $timeStr .= filemtime($path);
420 420
                 } else {
421 421
                     $noParsedScripts[$script] = $script;
422 422
                 }
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
                     if (!empty($script['name'])) {
432 432
                         $onLoadModules[$script['name']] = $script['name'];
433 433
                     }
434
-                    $timeStr.=filemtime($path);
434
+                    $timeStr .= filemtime($path);
435 435
                 } else {
436 436
                     $noParsedScripts[$script] = $script;
437 437
                 }
@@ -440,20 +440,20 @@  discard block
 block discarded – undo
440 440
 
441 441
         $timeMd5 = md5($timeStr);
442 442
         $cacheDir = Cache::getDir('static');
443
-        if (!file_exists($cacheDir . '/all' . $timeMd5 . '.js')) {
443
+        if (!file_exists($cacheDir.'/all'.$timeMd5.'.js')) {
444 444
             foreach ($urls as $url) {
445
-                $scriptAll .= ';' . file_get_contents($url);
445
+                $scriptAll .= ';'.file_get_contents($url);
446 446
             }
447
-            file_put_contents($cacheDir . '/all' . $timeMd5 . '.js', $scriptAll);
447
+            file_put_contents($cacheDir.'/all'.$timeMd5.'.js', $scriptAll);
448 448
         }
449 449
         $options = [
450 450
             'scripts' => array_values($noParsedScripts),
451 451
             'compresedScripts' => $nativeUrl,
452 452
             'styles' => [],
453
-            'appRoot' => $this->app->type == 'app' ? '/' : '/' . $this->app->name . '/',
453
+            'appRoot' => $this->app->type == 'app' ? '/' : '/'.$this->app->name.'/',
454 454
             'onLoadModules' => $onLoadModules
455 455
         ];
456
-        $options['scripts'][] = '/' . $cacheDir . '/all' . $timeMd5 . '.js';
456
+        $options['scripts'][] = '/'.$cacheDir.'/all'.$timeMd5.'.js';
457 457
         $this->widget('View\bodyEnd', compact('options'));
458 458
     }
459 459
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
                     if (strpos($js, '//') !== false)
501 501
                         $href = $js;
502 502
                     else
503
-                        $href = $this->app->templatesPath . "/{$this->template->name}/js/{$js}";
503
+                        $href = $this->app->templatesPath."/{$this->template->name}/js/{$js}";
504 504
                     $resultArray[] = $href;
505 505
                 }
506 506
                 break;
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
     {
538 538
         if ($add && !empty($this->app->config['site']['name'])) {
539 539
             if ($title) {
540
-                $this->title = $title . ' - ' . $this->app->config['site']['name'];
540
+                $this->title = $title.' - '.$this->app->config['site']['name'];
541 541
             } else {
542 542
                 $this->title = $this->app->config['site']['name'];
543 543
             }
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
                     }
567 567
                 }
568 568
                 if (!$paramArray)
569
-                    $lineParams = ':' . implode(':', $_params);
569
+                    $lineParams = ':'.implode(':', $_params);
570 570
             }
571 571
         }
572 572
         echo "<!--start:{WIDGET:{$_widgetName}{$lineParams}}-->\n";
@@ -585,24 +585,24 @@  discard block
 block discarded – undo
585 585
         if (strpos($widgetName, '\\')) {
586 586
             $widgetName = explode('\\', $widgetName);
587 587
 
588
-            $paths['templatePath_widgetDir'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName[0] . '/' . $widgetName[1] . '/' . $widgetName[1] . '.php';
589
-            $paths['templatePath'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName[0] . '/' . $widgetName[1] . '.php';
588
+            $paths['templatePath_widgetDir'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName[0].'/'.$widgetName[1].'/'.$widgetName[1].'.php';
589
+            $paths['templatePath'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName[0].'/'.$widgetName[1].'.php';
590 590
             App::$cur->$widgetName[0];
591 591
             $modulePaths = Module::getModulePaths(ucfirst($widgetName[0]));
592 592
             foreach ($modulePaths as $pathName => $path) {
593
-                $paths[$pathName . '_widgetDir'] = $path . '/widgets/' . $widgetName[1] . '/' . $widgetName[1] . '.php';
594
-                $paths[$pathName] = $path . '/widgets/' . $widgetName[1] . '.php';
593
+                $paths[$pathName.'_widgetDir'] = $path.'/widgets/'.$widgetName[1].'/'.$widgetName[1].'.php';
594
+                $paths[$pathName] = $path.'/widgets/'.$widgetName[1].'.php';
595 595
             }
596 596
             return $paths;
597 597
         } else {
598
-            $paths['templatePath_widgetDir'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName . '/' . $widgetName . '.php';
599
-            $paths['templatePath'] = $this->templatesPath . '/' . $this->template->name . '/widgets/' . $widgetName . '.php';
598
+            $paths['templatePath_widgetDir'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName.'/'.$widgetName.'.php';
599
+            $paths['templatePath'] = $this->templatesPath.'/'.$this->template->name.'/widgets/'.$widgetName.'.php';
600 600
 
601
-            $paths['curAppPath_widgetDir'] = $this->app->path . '/widgets/' . $widgetName . '/' . $widgetName . '.php';
602
-            $paths['curAppPath'] = $this->app->path . '/widgets/' . $widgetName . '.php';
601
+            $paths['curAppPath_widgetDir'] = $this->app->path.'/widgets/'.$widgetName.'/'.$widgetName.'.php';
602
+            $paths['curAppPath'] = $this->app->path.'/widgets/'.$widgetName.'.php';
603 603
 
604
-            $paths['systemPath_widgetDir'] = INJI_SYSTEM_DIR . '/widgets/' . $widgetName . '/' . $widgetName . '.php';
605
-            $paths['systemPath'] = INJI_SYSTEM_DIR . '/widgets/' . $widgetName . '.php';
604
+            $paths['systemPath_widgetDir'] = INJI_SYSTEM_DIR.'/widgets/'.$widgetName.'/'.$widgetName.'.php';
605
+            $paths['systemPath'] = INJI_SYSTEM_DIR.'/widgets/'.$widgetName.'.php';
606 606
         }
607 607
         return $paths;
608 608
     }
Please login to merge, or discard this patch.