@@ -27,6 +27,6 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public static function eventCoreIncludeCommonEnd($args) |
| 29 | 29 | { |
| 30 | - include __DIR__ . '/autoloader.php'; |
|
| 30 | + include __DIR__.'/autoloader.php'; |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -3,12 +3,12 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
| 5 | 5 | */ |
| 6 | -spl_autoload_register(static function ($class) { |
|
| 6 | +spl_autoload_register(static function($class) { |
|
| 7 | 7 | // project-specific namespace prefix |
| 8 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
| 8 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
| 9 | 9 | |
| 10 | 10 | // base directory for the namespace prefix |
| 11 | - $baseDir = __DIR__ . '/../class/'; |
|
| 11 | + $baseDir = __DIR__.'/../class/'; |
|
| 12 | 12 | |
| 13 | 13 | // does the class use the namespace prefix? |
| 14 | 14 | $len = mb_strlen($prefix); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | // replace the namespace prefix with the base directory, replace namespace |
| 24 | 24 | // separators with directory separators in the relative class name, append |
| 25 | 25 | // with .php |
| 26 | - $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php'; |
|
| 26 | + $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php'; |
|
| 27 | 27 | |
| 28 | 28 | // if the file exists, require it |
| 29 | 29 | if (file_exists($file)) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $modversion['release_info'] = 'README'; |
| 43 | 43 | $modversion['release_file'] = 'https://github.com/txmodxoops/tdmcreate-1.91/releases'; |
| 44 | 44 | $modversion['manual'] = 'MANUAL'; |
| 45 | -$modversion['manual_file'] = XOOPS_URL . "/modules/{$moduleDirName}/docs/manual.txt"; |
|
| 45 | +$modversion['manual_file'] = XOOPS_URL."/modules/{$moduleDirName}/docs/manual.txt"; |
|
| 46 | 46 | $modversion['image'] = "assets/images/{$moduleDirName}_logo.png"; |
| 47 | 47 | $modversion['dirname'] = $moduleDirName; |
| 48 | 48 | // Frameworks icons |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | // Module icons |
| 53 | 53 | $modversion['modicons16'] = 'assets/images/icons/16'; |
| 54 | 54 | $modversion['modicons32'] = 'assets/images/icons/32'; |
| 55 | -$modversion['targetdir'] = XOOPS_UPLOAD_PATH . "/{$moduleDirName}/repository/"; |
|
| 55 | +$modversion['targetdir'] = XOOPS_UPLOAD_PATH."/{$moduleDirName}/repository/"; |
|
| 56 | 56 | $modversion['module_website_url'] = 'https://github.com/txmodxoops/tdmcreate-1.91'; |
| 57 | 57 | $modversion['module_website_name'] = 'GitHub Txmodx Xoops'; |
| 58 | 58 | $modversion['min_php'] = '5.5'; |
@@ -88,17 +88,17 @@ discard block |
||
| 88 | 88 | $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; |
| 89 | 89 | // Tables created by sql file (without prefix!) |
| 90 | 90 | $modversion['tables'] = [ |
| 91 | - $moduleDirName . '_' . 'settings', |
|
| 92 | - $moduleDirName . '_' . 'modules', |
|
| 93 | - $moduleDirName . '_' . 'tables', |
|
| 94 | - $moduleDirName . '_' . 'fields', |
|
| 95 | - $moduleDirName . '_' . 'languages', |
|
| 96 | - $moduleDirName . '_' . 'fieldtype', |
|
| 97 | - $moduleDirName . '_' . 'fieldattributes', |
|
| 98 | - $moduleDirName . '_' . 'fieldnull', |
|
| 99 | - $moduleDirName . '_' . 'fieldkey', |
|
| 100 | - $moduleDirName . '_' . 'fieldelements', |
|
| 101 | - $moduleDirName . '_' . 'morefiles', |
|
| 91 | + $moduleDirName.'_'.'settings', |
|
| 92 | + $moduleDirName.'_'.'modules', |
|
| 93 | + $moduleDirName.'_'.'tables', |
|
| 94 | + $moduleDirName.'_'.'fields', |
|
| 95 | + $moduleDirName.'_'.'languages', |
|
| 96 | + $moduleDirName.'_'.'fieldtype', |
|
| 97 | + $moduleDirName.'_'.'fieldattributes', |
|
| 98 | + $moduleDirName.'_'.'fieldnull', |
|
| 99 | + $moduleDirName.'_'.'fieldkey', |
|
| 100 | + $moduleDirName.'_'.'fieldelements', |
|
| 101 | + $moduleDirName.'_'.'morefiles', |
|
| 102 | 102 | ]; |
| 103 | 103 | // Scripts to run upon installation or update |
| 104 | 104 | $modversion['onInstall'] = 'include/install.php'; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $c = 1; |
| 110 | 110 | |
| 111 | 111 | $modversion['config'][] = [ |
| 112 | - 'name' => 'break' . $c, |
|
| 112 | + 'name' => 'break'.$c, |
|
| 113 | 113 | 'title' => '_MI_TDMCREATE_CONFIG_BREAK_GENERAL', |
| 114 | 114 | 'description' => '_MI_TDMCREATE_CONFIG_', |
| 115 | 115 | 'formtype' => 'line_break', |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | ++$c; |
| 199 | 199 | $modversion['config'][] = [ |
| 200 | - 'name' => 'break' . $c, |
|
| 200 | + 'name' => 'break'.$c, |
|
| 201 | 201 | 'title' => '_MI_TDMCREATE_CONFIG_BREAK_REQUIRED', |
| 202 | 202 | 'description' => '_MI_TDMCREATE_CONFIG_', |
| 203 | 203 | 'formtype' => 'line_break', |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | |
| 379 | 379 | ++$c; |
| 380 | 380 | $modversion['config'][] = [ |
| 381 | - 'name' => 'break' . $c, |
|
| 381 | + 'name' => 'break'.$c, |
|
| 382 | 382 | 'title' => '_MI_TDMCREATE_CONFIG_BREAK_OPTIONAL', |
| 383 | 383 | 'description' => '_MI_TDMCREATE_CONFIG_', |
| 384 | 384 | 'formtype' => 'line_break', |
@@ -582,8 +582,8 @@ discard block |
||
| 582 | 582 | */ |
| 583 | 583 | $modversion['config'][] = [ |
| 584 | 584 | 'name' => 'displaySampleButton', |
| 585 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON', |
|
| 586 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC', |
|
| 585 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON', |
|
| 586 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC', |
|
| 587 | 587 | 'formtype' => 'yesno', |
| 588 | 588 | 'valuetype' => 'int', |
| 589 | 589 | 'default' => 1, |
@@ -594,8 +594,8 @@ discard block |
||
| 594 | 594 | */ |
| 595 | 595 | $modversion['config'][] = [ |
| 596 | 596 | 'name' => 'displayDeveloperTools', |
| 597 | - 'title' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS', |
|
| 598 | - 'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC', |
|
| 597 | + 'title' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS', |
|
| 598 | + 'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC', |
|
| 599 | 599 | 'formtype' => 'yesno', |
| 600 | 600 | 'valuetype' => 'int', |
| 601 | 601 | 'default' => 0, |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | . " <div style='text-align: center;'>\n" |
| 29 | 29 | . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
| 30 | 30 | . " </div>\n" |
| 31 | - . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
| 31 | + . ' '._AM_MODULEADMIN_ADMIN_FOOTER."\n" |
|
| 32 | 32 | . '</div>'; |
| 33 | 33 | |
| 34 | 34 | xoops_cp_footer(); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | global $xoopsDB; |
| 58 | 58 | $result = $xoopsDB->query( |
| 59 | - 'SELECT t1.tpl_id FROM ' . $xoopsDB->prefix('tplfile') . ' t1, ' . $xoopsDB->prefix('tplfile') |
|
| 59 | + 'SELECT t1.tpl_id FROM '.$xoopsDB->prefix('tplfile').' t1, '.$xoopsDB->prefix('tplfile') |
|
| 60 | 60 | . ' t2 WHERE t1.tpl_refid = t2.tpl_refid AND t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_type = t2.tpl_type AND t1.tpl_id > t2.tpl_id' |
| 61 | 61 | ); |
| 62 | 62 | $tplids = []; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if (count($tplids) > 0) { |
| 67 | 67 | $tplfileHandler = xoops_getHandler('tplfile'); |
| 68 | 68 | $duplicate_files = $tplfileHandler->getObjects( |
| 69 | - new \Criteria('tpl_id', '(' . implode(',', $tplids) . ')', 'IN') |
|
| 69 | + new \Criteria('tpl_id', '('.implode(',', $tplids).')', 'IN') |
|
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | 72 | if (count($duplicate_files) > 0) { |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | - $sql = 'SHOW INDEX FROM ' . $xoopsDB->prefix('tplfile') . " WHERE KEY_NAME = 'tpl_refid_module_set_file_type'"; |
|
| 78 | + $sql = 'SHOW INDEX FROM '.$xoopsDB->prefix('tplfile')." WHERE KEY_NAME = 'tpl_refid_module_set_file_type'"; |
|
| 79 | 79 | if (!$result = $xoopsDB->queryF($sql)) { |
| 80 | - xoops_error($this->db->error() . '<br />' . $sql); |
|
| 80 | + xoops_error($this->db->error().'<br />'.$sql); |
|
| 81 | 81 | |
| 82 | 82 | return false; |
| 83 | 83 | } |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | return true; |
| 94 | 94 | } |
| 95 | - $sql = 'ALTER TABLE ' . $xoopsDB->prefix('tplfile') |
|
| 95 | + $sql = 'ALTER TABLE '.$xoopsDB->prefix('tplfile') |
|
| 96 | 96 | . ' ADD UNIQUE tpl_refid_module_set_file_type ( tpl_refid, tpl_module, tpl_tplset, tpl_file, tpl_type )'; |
| 97 | 97 | if (!$result = $xoopsDB->queryF($sql)) { |
| 98 | - xoops_error($xoopsDB->error() . '<br />' . $sql); |
|
| 98 | + xoops_error($xoopsDB->error().'<br />'.$sql); |
|
| 99 | 99 | $module->setErrors( |
| 100 | 100 | "'tpl_refid_module_set_file_type' unique index is not added to 'tplfile' table. Warning: do not use XOOPS until you add this unique index." |
| 101 | 101 | ); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $isNew = $this->isNew(); |
| 146 | 146 | $title = $isNew ? sprintf(_AM_TDMCREATE_SETTING_NEW) : sprintf(_AM_TDMCREATE_SETTING_EDIT); |
| 147 | 147 | |
| 148 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
| 148 | + include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; |
|
| 149 | 149 | |
| 150 | 150 | $form = new \XoopsThemeForm($title, 'settingform', $action, 'post', true); |
| 151 | 151 | $form->setExtra('enctype="multipart/form-data"'); |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | $checkbox = new \XoopsFormCheckbox(' ', 'setting_option', $settingOption, '<br>'); |
| 175 | 175 | $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC); |
| 176 | 176 | foreach ($this->options as $option) { |
| 177 | - $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_SETTING_' . mb_strtoupper($option))); |
|
| 177 | + $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_SETTING_'.mb_strtoupper($option))); |
|
| 178 | 178 | } |
| 179 | 179 | $optionsTray->addElement($checkbox); |
| 180 | 180 | |
@@ -183,17 +183,17 @@ discard block |
||
| 183 | 183 | $modImage = $this->getVar('set_image'); |
| 184 | 184 | $modImage = $modImage ?: $set['image']; |
| 185 | 185 | |
| 186 | - $uploadDirectory = 'uploads/' . $GLOBALS['xoopsModule']->dirname() . '/images/modules'; |
|
| 186 | + $uploadDirectory = 'uploads/'.$GLOBALS['xoopsModule']->dirname().'/images/modules'; |
|
| 187 | 187 | $imgtray = new \XoopsFormElementTray(_AM_TDMCREATE_SETTING_IMAGE, '<br>'); |
| 188 | - $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './' . mb_strtolower($uploadDirectory) . '/'); |
|
| 188 | + $imgpath = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, './'.mb_strtolower($uploadDirectory).'/'); |
|
| 189 | 189 | $imageSelect = new \XoopsFormSelect($imgpath, 'set_image', $modImage); |
| 190 | 190 | $modImage_array = \XoopsLists::getImgListAsArray(TDMC_UPLOAD_IMGMOD_PATH); |
| 191 | 191 | foreach ($modImage_array as $image) { |
| 192 | 192 | $imageSelect->addOption($image, $image); |
| 193 | 193 | } |
| 194 | - $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"set_image\", \"" . $uploadDirectory . '", "", "' . XOOPS_URL . "\")'"); |
|
| 194 | + $imageSelect->setExtra("onchange='showImgSelected(\"image3\", \"set_image\", \"".$uploadDirectory.'", "", "'.XOOPS_URL."\")'"); |
|
| 195 | 195 | $imgtray->addElement($imageSelect); |
| 196 | - $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='" . TDMC_UPLOAD_IMGMOD_URL . '/' . $modImage . "' name='image3' id='image3' alt='' /><br>")); |
|
| 196 | + $imgtray->addElement(new \XoopsFormLabel('', "<br><img src='".TDMC_UPLOAD_IMGMOD_URL.'/'.$modImage."' name='image3' id='image3' alt='' /><br>")); |
|
| 197 | 197 | |
| 198 | 198 | $fileseltray = new \XoopsFormElementTray('', '<br>'); |
| 199 | 199 | $fileseltray->addElement(new \XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $helper->getConfig('maxsize'))); |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | $form->addElement(new \XoopsFormText(_AM_TDMCREATE_SETTING_PAYPAL_BUTTON, 'set_donations', 50, 255, $this->getVar('set_donations'))); |
| 222 | 222 | $form->addElement(new \XoopsFormText(_AM_TDMCREATE_SETTING_SUBVERSION, 'set_subversion', 50, 255, $this->getVar('set_subversion'))); |
| 223 | 223 | |
| 224 | - $buttonTray = new \XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', ''); |
|
| 224 | + $buttonTray = new \XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', ''); |
|
| 225 | 225 | $buttonTray->addElement(new \XoopsFormHidden('op', 'save')); |
| 226 | 226 | $buttonTray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
| 227 | 227 | $form->addElement($buttonTray); |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | { |
| 262 | 262 | $retSet = []; |
| 263 | 263 | foreach ($this->options as $option) { |
| 264 | - if (1 == $this->getVar('set_' . $option)) { |
|
| 264 | + if (1 == $this->getVar('set_'.$option)) { |
|
| 265 | 265 | $retSet[] = $option; |
| 266 | 266 | } |
| 267 | 267 | } |
@@ -23,11 +23,11 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @version $Id: LogoGenerator.php 12258 2014-01-02 09:33:29Z timgno $ |
| 25 | 25 | */ |
| 26 | -include_once dirname(dirname(dirname(__DIR__))) . '/mainfile.php'; |
|
| 26 | +include_once dirname(dirname(dirname(__DIR__))).'/mainfile.php'; |
|
| 27 | 27 | //include_once XOOPS_ROOT_PATH . '/modules/TDMCreate/include/common.php'; |
| 28 | 28 | |
| 29 | 29 | if (function_exists($_GET['f'])) { // get function name and parameter $_GET['f']($_GET["p"]); |
| 30 | - include_once __DIR__ . '/LogoGenerator.php'; |
|
| 30 | + include_once __DIR__.'/LogoGenerator.php'; |
|
| 31 | 31 | $ret = LogoGenerator::createLogo($_GET['iconName'], $_GET['caption']); |
| 32 | 32 | phpFunction($ret); |
| 33 | 33 | } else { |
@@ -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 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $form->addElement($mod_select, true); |
| 71 | 71 | |
| 72 | 72 | $form->addElement(new \XoopsFormHidden('op', 'build')); |
| 73 | - $form->addElement(new \XoopsFormButton(_REQUIRED . ' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 73 | + $form->addElement(new \XoopsFormButton(_REQUIRED.' <sup class="red bold">*</sup>', 'submit', _SUBMIT, 'submit')); |
|
| 74 | 74 | |
| 75 | 75 | return $form; |
| 76 | 76 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | public function clearDir($dir, $pattern = '*') |
| 83 | 83 | { |
| 84 | 84 | // Find all files and folders matching pattern |
| 85 | - $files = glob($dir . "/$pattern"); |
|
| 85 | + $files = glob($dir."/$pattern"); |
|
| 86 | 86 | // Interate thorugh the files and folders |
| 87 | 87 | foreach ($files as $file) { |
| 88 | 88 | // if it's a directory then re-call clearDir function to delete files inside this directory |
@@ -109,12 +109,12 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | while (false !== ($file = readdir($dir))) { |
| 111 | 111 | if (('.' !== $file) && ('..' !== $file)) { |
| 112 | - if (is_dir($src . '/' . $file)) { |
|
| 112 | + if (is_dir($src.'/'.$file)) { |
|
| 113 | 113 | // Copy the directory itself |
| 114 | - $this->copyDir($src . '/' . $file, $dst . '/' . $file); |
|
| 114 | + $this->copyDir($src.'/'.$file, $dst.'/'.$file); |
|
| 115 | 115 | } else { |
| 116 | 116 | // Make sure you copy the current script |
| 117 | - copy($src . '/' . $file, $dst . '/' . $file); |
|
| 117 | + copy($src.'/'.$file, $dst.'/'.$file); |
|
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -181,18 +181,18 @@ discard block |
||
| 181 | 181 | $tableImage = $getTableImage ?: 'blank.gif'; |
| 182 | 182 | $icons32Directory = '/Frameworks/moduleclasses/icons/32'; |
| 183 | 183 | $uploadsDirectory = '/uploads/tdmcreate/images/tables'; |
| 184 | - $iconsDirectory = is_dir(XOOPS_ROOT_PATH . $icons32Directory) ? $icons32Directory : $uploadsDirectory; |
|
| 184 | + $iconsDirectory = is_dir(XOOPS_ROOT_PATH.$icons32Directory) ? $icons32Directory : $uploadsDirectory; |
|
| 185 | 185 | |
| 186 | 186 | $imgtray1 = new \XoopsFormElementTray(_AM_TDMCREATE_TABLE_IMAGE, '<br>'); |
| 187 | 187 | $imgpath1 = sprintf(_AM_TDMCREATE_FORMIMAGE_PATH, ".{$iconsDirectory}/"); |
| 188 | 188 | $imageSelect1 = new \XoopsFormSelect($imgpath1, 'table_image', $tableImage, 10); |
| 189 | - $imageArray1 = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . $iconsDirectory); |
|
| 189 | + $imageArray1 = \XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH.$iconsDirectory); |
|
| 190 | 190 | foreach ($imageArray1 as $image1) { |
| 191 | 191 | $imageSelect1->addOption($image1, $image1); |
| 192 | 192 | } |
| 193 | - $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"" . $iconsDirectory . '", "", "' . XOOPS_URL . "\")'"); |
|
| 193 | + $imageSelect1->setExtra("onchange='showImgSelected(\"image1\", \"table_image\", \"".$iconsDirectory.'", "", "'.XOOPS_URL."\")'"); |
|
| 194 | 194 | $imgtray1->addElement($imageSelect1, false); |
| 195 | - $imgtray1->addElement(new \XoopsFormLabel('', "<br><img src='" . XOOPS_URL . '/' . $iconsDirectory . '/' . $tableImage . "' name='image1' id='image1' alt='' />")); |
|
| 195 | + $imgtray1->addElement(new \XoopsFormLabel('', "<br><img src='".XOOPS_URL.'/'.$iconsDirectory.'/'.$tableImage."' name='image1' id='image1' alt='' />")); |
|
| 196 | 196 | $fileseltray1 = new \XoopsFormElementTray('', '<br>'); |
| 197 | 197 | $fileseltray1->addElement(new \XoopsFormFile(_AM_TDMCREATE_FORMUPLOAD, 'attachedfile', $helper->getConfig('maxsize'))); |
| 198 | 198 | $fileseltray1->addElement(new \XoopsFormLabel('')); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $checkbox = new \XoopsFormCheckbox(' ', 'table_option', $this->getOptionsTables(), '<br>'); |
| 217 | 217 | $checkbox->setDescription(_AM_TDMCREATE_OPTIONS_DESC); |
| 218 | 218 | foreach ($this->options as $option) { |
| 219 | - $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_' . mb_strtoupper($option))); |
|
| 219 | + $checkbox->addOption($option, self::getDefinedLanguage('_AM_TDMCREATE_TABLE_'.mb_strtoupper($option))); |
|
| 220 | 220 | } |
| 221 | 221 | $optionsTray->addElement($checkbox); |
| 222 | 222 | |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | $form->addElement($optionsTray); |
| 226 | 226 | |
| 227 | - $buttonTray = new \XoopsFormElementTray(_REQUIRED . ' <sup class="red bold">*</sup>', ''); |
|
| 227 | + $buttonTray = new \XoopsFormElementTray(_REQUIRED.' <sup class="red bold">*</sup>', ''); |
|
| 228 | 228 | $buttonTray->addElement(new \XoopsFormHidden('op', 'save')); |
| 229 | 229 | $buttonTray->addElement(new \XoopsFormHidden('table_id', ($isNew ? 0 : $this->getVar('table_id')))); |
| 230 | 230 | $buttonTray->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | { |
| 274 | 274 | $retTable = []; |
| 275 | 275 | foreach ($this->options as $option) { |
| 276 | - if (1 == $this->getVar('table_' . $option)) { |
|
| 276 | + if (1 == $this->getVar('table_'.$option)) { |
|
| 277 | 277 | $retTable[] = $option; |
| 278 | 278 | } |
| 279 | 279 | } |