Passed
Pull Request — master (#145)
by Goffy
04:27
created
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 . "' name='image3' id='image3' alt='' /><br>"));
264
+        $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='".TDMC_UPLOAD_IMGMOD_URL.'/'.$modImage."' name='image3' 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')));
@@ -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 . "' name='image4' id='image4' alt='' />"));
289
+        $createLogoTray->addElement(new \XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$uploadDirectory.'/'.$tables_img."' name='image4' 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.
class/Files/CreateFile.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     private function setRepositoryPath($moduleDirname)
156 156
     {
157
-        $this->uploadPath = TDMC_UPLOAD_REPOSITORY_PATH . '/' . $moduleDirname;
157
+        $this->uploadPath = TDMC_UPLOAD_REPOSITORY_PATH.'/'.$moduleDirname;
158 158
     }
159 159
 
160 160
     /**
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     private function getUploadPath()
254 254
     {
255 255
         if (null != $this->getSubDir()) {
256
-            $ret = $this->getRepositoryPath() . '/' . $this->getSubDir();
256
+            $ret = $this->getRepositoryPath().'/'.$this->getSubDir();
257 257
         } else {
258 258
             $ret = $this->getRepositoryPath();
259 259
         }
@@ -310,12 +310,12 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function getLanguage($moduleDirname, $prefix = '', $suffix = '')
312 312
     {
313
-        $lang = '_' . $prefix . '_' . mb_strtoupper($moduleDirname);
313
+        $lang = '_'.$prefix.'_'.mb_strtoupper($moduleDirname);
314 314
         $ret  = $lang;
315 315
         if (!empty($suffix) || '_' !== $suffix) {
316
-            $ret = $lang . '_' . $suffix;
316
+            $ret = $lang.'_'.$suffix;
317 317
         } elseif ('_' === $suffix) {
318
-            $ret = $lang . '_';
318
+            $ret = $lang.'_';
319 319
         }
320 320
 
321 321
         return $ret;
@@ -365,10 +365,10 @@  discard block
 block discarded – undo
365 365
         $rightString = $this->getRightString($string);
366 366
         $leftString  = $this->getLeftString($string);
367 367
         if ($ucfirst) {
368
-            return $this->getUcfirst($leftString) . $this->getUcfirst($rightString);
368
+            return $this->getUcfirst($leftString).$this->getUcfirst($rightString);
369 369
         }
370 370
         if ($lcfirst) {
371
-            return $this->getLcfirst($leftString) . $this->getUcfirst($rightString);
371
+            return $this->getLcfirst($leftString).$this->getUcfirst($rightString);
372 372
         }
373 373
 
374 374
         return $string;
@@ -493,11 +493,11 @@  discard block
 block discarded – undo
493 493
         } else {
494 494
             $ret .= "\n/*\n";
495 495
         }
496
-        $filename = TDMC_CLASS_PATH . '/files/docs/license.txt';
496
+        $filename = TDMC_CLASS_PATH.'/files/docs/license.txt';
497 497
         $handle   = fopen($filename, 'rb');
498 498
         $data     = fread($handle, filesize($filename));
499 499
         fclose($handle);
500
-        $ret       .= $data . "\n";
500
+        $ret       .= $data."\n";
501 501
         $ret       .= "*/\n";
502 502
         $copyright = [
503 503
             $name           => 'module for xoops',
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
             '@author    '   => "    {$author} - Email:<{$authorMail}> - Website:<{$authorWebsiteUrl}>",
511 511
 //            '@version    '  => "   \$Id: {$version} {$fileName} {$subversion} {$date}Z {$credits} \$",
512 512
         ];
513
-        $ret       .= Tdmcreate\Files\CreatePhpCode::getInstance()->getPhpCodeCommentMultiLine($copyright);
513
+        $ret .= Tdmcreate\Files\CreatePhpCode::getInstance()->getPhpCodeCommentMultiLine($copyright);
514 514
 
515 515
         return $ret;
516 516
     }
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
     public function renderFile()
524 524
     {
525 525
         $fileName   = $this->getFileName();
526
-        $path       = $this->getUploadPath() . '/' . $fileName;
526
+        $path       = $this->getUploadPath().'/'.$fileName;
527 527
         $created    = $this->getCreated();
528 528
         $notCreated = $this->getNotCreated();
529 529
         $folderName = $this->getFolderName();
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_index.tpl';
25 25
 
26
-include __DIR__ . '/header.php';
26
+include __DIR__.'/header.php';
27 27
 $countSettings = $helper->getHandler('Settings')->getCount();
28 28
 $countModules  = $helper->getHandler('Modules')->getCount();
29 29
 $countTables   = $helper->getHandler('Tables')->getCount();
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 
34 34
 //$templateMain = 'tdmcreate_index.tpl';
35 35
 $adminObject->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES);
36
-$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMSETTINGS . '</label>', $countSettings), 'Blue');
37
-$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMMODULES . '</label>', $countModules), 'Green');
38
-$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMTABLES . '</label>', $countTables), 'Orange');
39
-$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMFIELDS . '</label>', $countFields), 'Gray');
40
-$adminObject->addInfoBoxLine(sprintf('<label>' . _AM_TDMCREATE_THEREARE_NUMFILES . '</label>', $countFiles), 'Red');
36
+$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMSETTINGS.'</label>', $countSettings), 'Blue');
37
+$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMMODULES.'</label>', $countModules), 'Green');
38
+$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMTABLES.'</label>', $countTables), 'Orange');
39
+$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMFIELDS.'</label>', $countFields), 'Gray');
40
+$adminObject->addInfoBoxLine(sprintf('<label>'._AM_TDMCREATE_THEREARE_NUMFILES.'</label>', $countFiles), 'Red');
41 41
 // Upload Folders
42 42
 $folder = [
43 43
     TDMC_UPLOAD_PATH,
@@ -58,20 +58,20 @@  discard block
 block discarded – undo
58 58
 //------------- Test Data ----------------------------
59 59
 
60 60
 if ($helper->getConfig('displaySampleButton')) {
61
-    $yamlFile            = dirname(__DIR__) . '/config/admin.yml';
61
+    $yamlFile            = dirname(__DIR__).'/config/admin.yml';
62 62
     $config              = loadAdminConfig($yamlFile);
63 63
     $displaySampleButton = $config['displaySampleButton'];
64 64
 
65 65
     if (1 == $displaySampleButton) {
66 66
         xoops_loadLanguage('admin/modulesadmin', 'system');
67
-        require __DIR__ . '/../testdata/index.php';
67
+        require __DIR__.'/../testdata/index.php';
68 68
 
69
-        $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add');
70
-        $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add');
69
+        $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=load', 'add');
70
+        $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA'), '__DIR__ . /../../testdata/index.php?op=save', 'add');
71 71
         //    $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA'), '__DIR__ . /../../testdata/index.php?op=exportschema', 'add');
72
-        $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS'), '?op=hide_buttons', 'delete');
72
+        $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS'), '?op=hide_buttons', 'delete');
73 73
     } else {
74
-        $adminObject->addItemButton(constant('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS'), '?op=show_buttons', 'add');
74
+        $adminObject->addItemButton(constant('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS'), '?op=show_buttons', 'add');
75 75
         $displaySampleButton = $config['displaySampleButton'];
76 76
     }
77 77
     $adminObject->displayButton('left', '');
@@ -131,4 +131,4 @@  discard block
 block discarded – undo
131 131
 //$GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('index.php'));
132 132
 //$GLOBALS['xoopsTpl']->assign('index', $adminObject->displayIndex());
133 133
 
134
-include __DIR__ . '/footer.php';
134
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
admin/migrate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 use Xmf\Request;
33 33
 use XoopsModules\Tdmcreate;
34 34
 
35
-require_once __DIR__ . '/header.php';
35
+require_once __DIR__.'/header.php';
36 36
 //xoops_cp_header();
37 37
 
38 38
 $adminObject->displayNavigation(basename(__FILE__));
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         if (!empty($queue)) {
76 76
             echo "<pre>\n";
77 77
             foreach ($queue as $line) {
78
-                echo $line . ";\n";
78
+                echo $line.";\n";
79 79
             }
80 80
             echo "</pre>\n";
81 81
         }
@@ -97,4 +97,4 @@  discard block
 block discarded – undo
97 97
 
98 98
 echo "<div>$message</div>";
99 99
 
100
-require_once __DIR__ . '/footer.php';
100
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  */
23 23
 
24 24
 use XoopsModules\Tdmcreate;
25
-include dirname(__DIR__) . '/preloads/autoloader.php';
25
+include dirname(__DIR__).'/preloads/autoloader.php';
26 26
 
27 27
 $moduleDirName = basename(dirname(__DIR__));
28 28
 $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
@@ -31,37 +31,37 @@  discard block
 block discarded – undo
31 31
 $dirname = $GLOBALS['xoopsModule']->getVar('dirname');
32 32
 // Root Frameworks icons 32x32 directory
33 33
 if (!defined('XOOPS_ICONS32_PATH')) {
34
-    define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32');
34
+    define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32');
35 35
 }
36 36
 if (!defined('XOOPS_ICONS32_URL')) {
37
-    define('XOOPS_ICONS32_URL', XOOPS_URL . '/Frameworks/moduleclasses/icons/32');
37
+    define('XOOPS_ICONS32_URL', XOOPS_URL.'/Frameworks/moduleclasses/icons/32');
38 38
 }
39 39
 // Local Directories
40
-define('TDMC_PATH', XOOPS_ROOT_PATH . '/modules/' . $dirname);
41
-define('TDMC_URL', XOOPS_URL . '/modules/' . $dirname);
42
-define('TDMC_CLASS_PATH', TDMC_PATH . '/class');
43
-define('TDMC_CLASS_URL', TDMC_URL . '/class');
44
-define('TDMC_DOCS_PATH', TDMC_PATH . '/docs');
45
-define('TDMC_DOCS_URL', TDMC_URL . '/docs');
46
-define('TDMC_FONTS_PATH', TDMC_PATH . '/assets/fonts');
47
-define('TDMC_FONTS_URL', TDMC_URL . '/assets/fonts');
48
-define('TDMC_IMAGE_PATH', TDMC_PATH . '/assets/images');
49
-define('TDMC_IMAGE_URL', TDMC_URL . '/assets/images');
50
-define('TDMC_IMAGES_LOGOS_PATH', TDMC_PATH . '/assets/images/logos');
51
-define('TDMC_IMAGES_LOGOS_URL', TDMC_URL . '/assets/images/logos');
52
-define('TDMC_ICONS_PATH', TDMC_PATH . '/assets/icons');
53
-define('TDMC_ICONS_URL', TDMC_URL . '/assets/icons');
54
-define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', TDMC_URL . '/assets/images/logoModule.png');
40
+define('TDMC_PATH', XOOPS_ROOT_PATH.'/modules/'.$dirname);
41
+define('TDMC_URL', XOOPS_URL.'/modules/'.$dirname);
42
+define('TDMC_CLASS_PATH', TDMC_PATH.'/class');
43
+define('TDMC_CLASS_URL', TDMC_URL.'/class');
44
+define('TDMC_DOCS_PATH', TDMC_PATH.'/docs');
45
+define('TDMC_DOCS_URL', TDMC_URL.'/docs');
46
+define('TDMC_FONTS_PATH', TDMC_PATH.'/assets/fonts');
47
+define('TDMC_FONTS_URL', TDMC_URL.'/assets/fonts');
48
+define('TDMC_IMAGE_PATH', TDMC_PATH.'/assets/images');
49
+define('TDMC_IMAGE_URL', TDMC_URL.'/assets/images');
50
+define('TDMC_IMAGES_LOGOS_PATH', TDMC_PATH.'/assets/images/logos');
51
+define('TDMC_IMAGES_LOGOS_URL', TDMC_URL.'/assets/images/logos');
52
+define('TDMC_ICONS_PATH', TDMC_PATH.'/assets/icons');
53
+define('TDMC_ICONS_URL', TDMC_URL.'/assets/icons');
54
+define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', TDMC_URL.'/assets/images/logoModule.png');
55 55
 // Uploads Directories
56
-define('TDMC_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $dirname);
57
-define('TDMC_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $dirname);
58
-define('TDMC_UPLOAD_REPOSITORY_PATH', TDMC_UPLOAD_PATH . '/repository');
59
-define('TDMC_UPLOAD_REPOSITORY_URL', TDMC_UPLOAD_URL . '/repository');
60
-define('TDMC_UPLOAD_IMGMOD_PATH', TDMC_UPLOAD_PATH . '/images/modules');
61
-define('TDMC_UPLOAD_IMGMOD_URL', TDMC_UPLOAD_URL . '/images/modules');
62
-define('TDMC_UPLOAD_IMGTAB_PATH', TDMC_UPLOAD_PATH . '/images/tables');
63
-define('TDMC_UPLOAD_IMGTAB_URL', TDMC_UPLOAD_URL . '/images/tables');
56
+define('TDMC_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$dirname);
57
+define('TDMC_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$dirname);
58
+define('TDMC_UPLOAD_REPOSITORY_PATH', TDMC_UPLOAD_PATH.'/repository');
59
+define('TDMC_UPLOAD_REPOSITORY_URL', TDMC_UPLOAD_URL.'/repository');
60
+define('TDMC_UPLOAD_IMGMOD_PATH', TDMC_UPLOAD_PATH.'/images/modules');
61
+define('TDMC_UPLOAD_IMGMOD_URL', TDMC_UPLOAD_URL.'/images/modules');
62
+define('TDMC_UPLOAD_IMGTAB_PATH', TDMC_UPLOAD_PATH.'/images/tables');
63
+define('TDMC_UPLOAD_IMGTAB_URL', TDMC_UPLOAD_URL.'/images/tables');
64 64
 // Xoops Request
65
-include_once XOOPS_ROOT_PATH . '/class/xoopsrequest.php';
66
-include_once TDMC_PATH . '/include/functions.php';
67
-include_once TDMC_PATH . '/class/helper.php';
65
+include_once XOOPS_ROOT_PATH.'/class/xoopsrequest.php';
66
+include_once TDMC_PATH.'/include/functions.php';
67
+include_once TDMC_PATH.'/class/helper.php';
Please login to merge, or discard this patch.
class/Common/Migrate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
                 $this->synchronizeTable($tableName);
92 92
                 $updateTable = $GLOBALS['xoopsDB']->prefix($tableName);
93 93
                 $joinTable   = $GLOBALS['xoopsDB']->prefix($srcTableName);
94
-                $sql         = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n" . "SET t1.dohtml = t2.dohtml,  t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n" . '  , t1.doimage = t2.doimage, t1.dobr = t2.dobr';
94
+                $sql         = "UPDATE `$updateTable` t1 INNER JOIN `$joinTable` t2 ON t1.post_id = t2.post_id \n"."SET t1.dohtml = t2.dohtml,  t1.dosmiley = t2.dosmiley, t1.doxcode = t2.doxcode\n".'  , t1.doimage = t2.doimage, t1.dobr = t2.dobr';
95 95
                 $this->tableHandler->addToQueue($sql);
96 96
             }
97 97
         }
Please login to merge, or discard this patch.
class/Common/Configurator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         //        require dirname(dirname(__DIR__)) . '/config/config.php';
52 52
         //        $config = getConfig();
53 53
 
54
-        $config = include dirname(dirname(__DIR__)) . '/config/config.php';
54
+        $config = include dirname(dirname(__DIR__)).'/config/config.php';
55 55
 
56 56
         $this->name            = $config->name;
57 57
         $this->paths           = $config->paths;
Please login to merge, or discard this patch.
language/english/common.php 1 patch
Spacing   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -21,129 +21,129 @@  discard block
 block discarded – undo
21 21
 $moduleDirName      = basename(dirname(dirname(__DIR__)));
22 22
 $moduleDirNameUpper = mb_strtoupper($moduleDirName);
23 23
 
24
-define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
25
-define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
26
-define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
-define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
-define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
29
-define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
-define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
-define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
-define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
-define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
-define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
35
-define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
36
-define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
-define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
-define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
39
-
40
-define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
-define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
42
-
43
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
44
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
45
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
46
-define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
47
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
48
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
49
-define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
50
-
51
-define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
24
+define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
25
+define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
26
+define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
+define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
+define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
29
+define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
+define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
+define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
+define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
+define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
+define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
35
+define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
36
+define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
+define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
+define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
39
+
40
+define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
+define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
42
+
43
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
44
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
45
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
46
+define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
47
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
48
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
49
+define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
50
+
51
+define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
52 52
 
53 53
 // Error Msgs
54
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
55
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
56
-define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
54
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
55
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
56
+define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
57 57
 
58 58
 //Help
59
-define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__))));
60
-define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__ . '/help/helpheader.tpl');
61
-define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
62
-define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
59
+define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__))));
60
+define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
61
+define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
62
+define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
63 63
 
64 64
 //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
65 65
 
66 66
 //help multi-page
67
-define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
68
-define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
69
-define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
67
+define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
68
+define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
69
+define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
70 70
 
71 71
 //Sample Data
72
-define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
73
-define('CO_' . $moduleDirNameUpper . '_' . 'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully');
74
-define('CO_' . $moduleDirNameUpper . '_' . 'SAVE_SAMPLEDATA', 'Export Tables to YAML');
75
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
76
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
77
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA', 'Export DB Schema to YAML');
78
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
79
-define('CO_' . $moduleDirNameUpper . '_' . 'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
80
-define('CO_' . $moduleDirNameUpper . '_' . 'ADD_SAMPLEDATA_OK', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
81
-define('CO_' . $moduleDirNameUpper . '_' . 'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons');
82
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons');
83
-define('CO_' . $moduleDirNameUpper . '_' . 'CONFIRM', 'Confirm');
72
+define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA', 'Import Sample Data (will delete ALL current data)');
73
+define('CO_'.$moduleDirNameUpper.'_'.'SAMPLEDATA_SUCCESS', 'Sample Date uploaded successfully');
74
+define('CO_'.$moduleDirNameUpper.'_'.'SAVE_SAMPLEDATA', 'Export Tables to YAML');
75
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', 'Show Sample Button?');
76
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', 'If yes, the "Add Sample Data" button will be visible to the Admin. It is Yes as a default for first installation.');
77
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA', 'Export DB Schema to YAML');
78
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_SUCCESS', 'Export DB Schema to YAML was a success');
79
+define('CO_'.$moduleDirNameUpper.'_'.'EXPORT_SCHEMA_ERROR', 'ERROR: Export of DB Schema to YAML failed');
80
+define('CO_'.$moduleDirNameUpper.'_'.'ADD_SAMPLEDATA_OK', 'Are you sure to Import Sample Data? (It will delete ALL current data)');
81
+define('CO_'.$moduleDirNameUpper.'_'.'HIDE_SAMPLEDATA_BUTTONS', 'Hide the Import buttons');
82
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLEDATA_BUTTONS', 'Show the Import buttons');
83
+define('CO_'.$moduleDirNameUpper.'_'.'CONFIRM', 'Confirm');
84 84
 
85 85
 //letter choice
86
-define('CO_' . $moduleDirNameUpper . '_' . 'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
87
-define('CO_' . $moduleDirNameUpper . '_' . 'OTHER', 'Other');
88
-define('CO_' . $moduleDirNameUpper . '_' . 'ALL', 'All');
86
+define('CO_'.$moduleDirNameUpper.'_'.'BROWSETOTOPIC', "<span style='font-weight: bold;'>Browse items alphabetically</span>");
87
+define('CO_'.$moduleDirNameUpper.'_'.'OTHER', 'Other');
88
+define('CO_'.$moduleDirNameUpper.'_'.'ALL', 'All');
89 89
 
90 90
 // block defines
91
-define('CO_' . $moduleDirNameUpper . '_' . 'ACCESSRIGHTS', 'Access Rights');
92
-define('CO_' . $moduleDirNameUpper . '_' . 'ACTION', 'Action');
93
-define('CO_' . $moduleDirNameUpper . '_' . 'ACTIVERIGHTS', 'Active Rights');
94
-define('CO_' . $moduleDirNameUpper . '_' . 'BADMIN', 'Block Administration');
95
-define('CO_' . $moduleDirNameUpper . '_' . 'BLKDESC', 'Description');
96
-define('CO_' . $moduleDirNameUpper . '_' . 'CBCENTER', 'Center Middle');
97
-define('CO_' . $moduleDirNameUpper . '_' . 'CBLEFT', 'Center Left');
98
-define('CO_' . $moduleDirNameUpper . '_' . 'CBRIGHT', 'Center Right');
99
-define('CO_' . $moduleDirNameUpper . '_' . 'SBLEFT', 'Left');
100
-define('CO_' . $moduleDirNameUpper . '_' . 'SBRIGHT', 'Right');
101
-define('CO_' . $moduleDirNameUpper . '_' . 'SIDE', 'Alignment');
102
-define('CO_' . $moduleDirNameUpper . '_' . 'TITLE', 'Title');
103
-define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE', 'Visible');
104
-define('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN', 'Visible In');
105
-define('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT', 'Weight');
106
-
107
-define('CO_' . $moduleDirNameUpper . '_' . 'PERMISSIONS', 'Permissions');
108
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS', 'Blocks Admin');
109
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_DESC', 'Blocks/Group Admin');
110
-
111
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_MANAGMENT', 'Manage');
112
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADDBLOCK', 'Add a new block');
113
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_EDITBLOCK', 'Edit a block');
114
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_CLONEBLOCK', 'Clone a block');
91
+define('CO_'.$moduleDirNameUpper.'_'.'ACCESSRIGHTS', 'Access Rights');
92
+define('CO_'.$moduleDirNameUpper.'_'.'ACTION', 'Action');
93
+define('CO_'.$moduleDirNameUpper.'_'.'ACTIVERIGHTS', 'Active Rights');
94
+define('CO_'.$moduleDirNameUpper.'_'.'BADMIN', 'Block Administration');
95
+define('CO_'.$moduleDirNameUpper.'_'.'BLKDESC', 'Description');
96
+define('CO_'.$moduleDirNameUpper.'_'.'CBCENTER', 'Center Middle');
97
+define('CO_'.$moduleDirNameUpper.'_'.'CBLEFT', 'Center Left');
98
+define('CO_'.$moduleDirNameUpper.'_'.'CBRIGHT', 'Center Right');
99
+define('CO_'.$moduleDirNameUpper.'_'.'SBLEFT', 'Left');
100
+define('CO_'.$moduleDirNameUpper.'_'.'SBRIGHT', 'Right');
101
+define('CO_'.$moduleDirNameUpper.'_'.'SIDE', 'Alignment');
102
+define('CO_'.$moduleDirNameUpper.'_'.'TITLE', 'Title');
103
+define('CO_'.$moduleDirNameUpper.'_'.'VISIBLE', 'Visible');
104
+define('CO_'.$moduleDirNameUpper.'_'.'VISIBLEIN', 'Visible In');
105
+define('CO_'.$moduleDirNameUpper.'_'.'WEIGHT', 'Weight');
106
+
107
+define('CO_'.$moduleDirNameUpper.'_'.'PERMISSIONS', 'Permissions');
108
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS', 'Blocks Admin');
109
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_DESC', 'Blocks/Group Admin');
110
+
111
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_MANAGMENT', 'Manage');
112
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADDBLOCK', 'Add a new block');
113
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_EDITBLOCK', 'Edit a block');
114
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_CLONEBLOCK', 'Clone a block');
115 115
 
116 116
 //myblocksadmin
117
-define('CO_' . $moduleDirNameUpper . '_' . 'AGDS', 'Admin Groups');
118
-define('CO_' . $moduleDirNameUpper . '_' . 'BCACHETIME', 'Cache Time');
119
-define('CO_' . $moduleDirNameUpper . '_' . 'BLOCKS_ADMIN', 'Blocks Admin');
117
+define('CO_'.$moduleDirNameUpper.'_'.'AGDS', 'Admin Groups');
118
+define('CO_'.$moduleDirNameUpper.'_'.'BCACHETIME', 'Cache Time');
119
+define('CO_'.$moduleDirNameUpper.'_'.'BLOCKS_ADMIN', 'Blocks Admin');
120 120
 
121 121
 //Template Admin
122
-define('CO_' . $moduleDirNameUpper . '_' . 'TPLSETS', 'Template Management');
123
-define('CO_' . $moduleDirNameUpper . '_' . 'GENERATE', 'Generate');
124
-define('CO_' . $moduleDirNameUpper . '_' . 'FILENAME', 'File Name');
122
+define('CO_'.$moduleDirNameUpper.'_'.'TPLSETS', 'Template Management');
123
+define('CO_'.$moduleDirNameUpper.'_'.'GENERATE', 'Generate');
124
+define('CO_'.$moduleDirNameUpper.'_'.'FILENAME', 'File Name');
125 125
 
126 126
 //Menu
127
-define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE', 'Migrate');
128
-define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_YES', 'Folder "%s" exist');
129
-define('CO_' . $moduleDirNameUpper . '_' . 'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
130
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
131
-define('CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
132
-define('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK', 'Feedback');
127
+define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE', 'Migrate');
128
+define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_YES', 'Folder "%s" exist');
129
+define('CO_'.$moduleDirNameUpper.'_'.'FOLDER_NO', 'Folder "%s" does not exist. Create the specified folder with CHMOD 777.');
130
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', 'Show Development Tools Button?');
131
+define('CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', 'If yes, the "Migrate" Tab and other Development tools will be visible to the Admin.');
132
+define('CO_'.$moduleDirNameUpper.'_'.'ADMENU_FEEDBACK', 'Feedback');
133 133
 
134 134
 //Latest Version Check
135
-define('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION', 'New Version: ');
135
+define('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION', 'New Version: ');
136 136
 
137 137
 //DirectoryChecker
138
-define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
139
-define('CO_' . $moduleDirNameUpper . '_' . 'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
140
-define('CO_' . $moduleDirNameUpper . '_' . 'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
141
-define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEDIR', 'Create it');
142
-define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
143
-define('CO_' . $moduleDirNameUpper . '_' . 'DIRCREATED', 'The directory has been created');
144
-define('CO_' . $moduleDirNameUpper . '_' . 'DIRNOTCREATED', 'The directory cannot be created');
145
-define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set');
146
-define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set');
138
+define('CO_'.$moduleDirNameUpper.'_'.'AVAILABLE', "<span style='color: green;'>Available</span>");
139
+define('CO_'.$moduleDirNameUpper.'_'.'NOTAVAILABLE', "<span style='color: red;'>Not available</span>");
140
+define('CO_'.$moduleDirNameUpper.'_'.'NOTWRITABLE', "<span style='color: red;'>Should have permission ( %d ), but it has ( %d )</span>");
141
+define('CO_'.$moduleDirNameUpper.'_'.'CREATETHEDIR', 'Create it');
142
+define('CO_'.$moduleDirNameUpper.'_'.'SETMPERM', 'Set the permission');
143
+define('CO_'.$moduleDirNameUpper.'_'.'DIRCREATED', 'The directory has been created');
144
+define('CO_'.$moduleDirNameUpper.'_'.'DIRNOTCREATED', 'The directory cannot be created');
145
+define('CO_'.$moduleDirNameUpper.'_'.'PERMSET', 'The permission has been set');
146
+define('CO_'.$moduleDirNameUpper.'_'.'PERMNOTSET', 'The permission cannot be set');
147 147
 
148 148
 //FileChecker
149 149
 //define('CO_' . $moduleDirNameUpper . '_' . 'AVAILABLE', "<span style='color: green;'>Available</span>");
@@ -153,31 +153,31 @@  discard block
 block discarded – undo
153 153
 //define('CO_' . $moduleDirNameUpper . '_' . 'CREATETHEFILE', 'Create it');
154 154
 //define('CO_' . $moduleDirNameUpper . '_' . 'SETMPERM', 'Set the permission');
155 155
 
156
-define('CO_' . $moduleDirNameUpper . '_' . 'FILECOPIED', 'The file has been copied');
157
-define('CO_' . $moduleDirNameUpper . '_' . 'FILENOTCOPIED', 'The file cannot be copied');
156
+define('CO_'.$moduleDirNameUpper.'_'.'FILECOPIED', 'The file has been copied');
157
+define('CO_'.$moduleDirNameUpper.'_'.'FILENOTCOPIED', 'The file cannot be copied');
158 158
 
159 159
 //define('CO_' . $moduleDirNameUpper . '_' . 'PERMSET', 'The permission has been set');
160 160
 //define('CO_' . $moduleDirNameUpper . '_' . 'PERMNOTSET', 'The permission cannot be set');
161 161
 
162 162
 //image config
163
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH', 'Image Display Width');
164
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC', 'Display width for image');
165
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT', 'Image Display Height');
166
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC', 'Display height for image');
167
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
168
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC', '');
169
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH', 'Image Upload path');
170
-define('CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
163
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH', 'Image Display Width');
164
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH_DSC', 'Display width for image');
165
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT', 'Image Display Height');
166
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT_DSC', 'Display height for image');
167
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG', '<span style="color: #FF0000; font-size: Small;  font-weight: bold;">--- EXTERNAL Image configuration ---</span> ');
168
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG_DSC', '');
169
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH', 'Image Upload path');
170
+define('CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH_DSC', 'Path for uploading images');
171 171
 
172 172
 //Preferences
173
-define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
174
-define('CO_' . $moduleDirNameUpper . '_' . 'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
173
+define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH', 'Number of Characters to truncate to the long text field');
174
+define('CO_'.$moduleDirNameUpper.'_'.'TRUNCATE_LENGTH_DESC', 'Set the maximum number of characters to truncate the long text fields');
175 175
 
176 176
 //Module Stats
177
-define('CO_' . $moduleDirNameUpper . '_' . 'STATS_SUMMARY', 'Module Statistics');
178
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_CATEGORIES', 'Categories:');
179
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_ITEMS', 'Items');
180
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_OFFLINE', 'Offline');
181
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_PUBLISHED', 'Published');
182
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_REJECTED', 'Rejected');
183
-define('CO_' . $moduleDirNameUpper . '_' . 'TOTAL_SUBMITTED', 'Submitted');
177
+define('CO_'.$moduleDirNameUpper.'_'.'STATS_SUMMARY', 'Module Statistics');
178
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_CATEGORIES', 'Categories:');
179
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_ITEMS', 'Items');
180
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_OFFLINE', 'Offline');
181
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_PUBLISHED', 'Published');
182
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_REJECTED', 'Rejected');
183
+define('CO_'.$moduleDirNameUpper.'_'.'TOTAL_SUBMITTED', 'Submitted');
Please login to merge, or discard this patch.
admin/modules.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 // Define main template
26 26
 $templateMain = 'tdmcreate_modules.tpl';
27 27
 
28
-include __DIR__ . '/header.php';
28
+include __DIR__.'/header.php';
29 29
 // Recovered value of argument op in the URL $
30 30
 $op    = \Xmf\Request::getString('op', 'list');
31 31
 $modId = \Xmf\Request::getInt('mod_id');
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left'));
43 43
         $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL);
44 44
         $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL);
45
-        $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16);
45
+        $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16);
46 46
         $modulesCount = $helper->getHandler('Modules')->getCountModules();
47 47
         $modulesAll   = $helper->getHandler('Modules')->getAllModules($start, $limit);
48 48
         // Redirect if there aren't modules
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
                 unset($module);
58 58
             }
59 59
             if ($modulesCount > $limit) {
60
-                include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
61
-                $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit);
60
+                include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
61
+                $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit);
62 62
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4));
63 63
             }
64 64
         } else {
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             ]
112 112
         );
113 113
         //Form mod_image
114
-        include_once XOOPS_ROOT_PATH . '/class/uploader.php';
114
+        include_once XOOPS_ROOT_PATH.'/class/uploader.php';
115 115
         $uploader = new \XoopsMediaUploader(
116 116
             TDMC_UPLOAD_IMGMOD_PATH, $helper->getConfig('mimetypes'), $helper->getConfig('maxsize'), null, null
117 117
         );
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
         if ($id > 0) {
197 197
             $modulesObj = $helper->getHandler('Modules')->get($id);
198 198
             foreach ($modFieldArray as $moduleField) {
199
-                if (isset($_POST['mod_' . $moduleField])) {
200
-                    $modField = $modulesObj->getVar('mod_' . $moduleField);
201
-                    $modulesObj->setVar('mod_' . $moduleField, !$modField);
199
+                if (isset($_POST['mod_'.$moduleField])) {
200
+                    $modField = $modulesObj->getVar('mod_'.$moduleField);
201
+                    $modulesObj->setVar('mod_'.$moduleField, !$modField);
202 202
                 }
203 203
             }
204 204
             if ($helper->getHandler('Modules')->insert($modulesObj)) {
@@ -209,5 +209,5 @@  discard block
 block discarded – undo
209 209
         break;
210 210
 }
211 211
 
212
-include __DIR__ . '/footer.php';
212
+include __DIR__.'/footer.php';
213 213
 
Please login to merge, or discard this patch.