@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | xoops_loadLanguage('main', 'contact'); |
72 | 72 | |
73 | - require_once XOOPS_ROOT_PATH . '/modules/contact/class/contact.php'; |
|
73 | + require_once XOOPS_ROOT_PATH.'/modules/contact/class/contact.php'; |
|
74 | 74 | |
75 | 75 | $block['lng_username'] = 'name'; |
76 | 76 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | if (false !== $xoopsSuccess && false !== $phpSuccess) { |
40 | 40 | $mod_tables = &$module->getInfo('tables'); |
41 | 41 | foreach ($mod_tables as $table) { |
42 | - $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' . $GLOBALS['xoopsDB']->prefix($table) . ';'); |
|
42 | + $GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS '.$GLOBALS['xoopsDB']->prefix($table).';'); |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | function xoops_module_install_contact(\XoopsModule $module) |
56 | 56 | { |
57 | - require dirname(__DIR__, 3) . '/mainfile.php'; |
|
57 | + require dirname(__DIR__, 3).'/mainfile.php'; |
|
58 | 58 | |
59 | 59 | $moduleDirName = \basename(\dirname(__DIR__)); |
60 | 60 | |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | /** @var \XoopsGroupPermHandler $grouppermHandler */ |
74 | 74 | $grouppermHandler = xoops_getHandler('groupperm'); |
75 | 75 | // access rights ------------------------------------------ |
76 | - $grouppermHandler->addRight($moduleDirName . '_approve', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | - $grouppermHandler->addRight($moduleDirName . '_submit', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
78 | - $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
79 | - $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_USERS, $moduleId); |
|
80 | - $grouppermHandler->addRight($moduleDirName . '_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
76 | + $grouppermHandler->addRight($moduleDirName.'_approve', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
77 | + $grouppermHandler->addRight($moduleDirName.'_submit', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
78 | + $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ADMIN, $moduleId); |
|
79 | + $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_USERS, $moduleId); |
|
80 | + $grouppermHandler->addRight($moduleDirName.'_view', 1, XOOPS_GROUP_ANONYMOUS, $moduleId); |
|
81 | 81 | |
82 | 82 | // --- CREATE FOLDERS --------------- |
83 | 83 | if (count($configurator->uploadFolders) > 0) { |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | |
90 | 90 | // --- COPY blank.png FILES --------------- |
91 | 91 | if (count($configurator->copyBlankFiles) > 0) { |
92 | - $file = dirname(__DIR__) . '/assets/images/blank.png'; |
|
92 | + $file = dirname(__DIR__).'/assets/images/blank.png'; |
|
93 | 93 | foreach (array_keys($configurator->copyBlankFiles) as $i) { |
94 | - $dest = $configurator->copyBlankFiles[$i] . '/blank.png'; |
|
94 | + $dest = $configurator->copyBlankFiles[$i].'/blank.png'; |
|
95 | 95 | $utility::copyFile($file, $dest); |
96 | 96 | } |
97 | 97 | } |
@@ -17,27 +17,27 @@ discard block |
||
17 | 17 | |
18 | 18 | use Xmf\Module\Admin; |
19 | 19 | |
20 | -require dirname(__DIR__, 3) . '/mainfile.php'; |
|
20 | +require dirname(__DIR__, 3).'/mainfile.php'; |
|
21 | 21 | |
22 | 22 | $moduleDirName = \basename(\dirname(__DIR__)); |
23 | 23 | $moduleDirNameUpper = mb_strtoupper($moduleDirName); |
24 | 24 | |
25 | -if (!defined($moduleDirNameUpper . '_DIRNAME')) { |
|
25 | +if (!defined($moduleDirNameUpper.'_DIRNAME')) { |
|
26 | 26 | //if (!defined(constant($capsDirName . '_DIRNAME'))) { |
27 | - define($moduleDirNameUpper . '_DIRNAME', $GLOBALS['xoopsModule']->dirname()); |
|
28 | - define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . constant($moduleDirNameUpper . '_DIRNAME')); |
|
29 | - define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . constant($moduleDirNameUpper . '_DIRNAME')); |
|
30 | - define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php'); |
|
31 | - define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . constant($moduleDirNameUpper . '_DIRNAME')); |
|
32 | - define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png'); |
|
27 | + define($moduleDirNameUpper.'_DIRNAME', $GLOBALS['xoopsModule']->dirname()); |
|
28 | + define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.constant($moduleDirNameUpper.'_DIRNAME')); |
|
29 | + define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.constant($moduleDirNameUpper.'_DIRNAME')); |
|
30 | + define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php'); |
|
31 | + define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.constant($moduleDirNameUpper.'_DIRNAME')); |
|
32 | + define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // Define here the place where main upload path |
36 | 36 | |
37 | 37 | //$img_dir = $GLOBALS['xoopsModuleConfig']['uploaddir']; |
38 | 38 | |
39 | -define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
40 | -define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash |
|
39 | +define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
40 | +define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash |
|
41 | 41 | |
42 | 42 | //constant($cloned_lang . '_CATEGORY_NOTIFY') |
43 | 43 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | // constant($capsDirName . '_UPLOAD_PATH') . '/midsize', |
85 | 85 | // constant($capsDirName . '_UPLOAD_PATH') . '/thumbs', |
86 | 86 | ]; |
87 | - $this->blankFiles = [ |
|
87 | + $this->blankFiles = [ |
|
88 | 88 | // constant($capsDirName . '_UPLOAD_PATH'), |
89 | 89 | // constant($capsDirName . '_UPLOAD_PATH') . '/midsize', |
90 | 90 | // constant($capsDirName . '_UPLOAD_PATH') . '/thumbs', |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | '/templates/blocks/', |
96 | 96 | '/templates/admin/', |
97 | 97 | ]; |
98 | - $this->oldFiles = [ |
|
98 | + $this->oldFiles = [ |
|
99 | 99 | // '/include/functions.php', |
100 | 100 | '/include/functions_update.php', |
101 | 101 | '/LICENSE', |
102 | 102 | '/readme.html', |
103 | 103 | ]; |
104 | - $this->oldFolders = [ |
|
104 | + $this->oldFolders = [ |
|
105 | 105 | '/images', |
106 | 106 | '/css', |
107 | 107 | '/js', |
@@ -111,4 +111,4 @@ discard block |
||
111 | 111 | |
112 | 112 | // module information |
113 | 113 | $modCopyright = "<a href='https://xoops.org' title='XOOPS Project' target='_blank'> |
114 | - <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . '\' alt=\'XOOPS Project\' ></a>'; |
|
114 | + <img src='" . Admin::iconUrl('xoopsmicrobutton.gif').'\' alt=\'XOOPS Project\' ></a>'; |
@@ -4,12 +4,12 @@ discard block |
||
4 | 4 | * @see http://www.php-fig.org/psr/psr-4/examples/ |
5 | 5 | */ |
6 | 6 | spl_autoload_register( |
7 | - static function ($class) { |
|
7 | + static function($class) { |
|
8 | 8 | // project-specific namespace prefix |
9 | - $prefix = 'XoopsModules\\' . ucfirst(basename(dirname(__DIR__))); |
|
9 | + $prefix = 'XoopsModules\\'.ucfirst(basename(dirname(__DIR__))); |
|
10 | 10 | |
11 | 11 | // base directory for the namespace prefix |
12 | - $baseDir = dirname(__DIR__) . '/class/'; |
|
12 | + $baseDir = dirname(__DIR__).'/class/'; |
|
13 | 13 | |
14 | 14 | // does the class use the namespace prefix? |
15 | 15 | $len = mb_strlen($prefix); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // replace the namespace prefix with the base directory, replace namespace |
25 | 25 | // separators with directory separators in the relative class name, append |
26 | 26 | // with .php |
27 | - $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php'; |
|
27 | + $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php'; |
|
28 | 28 | |
29 | 29 | // if the file exists, require it |
30 | 30 | if (is_file($file)) { |
@@ -26,6 +26,6 @@ |
||
26 | 26 | */ |
27 | 27 | public static function eventCoreIncludeCommonEnd($args) |
28 | 28 | { |
29 | - require_once __DIR__ . '/autoloader.php'; |
|
29 | + require_once __DIR__.'/autoloader.php'; |
|
30 | 30 | } |
31 | 31 | } |
@@ -86,7 +86,7 @@ |
||
86 | 86 | //2.25 RC1 |
87 | 87 | //Help |
88 | 88 | define('_MI_CONTACT_DIRNAME', basename(dirname(__DIR__, 2))); |
89 | -define('_MI_CONTACT_HELP_HEADER', __DIR__ . '/help/helpheader.tpl'); |
|
89 | +define('_MI_CONTACT_HELP_HEADER', __DIR__.'/help/helpheader.tpl'); |
|
90 | 90 | define('_MI_CONTACT_BACK_2_ADMIN', 'Back to Administration of '); |
91 | 91 | define('_MI_CONTACT_OVERVIEW', 'Overview'); |
92 | 92 |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $form->addElement(new \XoopsFormLabel(_AM_CONTACT_TO, '', '')); |
80 | 80 | $form->addElement(new \XoopsFormText(_AM_CONTACT_NAMETO, 'contact_nameto', 50, 255, $this->getVar('contact_name')), true); |
81 | 81 | $form->addElement(new \XoopsFormText(_AM_CONTACT_MAILTO, 'contact_mailto', 50, 255, $this->getVar('contact_mail')), true); |
82 | - $form->addElement(new \XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE . $this->getVar('contact_subject')), true); |
|
82 | + $form->addElement(new \XoopsFormText(_AM_CONTACT_SUBJECT, 'contact_subject', 50, 255, _RE.$this->getVar('contact_subject')), true); |
|
83 | 83 | $form->addElement(new \XoopsFormTextArea(_AM_CONTACT_MESSAGE, 'contact_message', '', 5, 60), true); |
84 | 84 | $form->addElement(new \XoopsFormButton('', 'submit', _SUBMIT, 'submit')); |
85 | 85 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | { |
70 | 70 | $ret = false; |
71 | 71 | |
72 | - $class = __NAMESPACE__ . '\\' . \ucfirst($name) . 'Handler'; |
|
72 | + $class = __NAMESPACE__.'\\'.\ucfirst($name).'Handler'; |
|
73 | 73 | if (!\class_exists($class)) { |
74 | 74 | throw new \RuntimeException("Class '$class' not found"); |
75 | 75 | } |
@@ -62,11 +62,11 @@ discard block |
||
62 | 62 | { |
63 | 63 | if ($considerHtml) { |
64 | 64 | // if the plain text is shorter than the maximum length, return the whole text |
65 | - if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) { |
|
65 | + if (mb_strlen(\preg_replace('/<.*?'.'>/', '', $text)) <= $length) { |
|
66 | 66 | return $text; |
67 | 67 | } |
68 | 68 | // splits all html-tags to scanable lines |
69 | - \preg_match_all('/(<.+?' . '>)?([^<>]*)/s', $text, $lines, \PREG_SET_ORDER); |
|
69 | + \preg_match_all('/(<.+?'.'>)?([^<>]*)/s', $text, $lines, \PREG_SET_ORDER); |
|
70 | 70 | $total_length = mb_strlen($ending); |
71 | 71 | $open_tags = []; |
72 | 72 | $truncate = ''; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | unset($open_tags[$pos]); |
85 | 85 | } |
86 | 86 | // if tag is an opening tag |
87 | - } elseif (\preg_match('/^<\s*([^\s>!]+).*?' . '>$/s', $line_matchings[1], $tag_matchings)) { |
|
87 | + } elseif (\preg_match('/^<\s*([^\s>!]+).*?'.'>$/s', $line_matchings[1], $tag_matchings)) { |
|
88 | 88 | // add tag to the beginning of $open_tags list |
89 | 89 | \array_unshift($open_tags, mb_strtolower($tag_matchings[1])); |
90 | 90 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | if ($considerHtml) { |
143 | 143 | // close all unclosed html-tags |
144 | 144 | foreach ($open_tags as $tag) { |
145 | - $truncate .= '</' . $tag . '>'; |
|
145 | + $truncate .= '</'.$tag.'>'; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | // set the auto-incremented id's value to blank. |
223 | 223 | unset($tempTable[$id_field]); |
224 | 224 | // insert cloned copy of the original record |
225 | - $sql = "INSERT INTO $table (" . implode(', ', array_keys($tempTable)) . ") VALUES ('" . implode("', '", array_values($tempTable)) . "')"; |
|
225 | + $sql = "INSERT INTO $table (".implode(', ', array_keys($tempTable)).") VALUES ('".implode("', '", array_values($tempTable))."')"; |
|
226 | 226 | $result = $GLOBALS['xoopsDB']->queryF($sql); |
227 | 227 | if (!$result) { |
228 | 228 | exit($GLOBALS['xoopsDB']->error()); |