@@ -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()) { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_morefiles.tpl'; |
| 25 | 25 | |
| 26 | -include __DIR__ . '/header.php'; |
|
| 26 | +include __DIR__.'/header.php'; |
|
| 27 | 27 | // Recovered value of argument op in the URL $ |
| 28 | 28 | $op = \Xmf\Request::getString('op', 'list'); |
| 29 | 29 | |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | unset($files); |
| 61 | 61 | } |
| 62 | 62 | if ($morefilesCount > $limit) { |
| 63 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 64 | - $pagenav = new \XoopsPageNav($morefilesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 63 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 64 | + $pagenav = new \XoopsPageNav($morefilesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 65 | 65 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 66 | 66 | } |
| 67 | 67 | } else { |
@@ -139,4 +139,4 @@ discard block |
||
| 139 | 139 | break; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | -include __DIR__ . '/footer.php'; |
|
| 142 | +include __DIR__.'/footer.php'; |
|
@@ -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()) { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_addfiles.tpl'; |
| 25 | 25 | |
| 26 | -include __DIR__ . '/header.php'; |
|
| 26 | +include __DIR__.'/header.php'; |
|
| 27 | 27 | // Recovered value of argument op in the URL $ |
| 28 | 28 | $op = \Xmf\Request::getString('op', 'list'); |
| 29 | 29 | |
@@ -60,8 +60,8 @@ discard block |
||
| 60 | 60 | unset($files); |
| 61 | 61 | } |
| 62 | 62 | if ($addfilesCount > $limit) { |
| 63 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 64 | - $pagenav = new \XoopsPageNav($addfilesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 63 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 64 | + $pagenav = new \XoopsPageNav($addfilesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 65 | 65 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 66 | 66 | } |
| 67 | 67 | } else { |
@@ -139,4 +139,4 @@ discard block |
||
| 139 | 139 | break; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | -include __DIR__ . '/footer.php'; |
|
| 142 | +include __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)); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_modules.tpl'; |
| 25 | 25 | |
| 26 | -include __DIR__ . '/header.php'; |
|
| 26 | +include __DIR__.'/header.php'; |
|
| 27 | 27 | // Recovered value of argument op in the URL $ |
| 28 | 28 | $op = \Xmf\Request::getString('op', 'list'); |
| 29 | 29 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 44 | 44 | $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL); |
| 45 | 45 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 46 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 46 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 47 | 47 | $modulesCount = $helper->getHandler('Modules')->getCountModules(); |
| 48 | 48 | $modulesAll = $helper->getHandler('Modules')->getAllModules($start, $limit); |
| 49 | 49 | // Redirect if there aren't modules |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | unset($module); |
| 59 | 59 | } |
| 60 | 60 | if ($modulesCount > $limit) { |
| 61 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 62 | - $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 61 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 62 | + $pagenav = new \XoopsPageNav($modulesCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 63 | 63 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 64 | 64 | } |
| 65 | 65 | } else { |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | 'mod_manual_file' => $_POST['mod_manual_file'], |
| 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, |
| 117 | 117 | $helper->getConfig('mimetypes'), |
@@ -201,9 +201,9 @@ discard block |
||
| 201 | 201 | if ($id > 0) { |
| 202 | 202 | $modulesObj = $helper->getHandler('Modules')->get($id); |
| 203 | 203 | foreach ($modFieldArray as $moduleField) { |
| 204 | - if (isset($_POST['mod_' . $moduleField])) { |
|
| 205 | - $modField = $modulesObj->getVar('mod_' . $moduleField); |
|
| 206 | - $modulesObj->setVar('mod_' . $moduleField, !$modField); |
|
| 204 | + if (isset($_POST['mod_'.$moduleField])) { |
|
| 205 | + $modField = $modulesObj->getVar('mod_'.$moduleField); |
|
| 206 | + $modulesObj->setVar('mod_'.$moduleField, !$modField); |
|
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | if ($helper->getHandler('Modules')->insert($modulesObj)) { |
@@ -214,4 +214,4 @@ discard block |
||
| 214 | 214 | break; |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | -include __DIR__ . '/footer.php'; |
|
| 217 | +include __DIR__.'/footer.php'; |
|
@@ -89,42 +89,42 @@ |
||
| 89 | 89 | $setModuleDirname = preg_replace('/[^a-zA-Z0-9]\s+/', '', mb_strtolower($_POST['set_dirname'])); |
| 90 | 90 | //Form module save |
| 91 | 91 | $settingsObj->setVars([ |
| 92 | - 'set_name' => $_POST['set_name'], |
|
| 93 | - 'set_dirname' => $setModuleDirname, |
|
| 94 | - 'set_version' => $_POST['set_version'], |
|
| 95 | - 'set_since' => $_POST['set_since'], |
|
| 96 | - 'set_min_php' => $_POST['set_min_php'], |
|
| 97 | - 'set_min_xoops' => $_POST['set_min_xoops'], |
|
| 98 | - 'set_min_admin' => $_POST['set_min_admin'], |
|
| 99 | - 'set_min_mysql' => $_POST['set_min_mysql'], |
|
| 100 | - 'set_description' => $_POST['set_description'], |
|
| 101 | - 'set_author' => $_POST['set_author'], |
|
| 102 | - 'set_author_mail' => $_POST['set_author_mail'], |
|
| 103 | - 'set_author_website_url' => $_POST['set_author_website_url'], |
|
| 104 | - 'set_author_website_name' => $_POST['set_author_website_name'], |
|
| 105 | - 'set_credits' => $_POST['set_credits'], |
|
| 106 | - 'set_license' => $_POST['set_license'], |
|
| 107 | - 'set_release_info' => $_POST['set_release_info'], |
|
| 108 | - 'set_release_file' => $_POST['set_release_file'], |
|
| 109 | - 'set_manual' => $_POST['set_manual'], |
|
| 110 | - 'set_manual_file' => $_POST['set_manual_file'], |
|
| 111 | - ]); |
|
| 92 | + 'set_name' => $_POST['set_name'], |
|
| 93 | + 'set_dirname' => $setModuleDirname, |
|
| 94 | + 'set_version' => $_POST['set_version'], |
|
| 95 | + 'set_since' => $_POST['set_since'], |
|
| 96 | + 'set_min_php' => $_POST['set_min_php'], |
|
| 97 | + 'set_min_xoops' => $_POST['set_min_xoops'], |
|
| 98 | + 'set_min_admin' => $_POST['set_min_admin'], |
|
| 99 | + 'set_min_mysql' => $_POST['set_min_mysql'], |
|
| 100 | + 'set_description' => $_POST['set_description'], |
|
| 101 | + 'set_author' => $_POST['set_author'], |
|
| 102 | + 'set_author_mail' => $_POST['set_author_mail'], |
|
| 103 | + 'set_author_website_url' => $_POST['set_author_website_url'], |
|
| 104 | + 'set_author_website_name' => $_POST['set_author_website_name'], |
|
| 105 | + 'set_credits' => $_POST['set_credits'], |
|
| 106 | + 'set_license' => $_POST['set_license'], |
|
| 107 | + 'set_release_info' => $_POST['set_release_info'], |
|
| 108 | + 'set_release_file' => $_POST['set_release_file'], |
|
| 109 | + 'set_manual' => $_POST['set_manual'], |
|
| 110 | + 'set_manual_file' => $_POST['set_manual_file'], |
|
| 111 | + ]); |
|
| 112 | 112 | //Form set_image |
| 113 | 113 | $settingsObj->setVar('set_image', $_POST['set_image']); |
| 114 | 114 | //Form module save |
| 115 | 115 | $settingsObj->setVars( |
| 116 | 116 | [ |
| 117 | - 'set_demo_site_url' => $_POST['set_demo_site_url'], |
|
| 118 | - 'set_demo_site_name' => $_POST['set_demo_site_name'], |
|
| 119 | - 'set_support_url' => $_POST['set_support_url'], |
|
| 120 | - 'set_support_name' => $_POST['set_support_name'], |
|
| 121 | - 'set_website_url' => $_POST['set_website_url'], |
|
| 122 | - 'set_website_name' => $_POST['set_website_name'], |
|
| 123 | - 'set_release' => $_POST['set_release'], |
|
| 124 | - 'set_status' => $_POST['set_status'], |
|
| 125 | - 'set_donations' => $_POST['set_donations'], |
|
| 126 | - 'set_subversion' => $_POST['set_subversion'], |
|
| 127 | - ] |
|
| 117 | + 'set_demo_site_url' => $_POST['set_demo_site_url'], |
|
| 118 | + 'set_demo_site_name' => $_POST['set_demo_site_name'], |
|
| 119 | + 'set_support_url' => $_POST['set_support_url'], |
|
| 120 | + 'set_support_name' => $_POST['set_support_name'], |
|
| 121 | + 'set_website_url' => $_POST['set_website_url'], |
|
| 122 | + 'set_website_name' => $_POST['set_website_name'], |
|
| 123 | + 'set_release' => $_POST['set_release'], |
|
| 124 | + 'set_status' => $_POST['set_status'], |
|
| 125 | + 'set_donations' => $_POST['set_donations'], |
|
| 126 | + 'set_subversion' => $_POST['set_subversion'], |
|
| 127 | + ] |
|
| 128 | 128 | ); |
| 129 | 129 | $settingOption = \Xmf\Request::getArray('setting_option', []); |
| 130 | 130 | $settingsObj->setVar('set_admin', in_array('admin', $settingOption)); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | $GLOBALS['xoopsOption']['template_main'] = 'tdmcreate_settings.tpl'; |
| 25 | 25 | |
| 26 | -include __DIR__ . '/header.php'; |
|
| 26 | +include __DIR__.'/header.php'; |
|
| 27 | 27 | |
| 28 | 28 | // Recovered value of argument op in the URL $ |
| 29 | 29 | $op = \Xmf\Request::getString('op', 'list'); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->displayButton('left')); |
| 45 | 45 | $GLOBALS['xoopsTpl']->assign('tdmc_upload_imgmod_url', TDMC_UPLOAD_IMGMOD_URL); |
| 46 | 46 | $GLOBALS['xoopsTpl']->assign('tdmc_url', TDMC_URL); |
| 47 | - $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL . '/' . $modPathIcon16); |
|
| 47 | + $GLOBALS['xoopsTpl']->assign('modPathIcon16', TDMC_URL.'/'.$modPathIcon16); |
|
| 48 | 48 | $GLOBALS['xoopsTpl']->assign('sysPathIcon32', $sysPathIcon32); |
| 49 | 49 | $settingsCount = $helper->getHandler('Settings')->getCountSettings(); |
| 50 | 50 | $settingsAll = $helper->getHandler('Settings')->getAllSettings($start, $limit); |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | unset($setting); |
| 57 | 57 | } |
| 58 | 58 | if ($settingsCount > $limit) { |
| 59 | - include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; |
|
| 60 | - $pagenav = new \XoopsPageNav($settingsCount, $limit, $start, 'start', 'op=list&limit=' . $limit); |
|
| 59 | + include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; |
|
| 60 | + $pagenav = new \XoopsPageNav($settingsCount, $limit, $start, 'start', 'op=list&limit='.$limit); |
|
| 61 | 61 | $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav(4)); |
| 62 | 62 | } |
| 63 | 63 | } else { |
@@ -184,4 +184,4 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | break; |
| 186 | 186 | } |
| 187 | -include __DIR__ . '/footer.php'; |
|
| 187 | +include __DIR__.'/footer.php'; |
|
@@ -25,10 +25,10 @@ |
||
| 25 | 25 | $pathIcon32 = Xmf\Module\Admin::iconUrl('', 32); |
| 26 | 26 | |
| 27 | 27 | echo "<div class='adminfooter'>\n" |
| 28 | - . " <div style='text-align: center;'>\n" |
|
| 29 | - . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
|
| 30 | - . " </div>\n" |
|
| 31 | - . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
| 32 | - . '</div>'; |
|
| 28 | + . " <div style='text-align: center;'>\n" |
|
| 29 | + . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" |
|
| 30 | + . " </div>\n" |
|
| 31 | + . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" |
|
| 32 | + . '</div>'; |
|
| 33 | 33 | |
| 34 | 34 | xoops_cp_footer(); |
@@ -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 | ); |