Passed
Push — master ( 4990f6...882d2a )
by Michael
03:01
created
include/vars.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
13 13
 require_once $GLOBALS['xoops']->path('modules/newbb/include/functions.ini.php');
14
-require_once __DIR__ . '/functions.session.php';
14
+require_once __DIR__.'/functions.session.php';
15 15
 
16 16
 // NewBB cookie structure
17 17
 /* NewBB cookie storage
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 $forumCookie['path']   = '/';
34 34
 $forumCookie['secure'] = false;
35 35
 $forumCookie['expire'] = time() + 3600 * 24 * 30; // one month
36
-$forumCookie['prefix'] = 'newbb_' . (is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : '0IP' . \Xmf\IPAddress::fromRequest()->asReadable()); // irmtfan IP for anons - use $GLOBALS["xoopsUser"]
36
+$forumCookie['prefix'] = 'newbb_'.(is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getVar('uid') : '0IP'.\Xmf\IPAddress::fromRequest()->asReadable()); // irmtfan IP for anons - use $GLOBALS["xoopsUser"]
37 37
 
38 38
 // set LastVisitTemp cookie, which only gets the time from the LastVisit cookie if it does not exist yet
39 39
 // otherwise, it gets the time from the LastVisitTemp cookie
Please login to merge, or discard this patch.
include/config.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
  */
21 21
 
22 22
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
23
-require_once __DIR__ . '/common.php';
23
+require_once __DIR__.'/common.php';
24 24
 
25 25
 $moduleDirName = basename(dirname(__DIR__));
26 26
 $uploadFolders = [
27 27
     NEWBB_UPLOAD_PATH,
28
-    NEWBB_UPLOAD_PATH . '/thumbs'
28
+    NEWBB_UPLOAD_PATH.'/thumbs'
29 29
 ];
30 30
 
31 31
 function getConfig()
@@ -33,24 +33,24 @@  discard block
 block discarded – undo
33 33
     $moduleDirName      = basename(dirname(__DIR__));
34 34
     $moduleDirNameUpper = strtoupper($moduleDirName);
35 35
     return (object)[
36
-        'name'           => strtoupper($moduleDirName) . ' Module Configurator',
36
+        'name'           => strtoupper($moduleDirName).' Module Configurator',
37 37
         'paths'          => [
38 38
             'dirname'    => $moduleDirName,
39
-            'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
40
-            'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
41
-            'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
42
-            'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
43
-            'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
39
+            'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
40
+            'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
41
+            'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
42
+            'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
43
+            'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
44 44
         ],
45 45
         'uploadFolders'  => [
46
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
47
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs',
46
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
47
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs',
48 48
 
49 49
             //XOOPS_UPLOAD_PATH . '/flags'
50 50
         ],
51 51
         'copyBlankFiles' => [
52
-            constant($moduleDirNameUpper . '_UPLOAD_PATH'),
53
-            constant($moduleDirNameUpper . '_UPLOAD_PATH') . '/thumbs',
52
+            constant($moduleDirNameUpper.'_UPLOAD_PATH'),
53
+            constant($moduleDirNameUpper.'_UPLOAD_PATH').'/thumbs',
54 54
             //XOOPS_UPLOAD_PATH . '/flags'
55 55
         ],
56 56
 
@@ -85,6 +85,6 @@  discard block
 block discarded – undo
85 85
             '/images',
86 86
         ],
87 87
         'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
88
-                     <img src='" . constant($moduleDirNameUpper . '_AUTHOR_LOGOIMG') . '\' alt=\'XOOPS Project\' /></a>',
88
+                     <img src='" . constant($moduleDirNameUpper.'_AUTHOR_LOGOIMG').'\' alt=\'XOOPS Project\' /></a>',
89 89
     ];
90 90
 }
Please login to merge, or discard this patch.
include/functions.stats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
15 15
 
16
-defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php';
16
+defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php';
17 17
 define('NEWBB_FUNCTIONS_STATS_LOADED', true);
18 18
 
19 19
 if (!defined('NEWBB_FUNCTIONS_STATS')) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     function getTotalViews()
104 104
     {
105
-        $sql = 'SELECT sum(topic_views) FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' ';
105
+        $sql = 'SELECT sum(topic_views) FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' ';
106 106
         if (!$result = $GLOBALS['xoopsDB']->query($sql)) {
107 107
             return null;
108 108
         }
Please login to merge, or discard this patch.
include/functions.language.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
13 13
 
14
-defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php';
14
+defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php';
15 15
 define('NEWBB_FUNCTIONS_LANGUAGE_LOADED', true);
16 16
 
17 17
 if (!defined('NEWBB_FUNCTIONS_LANGUAGE')) {
Please login to merge, or discard this patch.
include/functions.time.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
13 13
 
14
-defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php';
14
+defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php';
15 15
 define('NEWBB_FUNCTIONS_TIME_LOADED', true);
16 16
 
17 17
 if (!defined('NEWBB_FUNCTIONS_TIME')) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         // irmtfan no option when no selected value
77 77
         $forum_selection_since .= '<option value="">--------</option>';
78 78
         foreach ($select_array as $since) {
79
-            $forum_selection_since .= '<option value="' . $since . '"' . (($selected == $since) ? ' selected="selected"' : '') . '>';
79
+            $forum_selection_since .= '<option value="'.$since.'"'.(($selected == $since) ? ' selected="selected"' : '').'>';
80 80
             // START irmtfan functional since 0 and 365
81 81
             switch ($since) {
82 82
                 case 0:
Please login to merge, or discard this patch.
include/functions.ini.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,5 +38,5 @@
 block discarded – undo
38 38
 /**
39 39
  * @return array
40 40
  */
41
-require_once __DIR__ . '/functions.config.php';
42
-require_once __DIR__ . '/functions.session.php';
41
+require_once __DIR__.'/functions.config.php';
42
+require_once __DIR__.'/functions.session.php';
Please login to merge, or discard this patch.
include/functions.welcome.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
15 15
 
16
-defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__ . '/functions.ini.php';
16
+defined('NEWBB_FUNCTIONS_INI') || require_once __DIR__.'/functions.ini.php';
17 17
 define('NEWBB_FUNCTIONS_WELCOME_LOADED', true);
18 18
 
19 19
 if (!defined('NEWBB_FUNCTIONS_WELCOME')) {
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return false;
41 41
         }
42 42
 
43
-        include __DIR__ . '/functions.welcome.inc.php';
43
+        include __DIR__.'/functions.welcome.inc.php';
44 44
         unset($forumObject);
45 45
 
46 46
         return $ret;
Please login to merge, or discard this patch.
edit.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 use Xmf\Request;
13 13
 use XoopsModules\Newbb;
14 14
 
15
-require_once __DIR__ . '/header.php';
15
+require_once __DIR__.'/header.php';
16 16
 
17 17
 foreach (['forum', 'topic_id', 'post_id', 'order'] as $getint) {
18 18
     ${$getint} = Request::getInt($getint, 0, 'GET');
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     $query_array = [];
65 65
     foreach ($query_vars as $var) {
66 66
         if (Request::getString($var, '', 'GET')) {
67
-            $query_array[$var] = "{$var}=" . Request::getString($var, '', 'GET');
67
+            $query_array[$var] = "{$var}=".Request::getString($var, '', 'GET');
68 68
         }
69 69
     }
70 70
     $page_query = htmlspecialchars(implode('&', array_values($query_array)));
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 $post_karma    = $postObject->getVar('post_karma');
116 116
 $require_reply = $postObject->getVar('require_reply');
117 117
 
118
-$xoopsTpl->assign('error_message', _MD_NEWBB_EDITEDBY . ' ' . $GLOBALS['xoopsUser']->uname());
119
-include __DIR__ . '/include/form.post.php';
118
+$xoopsTpl->assign('error_message', _MD_NEWBB_EDITEDBY.' '.$GLOBALS['xoopsUser']->uname());
119
+include __DIR__.'/include/form.post.php';
120 120
 
121 121
 ///** @var Newbb\KarmaHandler $karmaHandler */
122 122
 //$karmaHandler = Newbb\Helper::getInstance()->getHandler('Karma');
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 $posts_contextObject = $istopic ? [] : [$postHandler->get($postObject->getVar('pid'))];
127 127
 foreach ($posts_contextObject as $post_contextObject) {
128 128
     if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $post_contextObject->getVar('post_karma') > 0) {
129
-        $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')) . '</div>';
129
+        $p_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $post_contextObject->getVar('post_karma')).'</div>';
130 130
     } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $post_contextObject->getVar('require_reply')) {
131 131
         $p_message = _MD_NEWBB_REPLY_REQUIREMENT;
132 132
     } else {
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
 
145 145
     $posts_context[] = [
146 146
         'subject' => $p_subject,
147
-        'meta'    => _MD_NEWBB_BY . ' ' . $p_name . ' ' . _MD_NEWBB_ON . ' ' . $p_date,
147
+        'meta'    => _MD_NEWBB_BY.' '.$p_name.' '._MD_NEWBB_ON.' '.$p_date,
148 148
         'content' => $p_message
149 149
     ];
150 150
 }
151 151
 $xoopsTpl->assign_by_ref('posts_context', $posts_context);
152 152
 // irmtfan move to footer.php
153
-require_once __DIR__ . '/footer.php';
153
+require_once __DIR__.'/footer.php';
154 154
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.
report.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 use Xmf\Request;
33 33
 
34
-require_once __DIR__ . '/header.php';
34
+require_once __DIR__.'/header.php';
35 35
 
36 36
 $GPC = '_GET';
37 37
 if (Request::getString('submit', '', 'POST')) {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 $viewmode = (isset(${$GPC}['viewmode']) && 'flat' !== ${$GPC}['viewmode']) ? 'thread' : 'flat';
45 45
 
46 46
 if (empty($post_id)) {
47
-    redirect_header(XOOPS_URL . '/index.php', 2, _MD_NEWBB_ERRORPOST);
47
+    redirect_header(XOOPS_URL.'/index.php', 2, _MD_NEWBB_ERRORPOST);
48 48
 }
49 49
 
50 50
 if ($GLOBALS['xoopsModuleConfig']['wol_enabled']) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 $submit_button = new \XoopsFormButton('', 'submit', _SUBMIT, 'submit');
140 140
 $cancel_button = new \XoopsFormButton('', 'cancel', _MD_NEWBB_CANCELPOST, 'button');
141 141
 $extra         = "viewtopic.php?forum=$forum&amp;topic_id=$topic_id&amp;post_id=$post_id&amp;order=$order&amp;viewmode=$viewmode";
142
-$cancel_button->setExtra("onclick='location=\"" . $extra . "\"'");
142
+$cancel_button->setExtra("onclick='location=\"".$extra."\"'");
143 143
 $button_tray->addElement($submit_button);
144 144
 $button_tray->addElement($cancel_button);
145 145
 $report_form->addElement($button_tray);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
 $r_subject = $postObject->getVar('subject', 'E');
149 149
 if ($GLOBALS['xoopsModuleConfig']['enable_karma'] && $postObject->getVar('post_karma') > 0) {
150
-    $r_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $postObject->getVar('post_karma')) . '</div>';
150
+    $r_message = sprintf(_MD_NEWBB_KARMA_REQUIREMENT, '***', $postObject->getVar('post_karma')).'</div>';
151 151
 } elseif ($GLOBALS['xoopsModuleConfig']['allow_require_reply'] && $postObject->getVar('require_reply')) {
152 152
     $r_message = _MD_NEWBB_REPLY_REQUIREMENT;
153 153
 } else {
@@ -161,11 +161,11 @@  discard block
 block discarded – undo
161 161
     $poster_name = $postObject->getVar('poster_name');
162 162
     $r_name      = empty($poster_name) ? $GLOBALS['xoopsConfig']['anonymous'] : $myts->htmlSpecialChars($poster_name);
163 163
 }
164
-$r_content = _MD_NEWBB_SUBJECTC . ' ' . $r_subject . '<br>';
165
-$r_content .= _MD_NEWBB_BY . ' ' . $r_name . ' ' . _MD_NEWBB_ON . ' ' . $r_date . '<br><br>';
164
+$r_content = _MD_NEWBB_SUBJECTC.' '.$r_subject.'<br>';
165
+$r_content .= _MD_NEWBB_BY.' '.$r_name.' '._MD_NEWBB_ON.' '.$r_date.'<br><br>';
166 166
 $r_content .= $r_message;
167 167
 
168
-echo "<br><table cellpadding='4' cellspacing='1' width='98%' class='outer'><tr><td class='head'>" . $r_subject . '</td></tr>';
169
-echo '<tr><td><br>' . $r_content . '<br></td></tr></table>';
168
+echo "<br><table cellpadding='4' cellspacing='1' width='98%' class='outer'><tr><td class='head'>".$r_subject.'</td></tr>';
169
+echo '<tr><td><br>'.$r_content.'<br></td></tr></table>';
170 170
 
171 171
 include $GLOBALS['xoops']->path('footer.php');
Please login to merge, or discard this patch.