@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!Users\Social::getList(['where' => ['active', 1]])){
|
|
| 2 | +if (!Users\Social::getList(['where' => ['active', 1]])) {
|
|
| 3 | 3 | return false; |
| 4 | 4 | } |
| 5 | 5 | return [ |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | if (!empty($_POST['partnerInvite']['email'])) { |
| 3 | 3 | $title = ''; |
| 4 | 4 | if (!empty($_POST['partnerInvite']['name'])) { |
| 5 | - $title .='Ув. ' . htmlspecialchars($_POST['partnerInvite']['name']) . '. '; |
|
| 5 | + $title .= 'Ув. ' . htmlspecialchars($_POST['partnerInvite']['name']) . '. '; |
|
| 6 | 6 | } |
| 7 | 7 | if (!filter_var($_POST['partnerInvite']['email'], FILTER_VALIDATE_EMAIL)) { |
| 8 | 8 | Tools::redirect(null, 'Вы ввели не корректный E-mail', 'danger'); |
@@ -11,13 +11,14 @@ |
||
| 11 | 11 | '', |
| 12 | 12 | '' |
| 13 | 13 | ]); |
| 14 | -if (!empty($templates['app']['installed'])) |
|
| 14 | +if (!empty($templates['app']['installed'])) { |
|
| 15 | 15 | foreach ($templates['app']['installed'] as $template => $name) { |
| 16 | 16 | $table->addRow([ |
| 17 | 17 | $name, |
| 18 | 18 | (empty($templates['app']['current']) || $templates['app']['current'] != $template) ? '<a href = "/admin/view/setDefault/' . $template . '">Установить по умолчанию</a>' : 'Тема по умолчанию', |
| 19 | 19 | '<a href = "/admin/view/editTemplate/' . $template . '">Редактировать</a>' |
| 20 | 20 | ]); |
| 21 | +} |
|
| 21 | 22 | } |
| 22 | 23 | $table->draw(); |
| 23 | 24 | ?> |
| 24 | 25 | \ No newline at end of file |
@@ -36,8 +36,9 @@ |
||
| 36 | 36 | $params = json_decode($widget->widget_params, true); |
| 37 | 37 | if ($params) { |
| 38 | 38 | foreach ($params as $param) { |
| 39 | - if (!isset($widgetCode[$i])) |
|
| 40 | - break; |
|
| 39 | + if (!isset($widgetCode[$i])) { |
|
| 40 | + break; |
|
| 41 | + } |
|
| 41 | 42 | if ($param['type'] == 'select') { |
| 42 | 43 | $item = $param['model']::get($widgetCode[$i++]); |
| 43 | 44 | if ($item) { |
@@ -35,10 +35,11 @@ |
||
| 35 | 35 | ?> |
| 36 | 36 | </select> |
| 37 | 37 | <?php |
| 38 | -if (false) |
|
| 38 | +if (false) { |
|
| 39 | 39 | foreach ($widgets as $widget) { |
| 40 | 40 | if ($widget->widget_params) { |
| 41 | 41 | $params = json_decode($widget->widget_params, true); |
| 42 | +} |
|
| 42 | 43 | if ($params) { |
| 43 | 44 | echo "<div id = 'params{$widget->widget_id}' class = 'widgetParams' style='display:none;'>"; |
| 44 | 45 | echo "<h3>Параметры</h3>"; |
@@ -28,9 +28,9 @@ |
||
| 28 | 28 | $code .= '$' . $param . ','; |
| 29 | 29 | } |
| 30 | 30 | $code = rtrim($code, ','); |
| 31 | - $code.= ") {\n"; |
|
| 32 | - $code.= ' ' . str_replace("\n", "\n ", $this->body); |
|
| 33 | - $code .="\n}"; |
|
| 31 | + $code .= ") {\n"; |
|
| 32 | + $code .= ' ' . str_replace("\n", "\n ", $this->body); |
|
| 33 | + $code .= "\n}"; |
|
| 34 | 34 | return $code; |
| 35 | 35 | } |
| 36 | 36 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | if (empty($config['failTry'])) { |
| 32 | 32 | $config['failTry'] = 1; |
| 33 | 33 | } else { |
| 34 | - $config['failTry'] ++; |
|
| 34 | + $config['failTry']++; |
|
| 35 | 35 | } |
| 36 | 36 | Config::save('share', $config); |
| 37 | 37 | } |
@@ -83,6 +83,9 @@ |
||
| 83 | 83 | return null; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | + /** |
|
| 87 | + * @return string |
|
| 88 | + */ |
|
| 86 | 89 | function colName() |
| 87 | 90 | { |
| 88 | 91 | return "{$this->activeForm->requestFormName}[{$this->activeForm->modelName}][{$this->colName}]"; |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | if ($treePath) { |
| 132 | 132 | $categorys = Category::getList(['where' => ['id', implode(',', $treePath), 'IN']]); |
| 133 | 133 | foreach ($categorys as $category) { |
| 134 | - $href .="/{$category->alias}"; |
|
| 134 | + $href .= "/{$category->alias}"; |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | return $href . "/" . ($this->alias ? $this->alias : $this->pk()); |