@@ -71,29 +71,29 @@ discard block |
||
| 71 | 71 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 72 | 72 | // Get Theme Form |
| 73 | 73 | xoops_load('XoopsFormLoader'); |
| 74 | - $form = new \XoopsThemeForm(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true); |
|
| 74 | + $form = new \XoopsThemeForm(constant('CO_'.$moduleDirNameUpper.'_'.'FB_FORM_TITLE'), 'formfeedback', 'feedback.php', 'post', true); |
|
| 75 | 75 | $form->setExtra('enctype="multipart/form-data"'); |
| 76 | 76 | |
| 77 | - $recipient = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail')); |
|
| 77 | + $recipient = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_RECIPIENT'), 'recipient', 50, 255, $GLOBALS['xoopsModule']->getInfo('author_mail')); |
|
| 78 | 78 | $recipient->setExtra('disabled="disabled"'); |
| 79 | 79 | $form->addElement($recipient); |
| 80 | - $your_name = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME'), 'your_name', 50, 255, $this->name); |
|
| 81 | - $your_name->setExtra('placeholder="' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME_PLACEHOLER') . '"'); |
|
| 80 | + $your_name = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME'), 'your_name', 50, 255, $this->name); |
|
| 81 | + $your_name->setExtra('placeholder="'.constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME_PLACEHOLER').'"'); |
|
| 82 | 82 | $form->addElement($your_name); |
| 83 | - $your_site = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE'), 'your_site', 50, 255, $this->site); |
|
| 84 | - $your_site->setExtra('placeholder="' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE_PLACEHOLER') . '"'); |
|
| 83 | + $your_site = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE'), 'your_site', 50, 255, $this->site); |
|
| 84 | + $your_site->setExtra('placeholder="'.constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE_PLACEHOLER').'"'); |
|
| 85 | 85 | $form->addElement($your_site); |
| 86 | - $your_mail = new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL'), 'your_mail', 50, 255, $this->email); |
|
| 87 | - $your_mail->setExtra('placeholder="' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL_PLACEHOLER') . '"'); |
|
| 86 | + $your_mail = new \XoopsFormText(constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL'), 'your_mail', 50, 255, $this->email); |
|
| 87 | + $your_mail->setExtra('placeholder="'.constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL_PLACEHOLER').'"'); |
|
| 88 | 88 | $form->addElement($your_mail); |
| 89 | 89 | |
| 90 | - $fbtypeSelect = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE'), 'fb_type', $this->type); |
|
| 90 | + $fbtypeSelect = new \XoopsFormSelect(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE'), 'fb_type', $this->type); |
|
| 91 | 91 | $fbtypeSelect->addOption('', ''); |
| 92 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION')); |
|
| 93 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS')); |
|
| 94 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL')); |
|
| 95 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES')); |
|
| 96 | - $fbtypeSelect->addOption(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS'), constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS')); |
|
| 92 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION')); |
|
| 93 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS')); |
|
| 94 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL')); |
|
| 95 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES')); |
|
| 96 | + $fbtypeSelect->addOption(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS'), constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS')); |
|
| 97 | 97 | $form->addElement($fbtypeSelect, true); |
| 98 | 98 | |
| 99 | 99 | $editorConfigs = []; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $configHandler = xoops_getHandler('config'); |
| 109 | 109 | $config = &$configHandler->getConfigsByCat(0, $module->getVar('mid')); |
| 110 | 110 | $editorConfigs['editor'] = $config['general_editor']; |
| 111 | - $editor = new \XoopsFormEditor(constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); |
|
| 111 | + $editor = new \XoopsFormEditor(constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT'), 'fb_content', $editorConfigs); |
|
| 112 | 112 | $form->addElement($editor, true); |
| 113 | 113 | |
| 114 | 114 | $form->addElement(new \XoopsFormHidden('op', 'send')); |
@@ -39,13 +39,13 @@ discard block |
||
| 39 | 39 | //check for minimum XOOPS version |
| 40 | 40 | $currentVer = mb_substr(XOOPS_VERSION, 6); // get the numeric part of string |
| 41 | 41 | if (null === $requiredVer) { |
| 42 | - $requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string |
|
| 42 | + $requiredVer = ''.$module->getInfo('min_xoops'); //making sure it's a string |
|
| 43 | 43 | } |
| 44 | 44 | $success = true; |
| 45 | 45 | |
| 46 | 46 | if (version_compare($currentVer, $requiredVer, '<')) { |
| 47 | 47 | $success = false; |
| 48 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
| 48 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS'), $requiredVer, $currentVer)); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | return $success; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | if (false !== $reqVer && '' !== $reqVer) { |
| 75 | 75 | if (version_compare($verNum, $reqVer, '<')) { |
| 76 | - $module->setErrors(sprintf(constant('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
| 76 | + $module->setErrors(sprintf(constant('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP'), $reqVer, $verNum)); |
|
| 77 | 77 | $success = false; |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 96 | 96 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 97 | 97 | $update = ''; |
| 98 | - $repository = 'XoopsModules25x/' . $moduleDirName; |
|
| 98 | + $repository = 'XoopsModules25x/'.$moduleDirName; |
|
| 99 | 99 | // $repository = 'XoopsModules25x/publisher'; //for testing only |
| 100 | 100 | $ret = ''; |
| 101 | 101 | $infoReleasesUrl = "https://api.github.com/repos/$repository/releases"; |
@@ -109,14 +109,14 @@ discard block |
||
| 109 | 109 | if (false === $curlReturn) { |
| 110 | 110 | trigger_error(curl_error($curlHandle)); |
| 111 | 111 | } elseif (mb_strpos($curlReturn, 'Not Found')) { |
| 112 | - trigger_error('Repository Not Found: ' . $infoReleasesUrl); |
|
| 112 | + trigger_error('Repository Not Found: '.$infoReleasesUrl); |
|
| 113 | 113 | } else { |
| 114 | 114 | $file = json_decode($curlReturn, false); |
| 115 | 115 | $latestVersionLink = sprintf("https://github.com/$repository/archive/%s.zip", $file ? reset($file)->tag_name : $default); |
| 116 | 116 | $latestVersion = $file[0]->tag_name; |
| 117 | 117 | $prerelease = $file[0]->prerelease; |
| 118 | 118 | if ('master' !== $latestVersionLink) { |
| 119 | - $update = constant('CO_' . $moduleDirNameUpper . '_' . 'NEW_VERSION') . $latestVersion; |
|
| 119 | + $update = constant('CO_'.$moduleDirNameUpper.'_'.'NEW_VERSION').$latestVersion; |
|
| 120 | 120 | } |
| 121 | 121 | //"PHP-standardized" version |
| 122 | 122 | $latestVersion = mb_strtolower($latestVersion); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $latestVersion = str_replace('_', '', mb_strtolower($latestVersion)); |
| 125 | 125 | $latestVersion = str_replace('final', '', mb_strtolower($latestVersion)); |
| 126 | 126 | } |
| 127 | - $moduleVersion = ($helper->getModule()->getInfo('version') . '_' . $helper->getModule()->getInfo('module_status')); |
|
| 127 | + $moduleVersion = ($helper->getModule()->getInfo('version').'_'.$helper->getModule()->getInfo('module_status')); |
|
| 128 | 128 | //"PHP-standardized" version |
| 129 | 129 | $moduleVersion = str_replace(' ', '', mb_strtolower($moduleVersion)); |
| 130 | 130 | // $moduleVersion = '1.0'; //for testing only |
@@ -112,15 +112,15 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | $dirname = 'tdmcreate'; |
| 115 | - $iconFileName = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32/' . basename($logoIcon); |
|
| 115 | + $iconFileName = XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32/'.basename($logoIcon); |
|
| 116 | 116 | |
| 117 | 117 | //$dirFonts = TDMC_PATH . "/assets/fonts"; |
| 118 | 118 | //$dirLogos = TDMC_PATH . "/assets/images/logos"; |
| 119 | - $dirFonts = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/fonts'; |
|
| 120 | - $dirLogos = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/images/logos'; |
|
| 119 | + $dirFonts = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/fonts'; |
|
| 120 | + $dirLogos = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/images/logos'; |
|
| 121 | 121 | |
| 122 | - if (!file_exists($imageBase = $dirLogos . '/empty.png') |
|
| 123 | - || !file_exists($font = $dirFonts . '/VeraBd.ttf') |
|
| 122 | + if (!file_exists($imageBase = $dirLogos.'/empty.png') |
|
| 123 | + || !file_exists($font = $dirFonts.'/VeraBd.ttf') |
|
| 124 | 124 | || !file_exists($iconFile = $iconFileName)) { |
| 125 | 125 | return false; |
| 126 | 126 | } |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); |
| 137 | 137 | |
| 138 | 138 | //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleDirname . "_logo.png"; |
| 139 | - $targetImage = '/uploads/' . $dirname . '/images/modules/' . $moduleDirname . '_logo.png'; |
|
| 139 | + $targetImage = '/uploads/'.$dirname.'/images/modules/'.$moduleDirname.'_logo.png'; |
|
| 140 | 140 | |
| 141 | - imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage); |
|
| 141 | + imagepng($imageModule, XOOPS_ROOT_PATH.$targetImage); |
|
| 142 | 142 | |
| 143 | 143 | imagedestroy($imageModule); |
| 144 | 144 | imagedestroy($imageIcon); |
| 145 | 145 | |
| 146 | - return XOOPS_URL . $targetImage; |
|
| 146 | + return XOOPS_URL.$targetImage; |
|
| 147 | 147 | } |
| 148 | 148 | } |
@@ -20,60 +20,60 @@ |
||
| 20 | 20 | * @author Txmod Xoops http://www.txmodxoops.org |
| 21 | 21 | * |
| 22 | 22 | */ |
| 23 | -$indexFile = XOOPS_UPLOAD_PATH . '/index.html'; |
|
| 24 | -$blankFile = XOOPS_UPLOAD_PATH . '/blank.gif'; |
|
| 25 | -$emptyFile = XOOPS_ROOT_PATH . '/modules/tdmcreate/assets/images/logos/empty.png'; |
|
| 23 | +$indexFile = XOOPS_UPLOAD_PATH.'/index.html'; |
|
| 24 | +$blankFile = XOOPS_UPLOAD_PATH.'/blank.gif'; |
|
| 25 | +$emptyFile = XOOPS_ROOT_PATH.'/modules/tdmcreate/assets/images/logos/empty.png'; |
|
| 26 | 26 | |
| 27 | 27 | // Making of "uploads" folder |
| 28 | -$helper = XOOPS_UPLOAD_PATH . '/tdmcreate'; |
|
| 28 | +$helper = XOOPS_UPLOAD_PATH.'/tdmcreate'; |
|
| 29 | 29 | if (!is_dir($helper)) { |
| 30 | 30 | if (!mkdir($helper, 0777) && !is_dir($helper)) { |
| 31 | 31 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $helper)); |
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | chmod($helper, 0777); |
| 35 | -copy($indexFile, $helper . '/index.html'); |
|
| 35 | +copy($indexFile, $helper.'/index.html'); |
|
| 36 | 36 | |
| 37 | 37 | // Making of images uploads folder |
| 38 | -$repository = $helper . '/repository'; |
|
| 38 | +$repository = $helper.'/repository'; |
|
| 39 | 39 | if (!is_dir($repository)) { |
| 40 | 40 | if (!mkdir($repository, 0777) && !is_dir($repository)) { |
| 41 | 41 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $repository)); |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | chmod($repository, 0777); |
| 45 | -copy($indexFile, $repository . '/index.html'); |
|
| 45 | +copy($indexFile, $repository.'/index.html'); |
|
| 46 | 46 | |
| 47 | 47 | // Making of images uploads folder |
| 48 | -$images = $helper . '/images'; |
|
| 48 | +$images = $helper.'/images'; |
|
| 49 | 49 | if (!is_dir($images)) { |
| 50 | 50 | if (!mkdir($images, 0777) && !is_dir($images)) { |
| 51 | 51 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $images)); |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | chmod($images, 0777); |
| 55 | -copy($indexFile, $images . '/index.html'); |
|
| 56 | -copy($blankFile, $images . '/blank.gif'); |
|
| 55 | +copy($indexFile, $images.'/index.html'); |
|
| 56 | +copy($blankFile, $images.'/blank.gif'); |
|
| 57 | 57 | |
| 58 | 58 | // Making of "modules" images folder |
| 59 | -$modules = $images . '/modules'; |
|
| 59 | +$modules = $images.'/modules'; |
|
| 60 | 60 | if (!is_dir($modules)) { |
| 61 | 61 | if (!mkdir($modules, 0777) && !is_dir($modules)) { |
| 62 | 62 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $modules)); |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | chmod($modules, 0777); |
| 66 | -copy($indexFile, $modules . '/index.html'); |
|
| 67 | -copy($blankFile, $modules . '/blank.gif'); |
|
| 68 | -copy($emptyFile, $modules . '/empty.png'); |
|
| 66 | +copy($indexFile, $modules.'/index.html'); |
|
| 67 | +copy($blankFile, $modules.'/blank.gif'); |
|
| 68 | +copy($emptyFile, $modules.'/empty.png'); |
|
| 69 | 69 | |
| 70 | 70 | // Making of "tables" images folder |
| 71 | -$tables = $images . '/tables'; |
|
| 71 | +$tables = $images.'/tables'; |
|
| 72 | 72 | if (!is_dir($tables)) { |
| 73 | 73 | if (!mkdir($tables, 0777) && !is_dir($tables)) { |
| 74 | 74 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $tables)); |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | chmod($tables, 0777); |
| 78 | -copy($indexFile, $tables . '/index.html'); |
|
| 79 | -copy($blankFile, $tables . '/blank.gif'); |
|
| 78 | +copy($indexFile, $tables.'/index.html'); |
|
| 79 | +copy($blankFile, $tables.'/blank.gif'); |
|
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @author Txmod Xoops http://www.txmodxoops.org |
| 22 | 22 | * |
| 23 | 23 | */ |
| 24 | -include dirname(__DIR__) . '/preloads/autoloader.php'; |
|
| 24 | +include dirname(__DIR__).'/preloads/autoloader.php'; |
|
| 25 | 25 | |
| 26 | 26 | $moduleDirName = basename(dirname(__DIR__)); |
| 27 | 27 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
@@ -45,62 +45,62 @@ discard block |
||
| 45 | 45 | $adminmenu[] = [ |
| 46 | 46 | 'title' => _MI_TDMCREATE_ADMENU1, |
| 47 | 47 | 'link' => 'admin/index.php', |
| 48 | - 'icon' => $pathIcon32 . '/dashboard.png', |
|
| 48 | + 'icon' => $pathIcon32.'/dashboard.png', |
|
| 49 | 49 | ]; |
| 50 | 50 | |
| 51 | 51 | $adminmenu[] = [ |
| 52 | 52 | 'title' => _MI_TDMCREATE_ADMENU2, |
| 53 | 53 | 'link' => 'admin/settings.php', |
| 54 | - 'icon' => $modPathIcon32 . '/settings.png', |
|
| 54 | + 'icon' => $modPathIcon32.'/settings.png', |
|
| 55 | 55 | ]; |
| 56 | 56 | |
| 57 | 57 | $adminmenu[] = [ |
| 58 | 58 | 'title' => _MI_TDMCREATE_ADMENU3, |
| 59 | 59 | 'link' => 'admin/modules.php', |
| 60 | - 'icon' => $modPathIcon32 . '/addmodule.png', |
|
| 60 | + 'icon' => $modPathIcon32.'/addmodule.png', |
|
| 61 | 61 | ]; |
| 62 | 62 | |
| 63 | 63 | $adminmenu[] = [ |
| 64 | 64 | 'title' => _MI_TDMCREATE_ADMENU4, |
| 65 | 65 | 'link' => 'admin/tables.php', |
| 66 | - 'icon' => $modPathIcon32 . '/addtable.png', |
|
| 66 | + 'icon' => $modPathIcon32.'/addtable.png', |
|
| 67 | 67 | ]; |
| 68 | 68 | |
| 69 | 69 | $adminmenu[] = [ |
| 70 | 70 | 'title' => _MI_TDMCREATE_ADMENU5, |
| 71 | 71 | 'link' => 'admin/fields.php', |
| 72 | - 'icon' => $modPathIcon32 . '/fields.png', |
|
| 72 | + 'icon' => $modPathIcon32.'/fields.png', |
|
| 73 | 73 | ]; |
| 74 | 74 | |
| 75 | 75 | $adminmenu[] = [ |
| 76 | 76 | 'title' => _MI_TDMCREATE_ADMENU6, |
| 77 | 77 | 'link' => 'admin/morefiles.php', |
| 78 | - 'icon' => $modPathIcon32 . '/files.png', |
|
| 78 | + 'icon' => $modPathIcon32.'/files.png', |
|
| 79 | 79 | ]; |
| 80 | 80 | |
| 81 | 81 | $adminmenu[] = [ |
| 82 | 82 | 'title' => _MI_TDMCREATE_ADMENU7, |
| 83 | 83 | 'link' => 'admin/building.php', |
| 84 | - 'icon' => $modPathIcon32 . '/builder.png', |
|
| 84 | + 'icon' => $modPathIcon32.'/builder.png', |
|
| 85 | 85 | ]; |
| 86 | 86 | |
| 87 | 87 | //Feedback |
| 88 | 88 | $adminmenu[] = [ |
| 89 | - 'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_FEEDBACK'), |
|
| 89 | + 'title' => constant('CO_'.$moduleDirNameUpper.'_'.'ADMENU_FEEDBACK'), |
|
| 90 | 90 | 'link' => 'admin/feedback.php', |
| 91 | - 'icon' => $pathIcon32 . 'mail_foward.png', |
|
| 91 | + 'icon' => $pathIcon32.'mail_foward.png', |
|
| 92 | 92 | ]; |
| 93 | 93 | |
| 94 | 94 | if ($helper->getConfig('displayDeveloperTools')) { |
| 95 | 95 | $adminmenu[] = [ |
| 96 | - 'title' => constant('CO_' . $moduleDirNameUpper . '_' . 'ADMENU_MIGRATE'), |
|
| 96 | + 'title' => constant('CO_'.$moduleDirNameUpper.'_'.'ADMENU_MIGRATE'), |
|
| 97 | 97 | 'link' => 'admin/migrate.php', |
| 98 | - 'icon' => $pathIcon32 . 'database_go.png', |
|
| 98 | + 'icon' => $pathIcon32.'database_go.png', |
|
| 99 | 99 | ]; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $adminmenu[] = [ |
| 103 | 103 | 'title' => _MI_TDMCREATE_ABOUT, |
| 104 | 104 | 'link' => 'admin/about.php', |
| 105 | - 'icon' => $pathIcon32 . 'about.png', |
|
| 105 | + 'icon' => $pathIcon32.'about.png', |
|
| 106 | 106 | ]; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @author Txmod Xoops <[email protected]> |
| 23 | 23 | * |
| 24 | 24 | */ |
| 25 | -include __DIR__ . '/header.php'; |
|
| 25 | +include __DIR__.'/header.php'; |
|
| 26 | 26 | $funct = \Xmf\Request::getString('funct', '', 'GET'); |
| 27 | 27 | $iconName = \Xmf\Request::getString('iconName', '', 'GET'); |
| 28 | 28 | $caption = \Xmf\Request::getString('caption', '', 'GET'); |
@@ -20,10 +20,10 @@ discard block |
||
| 20 | 20 | * @author Txmod Xoops http://www.txmodxoops.org |
| 21 | 21 | * |
| 22 | 22 | */ |
| 23 | -include dirname(__DIR__) . '/preloads/autoloader.php'; |
|
| 23 | +include dirname(__DIR__).'/preloads/autoloader.php'; |
|
| 24 | 24 | |
| 25 | -include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php'; |
|
| 26 | -include_once dirname(__DIR__) . '/include/common.php'; |
|
| 25 | +include_once dirname(dirname(dirname(__DIR__))).'/include/cp_header.php'; |
|
| 26 | +include_once dirname(__DIR__).'/include/common.php'; |
|
| 27 | 27 | |
| 28 | 28 | $thisDirname = $GLOBALS['xoopsModule']->getVar('dirname'); |
| 29 | 29 | // Link System Icons |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | // MyTextSanitizer |
| 41 | 41 | $myts = MyTextSanitizer::getInstance(); |
| 42 | 42 | if (!isset($xoopsTpl) || !is_object($xoopsTpl)) { |
| 43 | - include_once XOOPS_ROOT_PATH . '/class/template.php'; |
|
| 43 | + include_once XOOPS_ROOT_PATH.'/class/template.php'; |
|
| 44 | 44 | $xoopsTpl = new \XoopsTpl(); |
| 45 | 45 | } |
| 46 | 46 | // System Icons |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * @author Xoops Team Developement Modules - https://xoops.org |
| 23 | 23 | * |
| 24 | 24 | */ |
| 25 | -include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
| 25 | +include_once dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @param string $val |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | echo $val; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | -$myfunction = '\\XoopsModules\\Tdmcreate\\' . $_GET['f']; |
|
| 35 | +$myfunction = '\\XoopsModules\\Tdmcreate\\'.$_GET['f']; |
|
| 36 | 36 | |
| 37 | 37 | if (function_exists($myfunction)) { |
| 38 | 38 | $ret = \XoopsModules\Tdmcreate\LogoGenerator::createLogo($_GET['iconName'], $_GET['caption']); |
@@ -66,15 +66,15 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $dirname = 'tdmcreate'; |
| 69 | - $iconFileName = XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32/' . basename($logoIcon); |
|
| 69 | + $iconFileName = XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32/'.basename($logoIcon); |
|
| 70 | 70 | |
| 71 | 71 | //$dirFonts = TDMC_PATH . "/assets/fonts"; |
| 72 | 72 | //$dirLogos = TDMC_PATH . "/assets/images/logos"; |
| 73 | - $dirFonts = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/fonts'; |
|
| 74 | - $dirLogos = XOOPS_ROOT_PATH . '/modules/' . $dirname . '/assets/images/logos'; |
|
| 73 | + $dirFonts = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/fonts'; |
|
| 74 | + $dirLogos = XOOPS_ROOT_PATH.'/modules/'.$dirname.'/assets/images/logos'; |
|
| 75 | 75 | |
| 76 | - if (!file_exists($imageBase = $dirLogos . '/empty.png') |
|
| 77 | - || !file_exists($font = $dirFonts . '/VeraBd.ttf') |
|
| 76 | + if (!file_exists($imageBase = $dirLogos.'/empty.png') |
|
| 77 | + || !file_exists($font = $dirFonts.'/VeraBd.ttf') |
|
| 78 | 78 | || !file_exists($iconFile = $iconFileName)) { |
| 79 | 79 | return false; |
| 80 | 80 | } |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | imagecopy($imageModule, $imageIcon, 29, 2, 0, 0, 32, 32); |
| 91 | 91 | |
| 92 | 92 | //$targetImage = TDMC_UPLOAD_IMGMOD_URL . "/" . $moduleName . "_logo.png"; |
| 93 | - $targetImage = '/uploads/' . $dirname . '/images/modules/' . $moduleName . '_logo.png'; |
|
| 93 | + $targetImage = '/uploads/'.$dirname.'/images/modules/'.$moduleName.'_logo.png'; |
|
| 94 | 94 | |
| 95 | - imagepng($imageModule, XOOPS_ROOT_PATH . $targetImage); |
|
| 95 | + imagepng($imageModule, XOOPS_ROOT_PATH.$targetImage); |
|
| 96 | 96 | |
| 97 | 97 | imagedestroy($imageModule); |
| 98 | 98 | imagedestroy($imageIcon); |
| 99 | 99 | |
| 100 | - return XOOPS_URL . $targetImage; |
|
| 100 | + return XOOPS_URL.$targetImage; |
|
| 101 | 101 | } |
| 102 | 102 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |