Completed
Pull Request — master (#144)
by Michael
03:03
created
class/Files/admin/AdminPages.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 
152 152
         $ret            .= $pc->getPhpCodeCommentLine('Table view', $tableName, $t);
153 153
         $contentForeach = $xc->getXcGetValues($tableName, $tableSoleName, 'i', false, "\t");
154
-        $contentForeach .= $xc->getXcXoopsTplAppend("{$tableName}_list", "\${$tableSoleName}", $t . "\t\t");
155
-        $contentForeach .= $pc->getPhpCodeUnset($tableSoleName, $t . "\t\t");
156
-        $condIf         = $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $contentForeach, $t . "\t");
157
-        $condIf         .= $xc->getXcPageNav($tableName, $t . "\t");
158
-        $condElse       = $xc->getXcTplAssign('error', "{$language}THEREARENT_{$stuTableName}", true, $t . "\t");
154
+        $contentForeach .= $xc->getXcXoopsTplAppend("{$tableName}_list", "\${$tableSoleName}", $t."\t\t");
155
+        $contentForeach .= $pc->getPhpCodeUnset($tableSoleName, $t."\t\t");
156
+        $condIf         = $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $contentForeach, $t."\t");
157
+        $condIf         .= $xc->getXcPageNav($tableName, $t."\t");
158
+        $condElse       = $xc->getXcTplAssign('error', "{$language}THEREARENT_{$stuTableName}", true, $t."\t");
159 159
         $ret            .= $pc->getPhpCodeConditions("\${$tableName}Count", ' > ', '0', $condIf, $condElse, $t);
160 160
 
161 161
         return $ret;
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $stuTableName = mb_strtoupper($tableName);
180 180
         $ret          = $axc->getAdminTemplateMain($moduleDirname, $tableName);
181 181
         $navigation   = $axc->getAdminDisplayNavigation($tableName);
182
-        $ret          .= $xc->getXcTplAssign('navigation', $navigation, true, $t);
182
+        $ret .= $xc->getXcTplAssign('navigation', $navigation, true, $t);
183 183
 
184 184
         if (in_array(1, $fieldInForm)) {
185 185
             $ret .= $axc->getAdminItemButton($language, $tableName, $stuTableName, '', 'list', $t);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $ret     = $pc->getPhpCodeCommentLine('Permission to', $perm, "\t\t\t");
212 212
         $content = $xc->getXcAddRight('gpermHandler', "{$moduleDirname}_{$perm}", '$permId', '$onegroupId', "\$GLOBALS['xoopsModule']->getVar('mid')", false, "\t");
213 213
         $foreach = $pc->getPhpCodeForeach("_POST['groups_{$perm}']", false, false, 'onegroupId', $content, "\t\t\t\t");
214
-        $ret     .= $pc->getPhpCodeConditions("isset(\$_POST['groups_{$perm}'])", null, null, $foreach, false, "\t\t\t");
214
+        $ret .= $pc->getPhpCodeConditions("isset(\$_POST['groups_{$perm}'])", null, null, $foreach, false, "\t\t\t");
215 215
 
216 216
         return $ret;
217 217
     }
@@ -240,11 +240,11 @@  discard block
 block discarded – undo
240 240
         $xoopsSecurityCheck = $xc->getXcSecurityCheck('!');
241 241
         $securityError      = $xc->getXcSecurityErrors();
242 242
         $implode            = $pc->getPhpCodeImplode(',', $securityError);
243
-        $redirectError      = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t . "\t");
244
-        $ret                .= $pc->getPhpCodeConditions($xoopsSecurityCheck, '', '', $redirectError, false, $t);
243
+        $redirectError      = $xc->getXcRedirectHeader($tableName, '', '3', $implode, true, $t."\t");
244
+        $ret .= $pc->getPhpCodeConditions($xoopsSecurityCheck, '', '', $redirectError, false, $t);
245 245
 
246 246
         $isset       = $pc->getPhpCodeIsset($ccFieldId);
247
-        $contentIf   = $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler', false, $t . "\t");
247
+        $contentIf   = $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName.'Handler', false, $t."\t");
248 248
         $contentElse = $xc->getXcObjHandlerCreate($tableName, "\t\t\t");
249 249
         $ret         .= $pc->getPhpCodeConditions($isset, '', '', $contentIf, $contentElse, $t);
250 250
         $ret         .= $pc->getPhpCodeCommentLine('Set Vars', null, "\t\t");
@@ -286,20 +286,20 @@  discard block
 block discarded – undo
286 286
                 }
287 287
             }
288 288
         }
289
-        $ret           .= $pc->getPhpCodeCommentLine('Insert Data', null, "\t\t");
289
+        $ret .= $pc->getPhpCodeCommentLine('Insert Data', null, "\t\t");
290 290
         $insert        = $xc->getXcInsert($tableName, $tableName, 'Obj');
291 291
         $contentInsert = '';
292 292
         if (1 == $tableCategory) {
293 293
             $ucfTableName  = ucfirst($tableName);
294
-            $contentInsert = $xc->getXcEqualsOperator('$newCatId', "\${$tableName}Obj->getNewInsertedId{$ucfTableName}()", null, false, $t . "\t");
294
+            $contentInsert = $xc->getXcEqualsOperator('$newCatId', "\${$tableName}Obj->getNewInsertedId{$ucfTableName}()", null, false, $t."\t");
295 295
             $ucfFieldId    = $this->getCamelCase($fieldId, true);
296
-            $contentInsert .= $pc->getPhpCodeTernaryOperator('permId', "isset(\$_REQUEST['{$fieldId}'])", "\${$ccFieldId}", "\$new{$ucfFieldId}", $t . "\t");
297
-            $contentInsert .= $xc->getXcEqualsOperator('$gpermHandler', "xoops_getHandler('groupperm')", null, false, $t . "\t");
298
-            $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new' . $ucfFieldId);
299
-            $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new' . $ucfFieldId, 'submit');
300
-            $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new' . $ucfFieldId, 'approve');
296
+            $contentInsert .= $pc->getPhpCodeTernaryOperator('permId', "isset(\$_REQUEST['{$fieldId}'])", "\${$ccFieldId}", "\$new{$ucfFieldId}", $t."\t");
297
+            $contentInsert .= $xc->getXcEqualsOperator('$gpermHandler', "xoops_getHandler('groupperm')", null, false, $t."\t");
298
+            $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new'.$ucfFieldId);
299
+            $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new'.$ucfFieldId, 'submit');
300
+            $contentInsert .= $this->getPermissionsSave($moduleDirname, $fieldId, $ccFieldId, 'new'.$ucfFieldId, 'approve');
301 301
         }
302
-        $contentInsert .= $xc->getXcRedirectHeader($tableName . '', '?op=list', '2', "{$language}FORM_OK", true, $t . "\t");
302
+        $contentInsert .= $xc->getXcRedirectHeader($tableName.'', '?op=list', '2', "{$language}FORM_OK", true, $t."\t");
303 303
         $ret           .= $pc->getPhpCodeConditions($insert, '', '', $contentInsert, false, $t);
304 304
         $ret           .= $pc->getPhpCodeCommentLine('Get Form', null, "\t\t");
305 305
         $ret           .= $xc->getXcTplAssign('error', "\${$tableName}Obj->getHtmlErrors()", true, $t);
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
         $ret        = $axc->getAdminTemplateMain($moduleDirname, $tableName);
338 338
         $navigation = $axc->getAdminDisplayNavigation($tableName);
339
-        $ret        .= $xc->getXcTplAssign('navigation', $navigation, true, $t);
339
+        $ret .= $xc->getXcTplAssign('navigation', $navigation, true, $t);
340 340
 
341 341
         if (in_array(1, $fieldInForm)) {
342 342
             $ret .= $axc->getAdminItemButton($language, $tableName, $stuTableSoleName, '?op=new', 'add', $t);
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
             $ret .= $xc->getXcTplAssign('buttons', '$adminObject->displayButton(\'left\')', true, $t);
345 345
         }
346 346
         $ret .= $pc->getPhpCodeCommentLine('Get Form', null, "\t\t");
347
-        $ret .= $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler', false, $t);
347
+        $ret .= $xc->getXcGet($tableName, $ccFieldId, 'Obj', $tableName.'Handler', false, $t);
348 348
         $ret .= $xc->getXcGetForm('form', $tableName, 'Obj', $t);
349 349
         $ret .= $xc->getXcTplAssign('form', '$form->render()', true, $t);
350 350
 
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         }
409 409
         $delete = $this->getAdminPagesDelete($tableName, $language, $fieldId, $fieldMain, "\t\t");
410 410
 
411
-        $cases   = [
411
+        $cases = [
412 412
             'list'   => [$list],
413 413
             'new'    => [$new],
414 414
             'save'   => [$save],
Please login to merge, or discard this patch.
class/Files/admin/AdminFooter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
         $moduleDirname = $module->getVar('mod_dirname');
86 86
         $content       = $this->getHeaderFilesComments($module, $filename);
87 87
         $isset         = $this->phpcode->getPhpCodeIsset('templateMain');
88
-        $display       = "\t" . $this->xc->getXcTplAssign('maintainedby', '$' . $moduleDirname . "->getConfig('maintainedby')");
89
-        $display       .= "\t" . $this->phpcode->getPhpCodeRemoveCarriageReturn($this->xc->getXcTplDisplay(), '', "\r");
90
-        $content       .= $this->phpcode->getPhpCodeConditions($isset, '', '', $display, false, '') . PHP_EOL;
88
+        $display       = "\t".$this->xc->getXcTplAssign('maintainedby', '$'.$moduleDirname."->getConfig('maintainedby')");
89
+        $display       .= "\t".$this->phpcode->getPhpCodeRemoveCarriageReturn($this->xc->getXcTplDisplay(), '', "\r");
90
+        $content       .= $this->phpcode->getPhpCodeConditions($isset, '', '', $display, false, '').PHP_EOL;
91 91
         $content       .= $this->xc->getXcCPFooter();
92 92
 
93 93
         $this->create($moduleDirname, 'admin', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Please login to merge, or discard this patch.
class/Files/admin/AdminXoopsCode.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
     public function getAdminItemButton($language, $tableName, $stuTableSoleName, $op = '?op=new', $type = 'add', $t = '')
74 74
     {
75 75
         $stuType = mb_strtoupper($type);
76
-        $aM      = $t . '$adminObject->addItemButton(';
76
+        $aM      = $t.'$adminObject->addItemButton(';
77 77
         if ('add' === $type) {
78
-            $ret = $aM . "{$language}ADD_{$stuTableSoleName}, '{$tableName}.php{$op}', '{$type}');\n";
78
+            $ret = $aM."{$language}ADD_{$stuTableSoleName}, '{$tableName}.php{$op}', '{$type}');\n";
79 79
         } else {
80
-            $ret = $aM . "{$language}{$stuTableSoleName}_{$stuType}, '{$tableName}.php{$op}', '{$type}');\n";
80
+            $ret = $aM."{$language}{$stuTableSoleName}_{$stuType}, '{$tableName}.php{$op}', '{$type}');\n";
81 81
         }
82 82
 
83 83
         return $ret;
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
      */
120 120
     public function getAxcAddInfoBoxLine($language, $label = '', $var = '', $t = '')
121 121
     {
122
-        $aMenu = $t . '$adminObject->addInfoBoxLine(sprintf(';
122
+        $aMenu = $t.'$adminObject->addInfoBoxLine(sprintf(';
123 123
         if ('' != $var) {
124
-            $ret = $aMenu . " '<label>'.{$label}.'</label>', {$var}));\n";
124
+            $ret = $aMenu." '<label>'.{$label}.'</label>', {$var}));\n";
125 125
         } else {
126
-            $ret = $aMenu . " '<label>'.{$label}.'</label>'));\n";
126
+            $ret = $aMenu." '<label>'.{$label}.'</label>'));\n";
127 127
         }
128 128
 
129 129
         return $ret;
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function getAxcAddConfigBoxLine($language, $label = '', $var = '', $t = '')
142 142
     {
143
-        $aMenu = $t . '$adminObject->addConfigBoxLine(';
143
+        $aMenu = $t.'$adminObject->addConfigBoxLine(';
144 144
         if ('' != $var) {
145
-            $ret = $aMenu . "{$language}, '{$label}', {$var});\n";
145
+            $ret = $aMenu."{$language}, '{$label}', {$var});\n";
146 146
         } else {
147
-            $ret = $aMenu . "{$language}, '{$label}');\n";
147
+            $ret = $aMenu."{$language}, '{$label}');\n";
148 148
         }
149 149
 
150 150
         return $ret;
@@ -166,15 +166,15 @@  discard block
 block discarded – undo
166 166
         $ret            .= $pCodeImageList->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/uploader', true, false, '', $t);
167 167
         $xRootPath      = "XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32'";
168 168
         $ret            .= $xCodeImageList->getXcMediaUploader('uploader', $xRootPath, $moduleDirname, $t);
169
-        $post           = $pCodeImageList->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST') . '[0]';
169
+        $post           = $pCodeImageList->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST').'[0]';
170 170
         $fetchMedia     = $this->getAxcFetchMedia('uploader', $post);
171
-        $ifelse         = $t . "\t//" . $this->getAxcSetPrefix('uploader', "{$fieldName}_") . ";\n";
172
-        $ifelse         .= $t . "\t//{$fetchMedia};\n";
173
-        $contentElseInt = $xCodeImageList->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t . "\t\t");
174
-        $contentIf      = $xCodeImageList->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t . "\t\t");
175
-        $contentIf      .= $xCodeImageList->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t . "\t\t");
176
-        $ifelse         .= $pCodeImageList->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t . "\t");
177
-        $contentElseExt = $xCodeImageList->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t . "\t");
171
+        $ifelse         = $t."\t//".$this->getAxcSetPrefix('uploader', "{$fieldName}_").";\n";
172
+        $ifelse         .= $t."\t//{$fetchMedia};\n";
173
+        $contentElseInt = $xCodeImageList->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t."\t\t");
174
+        $contentIf      = $xCodeImageList->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t."\t\t");
175
+        $contentIf      .= $xCodeImageList->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t."\t\t");
176
+        $ifelse         .= $pCodeImageList->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t."\t");
177
+        $contentElseExt = $xCodeImageList->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t."\t");
178 178
 
179 179
         $ret .= $pCodeImageList->getPhpCodeConditions($fetchMedia, '', '', $ifelse, $contentElseExt, $t);
180 180
 
@@ -198,21 +198,21 @@  discard block
 block discarded – undo
198 198
         $ret              = $pCodeUploadImage->getPhpCodeCommentLine('Set Var', $fieldName, $t);
199 199
         $ret              .= $pCodeUploadImage->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/uploader', true, false, '', $t);
200 200
         $xUploadImage     = "{$stuModuleDirname}_UPLOAD_IMAGE_PATH";
201
-        $ret              .= $xCodeUploadImage->getXcMediaUploader('uploader', $xUploadImage . ".'/{$tableName}/'", $moduleDirname, $t);
202
-        $post             = $pCodeUploadImage->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST') . '[0]';
201
+        $ret              .= $xCodeUploadImage->getXcMediaUploader('uploader', $xUploadImage.".'/{$tableName}/'", $moduleDirname, $t);
202
+        $post             = $pCodeUploadImage->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST').'[0]';
203 203
         $fetchMedia       = $this->getAxcFetchMedia('uploader', $post);
204
-        $file             = $pCodeUploadImage->getPhpCodeGlobalsVariables('attachedfile', 'FILES') . "['name']";
204
+        $file             = $pCodeUploadImage->getPhpCodeGlobalsVariables('attachedfile', 'FILES')."['name']";
205 205
         $expr             = '/^.+\.([^.]+)$/sU';
206
-        $ifelse           = $pCodeUploadImage->getPhpCodePregFunzions('extension', $expr, '', $file, 'replace', false, $t . "\t");
206
+        $ifelse           = $pCodeUploadImage->getPhpCodePregFunzions('extension', $expr, '', $file, 'replace', false, $t."\t");
207 207
 
208
-        $ifelse         .= $t . "\t\$imgName = str_replace(' ', '', \$_POST['{$fieldMain}']).'.'.\$extension;\n";
209
-        $ifelse         .= $this->getAxcSetPrefix('uploader', '$imgName', $t . "\t") . ";\n";
210
-        $ifelse         .= $t . "\t{$fetchMedia};\n";
211
-        $contentElseInt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t . "\t\t");
212
-        $contentIf      = $xCodeUploadImage->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t . "\t\t");
213
-        $contentIf      .= $xCodeUploadImage->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t . "\t\t");
214
-        $ifelse         .= $pCodeUploadImage->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t . "\t");
215
-        $contentElseExt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t . "\t");
208
+        $ifelse         .= $t."\t\$imgName = str_replace(' ', '', \$_POST['{$fieldMain}']).'.'.\$extension;\n";
209
+        $ifelse         .= $this->getAxcSetPrefix('uploader', '$imgName', $t."\t").";\n";
210
+        $ifelse         .= $t."\t{$fetchMedia};\n";
211
+        $contentElseInt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t."\t\t");
212
+        $contentIf      = $xCodeUploadImage->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t."\t\t");
213
+        $contentIf      .= $xCodeUploadImage->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t."\t\t");
214
+        $ifelse         .= $pCodeUploadImage->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElseInt, $t."\t");
215
+        $contentElseExt = $xCodeUploadImage->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']", $t."\t");
216 216
 
217 217
         $ret .= $pCodeUploadImage->getPhpCodeConditions($fetchMedia, '', '', $ifelse, $contentElseExt, $t);
218 218
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     public function getAxcUploadFileSetVar($moduleDirname, $tableName, $fieldName, $formatUrl = false, $t = '')
232 232
     {
233 233
         $stuModuleDirname = mb_strtoupper($moduleDirname);
234
-        $ret              = $this->getAxcImageFileSetVar($moduleDirname, $stuModuleDirname . '_UPLOAD_FILES_PATH', $tableName, $fieldName, $formatUrl, $t);
234
+        $ret              = $this->getAxcImageFileSetVar($moduleDirname, $stuModuleDirname.'_UPLOAD_FILES_PATH', $tableName, $fieldName, $formatUrl, $t);
235 235
 
236 236
         return $ret;
237 237
     }
@@ -253,26 +253,26 @@  discard block
 block discarded – undo
253 253
         $ret             = '';
254 254
         $ifelse          = '';
255 255
         $files           = '';
256
-        $post            = $pCodeFileSetVar->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST') . '[0]';
256
+        $post            = $pCodeFileSetVar->getPhpCodeGlobalsVariables('xoops_upload_file', 'POST').'[0]';
257 257
         $fetchMedia      = $this->getAxcFetchMedia('uploader', $post);
258 258
         if ($formatUrl) {
259 259
             $ret    .= $xCodeFileSetVar->getXcSetVar($tableName, $fieldName, "formatUrl(\$_REQUEST['{$fieldName}'])", $t);
260 260
             $ret    .= $pCodeFileSetVar->getPhpCodeCommentLine('Set Var', $fieldName, $t);
261
-            $ifelse .= $t . "\t\t{$fetchMedia};\n";
261
+            $ifelse .= $t."\t\t{$fetchMedia};\n";
262 262
         } else {
263
-            $files  = '/files';
263
+            $files = '/files';
264 264
             $ret    .= $pCodeFileSetVar->getPhpCodeCommentLine('Set Var', $fieldName, $t);
265
-            $ifelse .= $t . "\t//" . $this->getAxcSetPrefix('uploader', "'{$fieldName}_'") . ";\n";
266
-            $ifelse .= $t . "\t//{$fetchMedia};\n";
265
+            $ifelse .= $t."\t//".$this->getAxcSetPrefix('uploader', "'{$fieldName}_'").";\n";
266
+            $ifelse .= $t."\t//{$fetchMedia};\n";
267 267
         }
268 268
         $ret         .= $pCodeFileSetVar->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/uploader', true, false, '', $t);
269
-        $ret         .= $xCodeFileSetVar->getXcMediaUploader('uploader', $dirname . ".'/{$tableName}{$files}'", $moduleDirname, $t);
270
-        $contentElse = $xCodeFileSetVar->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t . "\t\t");
271
-        $contentIf   = $xCodeFileSetVar->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t . "\t\t");
272
-        $contentIf   .= $xCodeFileSetVar->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t . "\t\t");
273
-        $ifelse      .= $pCodeFileSetVar->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElse, $t . "\t");
269
+        $ret         .= $xCodeFileSetVar->getXcMediaUploader('uploader', $dirname.".'/{$tableName}{$files}'", $moduleDirname, $t);
270
+        $contentElse = $xCodeFileSetVar->getXcSetVar($tableName, $fieldName, '$uploader->getSavedFileName()', $t."\t\t");
271
+        $contentIf   = $xCodeFileSetVar->getXcEqualsOperator('$errors', '$uploader->getErrors()', null, false, $t."\t\t");
272
+        $contentIf   .= $xCodeFileSetVar->getXcRedirectHeader('javascript:history.go(-1)', '', '3', '$errors', true, $t."\t\t");
273
+        $ifelse      .= $pCodeFileSetVar->getPhpCodeConditions('!$uploader->upload()', '', '', $contentIf, $contentElse, $t."\t");
274 274
 
275
-        $ret .= $pCodeFileSetVar->getPhpCodeConditions($fetchMedia, '', '', $t . "\t" . $fetchMedia . ";\n", $ifelse, $t);
275
+        $ret .= $pCodeFileSetVar->getPhpCodeConditions($fetchMedia, '', '', $t."\t".$fetchMedia.";\n", $ifelse, $t);
276 276
 
277 277
         return $ret;
278 278
     }
@@ -384,25 +384,25 @@  discard block
 block discarded – undo
384 384
         $phpCodeCaseDelete = Tdmcreate\Files\CreatePhpCode::getInstance();
385 385
         $xCodeCaseDelete   = Tdmcreate\Files\CreateXoopsCode::getInstance();
386 386
         $ccFieldId         = Tdmcreate\Files\CreateFile::getInstance()->getCamelCase($fieldId, false, true);
387
-        $ret               = $xCodeCaseDelete->getXcGet($tableName, $ccFieldId, 'Obj', $tableName . 'Handler');
387
+        $ret               = $xCodeCaseDelete->getXcGet($tableName, $ccFieldId, 'Obj', $tableName.'Handler');
388 388
 
389 389
         $reqOk                = "_REQUEST['ok']";
390 390
         $isset                = $phpCodeCaseDelete->getPhpCodeIsset($reqOk);
391 391
         $xoopsSecurityCheck   = $xCodeCaseDelete->getXcSecurityCheck();
392 392
         $xoopsSecurityErrors  = $xCodeCaseDelete->getXcSecurityErrors();
393 393
         $implode              = $phpCodeCaseDelete->getPhpCodeImplode(', ', $xoopsSecurityErrors);
394
-        $redirectHeaderErrors = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', $implode, true, $t . "\t\t");
394
+        $redirectHeaderErrors = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', $implode, true, $t."\t\t");
395 395
 
396 396
         $delete    = $xCodeCaseDelete->getXcDelete($tableName, $tableName, 'Obj', 'Handler');
397
-        $condition = $phpCodeCaseDelete->getPhpCodeConditions('!' . $xoopsSecurityCheck, '', '', $redirectHeaderErrors, false, $t . "\t");
397
+        $condition = $phpCodeCaseDelete->getPhpCodeConditions('!'.$xoopsSecurityCheck, '', '', $redirectHeaderErrors, false, $t."\t");
398 398
 
399
-        $redirectHeaderLanguage = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', "{$language}FORM_DELETE_OK", true, $t . "\t\t");
399
+        $redirectHeaderLanguage = $xCodeCaseDelete->getXcRedirectHeader($tableName, '', '3', "{$language}FORM_DELETE_OK", true, $t."\t\t");
400 400
         $htmlErrors             = $xCodeCaseDelete->getXcHtmlErrors($tableName, true);
401
-        $internalElse           = $xCodeCaseDelete->getXcTplAssign('error', $htmlErrors, true, $t . "\t\t");
402
-        $condition              .= $phpCodeCaseDelete->getPhpCodeConditions($delete, '', '', $redirectHeaderLanguage, $internalElse, $t . "\t");
401
+        $internalElse           = $xCodeCaseDelete->getXcTplAssign('error', $htmlErrors, true, $t."\t\t");
402
+        $condition .= $phpCodeCaseDelete->getPhpCodeConditions($delete, '', '', $redirectHeaderLanguage, $internalElse, $t."\t");
403 403
 
404
-        $mainElse = $xCodeCaseDelete->getXcXoopsConfirm($tableName, $language, $fieldId, $fieldMain, 'delete', $t . "\t");
405
-        $ret      .= $phpCodeCaseDelete->getPhpCodeConditions($isset, ' && ', "1 == \${$reqOk}", $condition, $mainElse, $t);
404
+        $mainElse = $xCodeCaseDelete->getXcXoopsConfirm($tableName, $language, $fieldId, $fieldMain, 'delete', $t."\t");
405
+        $ret .= $phpCodeCaseDelete->getPhpCodeConditions($isset, ' && ', "1 == \${$reqOk}", $condition, $mainElse, $t);
406 406
 
407 407
         return $ret;
408 408
     }
Please login to merge, or discard this patch.
class/Files/Templates/Blocks/TemplatesBlocks.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
             $fieldName    = $fields[$f]->getVar('field_name');
86 86
             $stuFieldName = mb_strtoupper($fieldName);
87 87
             $lang         = $hc->getSmartyConst($language, $stuFieldName);
88
-            $th           .= $hc->getHtmlTableHead($lang, 'center') . PHP_EOL;
88
+            $th .= $hc->getHtmlTableHead($lang, 'center').PHP_EOL;
89 89
         }
90
-        $tr = $hc->getHtmlTableRow($th, 'head') . PHP_EOL;
90
+        $tr = $hc->getHtmlTableRow($th, 'head').PHP_EOL;
91 91
 
92
-        return $hc->getHtmlTableThead($tr) . PHP_EOL;
92
+        return $hc->getHtmlTableThead($tr).PHP_EOL;
93 93
     }
94 94
 
95 95
     /**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $td = '';
110 110
         if (1 == $tableAutoincrement) {
111 111
             $double = $hc->getSmartyDoubleVar($tableSoleName, 'id');
112
-            $td     .= $hc->getHtmlTag('td', ['class' => 'center'], $double) . PHP_EOL;
112
+            $td .= $hc->getHtmlTag('td', ['class' => 'center'], $double).PHP_EOL;
113 113
         }
114 114
         $fields = $this->getTableFields($tableMid, $tableId);
115 115
         foreach (array_keys($fields) as $f) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                         // Old code was <span style="background-color: #<{\$list.{$rpFieldName}}>;">...
128 128
                         $double = $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
129 129
                         $span   = $hc->getHtmlTag('span', [], $double);
130
-                        $td     .= $hc->getHtmlTag('td', ['class' => 'center'], $span) . PHP_EOL;
130
+                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $span).PHP_EOL;
131 131
                         /*$ret .= <<<EOT
132 132
                     <td class="center"><span style="background-color: #<{\$list.{$rpFieldName}}>;">&nbsp;&nbsp;&nbsp;&nbsp;</span></td>\n
133 133
 EOT;*/
@@ -136,18 +136,18 @@  discard block
 block discarded – undo
136 136
                         $src = $hc->getSmartyNoSimbol('xoModuleIcons32');
137 137
                         $src .= $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
138 138
                         $img = $hc->getHtmlTag('img', ['src' => $src, 'alt' => $tableName], '', true);
139
-                        $td  .= $hc->getHtmlTag('td', ['class' => 'center'], $img) . PHP_EOL;
139
+                        $td  .= $hc->getHtmlTag('td', ['class' => 'center'], $img).PHP_EOL;
140 140
                         break;
141 141
                     case 13:
142
-                        $single = $hc->getSmartySingleVar($moduleDirname . '_upload_url');
142
+                        $single = $hc->getSmartySingleVar($moduleDirname.'_upload_url');
143 143
                         $double = $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
144
-                        $img    = $hc->getHtmlTag('img', ['src' => $single . "/images/{$tableName}/" . $double, 'alt' => $tableName], '', true);
145
-                        $td     .= $hc->getHtmlTag('td', ['class' => 'center'], $img) . PHP_EOL;
144
+                        $img    = $hc->getHtmlTag('img', ['src' => $single."/images/{$tableName}/".$double, 'alt' => $tableName], '', true);
145
+                        $td .= $hc->getHtmlTag('td', ['class' => 'center'], $img).PHP_EOL;
146 146
                         break;
147 147
                     default:
148 148
                         if (0 != $f) {
149 149
                             $double = $hc->getSmartyDoubleVar($tableSoleName, $rpFieldName);
150
-                            $td     .= $hc->getHtmlTag('td', ['class' => 'center'], $double) . PHP_EOL;
150
+                            $td .= $hc->getHtmlTag('td', ['class' => 'center'], $double).PHP_EOL;
151 151
                         }
152 152
                         break;
153 153
                 }
@@ -157,19 +157,19 @@  discard block
 block discarded – undo
157 157
         $double  = $hc->getSmartyDoubleVar($tableSoleName, 'id');
158 158
         $src     = $hc->getSmartyNoSimbol('xoModuleIcons32 edit.png');
159 159
         $img     = $hc->getHtmlTag('img', ['src' => $src, 'alt' => $tableName], '', true);
160
-        $anchor  = $hc->getHtmlTag('a', ['href' => $tableName . ".php?op=edit&amp;{$fieldId}=" . $double, 'title' => $lang], $img) . PHP_EOL;
160
+        $anchor  = $hc->getHtmlTag('a', ['href' => $tableName.".php?op=edit&amp;{$fieldId}=".$double, 'title' => $lang], $img).PHP_EOL;
161 161
         $lang    = $hc->getSmartyConst('', '_DELETE');
162 162
         $double  = $hc->getSmartyDoubleVar($tableSoleName, 'id');
163 163
         $src     = $hc->getSmartyNoSimbol('xoModuleIcons32 delete.png');
164
-        $img     = $hc->getHtmlTag('img', ['src' => $src . $double, 'alt' => $tableName], '', true);
165
-        $anchor  .= $hc->getHtmlTag('a', ['href' => $tableName . ".php?op=delete&amp;{$fieldId}=" . $double, 'title' => $lang], $img) . PHP_EOL;
166
-        $td      .= $hc->getHtmlTag('td', ['class' => 'center'], "\n" . $anchor) . PHP_EOL;
164
+        $img     = $hc->getHtmlTag('img', ['src' => $src.$double, 'alt' => $tableName], '', true);
165
+        $anchor  .= $hc->getHtmlTag('a', ['href' => $tableName.".php?op=delete&amp;{$fieldId}=".$double, 'title' => $lang], $img).PHP_EOL;
166
+        $td      .= $hc->getHtmlTag('td', ['class' => 'center'], "\n".$anchor).PHP_EOL;
167 167
         $cycle   = $hc->getSmartyNoSimbol('cycle values="odd, even"');
168
-        $tr      = $hc->getHtmlTag('tr', ['class' => $cycle], $td) . PHP_EOL;
169
-        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName . '_list', $tr) . PHP_EOL;
170
-        $tbody   = $hc->getHtmlTag('tbody', [], $foreach) . PHP_EOL;
168
+        $tr      = $hc->getHtmlTag('tr', ['class' => $cycle], $td).PHP_EOL;
169
+        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName.'_list', $tr).PHP_EOL;
170
+        $tbody   = $hc->getHtmlTag('tbody', [], $foreach).PHP_EOL;
171 171
 
172
-        return $hc->getSmartyConditions($tableName . '_count', '', '', $tbody) . PHP_EOL;
172
+        return $hc->getSmartyConditions($tableName.'_count', '', '', $tbody).PHP_EOL;
173 173
     }
174 174
 
175 175
     /**
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
     private function getTemplatesBlocksTableTfoot()
180 180
     {
181 181
         $hc = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
182
-        $td = $hc->getHtmlTag('td', [], '&nbsp;') . PHP_EOL;
183
-        $tr = $hc->getHtmlTag('tr', [], $td) . PHP_EOL;
182
+        $td = $hc->getHtmlTag('td', [], '&nbsp;').PHP_EOL;
183
+        $tr = $hc->getHtmlTag('tr', [], $td).PHP_EOL;
184 184
 
185
-        return $hc->getHtmlTag('tfoot', [], $tr) . PHP_EOL;
185
+        return $hc->getHtmlTag('tfoot', [], $tr).PHP_EOL;
186 186
     }
187 187
 
188 188
     /**
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $tbody  .= $this->getTemplatesBlocksTableTfoot();
205 205
         $single = $hc->getSmartySingleVar('table_type');
206 206
 
207
-        return $hc->getHtmlTable($tbody, 'table table-' . $single) . PHP_EOL;
207
+        return $hc->getHtmlTable($tbody, 'table table-'.$single).PHP_EOL;
208 208
     }
209 209
 
210 210
     /**
Please login to merge, or discard this patch.
class/Files/Templates/user/Index.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $hc = Tdmcreate\Files\CreateSmartyCode::getInstance();
82 82
 
83
-        return $hc->getSmartyIncludeFile($moduleDirname, 'header') . PHP_EOL;
83
+        return $hc->getSmartyIncludeFile($moduleDirname, 'header').PHP_EOL;
84 84
     }
85 85
 
86 86
     /**
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
         $hc     = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
97 97
         $single = $hc->getSmartySingleVar('table_type');
98 98
         $table  = $this->getTemplatesUserIndexTableThead($tableName, $language);
99
-        $table  .= $this->getTemplatesUserIndexTableTBody($moduleDirname, $tableName, $tableSoleName, $language);
99
+        $table .= $this->getTemplatesUserIndexTableTBody($moduleDirname, $tableName, $tableSoleName, $language);
100 100
 
101
-        return $hc->getHtmlTable($table, 'table table-' . $single) . PHP_EOL;
101
+        return $hc->getHtmlTable($table, 'table table-'.$single).PHP_EOL;
102 102
     }
103 103
 
104 104
     /**
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         $stuTableName = mb_strtoupper($tableName);
114 114
         $lang         = $hc->getSmartyConst($language, $stuTableName);
115 115
         $col          = $hc->getSmartySingleVar('numb_col');
116
-        $th           = $hc->getHtmlTableHead($lang, '', $col) . PHP_EOL;
117
-        $tr           = $hc->getHtmlTableRow($th, 'head') . PHP_EOL;
116
+        $th           = $hc->getHtmlTableHead($lang, '', $col).PHP_EOL;
117
+        $tr           = $hc->getHtmlTableRow($th, 'head').PHP_EOL;
118 118
 
119
-        return $hc->getHtmlTableThead($tr) . PHP_EOL;
119
+        return $hc->getHtmlTableThead($tr).PHP_EOL;
120 120
     }
121 121
 
122 122
     /**
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
         $hc      = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
133 133
         $type    = $hc->getSmartySingleVar('panel_type');
134 134
         $include = $hc->getSmartyIncludeFileListForeach($moduleDirname, $tableName, $tableSoleName);
135
-        $div     = $hc->getHtmlDiv($include, 'panel panel-' . $type);
136
-        $cont    = $hc->getHtmlTableData($div) . PHP_EOL;
137
-        $html    = $hc->getHtmlEmpty('</tr><tr>') . PHP_EOL;
138
-        $cont    .= $hc->getSmartyConditions($tableSoleName . '.count', ' is div by ', '$divideby', $html) . PHP_EOL;
139
-        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName, $cont) . PHP_EOL;
140
-        $tr      = $hc->getHtmlTableRow($foreach) . PHP_EOL;
135
+        $div     = $hc->getHtmlDiv($include, 'panel panel-'.$type);
136
+        $cont    = $hc->getHtmlTableData($div).PHP_EOL;
137
+        $html    = $hc->getHtmlEmpty('</tr><tr>').PHP_EOL;
138
+        $cont .= $hc->getSmartyConditions($tableSoleName.'.count', ' is div by ', '$divideby', $html).PHP_EOL;
139
+        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName, $cont).PHP_EOL;
140
+        $tr      = $hc->getHtmlTableRow($foreach).PHP_EOL;
141 141
 
142
-        return $hc->getHtmlTableTbody($tr) . PHP_EOL;
142
+        return $hc->getHtmlTableTbody($tr).PHP_EOL;
143 143
     }
144 144
 
145 145
     /**
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
     private function getTemplatesUserIndexTableTfoot()
150 150
     {
151 151
         $hc = Tdmcreate\Files\CreateHtmlCode::getInstance();
152
-        $td = $hc->getHtmlTableData('&nbsp;') . PHP_EOL;
153
-        $tr = $hc->getHtmlTableRow($td) . PHP_EOL;
152
+        $td = $hc->getHtmlTableData('&nbsp;').PHP_EOL;
153
+        $tr = $hc->getHtmlTableRow($td).PHP_EOL;
154 154
 
155
-        return $hc->getHtmlTableTfoot($tr) . PHP_EOL;
155
+        return $hc->getHtmlTableTfoot($tr).PHP_EOL;
156 156
     }
157 157
 
158 158
     /**
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
                 <ul class="menu text-center">
181 181
                     <li><a href="<{\${$moduleDirname}_url}>"><{\$smarty.const.{$language}INDEX}></a></li>\n
182 182
 EOT;
183
-        $tables        = $this->getTableTables($module->getVar('mod_id'), 'table_order');
183
+        $tables = $this->getTableTables($module->getVar('mod_id'), 'table_order');
184 184
         foreach (array_keys($tables) as $i) {
185 185
             $tableName    = $tables[$i]->getVar('table_name');
186 186
             $stuTableName = mb_strtoupper($tableName);
187
-            $ret          .= <<<EOT
187
+            $ret .= <<<EOT
188 188
                     <li><a href="<{\${$moduleDirname}_url}>/{$tableName}.php"><{\$smarty.const.{$language}{$stuTableName}}></a></li>\n
189 189
 EOT;
190 190
         }
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
         $single       = $hc->getSmartySingleVar('table_type');
254 254
         $table        = $this->getTemplatesUserIndexTableThead($tableName, $language);
255 255
         $table        .= $this->getTemplatesUserIndexTableTBody($moduleDirname, $tableName, $tableSoleName, $language);
256
-        $table        .= $hc->getHtmlTable($table, 'table table-' . $single) . PHP_EOL;
257
-        $div          = $hc->getHtmlDiv($table, 'table-responsive') . PHP_EOL;
256
+        $table        .= $hc->getHtmlTable($table, 'table table-'.$single).PHP_EOL;
257
+        $div          = $hc->getHtmlDiv($table, 'table-responsive').PHP_EOL;
258 258
 
259
-        return $ret/*$hc->getSmartyConditions($tableName, ' > ', '0', $div, false, true)*/ . PHP_EOL;
259
+        return $ret/*$hc->getSmartyConditions($tableName, ' > ', '0', $div, false, true)*/.PHP_EOL;
260 260
     }
261 261
 
262 262
     /**
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         $moduleDirname = $module->getVar('mod_dirname');
321 321
         $language      = $this->getLanguage($moduleDirname, 'MA');
322 322
         $content       = $this->getTemplateUserIndexHeader($moduleDirname);
323
-        $content       .= $this->getTemplatesUserIndexBodyDefault($module, $table, $language);
323
+        $content .= $this->getTemplatesUserIndexBodyDefault($module, $table, $language);
324 324
         foreach (array_keys($tables) as $t) {
325 325
             $tableName       = $tables[$t]->getVar('table_name');
326 326
             $tableSoleName   = $tables[$t]->getVar('table_solename');
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
                 $content .= $this->getTemplateUserIndexTable($moduleDirname, $tableName, $tableSoleName, $language);
335 335
             }
336 336
         }
337
-        $content  .= $this->getTemplateUserIndexFooter($moduleDirname);
337
+        $content .= $this->getTemplateUserIndexFooter($moduleDirname);
338 338
         $tdmcfile = Tdmcreate\Files\CreateFile::getInstance();
339 339
         $tdmcfile->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
340 340
 
Please login to merge, or discard this patch.
class/Files/Templates/user/Submit.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $hc = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
80 80
 
81
-        return $hc->getSmartyIncludeFile($moduleDirname, 'header') . PHP_EOL;
81
+        return $hc->getSmartyIncludeFile($moduleDirname, 'header').PHP_EOL;
82 82
     }
83 83
 
84 84
     /**
@@ -92,21 +92,21 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $hc    = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
94 94
         $const = $hc->getSmartyConst($language, 'SUBMIT_SUBMITONCE');
95
-        $li    = $hc->getHtmlLi($const) . PHP_EOL;
95
+        $li    = $hc->getHtmlLi($const).PHP_EOL;
96 96
         $const = $hc->getSmartyConst($language, 'SUBMIT_ALLPENDING');
97
-        $li    .= $hc->getHtmlLi($const) . PHP_EOL;
97
+        $li    .= $hc->getHtmlLi($const).PHP_EOL;
98 98
         $const = $hc->getSmartyConst($language, 'SUBMIT_DONTABUSE');
99
-        $li    .= $hc->getHtmlLi($const) . PHP_EOL;
99
+        $li    .= $hc->getHtmlLi($const).PHP_EOL;
100 100
         $const = $hc->getSmartyConst($language, 'SUBMIT_TAKEDAYS');
101
-        $li    .= $hc->getHtmlLi($const) . PHP_EOL;
102
-        $ul    = $hc->getHtmlUl($li) . PHP_EOL;
103
-        $ret   = $hc->getHtmlDiv($ul, $moduleDirname . '-tips') . PHP_EOL;
104
-
105
-        $single   = $hc->getSmartySingleVar('message_error') . PHP_EOL;
106
-        $divError = $hc->getHtmlDiv($single, 'errorMsg') . PHP_EOL;
107
-        $ret      .= $hc->getSmartyConditions('message_error', ' != ', '\'\'', $divError) . PHP_EOL;
108
-        $single   = $hc->getSmartySingleVar('form') . PHP_EOL;
109
-        $ret      .= $hc->getHtmlDiv($single, $moduleDirname . '-submitform') . PHP_EOL;
101
+        $li    .= $hc->getHtmlLi($const).PHP_EOL;
102
+        $ul    = $hc->getHtmlUl($li).PHP_EOL;
103
+        $ret   = $hc->getHtmlDiv($ul, $moduleDirname.'-tips').PHP_EOL;
104
+
105
+        $single   = $hc->getSmartySingleVar('message_error').PHP_EOL;
106
+        $divError = $hc->getHtmlDiv($single, 'errorMsg').PHP_EOL;
107
+        $ret      .= $hc->getSmartyConditions('message_error', ' != ', '\'\'', $divError).PHP_EOL;
108
+        $single   = $hc->getSmartySingleVar('form').PHP_EOL;
109
+        $ret      .= $hc->getHtmlDiv($single, $moduleDirname.'-submitform').PHP_EOL;
110 110
 
111 111
         return $ret;
112 112
     }
Please login to merge, or discard this patch.
class/Files/Templates/user/MoreFiles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
         $moduleDirname = $module->getVar('mod_dirname');
106 106
         $content       = $this->getTemplatesUserMoreFile();
107 107
 
108
-        $this->create($moduleDirname, $this->folder, $filename . '.' . $this->extension, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
108
+        $this->create($moduleDirname, $this->folder, $filename.'.'.$this->extension, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
109 109
 
110 110
         return $this->renderFile();
111 111
     }
Please login to merge, or discard this patch.
class/Files/Templates/user/Broken.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -101,12 +101,12 @@  discard block
 block discarded – undo
101 101
             $stuFieldName = mb_strtoupper($fieldName);
102 102
             if ((1 == $tableAutoincrement) || (1 == $fields[$f]->getVar('field_user'))) {
103 103
                 $const = $hc->getSmartyConst($language, $stuFieldName);
104
-                $th    .= $hc->getHtmlTag('th', ['class' => 'center'], $const) . PHP_EOL;
104
+                $th .= $hc->getHtmlTag('th', ['class' => 'center'], $const).PHP_EOL;
105 105
             }
106 106
         }
107
-        $tr = $hc->getHtmlTag('tr', ['class' => 'head'], $th) . PHP_EOL;
107
+        $tr = $hc->getHtmlTag('tr', ['class' => 'head'], $th).PHP_EOL;
108 108
 
109
-        return $hc->getHtmlTag('thead', ['class' => 'outer'], $tr) . PHP_EOL;
109
+        return $hc->getHtmlTag('thead', ['class' => 'outer'], $tr).PHP_EOL;
110 110
     }
111 111
 
112 112
     /**
@@ -132,27 +132,27 @@  discard block
 block discarded – undo
132 132
             if ((1 == $tableAutoincrement) || (1 == $fields[$f]->getVar('field_user'))) {
133 133
                 switch ($fieldElement) {
134 134
                     case 9:
135
-                        $span = $hc->getHtmlSpan("<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\${$tableSoleName}.{$rpFieldName}}>", "#<{\${$tableSoleName}.{$rpFieldName}}>") . PHP_EOL;
136
-                        $ret  .= $hc->getHtmlTableData($span, 'center') . PHP_EOL;
135
+                        $span = $hc->getHtmlSpan("<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\${$tableSoleName}.{$rpFieldName}}>", "#<{\${$tableSoleName}.{$rpFieldName}}>").PHP_EOL;
136
+                        $ret .= $hc->getHtmlTableData($span, 'center').PHP_EOL;
137 137
                         break;
138 138
                     case 10:
139 139
                         $img = $hc->getHtmlImage("<{xoModuleIcons32}><{\${$tableSoleName}.{$rpFieldName}}>", $tableName);
140
-                        $ret .= $hc->getHtmlTableData($img, 'center') . PHP_EOL;
140
+                        $ret .= $hc->getHtmlTableData($img, 'center').PHP_EOL;
141 141
                         break;
142 142
                     case 13:
143 143
                         $img = $hc->getHtmlImage("<{\${$moduleDirname}_upload_url}>/images/{$tableName}/<{\${$tableSoleName}.{$rpFieldName}}>", $tableName);
144
-                        $ret .= $hc->getHtmlTableData($img, 'center') . PHP_EOL;
144
+                        $ret .= $hc->getHtmlTableData($img, 'center').PHP_EOL;
145 145
                         break;
146 146
                     default:
147
-                        $ret .= $hc->getHtmlTableData("<{\${$tableSoleName}.{$rpFieldName}}>", 'center') . PHP_EOL;
147
+                        $ret .= $hc->getHtmlTableData("<{\${$tableSoleName}.{$rpFieldName}}>", 'center').PHP_EOL;
148 148
                         break;
149 149
                 }
150 150
             }
151 151
         }
152
-        $row     = $hc->getHtmlTableRow($ret, '<{cycle values="odd, even"}>') . PHP_EOL;
153
-        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName, $row) . PHP_EOL;
152
+        $row     = $hc->getHtmlTableRow($ret, '<{cycle values="odd, even"}>').PHP_EOL;
153
+        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName, $row).PHP_EOL;
154 154
 
155
-        return $hc->getHtmlTableTbody($foreach) . PHP_EOL;
155
+        return $hc->getHtmlTableTbody($foreach).PHP_EOL;
156 156
     }
157 157
 
158 158
     /**
@@ -185,10 +185,10 @@  discard block
 block discarded – undo
185 185
         $tableSoleName      = $table->getVar('table_solename');
186 186
         $tableAutoincrement = $table->getVar('table_autoincrement');
187 187
         $language           = $this->getLanguage($moduleDirname, 'MA');
188
-        $content            = $this->getTemplatesUserBrokenFileHeader($moduleDirname) . PHP_EOL;
188
+        $content            = $this->getTemplatesUserBrokenFileHeader($moduleDirname).PHP_EOL;
189 189
         $contentTable       = $this->getTemplatesUserBrokenTableHead($tableMid, $tableId, $tableAutoincrement, $language);
190 190
         $contentTable       .= $this->getTemplatesUserBrokenBody($moduleDirname, $tableMid, $tableId, $tableName, $tableSoleName, $tableAutoincrement, $language);
191
-        $content            .= $hc->getHtmlTable($contentTable, 'table table-bordered') . PHP_EOL;
191
+        $content            .= $hc->getHtmlTable($contentTable, 'table table-bordered').PHP_EOL;
192 192
         $content            .= $this->getTemplatesUserBrokenFileFooter($moduleDirname);
193 193
 
194 194
         $this->create($moduleDirname, 'templates', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
Please login to merge, or discard this patch.
class/Files/Templates/user/Categories.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         $hc = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
81 81
 
82
-        return $hc->getSmartyIncludeFile($moduleDirname, 'header') . PHP_EOL;
82
+        return $hc->getSmartyIncludeFile($moduleDirname, 'header').PHP_EOL;
83 83
     }
84 84
 
85 85
     /**
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         $hc     = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
96 96
         $single = $hc->getSmartySingleVar('table_type');
97 97
         $table  = $this->getTemplatesAdminPagesTableThead($tableName, $language);
98
-        $table  .= $this->getTemplatesAdminPagesTableTBody($moduleDirname, $tableName, $tableSoleName, $language);
98
+        $table .= $this->getTemplatesAdminPagesTableTBody($moduleDirname, $tableName, $tableSoleName, $language);
99 99
 
100
-        return $hc->getHtmlTable($table, 'table table-' . $single) . PHP_EOL;
100
+        return $hc->getHtmlTable($table, 'table table-'.$single).PHP_EOL;
101 101
     }
102 102
 
103 103
     /**
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $hc           = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
112 112
         $stuTableName = mb_strtoupper($tableName);
113
-        $lang         = $hc->getSmartyConst($language, $stuTableName . '_TITLE');
113
+        $lang         = $hc->getSmartyConst($language, $stuTableName.'_TITLE');
114 114
         $single       = $hc->getSmartySingleVar('numb_col');
115
-        $th           = $hc->getHtmlTableHead($lang, '', $single) . PHP_EOL;
116
-        $tr           = $hc->getHtmlTableRow($th, 'head') . PHP_EOL;
115
+        $th           = $hc->getHtmlTableHead($lang, '', $single).PHP_EOL;
116
+        $tr           = $hc->getHtmlTableRow($th, 'head').PHP_EOL;
117 117
 
118
-        return $hc->getHtmlTableThead($tr) . PHP_EOL;
118
+        return $hc->getHtmlTableThead($tr).PHP_EOL;
119 119
     }
120 120
 
121 121
     /**
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
         $hc      = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
132 132
         $single  = $hc->getSmartySingleVar('panel_type');
133 133
         $include = $hc->getSmartyIncludeFileListForeach($moduleDirname, $tableName, $tableSoleName);
134
-        $div     = $hc->getHtmlDiv($include, 'panel panel-' . $single);
135
-        $cont    = $hc->getHtmlTableData($div) . PHP_EOL;
136
-        $html    = $hc->getHtmlEmpty('</tr><tr>') . PHP_EOL;
137
-        $cont    .= $hc->getSmartyConditions($tableSoleName . '.count', ' is div by ', '$divideby', $html) . PHP_EOL;
138
-        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName, $cont) . PHP_EOL;
139
-        $tr      = $hc->getHtmlTableRow($foreach) . PHP_EOL;
140
-
141
-        return $hc->getHtmlTableTbody($tr) . PHP_EOL;
134
+        $div     = $hc->getHtmlDiv($include, 'panel panel-'.$single);
135
+        $cont    = $hc->getHtmlTableData($div).PHP_EOL;
136
+        $html    = $hc->getHtmlEmpty('</tr><tr>').PHP_EOL;
137
+        $cont .= $hc->getSmartyConditions($tableSoleName.'.count', ' is div by ', '$divideby', $html).PHP_EOL;
138
+        $foreach = $hc->getSmartyForeach($tableSoleName, $tableName, $cont).PHP_EOL;
139
+        $tr      = $hc->getHtmlTableRow($foreach).PHP_EOL;
140
+
141
+        return $hc->getHtmlTableTbody($tr).PHP_EOL;
142 142
     }
143 143
 
144 144
     /**
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
     private function getTemplatesUserCategoriesTfoot()
149 149
     {
150 150
         $hc = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
151
-        $td = $hc->getHtmlTableData('&nbsp;') . PHP_EOL;
152
-        $tr = $hc->getHtmlTableRow($td) . PHP_EOL;
151
+        $td = $hc->getHtmlTableData('&nbsp;').PHP_EOL;
152
+        $tr = $hc->getHtmlTableRow($td).PHP_EOL;
153 153
 
154
-        return $hc->getHtmlTableTfoot($tr) . PHP_EOL;
154
+        return $hc->getHtmlTableTfoot($tr).PHP_EOL;
155 155
     }
156 156
 
157 157
     /**
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
     private function getTemplatesUserCategories($moduleDirname, $tableName, $tableSoleName, $language)
166 166
     {
167 167
         $hc  = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
168
-        $tab = $this->getTemplatesUserCategoriesTable($moduleDirname, $tableName, $tableSoleName, $language) . PHP_EOL;
169
-        $div = $hc->getHtmlDiv($tab, 'table-responsive') . PHP_EOL;
168
+        $tab = $this->getTemplatesUserCategoriesTable($moduleDirname, $tableName, $tableSoleName, $language).PHP_EOL;
169
+        $div = $hc->getHtmlDiv($tab, 'table-responsive').PHP_EOL;
170 170
 
171
-        return $hc->getSmartyConditions($tableName, ' gt ', '0', $div, false, true) . PHP_EOL;
171
+        return $hc->getSmartyConditions($tableName, ' gt ', '0', $div, false, true).PHP_EOL;
172 172
     }
173 173
 
174 174
     /**
@@ -196,16 +196,16 @@  discard block
 block discarded – undo
196 196
 </div>\n
197 197
 EOT;*/
198 198
         $hc        = Tdmcreate\Files\CreateHtmlSmartyCodes::getInstance();
199
-        $incl      = $hc->getSmartyIncludeFileListForeach($moduleDirname, $tableName, $tableSoleName) . PHP_EOL;
200
-        $html      = $hc->getHtmlEmpty('<br>') . PHP_EOL;
201
-        $incl      .= $hc->getSmartyConditions($tableSoleName . '.count', ' is div by ', '$numb_col', $html) . PHP_EOL;
202
-        $const     = $hc->getSmartyConst($language, $stuTableName . '_TITLE');
203
-        $div       = $hc->getHtmlDiv($const, 'panel-heading') . PHP_EOL;
204
-        $cont      = $hc->getHtmlDiv($incl, 'panel panel-body') . PHP_EOL;
205
-        $div       .= $hc->getSmartyForeach($tableSoleName, $tableName, $cont) . PHP_EOL;
199
+        $incl      = $hc->getSmartyIncludeFileListForeach($moduleDirname, $tableName, $tableSoleName).PHP_EOL;
200
+        $html      = $hc->getHtmlEmpty('<br>').PHP_EOL;
201
+        $incl .= $hc->getSmartyConditions($tableSoleName.'.count', ' is div by ', '$numb_col', $html).PHP_EOL;
202
+        $const     = $hc->getSmartyConst($language, $stuTableName.'_TITLE');
203
+        $div       = $hc->getHtmlDiv($const, 'panel-heading').PHP_EOL;
204
+        $cont      = $hc->getHtmlDiv($incl, 'panel panel-body').PHP_EOL;
205
+        $div .= $hc->getSmartyForeach($tableSoleName, $tableName, $cont).PHP_EOL;
206 206
         $panelType = $hc->getSmartySingleVar('panel_type');
207 207
 
208
-        return $hc->getHtmlDiv($div, 'panel panel-' . $panelType) . PHP_EOL;
208
+        return $hc->getHtmlDiv($div, 'panel panel-'.$panelType).PHP_EOL;
209 209
     }
210 210
 
211 211
     /**
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $tableFieldname = $table->getVar('table_fieldname');
237 237
         $language       = $this->getLanguage($moduleDirname, 'MA');
238 238
         $content        = $this->getTemplatesUserCategoriesHeader($moduleDirname);
239
-        $content        .= $this->getTemplatesUserCategoriesPanel($moduleDirname, $tableName, $tableSoleName, $language);
239
+        $content .= $this->getTemplatesUserCategoriesPanel($moduleDirname, $tableName, $tableSoleName, $language);
240 240
         /*
241 241
         $content .= $this->getTemplatesUserCategories($moduleDirname, $tableName, $tableSoleName, $language);*/
242 242
         $content .= $this->getTemplatesUserCategoriesFooter($moduleDirname);
Please login to merge, or discard this patch.