@@ -43,7 +43,7 @@ |
||
43 | 43 | Tools::redirect('/admin', 'У вас нет прав доступа для просмотра этого объекта', 'danger'); |
44 | 44 | } |
45 | 45 | $item = $fullModelName::get($pk); |
46 | - $this->view->setTitle(($fullModelName::$objectName ? $fullModelName::$objectName : $fullModelName) . ($item ? ( ' - ' . $item->name()) : '')); |
|
46 | + $this->view->setTitle(($fullModelName::$objectName ? $fullModelName::$objectName : $fullModelName) . ($item ? (' - ' . $item->name()) : '')); |
|
47 | 47 | if (!empty($_POST['comment'])) { |
48 | 48 | $comment = new Dashboard\Comment(); |
49 | 49 | $comment->text = $_POST['comment']; |
@@ -25,10 +25,12 @@ |
||
25 | 25 | } |
26 | 26 | if (password_verify($_POST['systemPass'], $config['systemPass'])) { |
27 | 27 | $_SESSION['systemLogin'] = 1; |
28 | - } else { |
|
28 | + } |
|
29 | + else { |
|
29 | 30 | if (empty($config['failTry'])) { |
30 | 31 | $config['failTry'] = 1; |
31 | - } else { |
|
32 | + } |
|
33 | + else { |
|
32 | 34 | $config['failTry'] ++; |
33 | 35 | } |
34 | 36 | Config::save('share', $config); |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <div class="row"> |
2 | 2 | <div class="col-lg-12"> |
3 | 3 | <?php |
4 | - $dataManager = new Ui\DataManager('Apps\App', 'setup'); |
|
5 | - $dataManager->draw(); |
|
6 | - ?> |
|
4 | + $dataManager = new Ui\DataManager('Apps\App', 'setup'); |
|
5 | + $dataManager->draw(); |
|
6 | + ?> |
|
7 | 7 | </div> |
8 | 8 | <div class="col-lg-12"> |
9 | 9 | <?php |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -147,9 +147,11 @@ discard block |
||
147 | 147 | public function resolveTemplate() { |
148 | 148 | if ($this->template !== 'inherit') { |
149 | 149 | return $this->template; |
150 | - } elseif ($this->template == 'inherit' && $this->category) { |
|
150 | + } |
|
151 | + elseif ($this->template == 'inherit' && $this->category) { |
|
151 | 152 | return $this->category->resolveTemplate(true); |
152 | - } else { |
|
153 | + } |
|
154 | + else { |
|
153 | 155 | return 'current'; |
154 | 156 | } |
155 | 157 | } |
@@ -157,9 +159,11 @@ discard block |
||
157 | 159 | public function resolveViewer() { |
158 | 160 | if ($this->viewer !== 'inherit') { |
159 | 161 | return $this->viewer; |
160 | - } elseif ($this->viewer == 'inherit' && $this->category) { |
|
162 | + } |
|
163 | + elseif ($this->viewer == 'inherit' && $this->category) { |
|
161 | 164 | return $this->category->resolveViewer(true); |
162 | - } else { |
|
165 | + } |
|
166 | + else { |
|
163 | 167 | return 'default'; |
164 | 168 | } |
165 | 169 | } |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -24,7 +24,8 @@ |
||
24 | 24 | $code .= '$' . $this->name . ' = '; |
25 | 25 | if (is_array($this->value)) { |
26 | 26 | $code .= \CodeGenerator::genArray($this->value); |
27 | - } else { |
|
27 | + } |
|
28 | + else { |
|
28 | 29 | $code .= '"' . str_replace('"', '\"', $this->value) . '";'; |
29 | 30 | } |
30 | 31 | return $code; |
@@ -147,9 +147,11 @@ discard block |
||
147 | 147 | public function resolveTemplate() { |
148 | 148 | if ($this->template !== 'inherit') { |
149 | 149 | return $this->template; |
150 | - } elseif ($this->template == 'inherit' && $this->category) { |
|
150 | + } |
|
151 | + elseif ($this->template == 'inherit' && $this->category) { |
|
151 | 152 | return $this->category->resolveTemplate(true); |
152 | - } else { |
|
153 | + } |
|
154 | + else { |
|
153 | 155 | return 'current'; |
154 | 156 | } |
155 | 157 | } |
@@ -157,9 +159,11 @@ discard block |
||
157 | 159 | public function resolveViewer() { |
158 | 160 | if ($this->viewer !== 'inherit') { |
159 | 161 | return $this->viewer; |
160 | - } elseif ($this->viewer == 'inherit' && $this->category) { |
|
162 | + } |
|
163 | + elseif ($this->viewer == 'inherit' && $this->category) { |
|
161 | 164 | return $this->category->resolveViewer(true); |
162 | - } else { |
|
165 | + } |
|
166 | + else { |
|
163 | 167 | return 'default'; |
164 | 168 | } |
165 | 169 | } |
@@ -94,7 +94,8 @@ |
||
94 | 94 | public function value($default = '') { |
95 | 95 | if ($this->option->type != 'select') { |
96 | 96 | return $this->value; |
97 | - } elseif ($this->optionItem) { |
|
97 | + } |
|
98 | + elseif ($this->optionItem) { |
|
98 | 99 | return $this->optionItem->value; |
99 | 100 | } |
100 | 101 | return $default; |