@@ -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, |
@@ -94,11 +94,11 @@ |
||
| 94 | 94 | } |
| 95 | 95 | // Form file save |
| 96 | 96 | $morefilesObj->setVars([ |
| 97 | - 'file_mid' => $_POST['file_mid'], |
|
| 98 | - 'file_name' => $_POST['file_name'], |
|
| 99 | - 'file_extension' => $_POST['file_extension'], |
|
| 100 | - 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | - ]); |
|
| 97 | + 'file_mid' => $_POST['file_mid'], |
|
| 98 | + 'file_name' => $_POST['file_name'], |
|
| 99 | + 'file_extension' => $_POST['file_extension'], |
|
| 100 | + 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | + ]); |
|
| 102 | 102 | |
| 103 | 103 | if ($helper->getHandler('Morefiles')->insert($morefilesObj)) { |
| 104 | 104 | if ($morefilesObj->isNew()) { |
@@ -94,11 +94,11 @@ |
||
| 94 | 94 | } |
| 95 | 95 | // Form file save |
| 96 | 96 | $addfilesObj->setVars([ |
| 97 | - 'file_mid' => $_POST['file_mid'], |
|
| 98 | - 'file_name' => $_POST['file_name'], |
|
| 99 | - 'file_extension' => $_POST['file_extension'], |
|
| 100 | - 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | - ]); |
|
| 97 | + 'file_mid' => $_POST['file_mid'], |
|
| 98 | + 'file_name' => $_POST['file_name'], |
|
| 99 | + 'file_extension' => $_POST['file_extension'], |
|
| 100 | + 'file_infolder' => $_POST['file_infolder'], |
|
| 101 | + ]); |
|
| 102 | 102 | |
| 103 | 103 | if ($helper->getHandler('Addfiles')->insert($addfilesObj)) { |
| 104 | 104 | if ($addfilesObj->isNew()) { |
@@ -26,16 +26,16 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_building.tpl'; |
| 28 | 28 | |
| 29 | -include __DIR__ . '/header.php'; |
|
| 29 | +include __DIR__.'/header.php'; |
|
| 30 | 30 | $op = \Xmf\Request::getString('op', 'default'); |
| 31 | 31 | $mid = \Xmf\Request::getInt('mod_id'); |
| 32 | 32 | $moduleObj = $helper->getHandler('Modules')->get($mid); |
| 33 | -$cachePath = XOOPS_VAR_PATH . '/caches/tdmcreate_cache'; |
|
| 33 | +$cachePath = XOOPS_VAR_PATH.'/caches/tdmcreate_cache'; |
|
| 34 | 34 | // Clear cache |
| 35 | -if (file_exists($cache = $cachePath . '/classpaths.cache')) { |
|
| 35 | +if (file_exists($cache = $cachePath.'/classpaths.cache')) { |
|
| 36 | 36 | unlink($cache); |
| 37 | 37 | } |
| 38 | -if (!file_exists($indexFile = $cachePath . '/index.html')) { |
|
| 38 | +if (!file_exists($indexFile = $cachePath.'/index.html')) { |
|
| 39 | 39 | copy('index.html', $indexFile); |
| 40 | 40 | } |
| 41 | 41 | // Switch option |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | // Get var module dirname |
| 47 | 47 | $moduleDirname = $moduleObj->getVar('mod_dirname'); |
| 48 | 48 | // Directories for copy from to |
| 49 | - $fromDir = TDMC_UPLOAD_REPOSITORY_PATH . '/' . mb_strtolower($moduleDirname); |
|
| 50 | - $toDir = XOOPS_ROOT_PATH . '/modules/' . mb_strtolower($moduleDirname); |
|
| 49 | + $fromDir = TDMC_UPLOAD_REPOSITORY_PATH.'/'.mb_strtolower($moduleDirname); |
|
| 50 | + $toDir = XOOPS_ROOT_PATH.'/modules/'.mb_strtolower($moduleDirname); |
|
| 51 | 51 | // include_once TDMC_CLASS_PATH . '/building.php'; |
| 52 | 52 | if (isset($moduleDirname)) { |
| 53 | 53 | // Clear this module if it's in repository |
@@ -109,4 +109,4 @@ discard block |
||
| 109 | 109 | $GLOBALS['xoopsTpl']->assign('form', $form->render()); |
| 110 | 110 | break; |
| 111 | 111 | } |
| 112 | -include __DIR__ . '/footer.php'; |
|
| 112 | +include __DIR__.'/footer.php'; |
|
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_tables.tpl'; |
| 26 | 26 | |
| 27 | -include __DIR__ . '/header.php'; |
|
| 27 | +include __DIR__.'/header.php'; |
|
| 28 | 28 | // Recovered value of arguments op in the URL $ |
| 29 | 29 | $op = \Xmf\Request::getString('op', 'list'); |
| 30 | 30 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $adminObject->addItemButton(_AM_TDMCREATE_ADD_TABLE, 'tables.php?op=new', 'add'); |
| 52 | 52 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 53 | 53 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 54 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 54 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 55 | 55 | // Get the list of modules |
| 56 | 56 | $modulesCount = $helper->getHandler('Modules')->getCountModules(); |
| 57 | 57 | // Redirect if there aren't modules |
@@ -90,8 +90,8 @@ discard block |
||
| 90 | 90 | unset($module); |
| 91 | 91 | } |
| 92 | 92 | if ($modulesCount > $limit) { |
| 93 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 94 | - $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 93 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 94 | + $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 95 | 95 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 96 | 96 | } |
| 97 | 97 | } else { |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | 'table_order' => $order, |
| 144 | 144 | ]); |
| 145 | 145 | //Form table_image |
| 146 | - include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 146 | + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 147 | 147 | $uploaddir = is_dir(XOOPS_ICONS32_PATH) ? XOOPS_ICONS32_PATH : TDMC_UPLOAD_IMGTAB_PATH; |
| 148 | 148 | $uploader = new \XoopsMediaUploader( |
| 149 | 149 | $uploaddir, |
@@ -189,18 +189,18 @@ discard block |
||
| 189 | 189 | if ($tables->insert($tablesObj)) { |
| 190 | 190 | if ($tablesObj->isNew()) { |
| 191 | 191 | $tableTid = $GLOBALS['xoopsDB']->getInsertId(); |
| 192 | - $tableAction = '&field_mid=' . $tableMid . '&field_tid=' . $tableTid . '&field_numb=' . $tableNumbFields . '&field_name=' . $tableFieldname; |
|
| 192 | + $tableAction = '&field_mid='.$tableMid.'&field_tid='.$tableTid.'&field_numb='.$tableNumbFields.'&field_name='.$tableFieldname; |
|
| 193 | 193 | // Fields Elements Handler |
| 194 | 194 | $fieldelementObj = $helper->getHandler('Fieldelements')->create(); |
| 195 | 195 | $fieldelementObj->setVar('fieldelement_mid', $tableMid); |
| 196 | 196 | $fieldelementObj->setVar('fieldelement_tid', $tableTid); |
| 197 | - $fieldelementObj->setVar('fieldelement_name', 'Table : ' . ucfirst($_POST['table_name'])); |
|
| 198 | - $fieldelementObj->setVar('fieldelement_value', 'XoopsFormTables-' . ucfirst($_POST['table_name'])); |
|
| 197 | + $fieldelementObj->setVar('fieldelement_name', 'Table : '.ucfirst($_POST['table_name'])); |
|
| 198 | + $fieldelementObj->setVar('fieldelement_value', 'XoopsFormTables-'.ucfirst($_POST['table_name'])); |
|
| 199 | 199 | // Insert new field element id for table name |
| 200 | 200 | if (!$helper->getHandler('Fieldelements')->insert($fieldelementObj)) { |
| 201 | - $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors() . ' Field element'); |
|
| 201 | + $GLOBALS['xoopsTpl']->assign('error', $fieldelementObj->getHtmlErrors().' Field element'); |
|
| 202 | 202 | } |
| 203 | - redirect_header('fields.php?op=new' . $tableAction, 5, sprintf(_AM_TDMCREATE_TABLE_FORM_CREATED_OK, $_POST['table_name'])); |
|
| 203 | + redirect_header('fields.php?op=new'.$tableAction, 5, sprintf(_AM_TDMCREATE_TABLE_FORM_CREATED_OK, $_POST['table_name'])); |
|
| 204 | 204 | } else { |
| 205 | 205 | redirect_header('tables.php', 5, sprintf(_AM_TDMCREATE_TABLE_FORM_UPDATED_OK, $_POST['table_name'])); |
| 206 | 206 | } |
@@ -272,9 +272,9 @@ discard block |
||
| 272 | 272 | if ($mid > 0) { |
| 273 | 273 | $modulesObj = $helper->getHandler('Modules')->get($mid); |
| 274 | 274 | foreach ($modArray as $modField) { |
| 275 | - if (isset($_POST['mod_' . $modField])) { |
|
| 276 | - $mField = $modulesObj->getVar('mod_' . $modField); |
|
| 277 | - $modulesObj->setVar('mod_' . $modField, !$mField); |
|
| 275 | + if (isset($_POST['mod_'.$modField])) { |
|
| 276 | + $mField = $modulesObj->getVar('mod_'.$modField); |
|
| 277 | + $modulesObj->setVar('mod_'.$modField, !$mField); |
|
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | if ($helper->getHandler('Modules')->insert($modulesObj)) { |
@@ -287,9 +287,9 @@ discard block |
||
| 287 | 287 | if ($tid > 0) { |
| 288 | 288 | $tablesObj = $helper->getHandler('Tables')->get($tid); |
| 289 | 289 | foreach ($tableArray as $tableField) { |
| 290 | - if (isset($_POST['table_' . $tableField])) { |
|
| 291 | - $tblField = $tablesObj->getVar('table_' . $tableField); |
|
| 292 | - $tablesObj->setVar('table_' . $tableField, !$tblField); |
|
| 290 | + if (isset($_POST['table_'.$tableField])) { |
|
| 291 | + $tblField = $tablesObj->getVar('table_'.$tableField); |
|
| 292 | + $tablesObj->setVar('table_'.$tableField, !$tblField); |
|
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | if ($helper->getHandler('Tables')->insert($tablesObj)) { |
@@ -299,4 +299,4 @@ discard block |
||
| 299 | 299 | } |
| 300 | 300 | break; |
| 301 | 301 | } |
| 302 | -include __DIR__ . '/footer.php'; |
|
| 302 | +include __DIR__.'/footer.php'; |
|
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | use Xmf\Request; |
| 23 | 23 | use XoopsModules\Tdmcreate\Common; |
| 24 | 24 | |
| 25 | -include __DIR__ . '/header.php'; |
|
| 25 | +include __DIR__.'/header.php'; |
|
| 26 | 26 | |
| 27 | 27 | $adminObject = \Xmf\Module\Admin::getInstance(); |
| 28 | 28 | |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | $fb_content = Request::getText('fb_content', ''); |
| 63 | 63 | $fb_content = str_replace(["\r\n", "\n", "\r"], '<br>', $fb_content); //clean line break from dhtmltextarea |
| 64 | 64 | |
| 65 | - $title = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_FOR') . $GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 66 | - $body = constant('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME') . ': ' . $your_name . '<br>'; |
|
| 67 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL') . ': ' . $your_mail . '<br>'; |
|
| 68 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE') . ': ' . $your_site . '<br>'; |
|
| 69 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE') . ': ' . $fb_type . '<br><br>'; |
|
| 70 | - $body .= constant('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT') . ':<br>'; |
|
| 65 | + $title = constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_FOR').$GLOBALS['xoopsModule']->getVar('dirname'); |
|
| 66 | + $body = constant('CO_'.$moduleDirNameUpper.'_'.'FB_NAME').': '.$your_name.'<br>'; |
|
| 67 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL').': '.$your_mail.'<br>'; |
|
| 68 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_SITE').': '.$your_site.'<br>'; |
|
| 69 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE').': '.$fb_type.'<br><br>'; |
|
| 70 | + $body .= constant('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT').':<br>'; |
|
| 71 | 71 | $body .= $fb_content; |
| 72 | 72 | $xoopsMailer = xoops_getMailer(); |
| 73 | 73 | $xoopsMailer->useMail(); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $xoopsMailer->setBody($body); |
| 80 | 80 | $ret = $xoopsMailer->send(); |
| 81 | 81 | if ($ret) { |
| 82 | - redirect_header('index.php', 3, constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_SUCCESS')); |
|
| 82 | + redirect_header('index.php', 3, constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_SUCCESS')); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | // show form with content again |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | $feedback->type = $fb_type; |
| 90 | 90 | $feedback->content = $fb_content; |
| 91 | 91 | echo '<div align="center" style="width: 80%; padding: 10px; border: 2px solid #ff0000; color: #ff0000; margin-right:auto;margin-left:auto;"> |
| 92 | - <h3>' . constant('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_ERROR') . '</h3> |
|
| 92 | + <h3>' . constant('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_ERROR').'</h3> |
|
| 93 | 93 | </div>'; |
| 94 | 94 | $form = $feedback->getFormFeedback(); |
| 95 | 95 | $form->display(); |
| 96 | 96 | |
| 97 | 97 | break; |
| 98 | 98 | } |
| 99 | -require __DIR__ . '/footer.php'; |
|
| 99 | +require __DIR__.'/footer.php'; |
|
@@ -91,26 +91,26 @@ discard block |
||
| 91 | 91 | $moduleDirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', mb_strtolower($_POST['mod_dirname'])); |
| 92 | 92 | //Form module save |
| 93 | 93 | $modulesObj->setVars([ |
| 94 | - 'mod_name' => $_POST['mod_name'], |
|
| 95 | - 'mod_dirname' => $moduleDirname, |
|
| 96 | - 'mod_version' => $_POST['mod_version'], |
|
| 97 | - 'mod_since' => $_POST['mod_since'], |
|
| 98 | - 'mod_min_php' => $_POST['mod_min_php'], |
|
| 99 | - 'mod_min_xoops' => $_POST['mod_min_xoops'], |
|
| 100 | - 'mod_min_admin' => $_POST['mod_min_admin'], |
|
| 101 | - 'mod_min_mysql' => $_POST['mod_min_mysql'], |
|
| 102 | - 'mod_description' => $_POST['mod_description'], |
|
| 103 | - 'mod_author' => $_POST['mod_author'], |
|
| 104 | - 'mod_author_mail' => $_POST['mod_author_mail'], |
|
| 105 | - 'mod_author_website_url' => $_POST['mod_author_website_url'], |
|
| 106 | - 'mod_author_website_name' => $_POST['mod_author_website_name'], |
|
| 107 | - 'mod_credits' => $_POST['mod_credits'], |
|
| 108 | - 'mod_license' => $_POST['mod_license'], |
|
| 109 | - 'mod_release_info' => $_POST['mod_release_info'], |
|
| 110 | - 'mod_release_file' => $_POST['mod_release_file'], |
|
| 111 | - 'mod_manual' => $_POST['mod_manual'], |
|
| 112 | - 'mod_manual_file' => $_POST['mod_manual_file'], |
|
| 113 | - ]); |
|
| 94 | + 'mod_name' => $_POST['mod_name'], |
|
| 95 | + 'mod_dirname' => $moduleDirname, |
|
| 96 | + 'mod_version' => $_POST['mod_version'], |
|
| 97 | + 'mod_since' => $_POST['mod_since'], |
|
| 98 | + 'mod_min_php' => $_POST['mod_min_php'], |
|
| 99 | + 'mod_min_xoops' => $_POST['mod_min_xoops'], |
|
| 100 | + 'mod_min_admin' => $_POST['mod_min_admin'], |
|
| 101 | + 'mod_min_mysql' => $_POST['mod_min_mysql'], |
|
| 102 | + 'mod_description' => $_POST['mod_description'], |
|
| 103 | + 'mod_author' => $_POST['mod_author'], |
|
| 104 | + 'mod_author_mail' => $_POST['mod_author_mail'], |
|
| 105 | + 'mod_author_website_url' => $_POST['mod_author_website_url'], |
|
| 106 | + 'mod_author_website_name' => $_POST['mod_author_website_name'], |
|
| 107 | + 'mod_credits' => $_POST['mod_credits'], |
|
| 108 | + 'mod_license' => $_POST['mod_license'], |
|
| 109 | + 'mod_release_info' => $_POST['mod_release_info'], |
|
| 110 | + 'mod_release_file' => $_POST['mod_release_file'], |
|
| 111 | + 'mod_manual' => $_POST['mod_manual'], |
|
| 112 | + 'mod_manual_file' => $_POST['mod_manual_file'], |
|
| 113 | + ]); |
|
| 114 | 114 | //Form mod_image |
| 115 | 115 | include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
| 116 | 116 | $uploader = new \XoopsMediaUploader( |
@@ -134,17 +134,17 @@ discard block |
||
| 134 | 134 | //Form module save |
| 135 | 135 | $modulesObj->setVars( |
| 136 | 136 | [ |
| 137 | - 'mod_demo_site_url' => $_POST['mod_demo_site_url'], |
|
| 138 | - 'mod_demo_site_name' => $_POST['mod_demo_site_name'], |
|
| 139 | - 'mod_support_url' => $_POST['mod_support_url'], |
|
| 140 | - 'mod_support_name' => $_POST['mod_support_name'], |
|
| 141 | - 'mod_website_url' => $_POST['mod_website_url'], |
|
| 142 | - 'mod_website_name' => $_POST['mod_website_name'], |
|
| 143 | - 'mod_release' => $_POST['mod_release'], |
|
| 144 | - 'mod_status' => $_POST['mod_status'], |
|
| 145 | - 'mod_donations' => $_POST['mod_donations'], |
|
| 146 | - 'mod_subversion' => $_POST['mod_subversion'], |
|
| 147 | - ] |
|
| 137 | + 'mod_demo_site_url' => $_POST['mod_demo_site_url'], |
|
| 138 | + 'mod_demo_site_name' => $_POST['mod_demo_site_name'], |
|
| 139 | + 'mod_support_url' => $_POST['mod_support_url'], |
|
| 140 | + 'mod_support_name' => $_POST['mod_support_name'], |
|
| 141 | + 'mod_website_url' => $_POST['mod_website_url'], |
|
| 142 | + 'mod_website_name' => $_POST['mod_website_name'], |
|
| 143 | + 'mod_release' => $_POST['mod_release'], |
|
| 144 | + 'mod_status' => $_POST['mod_status'], |
|
| 145 | + 'mod_donations' => $_POST['mod_donations'], |
|
| 146 | + 'mod_subversion' => $_POST['mod_subversion'], |
|
| 147 | + ] |
|
| 148 | 148 | ); |
| 149 | 149 | $moduleOption = \Xmf\Request::getArray('module_option', []); |
| 150 | 150 | $modulesObj->setVar('mod_admin', in_array('admin', $moduleOption)); |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_modules.tpl'; |
| 26 | 26 | |
| 27 | -include __DIR__ . '/header.php'; |
|
| 27 | +include __DIR__.'/header.php'; |
|
| 28 | 28 | // Recovered value of argument op in the URL $ |
| 29 | 29 | $op = \Xmf\Request::getString('op', 'list'); |
| 30 | 30 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 45 | 45 | $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL); |
| 46 | 46 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 47 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 47 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 48 | 48 | $modulesCount = $helper->getHandler('Modules')->getCountModules(); |
| 49 | 49 | $modulesAll = $helper->getHandler('Modules')->getAllModules($start, $limit); |
| 50 | 50 | // Redirect if there aren't modules |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | unset($module); |
| 60 | 60 | } |
| 61 | 61 | if ($modulesCount > $limit) { |
| 62 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 63 | - $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 62 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 63 | + $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 64 | 64 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 65 | 65 | } |
| 66 | 66 | } else { |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | 'mod_manual_file' => $_POST['mod_manual_file'], |
| 113 | 113 | ]); |
| 114 | 114 | //Form mod_image |
| 115 | - include_once XOOPS_ROOT_PATH . '/class/uploader.php'; |
|
| 115 | + include_once XOOPS_ROOT_PATH.'/class/uploader.php'; |
|
| 116 | 116 | $uploader = new \XoopsMediaUploader( |
| 117 | 117 | TDMC_UPLOAD_IMGMOD_PATH, |
| 118 | 118 | $helper->getConfig('mimetypes'), |
@@ -202,9 +202,9 @@ discard block |
||
| 202 | 202 | if ($id > 0) { |
| 203 | 203 | $modulesObj = $helper->getHandler('Modules')->get($id); |
| 204 | 204 | foreach ($modFieldArray as $moduleField) { |
| 205 | - if (isset($_POST['mod_' . $moduleField])) { |
|
| 206 | - $modField = $modulesObj->getVar('mod_' . $moduleField); |
|
| 207 | - $modulesObj->setVar('mod_' . $moduleField, !$modField); |
|
| 205 | + if (isset($_POST['mod_'.$moduleField])) { |
|
| 206 | + $modField = $modulesObj->getVar('mod_'.$moduleField); |
|
| 207 | + $modulesObj->setVar('mod_'.$moduleField, !$modField); |
|
| 208 | 208 | } |
| 209 | 209 | } |
| 210 | 210 | if ($helper->getHandler('Modules')->insert($modulesObj)) { |
@@ -215,4 +215,4 @@ discard block |
||
| 215 | 215 | break; |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | -include __DIR__ . '/footer.php'; |
|
| 218 | +include __DIR__.'/footer.php'; |
|