@@ -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 | } |
@@ -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, |
@@ -21,30 +21,30 @@ discard block |
||
| 21 | 21 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 22 | 22 | |
| 23 | 23 | return (object)[ |
| 24 | - 'name' => mb_strtoupper($moduleDirName) . ' ModuleConfigurator', |
|
| 24 | + 'name' => mb_strtoupper($moduleDirName).' ModuleConfigurator', |
|
| 25 | 25 | 'paths' => [ |
| 26 | 26 | 'dirname' => $moduleDirName, |
| 27 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
| 28 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
| 29 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
| 30 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 31 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
| 27 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
| 28 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
| 29 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
| 30 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 31 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
| 32 | 32 | ], |
| 33 | 33 | 'uploadFolders' => [ |
| 34 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 35 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots', |
|
| 34 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 35 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots', |
|
| 36 | 36 | //XOOPS_UPLOAD_PATH . '/flags' |
| 37 | 37 | ], |
| 38 | 38 | 'copyBlankFiles' => [ |
| 39 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 40 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots', |
|
| 39 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 40 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots', |
|
| 41 | 41 | //XOOPS_UPLOAD_PATH . '/flags' |
| 42 | 42 | ], |
| 43 | 43 | |
| 44 | 44 | 'copyTestFolders' => [ |
| 45 | 45 | [ |
| 46 | - XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/uploads', |
|
| 47 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 46 | + XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/testdata/uploads', |
|
| 47 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 48 | 48 | ], |
| 49 | 49 | // [ |
| 50 | 50 | // XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/thumbs', |
@@ -81,6 +81,6 @@ discard block |
||
| 81 | 81 | // 'totalsubmitted' => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]), |
| 82 | 82 | ], |
| 83 | 83 | 'modCopyright' => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
| 84 | - <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . "' alt='XOOPS Project'></a>", |
|
| 84 | + <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG')."' alt='XOOPS Project'></a>", |
|
| 85 | 85 | ]; |
| 86 | 86 | |
@@ -6,19 +6,19 @@ |
||
| 6 | 6 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 7 | 7 | |
| 8 | 8 | return (object)[ |
| 9 | - 'name' => mb_strtoupper($moduleDirName) . ' PathConfigurator', |
|
| 9 | + 'name' => mb_strtoupper($moduleDirName).' PathConfigurator', |
|
| 10 | 10 | 'paths' => [ |
| 11 | 11 | 'dirname' => $moduleDirName, |
| 12 | - 'admin' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin', |
|
| 13 | - 'modPath' => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName, |
|
| 14 | - 'modUrl' => XOOPS_URL . '/modules/' . $moduleDirName, |
|
| 15 | - 'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 16 | - 'uploadUrl' => XOOPS_UPLOAD_URL . '/' . $moduleDirName, |
|
| 12 | + 'admin' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin', |
|
| 13 | + 'modPath' => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName, |
|
| 14 | + 'modUrl' => XOOPS_URL.'/modules/'.$moduleDirName, |
|
| 15 | + 'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 16 | + 'uploadUrl' => XOOPS_UPLOAD_URL.'/'.$moduleDirName, |
|
| 17 | 17 | ], |
| 18 | 18 | 'uploadFolders' => [ |
| 19 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName, |
|
| 20 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category', |
|
| 21 | - XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots', |
|
| 19 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName, |
|
| 20 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category', |
|
| 21 | + XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots', |
|
| 22 | 22 | //XOOPS_UPLOAD_PATH . '/flags' |
| 23 | 23 | ], |
| 24 | 24 | ]; |
@@ -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 | } |
@@ -74,8 +74,8 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | public function getClassCriteria($var, $param1, $param2 = '', $param3 = '', $isParam = false, $t = '') |
| 76 | 76 | { |
| 77 | - $params = ('' != $param2) ? ', ' . $param2 : ''; |
|
| 78 | - $params .= ('' != $param3) ? ', ' . $param3 : ''; |
|
| 77 | + $params = ('' != $param2) ? ', '.$param2 : ''; |
|
| 78 | + $params .= ('' != $param3) ? ', '.$param3 : ''; |
|
| 79 | 79 | |
| 80 | 80 | if (false === $isParam) { |
| 81 | 81 | $ret = "{$t}\${$var} = new \Criteria( {$param1}{$params} );\n"; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | public function __construct() |
| 46 | 46 | { |
| 47 | - $config = include dirname(dirname(__DIR__)) . '/config/config.php'; |
|
| 47 | + $config = include dirname(dirname(__DIR__)).'/config/config.php'; |
|
| 48 | 48 | |
| 49 | 49 | $this->name = $config->name; |
| 50 | 50 | $this->paths = $config->paths; |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | require $GLOBALS['xoops']->path('class/template.php'); |
| 72 | 72 | $breadcrumbTpl = new \XoopsTpl(); |
| 73 | 73 | $breadcrumbTpl->assign('breadcrumb', $this->bread); |
| 74 | - $html = $breadcrumbTpl->fetch('db:' . $this->dirname . '_common_breadcrumb.tpl'); |
|
| 74 | + $html = $breadcrumbTpl->fetch('db:'.$this->dirname.'_common_breadcrumb.tpl'); |
|
| 75 | 75 | unset($breadcrumbTpl); |
| 76 | 76 | |
| 77 | 77 | return $html; |
@@ -23,21 +23,21 @@ |
||
| 23 | 23 | $moduleDirName = basename(dirname(dirname(__DIR__))); |
| 24 | 24 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
| 25 | 25 | |
| 26 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_FORM_TITLE', 'Send a feedback'); |
|
| 27 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_RECIPIENT', 'Recipient'); |
|
| 28 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME', 'Name'); |
|
| 29 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_NAME_PLACEHOLER', 'Please enter your name'); |
|
| 30 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE', 'Website'); |
|
| 31 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_SITE_PLACEHOLER', 'Please enter your website'); |
|
| 32 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL', 'Email'); |
|
| 33 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_MAIL_PLACEHOLER', 'Please enter your email'); |
|
| 34 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE', 'Type of feedback'); |
|
| 35 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_SUGGESTION', 'Suggestions'); |
|
| 36 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_BUGS', 'Bugs'); |
|
| 37 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_TESTIMONIAL', 'Testimonials'); |
|
| 38 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_FEATURES', 'Features'); |
|
| 39 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_OTHERS', 'Misc'); |
|
| 40 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_TYPE_CONTENT', 'Feedback content'); |
|
| 41 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_FOR', 'Feedback for module '); |
|
| 42 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_SUCCESS', 'Feedback successfully sent'); |
|
| 43 | -define('CO_' . $moduleDirNameUpper . '_' . 'FB_SEND_ERROR', 'An errror occured when feedback was sent!'); |
|
| 26 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_FORM_TITLE', 'Send a feedback'); |
|
| 27 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_RECIPIENT', 'Recipient'); |
|
| 28 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_NAME', 'Name'); |
|
| 29 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_NAME_PLACEHOLER', 'Please enter your name'); |
|
| 30 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_SITE', 'Website'); |
|
| 31 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_SITE_PLACEHOLER', 'Please enter your website'); |
|
| 32 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL', 'Email'); |
|
| 33 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_MAIL_PLACEHOLER', 'Please enter your email'); |
|
| 34 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE', 'Type of feedback'); |
|
| 35 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_SUGGESTION', 'Suggestions'); |
|
| 36 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_BUGS', 'Bugs'); |
|
| 37 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_TESTIMONIAL', 'Testimonials'); |
|
| 38 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_FEATURES', 'Features'); |
|
| 39 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_OTHERS', 'Misc'); |
|
| 40 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_TYPE_CONTENT', 'Feedback content'); |
|
| 41 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_FOR', 'Feedback for module '); |
|
| 42 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_SUCCESS', 'Feedback successfully sent'); |
|
| 43 | +define('CO_'.$moduleDirNameUpper.'_'.'FB_SEND_ERROR', 'An errror occured when feedback was sent!'); |
|