Completed
Push — master ( 135fa8...4a5eb0 )
by Alexey
09:51 queued 04:36
created
system/modules/Ui/objects/ActiveForm.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                             $this->model->_params[$modelName::index()] = 0;
85 85
                         }
86 86
                         $relOptions['model']::fixPrefix($relOptions['col']);
87
-                        $inputs[$col] = new ActiveForm(new $relOptions['model']([ $relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]);
87
+                        $inputs[$col] = new ActiveForm(new $relOptions['model']([$relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]);
88 88
                     }
89 89
                     $inputs[$col]->parent = $this;
90 90
                 } elseif (!empty($modelName::$cols[$col])) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     public function checkRequest($params = [], $ajax = false)
99 99
     {
100 100
         if (!$this->checkAccess()) {
101
-            $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->formName . '"');
101
+            $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->formName.'"');
102 102
             return [];
103 103
         }
104 104
         $successId = 0;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     if (!empty($this->form['userGroupReadonly'][\Users\User::$cur->group_id]) && in_array($col, $this->form['userGroupReadonly'][\Users\User::$cur->group_id])) {
123 123
                         continue;
124 124
                     }
125
-                    $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($param['type']);
125
+                    $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($param['type']);
126 126
                     $input = new $inputClassName();
127 127
                     $input->activeForm = $this;
128 128
                     $input->activeFormParams = $params;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     public function draw($params = [], $ajax = false)
183 183
     {
184 184
         if (!$this->checkAccess()) {
185
-            $this->drawError('you not have access to "' . $this->modelName . '" form with name: "' . $this->formName . '"');
185
+            $this->drawError('you not have access to "'.$this->modelName.'" form with name: "'.$this->formName.'"');
186 186
             return [];
187 187
         }
188 188
         $form = new Form(!empty($this->form['formOptions']) ? $this->form['formOptions'] : []);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         if (is_object($options)) {
195 195
             $options->draw();
196 196
         } else {
197
-            $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($options['type']);
197
+            $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($options['type']);
198 198
             $input = new $inputClassName();
199 199
             $input->form = $form;
200 200
             $input->activeForm = $this;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         }
271 271
         foreach ($values as $key => $value) {
272 272
             if (is_array($value) && !empty($value['input']) && empty($value['input']['noprefix'])) {
273
-                $values[$key]['input']['name'] = $aditionalInputNamePrefix . "[{$value['input']['name']}]";
273
+                $values[$key]['input']['name'] = $aditionalInputNamePrefix."[{$value['input']['name']}]";
274 274
             }
275 275
         }
276 276
         return $values;
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     public function checkAccess()
295 295
     {
296 296
         if (empty($this->form)) {
297
-            $this->drawError('"' . $this->modelName . '" form with name: "' . $this->formName . '" not found');
297
+            $this->drawError('"'.$this->modelName.'" form with name: "'.$this->formName.'" not found');
298 298
             return false;
299 299
         }
300 300
         if (\App::$cur->Access && !\App::$cur->Access->checkAccess($this)) {
Please login to merge, or discard this patch.
system/modules/Ui/objects/FastEdit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         echo "<div class = 'fastEdit' ";
19 19
         if ($object) {
20
-            echo "data-model='" . get_class($object) . "' data-col='{$col}' data-key='" . $object->pk() . "'";
20
+            echo "data-model='".get_class($object)."' data-col='{$col}' data-key='".$object->pk()."'";
21 21
         }
22 22
         echo ">";
23 23
         $value = $value !== null ? $value : ($object ? $object->$col : '');
Please login to merge, or discard this patch.
system/modules/Ui/objects/ActiveForm/Input.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     public function validate(&$request)
103 103
     {
104 104
         if (empty($request[$this->colName]) && !empty($this->colParams['required'])) {
105
-            throw new \Exception('Вы не заполнили: ' . $this->colLabel());
105
+            throw new \Exception('Вы не заполнили: '.$this->colLabel());
106 106
         }
107 107
         //var_dump($this->colName,$this->colParams);
108 108
         //exit();
Please login to merge, or discard this patch.
system/modules/Ui/objects/ActiveForm/Input/Image.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                 'size' => $_FILES[$this->activeForm->requestFormName]['size'][$this->modelName][$this->colName],
45 45
                 'error' => $_FILES[$this->activeForm->requestFormName]['error'][$this->modelName][$this->colName],
46 46
                     ], [
47
-                'upload_code' => 'activeForm:' . $this->activeForm->modelName . ':' . $this->activeForm->model->pk(),
47
+                'upload_code' => 'activeForm:'.$this->activeForm->modelName.':'.$this->activeForm->model->pk(),
48 48
                 'accept_group' => 'image'
49 49
             ]);
50 50
             if ($file_id) {
Please login to merge, or discard this patch.
system/modules/Ui/objects/ActiveForm/Input/Files.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
                     'size' => $_FILES[$this->activeForm->requestFormName]['size'][$this->modelName][$this->colName][$key],
26 26
                     'error' => $_FILES[$this->activeForm->requestFormName]['error'][$this->modelName][$this->colName][$key],
27 27
                         ], [
28
-                    'upload_code' => 'activeForm:' . $this->activeForm->modelName . ':' . $this->activeForm->model->pk()
28
+                    'upload_code' => 'activeForm:'.$this->activeForm->modelName.':'.$this->activeForm->model->pk()
29 29
                 ]);
30 30
             }
31 31
             $this->activeForm->model->{$this->colName} = implode(',', array_filter($file_ids));
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager/Action/Open.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             'formName' => !empty($dataManager->managerOptions['editForm']) ? $dataManager->managerOptions['editForm'] : 'manager',
27 27
             'redirectUrl' => !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : str_replace('\\', '/', $dataManager->modelName)
28 28
         ];
29
-        return "<a href='/admin/" . str_replace('\\', '/view/', get_class($item)) . "/{$item->pk()}?" . http_build_query($query) . "'><i class='glyphicon glyphicon-eye-open'></i></a>";
29
+        return "<a href='/admin/".str_replace('\\', '/view/', get_class($item))."/{$item->pk()}?".http_build_query($query)."'><i class='glyphicon glyphicon-eye-open'></i></a>";
30 30
     }
31 31
 
32 32
 }
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager/Action/Href.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         if (!empty($actionParams['query'])) {
29 29
             $query = $query + $actionParams['query'];
30 30
         }
31
-        return "<a class='" . (isset($actionParams['class']) ? $actionParams['class'] : '') . "' href='{$actionParams['href']}?" . http_build_query($query) . "'>{$actionParams['text']}</a>";
31
+        return "<a class='".(isset($actionParams['class']) ? $actionParams['class'] : '')."' href='{$actionParams['href']}?".http_build_query($query)."'>{$actionParams['text']}</a>";
32 32
     }
33 33
 
34 34
 }
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager/Action/Edit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
             'formName' => !empty($dataManager->managerOptions['editForm']) ? $dataManager->managerOptions['editForm'] : 'manager'
25 25
         ];
26 26
 
27
-        return '<a href ="#" onclick=\'inji.Ui.forms.popUp("' . addcslashes(get_class($item), '\\') . ':' . $item->pk() . '",' . json_encode($formParams) . ');
27
+        return '<a href ="#" onclick=\'inji.Ui.forms.popUp("'.addcslashes(get_class($item), '\\').':'.$item->pk().'",'.json_encode($formParams).');
28 28
                                       return false;\'><i class="glyphicon glyphicon-edit"></i></a>';
29 29
     }
30 30
 
Please login to merge, or discard this patch.
system/modules/Ui/objects/DataManager/Action/Delete.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     public static function rowButton($dataManager, $item, $params, $actionParams)
21 21
     {
22
-        return '<a href ="#" onclick=\'inji.Ui.dataManagers.get(this).delRow(' . $item->pk() . ');
22
+        return '<a href ="#" onclick=\'inji.Ui.dataManagers.get(this).delRow('.$item->pk().');
23 23
                                       return false;\'><i class="glyphicon glyphicon-remove"></i></a>';
24 24
     }
25 25
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             $model->delete();
32 32
         }
33 33
         $count = count($models);
34
-        return 'Удалено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['запись', 'записи', 'записей']);
34
+        return 'Удалено <b>'.$count.'</b> '.\Tools::getNumEnding($count, ['запись', 'записи', 'записей']);
35 35
     }
36 36
 
37 37
 }
Please login to merge, or discard this patch.