Passed
Push — master ( 123922...c30da6 )
by Goffy
09:11 queued 04:26
created
class/Files/Includes/IncludeComments.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
         $pc            = Tdmcreate\Files\CreatePhpCode::getInstance();
79 79
         $moduleDirname = $module->getVar('mod_dirname');
80 80
         $content       = $this->getHeaderFilesComments($module);
81
-        $content       .= $pc->getPhpCodeIncludeDir("__DIR__ . '/../../../mainfile.php'",'',true, true);
82
-        $content       .= $pc->getPhpCodeIncludeDir("XOOPS_ROOT_PATH.'/include/{$filename}.php'",'',true, true);
81
+        $content       .= $pc->getPhpCodeIncludeDir("__DIR__ . '/../../../mainfile.php'", '', true, true);
82
+        $content       .= $pc->getPhpCodeIncludeDir("XOOPS_ROOT_PATH.'/include/{$filename}.php'", '', true, true);
83 83
 
84
-        $this->create($moduleDirname, 'include', $filename . '.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
84
+        $this->create($moduleDirname, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
85 85
 
86 86
         return $this->renderFile();
87 87
     }
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
         }
110 110
         $content = $this->getHeaderFilesComments($module);
111 111
         $content .= $pc->getPhpCodeUseNamespace(['Xmf', 'Request']);
112
-        $content .= $pc->getPhpCodeIncludeDir("__DIR__ . '/../../../mainfile.php'",'',true, true);
113
-        $content .= $pc->getPhpCodeIncludeDir("XOOPS_ROOT_PATH.'/modules/{$moduleDirname}/class/{$tableName}.php'",'',true, true);
112
+        $content .= $pc->getPhpCodeIncludeDir("__DIR__ . '/../../../mainfile.php'", '', true, true);
113
+        $content .= $pc->getPhpCodeIncludeDir("XOOPS_ROOT_PATH.'/modules/{$moduleDirname}/class/{$tableName}.php'", '', true, true);
114 114
         $content .= $xc->getXcXoopsRequest('com_itemid', 'com_itemid', '0', 'Int');
115
-        $contIf  = $xc->getXcEqualsOperator("\${$tableName}Handler", "xoops_getModuleHandler('{$tableName}', '{$moduleDirname}')",'',"\t");
116
-        $contIf  .= $xc->getXcHandlerGet("{$tableName}", 'com_itemid','Obj', "{$tableName}Handler", false, "\t");
117
-        $contIf  .= $xc->getXcGetVar('com_replytitle', "{$tableName}Obj", $fieldMain,false, "\t");
118
-        $contIf  .= $pc->getPhpCodeIncludeDir("XOOPS_ROOT_PATH.'/include/{$filename}.php'",'',true, true, '',"\t");
119
-        $content .= $pc->getPhpCodeConditions('$com_itemid',' > ', '0', $contIf);
115
+        $contIf = $xc->getXcEqualsOperator("\${$tableName}Handler", "xoops_getModuleHandler('{$tableName}', '{$moduleDirname}')", '', "\t");
116
+        $contIf  .= $xc->getXcHandlerGet("{$tableName}", 'com_itemid', 'Obj', "{$tableName}Handler", false, "\t");
117
+        $contIf  .= $xc->getXcGetVar('com_replytitle', "{$tableName}Obj", $fieldMain, false, "\t");
118
+        $contIf  .= $pc->getPhpCodeIncludeDir("XOOPS_ROOT_PATH.'/include/{$filename}.php'", '', true, true, '', "\t");
119
+        $content .= $pc->getPhpCodeConditions('$com_itemid', ' > ', '0', $contIf);
120 120
 
121
-        $this->create($moduleDirname, 'include', $filename . '.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
121
+        $this->create($moduleDirname, 'include', $filename.'.php', $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
122 122
 
123 123
         return $this->renderFile();
124 124
     }
Please login to merge, or discard this patch.
class/Files/Includes/IncludeCommentFunctions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
         $func1  = $xc->getXcEqualsOperator('$itemId', '(int)$itemId', '', "\t");
89 89
         $func1  .= $xc->getXcEqualsOperator('$itemNumb', '(int)$itemNumb', '', "\t");
90 90
         $func1  .= $xc->getXcEqualsOperator('$article', "new {$ucfModuleDirname}{$ucfTableName}(\$itemId)", '', "\t");
91
-        $contIf = $this->getSimpleString('return false;',"\t\t");
92
-        $func1  .= $pc->getPhpCodeConditions('!$article->updateComments($itemNumb)','','',$contIf, false,"\t");
93
-        $func1  .= $this->getSimpleString('return true;',"\t");
94
-        $ret    .= $pc->getPhpCodeFunction($moduleDirname . 'CommentsUpdate', '$itemId, $itemNumb', $func1);
91
+        $contIf = $this->getSimpleString('return false;', "\t\t");
92
+        $func1  .= $pc->getPhpCodeConditions('!$article->updateComments($itemNumb)', '', '', $contIf, false, "\t");
93
+        $func1  .= $this->getSimpleString('return true;', "\t");
94
+        $ret    .= $pc->getPhpCodeFunction($moduleDirname.'CommentsUpdate', '$itemId, $itemNumb', $func1);
95 95
         $ret    .= $pc->getPhpCodeCommentMultiLine(['CommentsApprove' => '', '' => '', '@param mixed' => '$comment', '@return' => 'bool']);
96
-        $func2  = $pc->getPhpCodeCommentLine('notification mail here','',"\t");
96
+        $func2 = $pc->getPhpCodeCommentLine('notification mail here', '', "\t");
97 97
         $func2  .= $pc->getPhpCodeBlankLine();
98
-        $func2  .= $this->getSimpleString('return false;',"\t");
98
+        $func2  .= $this->getSimpleString('return false;', "\t");
99 99
         $func2  .= $pc->getPhpCodeBlankLine();
100
-        $ret    .= $pc->getPhpCodeFunction($moduleDirname . 'CommentsApprove', '&$comment', $func2);
100
+        $ret    .= $pc->getPhpCodeFunction($moduleDirname.'CommentsApprove', '&$comment', $func2);
101 101
 
102 102
         return $ret;
103 103
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         $filename      = $this->getFileName();
117 117
         $content       = $this->getHeaderFilesComments($module);
118
-        $content       .= $this->getCommentBody($module, $table);
118
+        $content .= $this->getCommentBody($module, $table);
119 119
 
120 120
         $this->create($moduleDirname, 'include', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
121 121
 
Please login to merge, or discard this patch.
class/Files/Includes/IncludeSearch.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         if (is_array($tables)) {
95 95
             foreach (array_keys($tables) as $i) {
96
-                if(1 === (int) $tables[$i]->getVar('table_search')) {
96
+                if (1 === (int)$tables[$i]->getVar('table_search')) {
97 97
                     $tableId        = $tables[$i]->getVar('table_id');
98 98
                     $tableMid       = $tables[$i]->getVar('table_mid');
99 99
                     $tableName      = $tables[$i]->getVar('table_name');
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
                     $func   .= $pc->getPhpCodeCommentLine('search keywords', '', $t);
103 103
                     $func   .= $xc->getXcEqualsOperator('$elementCount', '0', '', $t);
104 104
                     $func   .= $xc->getXcHandlerLine($tableName, $t);
105
-                    $contIf = $xc->getXcEqualsOperator('$elementCount', 'count($queryarray)', '', $t . "\t");
105
+                    $contIf = $xc->getXcEqualsOperator('$elementCount', 'count($queryarray)', '', $t."\t");
106 106
                     $func   .= $pc->getPhpCodeConditions('is_array($queryarray)', '', '', $contIf, false, $t);
107
-                    $contIf = $xc->getXcCriteriaCompo('crKeywords', $t . "\t");
108
-                    $for    = $xc->getXcCriteriaCompo('crKeyword', $t . "\t\t");
107
+                    $contIf = $xc->getXcCriteriaCompo('crKeywords', $t."\t");
108
+                    $for    = $xc->getXcCriteriaCompo('crKeyword', $t."\t\t");
109 109
 
110 110
                     $fields    = $this->getTableFields($tableMid, $tableId);
111 111
                     $fieldId   = '';
@@ -124,50 +124,50 @@  discard block
 block discarded – undo
124 124
                             $fieldDate = $fieldName;
125 125
                         }
126 126
                         if (1 === (int)$fields[$f]->getVar('field_search')) {
127
-                            $crit = $xc->getXcCriteria('', "'{$fieldName}'", "'%' . \$queryarray[\$i] . '%'", "'LIKE'", true, $t . "\t");
128
-                            $for  .= $xc->getXcCriteriaAdd('crKeyword', $crit, $t . "\t\t", "\n", "'OR'");
127
+                            $crit = $xc->getXcCriteria('', "'{$fieldName}'", "'%' . \$queryarray[\$i] . '%'", "'LIKE'", true, $t."\t");
128
+                            $for .= $xc->getXcCriteriaAdd('crKeyword', $crit, $t."\t\t", "\n", "'OR'");
129 129
                             $countField++;
130 130
                         }
131 131
                     }
132 132
                     if ($countField > 0) {
133
-                        $for .= $xc->getXcCriteriaAdd('crKeywords', '$crKeyword', $t . "\t\t", "\n", '$andor');
133
+                        $for .= $xc->getXcCriteriaAdd('crKeywords', '$crKeyword', $t."\t\t", "\n", '$andor');
134 134
                     }
135
-                    $for      .= $pc->getPhpCodeUnset('crKeyword', $t . "\t\t");
136
-                    $contIf   .= $pc->getPhpCodeFor( 'i', $for, 'elementCount', '0', ' < ', $t . "\t");
135
+                    $for      .= $pc->getPhpCodeUnset('crKeyword', $t."\t\t");
136
+                    $contIf   .= $pc->getPhpCodeFor('i', $for, 'elementCount', '0', ' < ', $t."\t");
137 137
                     $func     .= $pc->getPhpCodeConditions('$elementCount', ' > ', '0', $contIf, false, $t);
138 138
                     $func     .= $pc->getPhpCodeCommentLine('search user(s)', '', $t);
139
-                    $contIf   = $xc->getXcEqualsOperator('$userid', "array_map('intval', \$userid)", '', $t . "\t");
140
-                    $contIf   .= $xc->getXcCriteriaCompo('crUser', $t . "\t");
141
-                    $crit     = $xc->getXcCriteria('', "'{$tableFieldname}_submitter'", "'(' . implode(',', \$userid) . ')'", "'IN'", true, $t . "\t");
142
-                    $contIf   .= $xc->getXcCriteriaAdd('crUser', $crit, $t . "\t", "\n", "'OR'");
143
-                    $contElse = $xc->getXcCriteriaCompo('crUser', $t . "\t");
144
-                    $crit     = $xc->getXcCriteria('', "'{$tableFieldname}_submitter'", '$userid', '', true, $t . "\t");
145
-                    $contElse .= $xc->getXcCriteriaAdd('crUser', $crit, $t . "\t", "\n", "'OR'");
139
+                    $contIf   = $xc->getXcEqualsOperator('$userid', "array_map('intval', \$userid)", '', $t."\t");
140
+                    $contIf   .= $xc->getXcCriteriaCompo('crUser', $t."\t");
141
+                    $crit     = $xc->getXcCriteria('', "'{$tableFieldname}_submitter'", "'(' . implode(',', \$userid) . ')'", "'IN'", true, $t."\t");
142
+                    $contIf   .= $xc->getXcCriteriaAdd('crUser', $crit, $t."\t", "\n", "'OR'");
143
+                    $contElse = $xc->getXcCriteriaCompo('crUser', $t."\t");
144
+                    $crit     = $xc->getXcCriteria('', "'{$tableFieldname}_submitter'", '$userid', '', true, $t."\t");
145
+                    $contElse .= $xc->getXcCriteriaAdd('crUser', $crit, $t."\t", "\n", "'OR'");
146 146
                     $func     .= $pc->getPhpCodeConditions('$userid && is_array($userid)', '', '', $contIf, $contElse, $t, 'is_numeric($userid) && $userid > 0');
147 147
                     $func     .= $xc->getXcCriteriaCompo('crSearch', $t);
148
-                    $contIf   = $xc->getXcCriteriaAdd('crSearch', '$crKeywords', $t . "\t", "\n", "'AND'");
148
+                    $contIf   = $xc->getXcCriteriaAdd('crSearch', '$crKeywords', $t."\t", "\n", "'AND'");
149 149
                     $cond     = $pc->getPhpCodeIsset('crKeywords');
150 150
                     $func     .= $pc->getPhpCodeConditions($cond, '', '', $contIf, false, $t);
151
-                    $contIf   = $xc->getXcCriteriaAdd('crSearch', '$crUser', $t . "\t", "\n", "'AND'");
151
+                    $contIf   = $xc->getXcCriteriaAdd('crSearch', '$crUser', $t."\t", "\n", "'AND'");
152 152
                     $cond     = $pc->getPhpCodeIsset('crUser');
153 153
                     $func     .= $pc->getPhpCodeConditions($cond, '', '', $contIf, false, $t);
154
-                    $func     .= $xc->getXcCriteriaSetStart( 'crSearch', '$offset', $t);
155
-                    $func     .= $xc->getXcCriteriaSetLimit( 'crSearch', '$limit', $t);
154
+                    $func     .= $xc->getXcCriteriaSetStart('crSearch', '$offset', $t);
155
+                    $func     .= $xc->getXcCriteriaSetLimit('crSearch', '$limit', $t);
156 156
                     if ('' !== $fieldDate) {
157
-                        $func .= $xc->getXcCriteriaSetSort( 'crSearch', "'{$fieldDate}'", $t);
157
+                        $func .= $xc->getXcCriteriaSetSort('crSearch', "'{$fieldDate}'", $t);
158 158
                     } else {
159
-                        $func .= $xc->getXcCriteriaSetSort( 'crSearch', "'{$fieldId}_date'", $t);
159
+                        $func .= $xc->getXcCriteriaSetSort('crSearch', "'{$fieldId}_date'", $t);
160 160
                     }
161
-                    $func .= $xc->getXcCriteriaSetOrder( 'crSearch', "'DESC'", $t);
162
-                    $func .= $xc->getXcHandlerAllClear($tableName . 'All', $tableName, '$crSearch', $t);
163
-                    $contentForeach = $t . "\t\$ret[] = [\n";
164
-                    $contentForeach .= $t . "\t\t'image'  => 'assets/icons/16/{$tableName}.png',\n";
165
-                    $contentForeach .= $t . "\t\t'link'   => '{$tableName}.php?op=show&amp;{$fieldId}=' . \${$tableName}All[\$i]->getVar('{$fieldId}'),\n";
166
-                    $contentForeach .= $t . "\t\t'title'  => \${$tableName}All[\$i]->getVar('{$fieldMain}'),\n";
161
+                    $func .= $xc->getXcCriteriaSetOrder('crSearch', "'DESC'", $t);
162
+                    $func .= $xc->getXcHandlerAllClear($tableName.'All', $tableName, '$crSearch', $t);
163
+                    $contentForeach = $t."\t\$ret[] = [\n";
164
+                    $contentForeach .= $t."\t\t'image'  => 'assets/icons/16/{$tableName}.png',\n";
165
+                    $contentForeach .= $t."\t\t'link'   => '{$tableName}.php?op=show&amp;{$fieldId}=' . \${$tableName}All[\$i]->getVar('{$fieldId}'),\n";
166
+                    $contentForeach .= $t."\t\t'title'  => \${$tableName}All[\$i]->getVar('{$fieldMain}'),\n";
167 167
                     if ('' !== $fieldDate) {
168
-                        $contentForeach .= $t . "\t\t'time'   => \${$tableName}All[\$i]->getVar('{$fieldDate}')\n";
168
+                        $contentForeach .= $t."\t\t'time'   => \${$tableName}All[\$i]->getVar('{$fieldDate}')\n";
169 169
                     }
170
-                    $contentForeach .= $t . "\t];\n";
170
+                    $contentForeach .= $t."\t];\n";
171 171
                     $func .= $pc->getPhpCodeForeach("{$tableName}All", true, false, 'i', $contentForeach, "\t");
172 172
                     $func .= $pc->getPhpCodeUnset('crKeywords', $t);
173 173
                     $func .= $pc->getPhpCodeUnset('crKeyword', $t);
Please login to merge, or discard this patch.
class/Form/FormTab.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -53,25 +53,25 @@
 block discarded – undo
53 53
         /* @var \XoopsFormElement $ele */
54 54
         foreach ($this->getElements() as $ele) {
55 55
             $ret         .= NWLINE;
56
-            $ret         .= '<tr>' . NWLINE;
57
-            $ret         .= '<td class="head" style="width:30%">' . NWLINE;
58
-            $required    = $ele->isRequired() ? '-required' : '';
59
-            $ret         .= '<div class="xoops-form-element-caption' . $required . '">' . NWLINE;
60
-            $ret         .= '<span class="caption-text">' . $ele->getCaption() . '</span>' . NWLINE;
61
-            $ret         .= '<span class="caption-marker">*</span>' . NWLINE;
62
-            $ret         .= '</div>' . NWLINE;
56
+            $ret         .= '<tr>'.NWLINE;
57
+            $ret         .= '<td class="head" style="width:30%">'.NWLINE;
58
+            $required = $ele->isRequired() ? '-required' : '';
59
+            $ret         .= '<div class="xoops-form-element-caption'.$required.'">'.NWLINE;
60
+            $ret         .= '<span class="caption-text">'.$ele->getCaption().'</span>'.NWLINE;
61
+            $ret         .= '<span class="caption-marker">*</span>'.NWLINE;
62
+            $ret         .= '</div>'.NWLINE;
63 63
             $description = $ele->getDescription();
64 64
             if ($description) {
65
-                $ret .= '<div style="font-weight: normal">' . NWLINE;
66
-                $ret .= $description . NWLINE;
67
-                $ret .= '</div>' . NWLINE;
65
+                $ret .= '<div style="font-weight: normal">'.NWLINE;
66
+                $ret .= $description.NWLINE;
67
+                $ret .= '</div>'.NWLINE;
68 68
             }
69
-            $ret .= '</td>' . NWLINE;
70
-            $ret .= '<td class="even">' . NWLINE;
71
-            $ret .= $ele->render() . NWLINE;
72
-            $ret .= '<span class="form-horizontal">' . $ele->getDescription() . '</span>';
73
-            $ret .= '</td>' . NWLINE;
74
-            $ret .= '</tr>' . NWLINE;
69
+            $ret .= '</td>'.NWLINE;
70
+            $ret .= '<td class="even">'.NWLINE;
71
+            $ret .= $ele->render().NWLINE;
72
+            $ret .= '<span class="form-horizontal">'.$ele->getDescription().'</span>';
73
+            $ret .= '</td>'.NWLINE;
74
+            $ret .= '</tr>'.NWLINE;
75 75
         }
76 76
 
77 77
         return $ret;
Please login to merge, or discard this patch.
class/Form/FormTabTray.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -65,17 +65,17 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js');
67 67
         $GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
68
-        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . $this->uiTheme . '/ui.all.css');
69
-        $GLOBALS['xoTheme']->addScript('', ['type' => 'text/javascript'], '$(function() { $("#tabs_' . $this->getName() . '").tabs(); });');
68
+        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL.'/modules/system/css/ui/'.$this->uiTheme.'/ui.all.css');
69
+        $GLOBALS['xoTheme']->addScript('', ['type' => 'text/javascript'], '$(function() { $("#tabs_'.$this->getName().'").tabs(); });');
70 70
 
71
-        $ret = '<div id="tabs_' . $this->getName() . '">' . NWLINE;
72
-        $ret .= '<ul>' . NWLINE;
71
+        $ret = '<div id="tabs_'.$this->getName().'">'.NWLINE;
72
+        $ret .= '<ul>'.NWLINE;
73 73
         foreach ($this->getElements() as $ele) {
74 74
             if ($ele instanceof Tdmcreate\Form\FormTab) {
75
-                $ret .= '<li><a href="#tab_' . $ele->getName() . '"><span>' . $ele->getCaption() . '</span></a></li>' . NWLINE;
75
+                $ret .= '<li><a href="#tab_'.$ele->getName().'"><span>'.$ele->getCaption().'</span></a></li>'.NWLINE;
76 76
             }
77 77
         }
78
-        $ret .= '</ul>' . NWLINE;
78
+        $ret .= '</ul>'.NWLINE;
79 79
 
80 80
         $hidden = '';
81 81
         $extras = [];
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
             if (!$ele->isHidden()) {
86 86
                 if (!$ele instanceof Tdmcreate\Form\FormRaw) {
87 87
                     if ($ele instanceof Tdmcreate\Form\FormTab) {
88
-                        $ret .= '<div id="tab_' . $ele->getName() . '">' . NWLINE;
89
-                        $ret .= '<table class="outer" style="border-spacing:5px;">' . NWLINE;
88
+                        $ret .= '<div id="tab_'.$ele->getName().'">'.NWLINE;
89
+                        $ret .= '<table class="outer" style="border-spacing:5px;">'.NWLINE;
90 90
                         $ret .= $ele->render();
91
-                        $ret .= '</table>' . NWLINE;
92
-                        $ret .= '</div>' . NWLINE;
91
+                        $ret .= '</table>'.NWLINE;
92
+                        $ret .= '</div>'.NWLINE;
93 93
                     } else {
94 94
                         $extras[] = $ele;
95 95
                     }
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
             $ret .= NWLINE;
110 110
         }
111 111
 
112
-        $ret .= $hidden . NWLINE;
113
-        $ret .= '</div>' . NWLINE;
112
+        $ret .= $hidden.NWLINE;
113
+        $ret .= '</div>'.NWLINE;
114 114
 
115 115
         return $ret;
116 116
     }
Please login to merge, or discard this patch.
class/Modules.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $isNew = $this->isNew();
184 184
         $title = $isNew ? sprintf(_AM_TDMCREATE_MODULE_NEW) : sprintf(_AM_TDMCREATE_MODULE_EDIT);
185 185
 
186
-        include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
186
+        include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
187 187
 
188 188
         $form = new \XoopsThemeForm($title, 'moduleform', $action, 'post', true);
189 189
         $form->setExtra('enctype="multipart/form-data"');
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         // Options
243 243
         $checkbox = new \XoopsFormCheckbox(' ', 'module_option', $this->getOptionsModules(), '<br>');
244 244
         foreach ($this->options as $option) {
245
-            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_MODULE_' . mb_strtoupper($option)));
245
+            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_MODULE_'.mb_strtoupper($option)));
246 246
         }
247 247
         $optionsTray->addElement($checkbox);
248 248
 
@@ -251,17 +251,17 @@  discard block
 block discarded – undo
251 251
         $modImage = $this->getVar('mod_image');
252 252
         $modImage = $modImage ?: $set['image'];
253 253
 
254
-        $uploadDirectory = 'uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/modules';
254
+        $uploadDirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules';
255 255
         $imgtray         = new \XoopsFormElementTray(_AM_TDMCREATE_MODULE_IMAGE, '<br>');
256
-        $imgpath         = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . mb_strtolower($uploadDirectory) . '/');
256
+        $imgpath         = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './'.mb_strtolower($uploadDirectory).'/');
257 257
         $imageselect     = new \XoopsFormSelect($imgpath, 'mod_image', $modImage);
258 258
         $modImageArray   = \XoopsLists::getImgListAsArray(TDMC_UPLOAD_IMGMOD_PATH);
259 259
         foreach ($modImageArray as $image) {
260 260
             $imageselect->addOption($image, $image);
261 261
         }
262
-        $imageselect->setExtra("onchange='showImgSelected(\"image3\", \"mod_image\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")'");
262
+        $imageselect->setExtra("onchange='showImgSelected(\"image3\", \"mod_image\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")'");
263 263
         $imgtray->addElement($imageselect);
264
-        $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='" . TDMC_UPLOAD_IMGMOD_URL . '/' . $modImage . "' id='image3' alt='' /><br>"));
264
+        $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='".TDMC_UPLOAD_IMGMOD_URL.'/'.$modImage."' id='image3' alt='' /><br>"));
265 265
 
266 266
         $fileseltray = new \XoopsFormElementTray('', '<br>');
267 267
         $fileseltray->addElement(new \XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $helper->getConfig('maxsize_image')));
@@ -271,25 +271,25 @@  discard block
 block discarded – undo
271 271
         //---------- START LOGO GENERATOR -----------------
272 272
         $tables_img = $this->getVar('table_image') ?: 'about.png';
273 273
         $iconsdir   = '/Frameworks/moduleclasses/icons/32';
274
-        if (is_dir(XOOPS_ROOT_PATH . $iconsdir)) {
274
+        if (is_dir(XOOPS_ROOT_PATH.$iconsdir)) {
275 275
             $uploadDirectory = $iconsdir;
276 276
             $imgpath         = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsdir}/");
277 277
         } else {
278
-            $uploadDirectory = '/uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/tables';
279
-            $imgpath         = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/tables');
278
+            $uploadDirectory = '/uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/tables';
279
+            $imgpath         = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/tables');
280 280
         }
281 281
         $createLogoTray    = new \XoopsFormElementTray(_AM_TDMCREATE_MODULE_CREATENEWLOGO, '<br>');
282 282
         $iconSelect        = new \XoopsFormSelect($imgpath, 'tables_img', $tables_img, 8);
283
-        $tablesImagesArray = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $uploadDirectory);
283
+        $tablesImagesArray = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$uploadDirectory);
284 284
         foreach ($tablesImagesArray as $image) {
285 285
             $iconSelect->addOption($image, $image);
286 286
         }
287
-        $iconSelect->setExtra(" onchange='showImgSelected2(\"image4\", \"tables_img\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")' ");
287
+        $iconSelect->setExtra(" onchange='showImgSelected2(\"image4\", \"tables_img\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")' ");
288 288
         $createLogoTray->addElement($iconSelect);
289
-        $createLogoTray->addElement(new \XoopsFormLabel('', "<br><img src='" . XOOPS_URL . '/' . $uploadDirectory . '/' . $tables_img . "' id='image4' alt='' />"));
289
+        $createLogoTray->addElement(new \XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$uploadDirectory.'/'.$tables_img."' id='image4' alt='' />"));
290 290
         // Create preview and submit buttons
291 291
         $buttonLogoGenerator4 = new \XoopsFormButton('', 'button4', _AM_TDMCREATE_MODULE_CREATENEWLOGO, 'button');
292
-        $buttonLogoGenerator4->setExtra(" onclick='createNewModuleLogo(\"" . TDMC_URL . "\")' ");
292
+        $buttonLogoGenerator4->setExtra(" onclick='createNewModuleLogo(\"".TDMC_URL."\")' ");
293 293
         $createLogoTray->addElement($buttonLogoGenerator4);
294 294
 
295 295
         $form->addElement($createLogoTray);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         $modSubversion = $isNew ? $set['subversion'] : $this->getVar('mod_subversion');
350 350
         $form->addElement(new \XoopsFormText(_AM_TDMCREATE_MODULE_SUBVERSION, 'mod_subversion', 50, 255, $modSubversion));
351 351
 
352
-        $buttonTray = new \XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', '');
352
+        $buttonTray = new \XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', '');
353 353
         $buttonTray->addElement(new \XoopsFormHidden('op', 'save'));
354 354
         $buttonTray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
355 355
         $form->addElement($buttonTray);
@@ -376,9 +376,9 @@  discard block
 block discarded – undo
376 376
             }
377 377
         }
378 378
 
379
-        if (!file_exists($imageBase = TDMC_IMAGES_LOGOS_PATH . '/empty.png')
380
-            || !file_exists($font = TDMC_FONTS_PATH . '/VeraBd.ttf')
381
-            || !file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))) {
379
+        if (!file_exists($imageBase = TDMC_IMAGES_LOGOS_PATH.'/empty.png')
380
+            || !file_exists($font = TDMC_FONTS_PATH.'/VeraBd.ttf')
381
+            || !file_exists($iconFile = XOOPS_ICONS32_PATH.'/'.basename($logoIcon))) {
382 382
             return false;
383 383
         }
384 384
         $imageModule = imagecreatefrompng($imageBase);
@@ -388,12 +388,12 @@  discard block
 block discarded – undo
388 388
         $spaceBorder = (92 - mb_strlen($moduleDirname) * 7.5) / 2;
389 389
         imagefttext($imageModule, 8.5, 0, $spaceBorder, 45, $textColor, $font, ucfirst($moduleDirname), []);
390 390
         imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
391
-        $logoImg = '/' . 'logoModule.png';
392
-        imagepng($imageModule, TDMC_UPLOAD_IMGMOD_PATH . $logoImg);
391
+        $logoImg = '/'.'logoModule.png';
392
+        imagepng($imageModule, TDMC_UPLOAD_IMGMOD_PATH.$logoImg);
393 393
         imagedestroy($imageModule);
394 394
         imagedestroy($imageIcon);
395 395
 
396
-        return TDMC_UPLOAD_IMGMOD_URL . $logoImg;
396
+        return TDMC_UPLOAD_IMGMOD_URL.$logoImg;
397 397
     }
398 398
 
399 399
     /**
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
     {
436 436
         $retModules = [];
437 437
         foreach ($this->options as $option) {
438
-            if (1 == $this->getVar('mod_' . $option)) {
438
+            if (1 == $this->getVar('mod_'.$option)) {
439 439
                 $retModules[] = $option;
440 440
             }
441 441
         }
Please login to merge, or discard this patch.