Passed
Push — master ( 715875...b7c343 )
by Michael
03:54 queued 11s
created
blocks/block_contact_form_map.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
ajax.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @author      Trabis <[email protected]>
19 19
  * @author      Hossein Azizabadi (AKA Voltan)
20 20
  */
21
-require_once __DIR__ . '/header.php';
21
+require_once __DIR__.'/header.php';
22 22
 
23 23
 if (!empty($_POST)) {
24 24
     // Info Processing
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 use Xmf\Module\Admin;
24 24
 use XoopsModules\Contact;
25 25
 
26
-require_once dirname(__DIR__) . '/preloads/autoloader.php';
26
+require_once dirname(__DIR__).'/preloads/autoloader.php';
27 27
 
28 28
 $moduleDirName      = \basename(\dirname(__DIR__));
29 29
 $moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
@@ -42,20 +42,20 @@  discard block
 block discarded – undo
42 42
 //$categoryHandler     = new Contact\CategoryHandler($db);
43 43
 //$downloadHandler     = new Contact\DownloadHandler($db);
44 44
 
45
-if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
46
-    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
47
-    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
48
-    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
49
-    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
50
-    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
51
-    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
52
-    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
53
-    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
54
-    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
55
-    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
56
-    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
57
-    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
58
-    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
45
+if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) {
46
+    define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__)));
47
+    define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
48
+    define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
49
+    define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/');
50
+    define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/');
51
+    define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images');
52
+    define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/');
53
+    define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/');
54
+    define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php');
55
+    define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png');
56
+    define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash
57
+    define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash
58
+    define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1);
59 59
 }
60 60
 
61 61
 $pathIcon16 = Admin::iconUrl('', 16);
@@ -64,15 +64,15 @@  discard block
 block discarded – undo
64 64
 //$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
65 65
 
66 66
 $icons = [
67
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
68
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
69
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
70
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
71
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
72
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
73
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
74
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
75
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
67
+    'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT."' align='middle'>",
68
+    'delete'  => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>",
69
+    'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>",
70
+    'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>",
71
+    'print'   => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>",
72
+    'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>",
73
+    'add'     => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>",
74
+    '0'       => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>",
75
+    '1'       => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>",
76 76
 ];
77 77
 
78 78
 $debug = false;
@@ -85,19 +85,19 @@  discard block
 block discarded – undo
85 85
     $GLOBALS['xoopsTpl'] = new \XoopsTpl();
86 86
 }
87 87
 
88
-$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL . '/modules/' . $moduleDirName);
88
+$GLOBALS['xoopsTpl']->assign('mod_url', XOOPS_URL.'/modules/'.$moduleDirName);
89 89
 // Local icons path
90 90
 if (is_object($helper->getModule())) {
91 91
     $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
92 92
     $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
93 93
 
94
-    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
94
+    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16);
95 95
     $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
96 96
 }
97 97
 
98 98
 // module information
99 99
 $copyright = "<a href='http://xoops.wedega.com' title='WEDEGA Webdesign Gabor' target='_blank'>
100
-                     <img src='" . $local_logo . "' alt='WEDEGA Webdesign Gabor'></a>";
100
+                     <img src='" . $local_logo."' alt='WEDEGA Webdesign Gabor'></a>";
101 101
 
102 102
 //require_once CONTACT_PATH.'/class/helper.php';
103
-require_once CONTACT_PATH . '/include/functions.php';
103
+require_once CONTACT_PATH.'/include/functions.php';
Please login to merge, or discard this patch.
include/oninstall.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
include/onupdate.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)
28 28
     || !$GLOBALS['xoopsUser']->isAdmin()) {
29
-    exit('Restricted access' . PHP_EOL);
29
+    exit('Restricted access'.PHP_EOL);
30 30
 }
31 31
 
32 32
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     $xoopsDB = \XoopsDatabaseFactory::getDatabaseConnection();
73 73
 
74 74
     if ($previousVersion < 180) {
75
-        $sql = 'CREATE TABLE ' . $xoopsDB->prefix('contact') . ' (
75
+        $sql = 'CREATE TABLE '.$xoopsDB->prefix('contact').' (
76 76
         contact_id int(10) unsigned NOT NULL auto_increment,
77 77
         contact_uid int(10) NOT NULL,
78 78
         contact_cid int(10) NOT NULL,
@@ -97,36 +97,36 @@  discard block
 block discarded – undo
97 97
 
98 98
     if ($previousVersion < 181) {
99 99
         // Add contact_platform
100
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'";
100
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_platform` ENUM('Android','Ios','Web') NOT NULL DEFAULT 'Web'";
101 101
         $xoopsDB->query($sql);
102 102
         // Add contact_type
103
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'";
103
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_type` ENUM('Contact','Phone','Mail') NOT NULL DEFAULT 'Contact'";
104 104
         $xoopsDB->query($sql);
105 105
         // Add index contact_uid
106
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_uid` ( `contact_uid` )';
106
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_uid` ( `contact_uid` )';
107 107
         $xoopsDB->query($sql);
108 108
         // Add index contact_cid
109
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_cid` ( `contact_cid` )';
109
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_cid` ( `contact_cid` )';
110 110
         $xoopsDB->query($sql);
111 111
         // Add index contact_create
112
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_create` ( `contact_create` )';
112
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_create` ( `contact_create` )';
113 113
         $xoopsDB->query($sql);
114 114
         // Add index contact_mail
115
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_mail` ( `contact_mail` )';
115
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_mail` ( `contact_mail` )';
116 116
         $xoopsDB->query($sql);
117 117
         // Add index contact_phone
118
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_phone` ( `contact_phone` )';
118
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_phone` ( `contact_phone` )';
119 119
         $xoopsDB->query($sql);
120 120
         // Add index contact_platform
121
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_platform` ( `contact_platform` )';
121
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_platform` ( `contact_platform` )';
122 122
         $xoopsDB->query($sql);
123 123
         // Add index contact_type
124
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . '` ADD INDEX `contact_type` ( `contact_type` )';
124
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact').'` ADD INDEX `contact_type` ( `contact_type` )';
125 125
         $xoopsDB->query($sql);
126 126
     }
127 127
 
128 128
     if ($previousVersion < 227) {
129
-        require_once __DIR__ . '/config.php';
129
+        require_once __DIR__.'/config.php';
130 130
         $configurator = new ContactConfigurator();
131 131
         /** @var Contact\Utility $utility */
132 132
         $utility = new Utility();
@@ -134,14 +134,14 @@  discard block
 block discarded – undo
134 134
         //delete old HTML templates
135 135
         if (count($configurator->templateFolders) > 0) {
136 136
             foreach ($configurator->templateFolders as $folder) {
137
-                $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder);
137
+                $templateFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$folder);
138 138
                 if (is_dir($templateFolder)) {
139 139
                     $templateList = array_diff(scandir($templateFolder, SCANDIR_SORT_NONE), ['..', '.']);
140 140
                     foreach ($templateList as $k => $v) {
141
-                        $fileInfo = new \SplFileInfo($templateFolder . $v);
141
+                        $fileInfo = new \SplFileInfo($templateFolder.$v);
142 142
                         if ('html' === $fileInfo->getExtension() && 'index.html' !== $fileInfo->getFilename()) {
143
-                            if (is_file($templateFolder . $v)) {
144
-                                unlink($templateFolder . $v);
143
+                            if (is_file($templateFolder.$v)) {
144
+                                unlink($templateFolder.$v);
145 145
                             }
146 146
                         }
147 147
                     }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         if (count($configurator->oldFiles) > 0) {
154 154
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
155 155
             foreach (array_keys($configurator->oldFiles) as $i) {
156
-                $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
156
+                $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFiles[$i]);
157 157
                 if (is_file($tempFile)) {
158 158
                     unlink($tempFile);
159 159
                 }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         if (count($configurator->oldFolders) > 0) {
166 166
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
167 167
             foreach (array_keys($configurator->oldFolders) as $i) {
168
-                $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
168
+                $tempFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFolders[$i]);
169 169
                 /* @var XoopsObjectHandler $folderHandler */
170 170
                 $folderHandler = XoopsFile::getHandler('folder', $tempFolder);
171 171
                 $folderHandler->delete($tempFolder);
@@ -182,15 +182,15 @@  discard block
 block discarded – undo
182 182
 
183 183
         //  ---  COPY blank.png FILES ---------------
184 184
         if (count($configurator->copyBlankFiles) > 0) {
185
-            $file = dirname(__DIR__) . '/assets/images/blank.png';
185
+            $file = dirname(__DIR__).'/assets/images/blank.png';
186 186
             foreach (array_keys($configurator->copyBlankFiles) as $i) {
187
-                $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
187
+                $dest = $configurator->copyBlankFiles[$i].'/blank.png';
188 188
                 $utility::copyFile($file, $dest);
189 189
             }
190 190
         }
191 191
 
192 192
         //delete .html entries from the tpl table
193
-        $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.html%\'';
193
+        $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n').'\' AND `tpl_file` LIKE \'%.html%\'';
194 194
         $GLOBALS['xoopsDB']->queryF($sql);
195 195
 
196 196
         /** @var \XoopsGroupPermHandler $grouppermHandler */
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
     if ($previousVersion < 227) {
203 203
         // Add contact_skype
204
-        $sql = 'ALTER TABLE `' . $xoopsDB->prefix('contact') . "` ADD `contact_skype` VARCHAR(255) NULL AFTER `contact_icq`";
204
+        $sql = 'ALTER TABLE `'.$xoopsDB->prefix('contact')."` ADD `contact_skype` VARCHAR(255) NULL AFTER `contact_icq`";
205 205
         $xoopsDB->query($sql);
206 206
     }
207 207
 }
Please login to merge, or discard this patch.
include/config.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -17,27 +17,27 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>';
Please login to merge, or discard this patch.
preloads/autoloader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)) {
Please login to merge, or discard this patch.
preloads/core.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.