@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function ($step = null, $params = []) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function ($step = null, $params = []) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function ($step = null, $params = []) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -189,17 +189,20 @@ |
||
189 | 189 | |
190 | 190 | public function get($idn = false, $ltype = 'id') |
191 | 191 | { |
192 | - if (!$idn) |
|
193 | - return false; |
|
192 | + if (!$idn) { |
|
193 | + return false; |
|
194 | + } |
|
194 | 195 | |
195 | - if (is_numeric($idn) && $ltype != 'login') |
|
196 | - $user = Users\User::get($idn, 'id'); |
|
197 | - elseif ($ltype == 'login') |
|
198 | - $user = Users\User::get($idn, 'login'); |
|
199 | - else |
|
200 | - $user = Users\User::get($idn, 'mail'); |
|
201 | - if (!$user) |
|
202 | - return []; |
|
196 | + if (is_numeric($idn) && $ltype != 'login') { |
|
197 | + $user = Users\User::get($idn, 'id'); |
|
198 | + } elseif ($ltype == 'login') { |
|
199 | + $user = Users\User::get($idn, 'login'); |
|
200 | + } else { |
|
201 | + $user = Users\User::get($idn, 'mail'); |
|
202 | + } |
|
203 | + if (!$user) { |
|
204 | + return []; |
|
205 | + } |
|
203 | 206 | |
204 | 207 | return $user; |
205 | 208 | } |
@@ -329,6 +329,9 @@ |
||
329 | 329 | return $rows; |
330 | 330 | } |
331 | 331 | |
332 | + /** |
|
333 | + * @param DataManager $dataManager |
|
334 | + */ |
|
332 | 335 | public static function drawCol($item, $colName, $params = [], $dataManager = null, $originalCol = '', $originalItem = null) |
333 | 336 | { |
334 | 337 | $modelName = get_class($item); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function($step = NULL, $params = []) { |
|
4 | 4 | |
5 | 5 | $groups = [ |
6 | 6 | [ |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function ($step = NULL, $params = []) { |
|
3 | +return function ($step = null, $params = []) { |
|
4 | 4 | App::$cur->db->createTable('notifications_notification', [ |
5 | 5 | 'notification_id' => 'pk', |
6 | 6 | 'notification_chanel_id' => 'int(11) UNSIGNED NOT NULL', |
@@ -132,7 +132,7 @@ |
||
132 | 132 | * Get installed modules for app |
133 | 133 | * |
134 | 134 | * @param \App $app |
135 | - * @param boolean|\App $primary |
|
135 | + * @param App $primary |
|
136 | 136 | * @return array |
137 | 137 | */ |
138 | 138 | public static function getInstalled($app, $primary = false) |
@@ -2,27 +2,45 @@ |
||
2 | 2 | <form action = '' method = 'POST' enctype="multipart/form-data"> |
3 | 3 | <div class ="form-group"> |
4 | 4 | <label>Название сайта</label> |
5 | - <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) echo \App::$primary->config['site']['name']; ?>' /> |
|
5 | + <input class ="form-control" type = 'text' name = 'site_name' value = '<?php if (!empty(\App::$primary->config['site']['name'])) { |
|
6 | + echo \App::$primary->config['site']['name']; |
|
7 | +} |
|
8 | +?>' /> |
|
6 | 9 | </div> |
7 | 10 | <div class ="form-group"> |
8 | 11 | <label>Название компании</label> |
9 | - <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) echo \App::$primary->config['site']['company_name']; ?>' /> |
|
12 | + <input class ="form-control" type = 'text' name = 'company_name' value = '<?php if (!empty(\App::$primary->config['site']['company_name'])) { |
|
13 | + echo \App::$primary->config['site']['company_name']; |
|
14 | +} |
|
15 | +?>' /> |
|
10 | 16 | </div> |
11 | 17 | <div class ="form-group"> |
12 | 18 | <label>Основной домен</label> |
13 | - <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) echo \App::$primary->config['site']['domain']; ?>' /> |
|
19 | + <input class ="form-control" type = 'text' name = 'site_domain' value = '<?php if (!empty(\App::$primary->config['site']['domain'])) { |
|
20 | + echo \App::$primary->config['site']['domain']; |
|
21 | +} |
|
22 | +?>' /> |
|
14 | 23 | </div> |
15 | 24 | <div class ="form-group"> |
16 | 25 | <label>Контактный email</label> |
17 | - <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) echo \App::$primary->config['site']['email']; ?>' /> |
|
26 | + <input class ="form-control" type = 'text' name = 'site_email' value = '<?php if (!empty(\App::$primary->config['site']['email'])) { |
|
27 | + echo \App::$primary->config['site']['email']; |
|
28 | +} |
|
29 | +?>' /> |
|
18 | 30 | </div> |
19 | 31 | <div class ="form-group"> |
20 | 32 | <label>Ключевые слова</label> |
21 | - <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) echo \App::$primary->config['site']['keywords']; ?>' /> |
|
33 | + <input class ="form-control" type = 'text' name = 'site_keywords' value = '<?php if (!empty(\App::$primary->config['site']['keywords'])) { |
|
34 | + echo \App::$primary->config['site']['keywords']; |
|
35 | +} |
|
36 | +?>' /> |
|
22 | 37 | </div> |
23 | 38 | <div class ="form-group"> |
24 | 39 | <label>Краткое описание сайта</label> |
25 | - <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) echo \App::$primary->config['site']['description']; ?>' /> |
|
40 | + <input class ="form-control" type = 'text' name = 'site_description' value = '<?php if (!empty(\App::$primary->config['site']['description'])) { |
|
41 | + echo \App::$primary->config['site']['description']; |
|
42 | +} |
|
43 | +?>' /> |
|
26 | 44 | </div> |
27 | 45 | <?php |
28 | 46 | $form = new Ui\Form(); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (App::$cur->users->config['invites']) { |
|
3 | +if (App::$cur->users->config['invites']) { |
|
4 | 4 | return [ |
5 | 5 | 'name' => 'Мои партнеры', |
6 | 6 | 'fullWidget' => 'Users\cabinet/usersTree' |