Passed
Pull Request — master (#143)
by Michael
04:30
created
class/modules.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @version         $Id: 1.91 modules.php 13040 2015-04-25 15:12:12Z timgno $
24 24
  */
25
-include __DIR__ . '/autoload.php';
25
+include __DIR__.'/autoload.php';
26 26
 
27 27
 /**
28 28
  * Class TDMCreateModules.
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $isNew = $this->isNew();
181 181
         $title = $isNew ? sprintf(_AM_TDMCREATE_MODULE_NEW) : sprintf(_AM_TDMCREATE_MODULE_EDIT);
182 182
 
183
-        include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
183
+        include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
184 184
 
185 185
         $form = new XoopsThemeForm($title, 'moduleform', $action, 'post', true);
186 186
         $form->setExtra('enctype="multipart/form-data"');
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
         // Options
240 240
         $checkbox = new XoopsFormCheckbox(' ', 'module_option', $this->getOptionsModules(), '<br>');
241 241
         foreach ($this->options as $option) {
242
-            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_MODULE_' . mb_strtoupper($option)));
242
+            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_MODULE_'.mb_strtoupper($option)));
243 243
         }
244 244
         $optionsTray->addElement($checkbox);
245 245
 
@@ -248,17 +248,17 @@  discard block
 block discarded – undo
248 248
         $modImage = $this->getVar('mod_image');
249 249
         $modImage = $modImage ?: $set['image'];
250 250
 
251
-        $uploadDirectory = 'uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/modules';
251
+        $uploadDirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules';
252 252
         $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_MODULE_IMAGE, '<br>');
253
-        $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . mb_strtolower($uploadDirectory) . '/');
253
+        $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './'.mb_strtolower($uploadDirectory).'/');
254 254
         $imageselect = new XoopsFormSelect($imgpath, 'mod_image', $modImage);
255 255
         $modImageArray = XoopsLists::getImgListAsArray(TDMC_UPLOAD_IMGMOD_PATH);
256 256
         foreach ($modImageArray as $image) {
257 257
             $imageselect->addOption("{$image}", $image);
258 258
         }
259
-        $imageselect->setExtra("onchange='showImgSelected(\"image3\", \"mod_image\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")'");
259
+        $imageselect->setExtra("onchange='showImgSelected(\"image3\", \"mod_image\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")'");
260 260
         $imgtray->addElement($imageselect);
261
-        $imgtray->addElement(new XoopsFormLabel('', "<br><img src='" . TDMC_UPLOAD_IMGMOD_URL . '/' . $modImage . "' name='image3' id='image3' alt='' /><br>"));
261
+        $imgtray->addElement(new XoopsFormLabel('', "<br><img src='".TDMC_UPLOAD_IMGMOD_URL.'/'.$modImage."' name='image3' id='image3' alt='' /><br>"));
262 262
 
263 263
         $fileseltray = new XoopsFormElementTray('', '<br>');
264 264
         $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $tdmcreate->getConfig('maxsize')));
@@ -268,25 +268,25 @@  discard block
 block discarded – undo
268 268
         //---------- START LOGO GENERATOR -----------------
269 269
         $tables_img = $this->getVar('table_image') ?: 'about.png';
270 270
         $iconsdir = '/Frameworks/moduleclasses/icons/32';
271
-        if (is_dir(XOOPS_ROOT_PATH . $iconsdir)) {
271
+        if (is_dir(XOOPS_ROOT_PATH.$iconsdir)) {
272 272
             $uploadDirectory = $iconsdir;
273 273
             $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsdir}/");
274 274
         } else {
275
-            $uploadDirectory = '/uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/tables';
276
-            $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/tables');
275
+            $uploadDirectory = '/uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/tables';
276
+            $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/tables');
277 277
         }
278 278
         $createLogoTray = new XoopsFormElementTray(_AM_TDMCREATE_MODULE_CREATENEWLOGO, '<br>');
279 279
         $iconSelect = new XoopsFormSelect($imgpath, 'tables_img', $tables_img, 8);
280
-        $tablesImagesArray = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $uploadDirectory);
280
+        $tablesImagesArray = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$uploadDirectory);
281 281
         foreach ($tablesImagesArray as $image) {
282 282
             $iconSelect->addOption("{$image}", $image);
283 283
         }
284
-        $iconSelect->setExtra(" onchange='showImgSelected2(\"image4\", \"tables_img\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")' ");
284
+        $iconSelect->setExtra(" onchange='showImgSelected2(\"image4\", \"tables_img\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")' ");
285 285
         $createLogoTray->addElement($iconSelect);
286
-        $createLogoTray->addElement(new XoopsFormLabel('', "<br><img src='" . XOOPS_URL . '/' . $uploadDirectory . '/' . $tables_img . "' name='image4' id='image4' alt='' />"));
286
+        $createLogoTray->addElement(new XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$uploadDirectory.'/'.$tables_img."' name='image4' id='image4' alt='' />"));
287 287
         // Create preview and submit buttons
288 288
         $buttonLogoGenerator4 = new XoopsFormButton('', 'button4', _AM_TDMCREATE_MODULE_CREATENEWLOGO, 'button');
289
-        $buttonLogoGenerator4->setExtra(" onclick='createNewModuleLogo(\"" . TDMC_URL . "\")' ");
289
+        $buttonLogoGenerator4->setExtra(" onclick='createNewModuleLogo(\"".TDMC_URL."\")' ");
290 290
         $createLogoTray->addElement($buttonLogoGenerator4);
291 291
 
292 292
         $form->addElement($createLogoTray);
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
         $modSubversion = $isNew ? $set['subversion'] : $this->getVar('mod_subversion');
347 347
         $form->addElement(new XoopsFormText(_AM_TDMCREATE_MODULE_SUBVERSION, 'mod_subversion', 50, 255, $modSubversion));
348 348
 
349
-        $buttonTray = new XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', '');
349
+        $buttonTray = new XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', '');
350 350
         $buttonTray->addElement(new XoopsFormHidden('op', 'save'));
351 351
         $buttonTray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
352 352
         $form->addElement($buttonTray);
@@ -373,9 +373,9 @@  discard block
 block discarded – undo
373 373
             }
374 374
         }
375 375
 
376
-        if (!file_exists($imageBase = TDMC_IMAGES_LOGOS_PATH . '/empty.png') ||
377
-            !file_exists($font = TDMC_FONTS_PATH . '/VeraBd.ttf') ||
378
-            !file_exists($iconFile = XOOPS_ICONS32_PATH . '/' . basename($logoIcon))
376
+        if (!file_exists($imageBase = TDMC_IMAGES_LOGOS_PATH.'/empty.png') ||
377
+            !file_exists($font = TDMC_FONTS_PATH.'/VeraBd.ttf') ||
378
+            !file_exists($iconFile = XOOPS_ICONS32_PATH.'/'.basename($logoIcon))
379 379
         ) {
380 380
             return false;
381 381
         }
@@ -386,12 +386,12 @@  discard block
 block discarded – undo
386 386
         $spaceBorder = (92 - mb_strlen($moduleDirname) * 7.5) / 2;
387 387
         imagefttext($imageModule, 8.5, 0, $spaceBorder, 45, $textColor, $font, ucfirst($moduleDirname), []);
388 388
         imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
389
-        $logoImg = '/' . $moduleDirname . '_logo.png';
390
-        imagepng($imageModule, TDMC_UPLOAD_IMGMOD_PATH . $logoImg);
389
+        $logoImg = '/'.$moduleDirname.'_logo.png';
390
+        imagepng($imageModule, TDMC_UPLOAD_IMGMOD_PATH.$logoImg);
391 391
         imagedestroy($imageModule);
392 392
         imagedestroy($imageIcon);
393 393
 
394
-        return TDMC_UPLOAD_IMGMOD_URL . $logoImg;
394
+        return TDMC_UPLOAD_IMGMOD_URL.$logoImg;
395 395
     }
396 396
 
397 397
     /**
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
     {
434 434
         $retModules = [];
435 435
         foreach ($this->options as $option) {
436
-            if (1 == $this->getVar('mod_' . $option)) {
436
+            if (1 == $this->getVar('mod_'.$option)) {
437 437
                 $retModules[] = $option;
438 438
             }
439 439
         }
Please login to merge, or discard this patch.
class/SplClassLoader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -137,17 +137,17 @@
 block discarded – undo
137 137
      */
138 138
     public function loadClass($className)
139 139
     {
140
-        if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace . $this->_namespaceSeparator))) {
140
+        if (null === $this->_namespace || $this->_namespace.$this->_namespaceSeparator === mb_substr($className, 0, mb_strlen($this->_namespace.$this->_namespaceSeparator))) {
141 141
             $fileName = '';
142 142
             $namespace = '';
143 143
             if (false !== ($lastNsPos = mb_strrpos($className, $this->_namespaceSeparator))) {
144 144
                 $namespace = mb_substr($className, 0, $lastNsPos);
145 145
                 $className = mb_substr($className, $lastNsPos + 1);
146
-                $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
146
+                $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR;
147 147
             }
148
-            $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension;
148
+            $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className).$this->_fileExtension;
149 149
 
150
-            require(null !== $this->_includePath ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName;
150
+            require(null !== $this->_includePath ? $this->_includePath.DIRECTORY_SEPARATOR : '').$fileName;
151 151
         }
152 152
     }
153 153
 }
Please login to merge, or discard this patch.
class/logoGenerator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @version         $Id: logoGenerator.php 12258 2014-01-02 09:33:29Z timgno $
23 23
  */
24
-include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php';
24
+include_once dirname(dirname(dirname(__DIR__))).'/mainfile.php';
25 25
 //include_once XOOPS_ROOT_PATH . '/modules/TDMCreate/include/common.php';
26 26
 
27 27
 if (function_exists($_GET['f'])) { // get function name and parameter  $_GET['f']($_GET["p"]);
28
-    include_once __DIR__ . '/logoGenerator.php';
28
+    include_once __DIR__.'/logoGenerator.php';
29 29
     $ret = logoGenerator::createLogo($_GET['iconName'], $_GET['caption']);
30 30
     phpFunction($ret);
31 31
 } else {
@@ -64,15 +64,15 @@  discard block
 block discarded – undo
64 64
         }
65 65
 
66 66
         $dirname = 'tdmcreate';
67
-        $iconFileName = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32/' . basename($logoIcon);
67
+        $iconFileName = XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32/'.basename($logoIcon);
68 68
 
69 69
         //$dirFonts = TDMC_PATH . "/assets/fonts";
70 70
         //$dirLogos = TDMC_PATH . "/assets/images/logos";
71
-        $dirFonts = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/fonts';
72
-        $dirLogos = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/images/logos';
71
+        $dirFonts = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/fonts';
72
+        $dirLogos = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/images/logos';
73 73
 
74
-        if (!file_exists($imageBase = $dirLogos . '/empty.png') ||
75
-            !file_exists($font = $dirFonts . '/VeraBd.ttf') ||
74
+        if (!file_exists($imageBase = $dirLogos.'/empty.png') ||
75
+            !file_exists($font = $dirFonts.'/VeraBd.ttf') ||
76 76
             !file_exists($iconFile = $iconFileName)) {
77 77
             return false;
78 78
         }
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
         imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
89 89
 
90 90
         //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleName . "_logo.png";
91
-        $targetImage = '/uploads/' . $dirname . '/images/modules/' . $moduleName . '_logo.png';
91
+        $targetImage = '/uploads/'.$dirname.'/images/modules/'.$moduleName.'_logo.png';
92 92
 
93
-        imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage);
93
+        imagepng($imageModule, XOOPS_ROOT_PATH.$targetImage);
94 94
 
95 95
         imagedestroy($imageModule);
96 96
         imagedestroy($imageIcon);
97 97
 
98
-        return XOOPS_URL . $targetImage;
98
+        return XOOPS_URL.$targetImage;
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
class/settings.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @version         $Id: settings.php 13070 2015-05-19 12:24:20Z timgno $
24 24
  */
25
-include __DIR__ . '/autoload.php';
25
+include __DIR__.'/autoload.php';
26 26
 /*
27 27
 *  @Class TDMCreateSettings
28 28
 *  @extends XoopsObject
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $isNew = $this->isNew();
144 144
         $title = $isNew ? sprintf(_AM_TDMCREATE_SETTING_NEW) : sprintf(_AM_TDMCREATE_SETTING_EDIT);
145 145
 
146
-        include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
146
+        include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
147 147
 
148 148
         $form = new XoopsThemeForm($title, 'settingform', $action, 'post', true);
149 149
         $form->setExtra('enctype="multipart/form-data"');
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $checkbox = new XoopsFormCheckbox(' ', 'setting_option', $settingOption, '<br>');
173 173
         $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC);
174 174
         foreach ($this->options as $option) {
175
-            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_SETTING_' . mb_strtoupper($option)));
175
+            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_SETTING_'.mb_strtoupper($option)));
176 176
         }
177 177
         $optionsTray->addElement($checkbox);
178 178
 
@@ -181,17 +181,17 @@  discard block
 block discarded – undo
181 181
         $modImage = $this->getVar('set_image');
182 182
         $modImage = $modImage ?: $set['image'];
183 183
 
184
-        $uploadDirectory = 'uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/modules';
184
+        $uploadDirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules';
185 185
         $imgtray = new XoopsFormElementTray(_AM_TDMCREATE_SETTING_IMAGE, '<br>');
186
-        $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . mb_strtolower($uploadDirectory) . '/');
186
+        $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './'.mb_strtolower($uploadDirectory).'/');
187 187
         $imageSelect = new XoopsFormSelect($imgpath, 'set_image', $modImage);
188 188
         $modImage_array = XoopsLists::getImgListAsArray(TDMC_UPLOAD_IMGMOD_PATH);
189 189
         foreach ($modImage_array as $image) {
190 190
             $imageSelect->addOption("{$image}", $image);
191 191
         }
192
-        $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"set_image\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")'");
192
+        $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"set_image\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")'");
193 193
         $imgtray->addElement($imageSelect);
194
-        $imgtray->addElement(new XoopsFormLabel('', "<br><img src='" . TDMC_UPLOAD_IMGMOD_URL . '/' . $modImage . "' name='image3' id='image3' alt='' /><br>"));
194
+        $imgtray->addElement(new XoopsFormLabel('', "<br><img src='".TDMC_UPLOAD_IMGMOD_URL.'/'.$modImage."' name='image3' id='image3' alt='' /><br>"));
195 195
 
196 196
         $fileseltray = new XoopsFormElementTray('', '<br>');
197 197
         $fileseltray->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $tdmcreate->getConfig('maxsize')));
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         $form->addElement(new XoopsFormText(_AM_TDMCREATE_SETTING_PAYPAL_BUTTON, 'set_donations', 50, 255, $this->getVar('set_donations')));
220 220
         $form->addElement(new XoopsFormText(_AM_TDMCREATE_SETTING_SUBVERSION, 'set_subversion', 50, 255, $this->getVar('set_subversion')));
221 221
 
222
-        $buttonTray = new XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', '');
222
+        $buttonTray = new XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', '');
223 223
         $buttonTray->addElement(new XoopsFormHidden('op', 'save'));
224 224
         $buttonTray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
225 225
         $form->addElement($buttonTray);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         $retSet = [];
261 261
         foreach ($this->options as $option) {
262
-            if (1 == $this->getVar('set_' . $option)) {
262
+            if (1 == $this->getVar('set_'.$option)) {
263 263
                 $retSet[] = $option;
264 264
             }
265 265
         }
Please login to merge, or discard this patch.
class/logo.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @version         $Id: 1.91 logo.php 13040 2015-04-25 15:12:12Z timgno $
24 24
  */
25
-include __DIR__ . '/autoload.php';
25
+include __DIR__.'/autoload.php';
26 26
 /**
27 27
  * Class TDMCreateLogo.
28 28
  */
@@ -109,15 +109,15 @@  discard block
 block discarded – undo
109 109
         }
110 110
 
111 111
         $dirname = 'tdmcreate';
112
-        $iconFileName = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32/' . basename($logoIcon);
112
+        $iconFileName = XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32/'.basename($logoIcon);
113 113
 
114 114
         //$dirFonts = TDMC_PATH . "/assets/fonts";
115 115
         //$dirLogos = TDMC_PATH . "/assets/images/logos";
116
-        $dirFonts = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/fonts';
117
-        $dirLogos = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/images/logos';
116
+        $dirFonts = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/fonts';
117
+        $dirLogos = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/images/logos';
118 118
 
119
-        if (!file_exists($imageBase = $dirLogos . '/empty.png') ||
120
-            !file_exists($font = $dirFonts . '/VeraBd.ttf') ||
119
+        if (!file_exists($imageBase = $dirLogos.'/empty.png') ||
120
+            !file_exists($font = $dirFonts.'/VeraBd.ttf') ||
121 121
             !file_exists($iconFile = $iconFileName)) {
122 122
             return false;
123 123
         }
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
         imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32);
134 134
 
135 135
         //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png";
136
-        $targetImage = '/uploads/' . $dirname . '/images/modules/' . $moduleDirname . '_logo.png';
136
+        $targetImage = '/uploads/'.$dirname.'/images/modules/'.$moduleDirname.'_logo.png';
137 137
 
138
-        imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage);
138
+        imagepng($imageModule, XOOPS_ROOT_PATH.$targetImage);
139 139
 
140 140
         imagedestroy($imageModule);
141 141
         imagedestroy($imageIcon);
142 142
 
143
-        return XOOPS_URL . $targetImage;
143
+        return XOOPS_URL.$targetImage;
144 144
     }
145 145
 }
Please login to merge, or discard this patch.
class/tables.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * @version         $Id: 1.91 tables.php 11297 2013-03-24 10:58:10Z timgno $
24 24
  */
25
-include __DIR__ . '/autoload.php';
25
+include __DIR__.'/autoload.php';
26 26
 
27 27
 /**
28 28
  * Class TDMCreateTables.
@@ -179,18 +179,18 @@  discard block
 block discarded – undo
179 179
         $tableImage = $getTableImage ?: 'blank.gif';
180 180
         $icons32Directory = '/Frameworks/moduleclasses/icons/32';
181 181
         $uploadsDirectory = '/uploads/tdmcreate/images/tables';
182
-        $iconsDirectory = is_dir(XOOPS_ROOT_PATH . $icons32Directory) ? $icons32Directory : $uploadsDirectory;
182
+        $iconsDirectory = is_dir(XOOPS_ROOT_PATH.$icons32Directory) ? $icons32Directory : $uploadsDirectory;
183 183
 
184 184
         $imgtray1 = new XoopsFormElementTray(_AM_TDMCREATE_TABLE_IMAGE, '<br>');
185 185
         $imgpath1 = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsDirectory}/");
186 186
         $imageSelect1 = new XoopsFormSelect($imgpath1, 'table_image', $tableImage, 10);
187
-        $imageArray1 = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $iconsDirectory);
187
+        $imageArray1 = XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$iconsDirectory);
188 188
         foreach ($imageArray1 as $image1) {
189 189
             $imageSelect1->addOption("{$image1}", $image1);
190 190
         }
191
-        $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"" . $iconsDirectory . '", "", "' . XOOPS_URL . "\")'");
191
+        $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"".$iconsDirectory.'", "", "'.XOOPS_URL."\")'");
192 192
         $imgtray1->addElement($imageSelect1, false);
193
-        $imgtray1->addElement(new XoopsFormLabel('', "<br><img src='" . XOOPS_URL . '/' . $iconsDirectory . '/' . $tableImage . "' name='image1' id='image1' alt='' />"));
193
+        $imgtray1->addElement(new XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$iconsDirectory.'/'.$tableImage."' name='image1' id='image1' alt='' />"));
194 194
         $fileseltray1 = new XoopsFormElementTray('', '<br>');
195 195
         $fileseltray1->addElement(new XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $tdmcreate->getConfig('maxsize')));
196 196
         $fileseltray1->addElement(new XoopsFormLabel(''));
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
         $checkbox = new XoopsFormCheckbox(' ', 'table_option', $this->getOptionsTables(), '<br>');
215 215
         $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC);
216 216
         foreach ($this->options as $option) {
217
-            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_' . mb_strtoupper($option)));
217
+            $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_'.mb_strtoupper($option)));
218 218
         }
219 219
         $optionsTray->addElement($checkbox);
220 220
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
         $form->addElement($optionsTray);
224 224
 
225
-        $buttonTray = new XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', '');
225
+        $buttonTray = new XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', '');
226 226
         $buttonTray->addElement(new XoopsFormHidden('op', 'save'));
227 227
         $buttonTray->addElement(new XoopsFormHidden('table_id', ($isNew ? 0 : $this->getVar('table_id'))));
228 228
         $buttonTray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     {
272 272
         $retTable = [];
273 273
         foreach ($this->options as $option) {
274
-            if (1 == $this->getVar('table_' . $option)) {
274
+            if (1 == $this->getVar('table_'.$option)) {
275 275
                 $retTable[] = $option;
276 276
             }
277 277
         }
Please login to merge, or discard this patch.
class/files/TDMCreateStructure.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,9 +213,9 @@
 block discarded – undo
213 213
         $this->setFolderName($folderName);
214 214
         if ($fileName) {
215 215
             $this->setFileName($fileName);
216
-            $ret = $this->getUploadPath() . DS . $this->getModuleName() . DS . $this->getFolderName() . DS . $this->getFileName();
216
+            $ret = $this->getUploadPath().DS.$this->getModuleName().DS.$this->getFolderName().DS.$this->getFileName();
217 217
         } else {
218
-            $ret = $this->getUploadPath() . DS . $this->getModuleName() . DS . $this->getFolderName();
218
+            $ret = $this->getUploadPath().DS.$this->getModuleName().DS.$this->getFolderName();
219 219
         }
220 220
 
221 221
         return $ret;
Please login to merge, or discard this patch.
class/files/TDMCreateXoopsCode.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
         $pTopic = TDMCreatePhpCode::getInstance();
476 476
         $ret = $pTopic->getPhpCodeCommentLine('Get Var', $fieldNameParent, $t);
477 477
         $fieldParent = $this->getXcGetVar('', "\${$tableName}All[\$i]", $fieldNameParent, true, '');
478
-        $ret .= $this->getXcGet($rpFieldName, $fieldParent, '', $tableNameTopic . 'Handler', false, $t);
478
+        $ret .= $this->getXcGet($rpFieldName, $fieldParent, '', $tableNameTopic.'Handler', false, $t);
479 479
         $ret .= $this->getXcGetVar("\${$lpFieldName}['{$rpFieldName}']", "\${$rpFieldName}", $fieldNameTopic, false, $t);
480 480
 
481 481
         return $ret;
@@ -496,8 +496,8 @@  discard block
 block discarded – undo
496 496
     public function getXcParentTopicGetVar($moduleDirname, $lpFieldName, $rpFieldName, $tableName, $tableSoleNameTopic, $tableNameTopic, $fieldNameParent, $t = '')
497 497
     {
498 498
         $pParentTopic = TDMCreatePhpCode::getInstance();
499
-        $parentTopic = $pParentTopic->getPhpCodeCommentLine('Get', $tableNameTopic . ' Handler', $t . "\t");
500
-        $parentTopic .= $this->getXoopsHandlerLine($moduleDirname, $tableNameTopic, $t . "\t");
499
+        $parentTopic = $pParentTopic->getPhpCodeCommentLine('Get', $tableNameTopic.' Handler', $t."\t");
500
+        $parentTopic .= $this->getXoopsHandlerLine($moduleDirname, $tableNameTopic, $t."\t");
501 501
         $elseGroups = $this->getXcEqualsOperator('$groups', 'XOOPS_GROUP_ANONYMOUS');
502 502
         $ret = $pParentTopic->getPhpCodeConditions("!isset(\${$tableNameTopic}Handler", '', '', $parentTopic, $elseGroups);
503 503
         $ret .= $this->getXcGetVarFromID("\${$lpFieldName}['{$rpFieldName}']", $tableNameTopic, $tableSoleNameTopic, $tableName, $fieldNameParent, $t);
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         $pVarFromID = TDMCreatePhpCode::getInstance();
521 521
         $ret = $pVarFromID->getPhpCodeCommentLine('Get Var', $fieldName, $t);
522 522
         $getVarFromID = $this->getXcGetVar('', "\${$tableName}All[\$i]", $fieldName, true, '');
523
-        $rightGet = $this->getXcAnchorFunction($anchor . 'Handler', 'get' . $var . 'FromId', $getVarFromID);
523
+        $rightGet = $this->getXcAnchorFunction($anchor.'Handler', 'get'.$var.'FromId', $getVarFromID);
524 524
         $ret .= $this->getXcEqualsOperator($left, $rightGet, null, false, $t);
525 525
 
526 526
         return $ret;
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
         $phpCodeTextArea = TDMCreatePhpCode::getInstance();
573 573
         $getVar = $this->getXcGetVar('', "\${$tableName}All[\$i]", $fieldName, true, '');
574 574
 
575
-        return "{$t}" . $phpCodeTextArea->getPhpCodeStripTags("{$lpFieldName}['{$rpFieldName}']", $getVar, false, $t);
575
+        return "{$t}".$phpCodeTextArea->getPhpCodeStripTags("{$lpFieldName}['{$rpFieldName}']", $getVar, false, $t);
576 576
     }
577 577
 
578 578
     /**
@@ -781,9 +781,9 @@  discard block
 block discarded – undo
781 781
     {
782 782
         $assign = "{$t}\$GLOBALS['xoopsTpl']->assign(";
783 783
         if (false === $leftIsString) {
784
-            $ret = $assign . "{$tplString}, {$phpRender});\n";
784
+            $ret = $assign."{$tplString}, {$phpRender});\n";
785 785
         } else {
786
-            $ret = $assign . "'{$tplString}', {$phpRender});\n";
786
+            $ret = $assign."'{$tplString}', {$phpRender});\n";
787 787
         }
788 788
 
789 789
         return $ret;
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
             return "{$t}\$GLOBALS['xoopsTpl']->display(\"db:{$displayTpl}\");\n";
853 853
         }
854 854
 
855
-        return "{$t}\$GLOBALS['xoopsTpl']->display('db:" . $displayTpl . "');\n";
855
+        return "{$t}\$GLOBALS['xoopsTpl']->display('db:".$displayTpl."');\n";
856 856
     }
857 857
 
858 858
     /**
@@ -1093,10 +1093,10 @@  discard block
 block discarded – undo
1093 1093
         $phpCodeSecurity = TDMCreatePhpCode::getInstance();
1094 1094
         $securityError = $this->getXcSecurityErrors();
1095 1095
         $implode = $phpCodeSecurity->getPhpCodeImplode(',', $securityError);
1096
-        $content = "{$t}\t" . $this->getXcRedirectHeader($tableName, '', 3, $implode, $t);
1096
+        $content = "{$t}\t".$this->getXcRedirectHeader($tableName, '', 3, $implode, $t);
1097 1097
         $securityCheck = $this->getXcSecurityCheck();
1098 1098
 
1099
-        return $phpCodeSecurity->getPhpCodeConditions('!' . $securityCheck, '', '', $content, $t);
1099
+        return $phpCodeSecurity->getPhpCodeConditions('!'.$securityCheck, '', '', $content, $t);
1100 1100
     }
1101 1101
 
1102 1102
     /**
@@ -1109,7 +1109,7 @@  discard block
 block discarded – undo
1109 1109
     public function getXcInsertData($tableName, $language, $t = '')
1110 1110
     {
1111 1111
         $phpCodeInsertData = TDMCreatePhpCode::getInstance();
1112
-        $content = "{$t}\t" . $this->getXcRedirectHeader($tableName, '?op=list', 2, "{$language}FORM_OK");
1112
+        $content = "{$t}\t".$this->getXcRedirectHeader($tableName, '?op=list', 2, "{$language}FORM_OK");
1113 1113
         $handlerInsert = $this->getXcHandler($tableName, $tableName, false, true, false, 'Obj');
1114 1114
 
1115 1115
         return $phpCodeInsertData->getPhpCodeConditions($handlerInsert, '', '', $content, $t);
@@ -1156,8 +1156,8 @@  discard block
 block discarded – undo
1156 1156
         $phpXoopsConfirm = TDMCreatePhpCode::getInstance();
1157 1157
         $array = "array('ok' => 1, '{$fieldId}' => \${$ccFieldId}, 'op' => '{$options}')";
1158 1158
         $server = $phpXoopsConfirm->getPhpCodeGlobalsVariables('REQUEST_URI', 'SERVER');
1159
-        $getVar = $this->getXcGetVar('', $tableName . 'Obj', $fieldMain, true, '');
1160
-        $sprintf = $phpXoopsConfirm->getPhpCodeSprintf($language . 'FORM_SURE_' . $stuOptions, $getVar);
1159
+        $getVar = $this->getXcGetVar('', $tableName.'Obj', $fieldMain, true, '');
1160
+        $sprintf = $phpXoopsConfirm->getPhpCodeSprintf($language.'FORM_SURE_'.$stuOptions, $getVar);
1161 1161
         $ret = "{$t}xoops_confirm({$array}, {$server}, {$sprintf});\n";
1162 1162
 
1163 1163
         return $ret;
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
     {
1330 1330
         $ret = TDMCreatePhpCode::getInstance()->getPhpCodeCommentLine('Get Var', $fieldNameParent, $t);
1331 1331
         $paramGet = $this->getXcGetVar('', "\${$tableName}All[\$i]", $fieldNameParent, true, '');
1332
-        $ret .= $this->getXcGet($rpFieldName, $paramGet, '', $tableNameTopic . 'Handler', false, $t);
1332
+        $ret .= $this->getXcGet($rpFieldName, $paramGet, '', $tableNameTopic.'Handler', false, $t);
1333 1333
         $ret .= $this->getXcGetVar("\${$lpFieldName}['{$rpFieldName}']", "\${$rpFieldName}", $fieldNameTopic, false, $t);
1334 1334
 
1335 1335
         return $ret;
@@ -1417,18 +1417,18 @@  discard block
 block discarded – undo
1417 1417
                 $fieldMain = $fieldName;
1418 1418
             }
1419 1419
             if ((5 == $fieldElement) || (6 == $fieldElement)) {
1420
-                $ret .= $t . $this->getXcCheckBoxOrRadioYNSetVar($tableName, $fieldName);
1420
+                $ret .= $t.$this->getXcCheckBoxOrRadioYNSetVar($tableName, $fieldName);
1421 1421
             } elseif (13 == $fieldElement) {
1422 1422
                 $ret .= $axCodeSaveElements->getAxcUploadImageSetVar($moduleDirname, $tableName, $fieldName, $fieldMain);
1423 1423
             } elseif (14 == $fieldElement) {
1424 1424
                 $ret .= $axCodeSaveElements->getAxcUploadFileSetVar($moduleDirname, $tableName, $fieldName);
1425 1425
             } elseif (15 == $fieldElement) {
1426
-                $ret .= $t . $this->getXcTextDateSelectSetVar($tableName, $tableSoleName, $fieldName);
1426
+                $ret .= $t.$this->getXcTextDateSelectSetVar($tableName, $tableSoleName, $fieldName);
1427 1427
             } else {
1428 1428
                 if ((0 != $f) && 1 == $tableAutoincrement) {
1429
-                    $ret .= $t . $this->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']");
1429
+                    $ret .= $t.$this->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']");
1430 1430
                 } elseif ((0 == $f) && 0 == $tableAutoincrement) {
1431
-                    $ret .= $t . $this->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']");
1431
+                    $ret .= $t.$this->getXcSetVar($tableName, $fieldName, "\$_POST['{$fieldName}']");
1432 1432
                 }
1433 1433
             }
1434 1434
         }
@@ -1448,9 +1448,9 @@  discard block
 block discarded – undo
1448 1448
         $phpCodePageNav = TDMCreatePhpCode::getInstance();
1449 1449
         $classXCode = ClassXoopsCode::getInstance();
1450 1450
         $ret = $phpCodePageNav->getPhpCodeCommentLine('Display Navigation', null, $t);
1451
-        $condition = $phpCodePageNav->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/pagenav', true, false, 'include', $t . "\t");
1452
-        $condition .= $classXCode->getClassXoopsPageNav('pagenav', $tableName . 'Count', 'limit', 'start', 'start', "'op=list&limit=' . \$limit", false, $t . "\t");
1453
-        $condition .= $this->getXcTplAssign('pagenav', '$pagenav->renderNav(4)', true, $t . "\t");
1451
+        $condition = $phpCodePageNav->getPhpCodeIncludeDir('XOOPS_ROOT_PATH', 'class/pagenav', true, false, 'include', $t."\t");
1452
+        $condition .= $classXCode->getClassXoopsPageNav('pagenav', $tableName.'Count', 'limit', 'start', 'start', "'op=list&limit=' . \$limit", false, $t."\t");
1453
+        $condition .= $this->getXcTplAssign('pagenav', '$pagenav->renderNav(4)', true, $t."\t");
1454 1454
         $ret .= $phpCodePageNav->getPhpCodeConditions("\${$tableName}Count", ' > ', '$limit', $condition, false, $t);
1455 1455
 
1456 1456
         return $ret;
Please login to merge, or discard this patch.
class/files/admin/AdminIndex.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,18 +90,18 @@  discard block
 block discarded – undo
90 90
         $ret .= $pc->getPhpCodeCommentLine('Template Index');
91 91
         $ret .= $axc->getAdminTemplateMain("{$moduleDirname}", 'index');
92 92
         $ret .= $pc->getPhpCodeCommentLine('InfoBox Statistics');
93
-        $ret .= $axc->getAxcAddInfoBox($language . 'STATISTICS');
93
+        $ret .= $axc->getAxcAddInfoBox($language.'STATISTICS');
94 94
         $ret .= $pc->getPhpCodeCommentLine('Info elements');
95 95
         foreach (array_keys($tables) as $i) {
96 96
             $tableName = $tables[$i]->getVar('table_name');
97 97
             $tableInstall[] = $tables[$i]->getVar('table_install');
98
-            $stuTableName = $languageThereAre . mb_strtoupper($tableName);
98
+            $stuTableName = $languageThereAre.mb_strtoupper($tableName);
99 99
             $ucfTableName = ucfirst($tableName);
100
-            $ret .= $axc->getAxcAddInfoBoxLine($language . 'STATISTICS', $stuTableName, "\$count{$ucfTableName}");
100
+            $ret .= $axc->getAxcAddInfoBoxLine($language.'STATISTICS', $stuTableName, "\$count{$ucfTableName}");
101 101
         }
102 102
 
103 103
         if (null === $tableName) {
104
-            $ret .= $axc->getAxcAddInfoBoxLine($language . 'STATISTICS', 'No statistics', '0');
104
+            $ret .= $axc->getAxcAddInfoBoxLine($language.'STATISTICS', 'No statistics', '0');
105 105
         }
106 106
         if (is_array($tables) && in_array(1, $tableInstall, true)) {
107 107
             $ret .= $pc->getPhpCodeCommentLine('Upload Folders');
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $ret .= $pc->getPhpCodeCommentLine('Uploads Folders Created');
119 119
             $boxLine = $axc->getAxcAddConfigBoxLine('$folder[$i]', 'folder', '', "\t");
120 120
             $boxLine .= $axc->getAxcAddConfigBoxLine("array(\$folder[\$i], '777')", 'chmod', '', "\t");
121
-            $ret .= $pc->getPhpCodeForeach('folder', true, false, 'i', $boxLine, '') . PHP_EOL;
121
+            $ret .= $pc->getPhpCodeForeach('folder', true, false, 'i', $boxLine, '').PHP_EOL;
122 122
         }
123 123
         $ret .= $pc->getPhpCodeCommentLine('Render Index');
124 124
         $ret .= $xc->getXcTplAssign('navigation', "\$adminObject->displayNavigation('index.php')");
Please login to merge, or discard this patch.