Passed
Push — master ( 492cc7...e5a5fc )
by Michael
45s queued 11s
created
seo_url.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use XoopsModules\Newbb;
5 5
 
6
-define('REAL_MODULE_NAME', 'modules/newbb');  //this is the Real Module directory
7
-define('SEO_MODULE_NAME', 'modules/newbb');  //this is SEO Name for rewrite Hack
6
+define('REAL_MODULE_NAME', 'modules/newbb'); //this is the Real Module directory
7
+define('SEO_MODULE_NAME', 'modules/newbb'); //this is SEO Name for rewrite Hack
8 8
 
9 9
 //ob_start('seo_urls');
10 10
 
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
     $search = [
21 21
 
22 22
         // Search URLs of modules' directry.
23
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(index.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
24
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(viewpost.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
25
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(rss.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
26
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(viewforum.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
27
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(viewtopic.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
28
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(newtopic.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
29
-        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})' . $XPS_URL . '\/' . $module_name . '\/(.*)([^>\'\"]*)([\'\"]{1})([^>]*)>/i'
23
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(index.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
24
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(viewpost.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
25
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(rss.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
26
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(viewforum.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
27
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(viewtopic.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
28
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(newtopic.php)([^>\'\"]*)([\'\"]{1})([^>]*)>/i',
29
+        '/<(a|meta)([^>]*)(href|url)=([\'\"]{0,1})'.$XPS_URL.'\/'.$module_name.'\/(.*)([^>\'\"]*)([\'\"]{1})([^>]*)>/i'
30 30
     ];
31 31
 
32 32
     $s = preg_replace_callback($search, 'replace_links', $s);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             if (!empty($matches[6])) {
48 48
                 //                replacing cat=x
49 49
                 if (preg_match('/cat=(\d+)/', $matches[6], $mvars)) {
50
-                    $add_to_url = 'c-' . $mvars[1] . '/' . forum_seo_cat($mvars[1]) . '';
50
+                    $add_to_url = 'c-'.$mvars[1].'/'.forum_seo_cat($mvars[1]).'';
51 51
                     $req_string = preg_replace('/cat=\d+/', '', $matches[6]);
52 52
                 } else {
53 53
                     return $matches['0'];
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
             if (!empty($matches[6])) {
61 61
                 //                replacing status=x
62 62
                 if (preg_match('/status=([a-z]+)/', $matches[6], $mvars)) {
63
-                    $add_to_url = 'viewpost.php' . $matches[6];
63
+                    $add_to_url = 'viewpost.php'.$matches[6];
64 64
                     $req_string = preg_replace('/status=([a-z])+/', '', $matches[6]);
65 65
                 } else {
66 66
                     return $matches['0'];
67 67
                 }
68 68
             } else {
69
-                $add_to_url = 'viewpost.php' . $matches[6];
69
+                $add_to_url = 'viewpost.php'.$matches[6];
70 70
             }
71 71
             break;
72 72
         case 'rss.php':
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
                 if (preg_match('/c=(\d+)/', $matches[6], $mvars)) {
78 78
                     $add_to_url = 'rc-';
79 79
                     if ($mvars[1] > 0) {
80
-                        $add_to_url .= $mvars[1] . '/' . forum_seo_cat($mvars[1]) . '';
80
+                        $add_to_url .= $mvars[1].'/'.forum_seo_cat($mvars[1]).'';
81 81
                     } else {
82
-                        $add_to_url .= $mvars[1] . '/rss.html';
82
+                        $add_to_url .= $mvars[1].'/rss.html';
83 83
                     }
84 84
                     $req_string = preg_replace('/c=\d+/', '', $matches[6]);
85 85
                 } elseif (preg_match('/f=(\d+)/', $matches[6], $mvars)) {
86 86
                     $add_to_url = 'rf-';
87 87
                     if ($mvars[1] > 0) {
88
-                        $add_to_url .= $mvars[1] . '/' . forum_seo_forum($mvars[1]) . '';
88
+                        $add_to_url .= $mvars[1].'/'.forum_seo_forum($mvars[1]).'';
89 89
                     } else {
90
-                        $add_to_url .= $mvars[1] . '/rss.html';
90
+                        $add_to_url .= $mvars[1].'/rss.html';
91 91
                     }
92 92
                     $req_string = preg_replace('/f=\d+/', '', $matches[6]);
93 93
                 } else {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if (!empty($matches[6])) {
103 103
                 //                replacing forum=x
104 104
                 if (preg_match('/forum=(\d+)/', $matches[6], $mvars)) {
105
-                    $add_to_url = 'f-' . $mvars[1] . '/' . forum_seo_forum($mvars[1]) . '';
105
+                    $add_to_url = 'f-'.$mvars[1].'/'.forum_seo_forum($mvars[1]).'';
106 106
                     $req_string = preg_replace('/forum=\d+/', '', $matches[6]);
107 107
                 } else {
108 108
                     return $matches['0'];
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
             if (!empty($matches[6])) {
116 116
                 //                replacing topic_id=x
117 117
                 if (preg_match('/topic_id=(\d+)/', $matches[6], $mvars)) {
118
-                    $add_to_url = 't-' . $mvars[1] . '/' . forum_seo_topic($mvars[1]) . '';
118
+                    $add_to_url = 't-'.$mvars[1].'/'.forum_seo_topic($mvars[1]).'';
119 119
                     $req_string = preg_replace('/topic_id=\d+/', '', $matches[6]);
120 120
                 } //replacing post_id=x
121 121
                 elseif (preg_match('/post_id=(\d+)/', $matches[6], $mvars)) {
122
-                    $add_to_url = 'p-' . $mvars[1] . '/' . forum_seo_post($mvars[1]) . '';
122
+                    $add_to_url = 'p-'.$mvars[1].'/'.forum_seo_post($mvars[1]).'';
123 123
                     $req_string = preg_replace('/post_id=\d+/', '', $matches[6]);
124 124
                 } else {
125 125
                     return $matches['0'];
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
             if (!empty($matches[6])) {
133 133
                 //                replacing topic_id=x
134 134
                 if (preg_match('/topic_id=(\d+)/', $matches[6], $mvars)) {
135
-                    $add_to_url = 'pr-' . $mvars[1] . '/' . forum_seo_topic($mvars[1]) . '';
135
+                    $add_to_url = 'pr-'.$mvars[1].'/'.forum_seo_topic($mvars[1]).'';
136 136
                     $req_string = preg_replace('/topic_id=\d+/', '', $matches[6]);
137 137
                 } //replacing post_id=x
138 138
                 elseif (preg_match('/post_id=(\d+)/', $matches[6], $mvars)) {
139
-                    $add_to_url = 'pr-' . $mvars[1] . '/' . forum_seo_post($mvars[1]) . '';
139
+                    $add_to_url = 'pr-'.$mvars[1].'/'.forum_seo_post($mvars[1]).'';
140 140
                     $req_string = preg_replace('/post_id=\d+/', '', $matches[6]);
141 141
                 } else {
142 142
                     return $matches['0'];
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
             if (!empty($matches[6])) {
150 150
                 //                replacing topic_id=x
151 151
                 if (preg_match('/topic_id=(\d+)/', $matches[6], $mvars)) {
152
-                    $add_to_url = 'pdf-' . $mvars[1] . '/' . forum_seo_topic($mvars[1]) . '';
152
+                    $add_to_url = 'pdf-'.$mvars[1].'/'.forum_seo_topic($mvars[1]).'';
153 153
                     $req_string = preg_replace('/topic_id=\d+/', '', $matches[6]);
154 154
                 } //replacing post_id=x
155 155
                 elseif (preg_match('/post_id=(\d+)/', $matches[6], $mvars)) {
156
-                    $add_to_url = 'pdf-' . $mvars[1] . '/' . forum_seo_post($mvars[1]) . '';
156
+                    $add_to_url = 'pdf-'.$mvars[1].'/'.forum_seo_post($mvars[1]).'';
157 157
                     $req_string = preg_replace('/post_id=\d+/', '', $matches[6]);
158 158
                 } else {
159 159
                     return $matches['0'];
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     if ('?' === $req_string) {
170 170
         $req_string = '';
171 171
     }
172
-    $ret = '<' . $matches[1] . $matches[2] . $matches[3] . '=' . $matches[4] . XOOPS_URL . '/' . SEO_MODULE_NAME . '/' . $add_to_url . $req_string . $matches[7] . $matches[8] . '>';
172
+    $ret = '<'.$matches[1].$matches[2].$matches[3].'='.$matches[4].XOOPS_URL.'/'.SEO_MODULE_NAME.'/'.$add_to_url.$req_string.$matches[7].$matches[8].'>';
173 173
 
174 174
     //$ret = '<'.$matches[1].$matches[2].$matches[3].'='.$matches[4].XOOPS_URL.'/'.REAL_MODULE_NAME.'/'.$add_to_url.$req_string.$matches[7].$matches[8].'>';
175 175
     return $ret;
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             return $ret;
191 191
         }
192 192
     }
193
-    $query  = 'SELECT cat_id, cat_title FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_categories');
193
+    $query  = 'SELECT cat_id, cat_title FROM '.$GLOBALS['xoopsDB']->prefix('newbb_categories');
194 194
     $result = $GLOBALS['xoopsDB']->query($query);
195 195
     $_ret   = [];
196 196
     while (false !== ($res = $GLOBALS['xoopsDB']->fetchArray($result))) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             return $ret;
219 219
         }
220 220
     }
221
-    $query  = 'SELECT forum_id, forum_name    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_forums');
221
+    $query  = 'SELECT forum_id, forum_name    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_forums');
222 222
     $result = $GLOBALS['xoopsDB']->query($query);
223 223
     $_ret   = [];
224 224
     while (false !== ($res = $GLOBALS['xoopsDB']->fetchArray($result))) {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
  */
238 238
 function forum_seo_topic($_cat_id)
239 239
 {
240
-    $query  = 'SELECT    topic_title    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_topics') . ' WHERE topic_id = ' . $_cat_id;
240
+    $query  = 'SELECT    topic_title    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_topics').' WHERE topic_id = '.$_cat_id;
241 241
     $result = $GLOBALS['xoopsDB']->query($query);
242 242
     $res    = $GLOBALS['xoopsDB']->fetchArray($result);
243 243
     $ret    = forum_seo_title($res['topic_title']);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
  */
259 259
 function forum_seo_post($_cat_id)
260 260
 {
261
-    $query  = 'SELECT    subject    FROM ' . $GLOBALS['xoopsDB']->prefix('newbb_posts') . ' WHERE post_id = ' . $_cat_id;
261
+    $query  = 'SELECT    subject    FROM '.$GLOBALS['xoopsDB']->prefix('newbb_posts').' WHERE post_id = '.$_cat_id;
262 262
     $result = $GLOBALS['xoopsDB']->query($query);
263 263
     $res    = $GLOBALS['xoopsDB']->fetchArray($result);
264 264
     $ret    = forum_seo_title($res['subject']);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         '',
350 350
         ''
351 351
     ];
352
-    $title   = preg_replace($pattern, $rep_pat, $title);
352
+    $title = preg_replace($pattern, $rep_pat, $title);
353 353
 
354 354
     // Transformation des caractères accentués
355 355
     //                  è         é        ê         ë         ç         à         â         ä        î         ï        ù         ü         û         ô        ö
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         'ae',
406 406
         'ss'
407 407
     ];
408
-    $title   = preg_replace($pattern, $rep_pat, $title);
408
+    $title = preg_replace($pattern, $rep_pat, $title);
409 409
 
410 410
     /*$string = str_replace(' ', '-', $title);
411 411
     $string = iconv('utf-8', 'ascii//translit', $string);
Please login to merge, or discard this patch.
include/search.inc.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
     $criteriaPost = new \CriteriaCompo();
56 56
     $criteriaPost->add(new \Criteria('p.approved', 1), 'AND'); // only active posts
57 57
 
58
-    $forum_list = [];// get forum lists just for forum names
58
+    $forum_list = []; // get forum lists just for forum names
59 59
     if (count($validForums) > 0) {
60 60
         $criteriaPermissions = new \CriteriaCompo();
61
-        $criteriaPermissions->add(new \Criteria('p.forum_id', '(' . implode(',', $validForums) . ')', 'IN'), 'AND');
62
-        $forum_list = $forumHandler->getAll(new \Criteria('forum_id', '(' . implode(', ', $validForums) . ')', 'IN'), 'forum_name', false);
61
+        $criteriaPermissions->add(new \Criteria('p.forum_id', '('.implode(',', $validForums).')', 'IN'), 'AND');
62
+        $forum_list = $forumHandler->getAll(new \Criteria('forum_id', '('.implode(', ', $validForums).')', 'IN'), 'forum_name', false);
63 63
     }
64 64
 
65 65
     if (is_numeric($userid) && 0 !== $userid) {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     } elseif (is_array($userid) && count($userid) > 0) {
69 69
         $userid       = array_map('intval', $userid);
70 70
         $criteriaUser = new \CriteriaCompo();
71
-        $criteriaUser->add(new \Criteria('p.uid', '(' . implode(',', $userid) . ')', 'IN'), 'OR');
71
+        $criteriaUser->add(new \Criteria('p.uid', '('.implode(',', $userid).')', 'IN'), 'OR');
72 72
     }
73 73
 
74 74
     $count = 0;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $criteriaKeywords = new \CriteriaCompo();
81 81
         foreach ($queryarray as $queryTerm) {
82 82
             $termCriteria  = new \CriteriaCompo();
83
-            $queryTermLike = '%' . $xoopsDB->escape($queryTerm) . '%';
83
+            $queryTermLike = '%'.$xoopsDB->escape($queryTerm).'%';
84 84
             if ('title' === $searchin || 'both' === $searchin) {
85 85
                 $termCriteria->add(new \Criteria('p.subject', $queryTermLike, 'LIKE'), 'OR');
86 86
             }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $criteriaKeywords->add($termCriteria, $andor);
91 91
         }
92 92
         // add highlight keywords to post links
93
-        $highlightKey = '&amp;keywords=' . implode(' ', $queryarray);
93
+        $highlightKey = '&amp;keywords='.implode(' ', $queryarray);
94 94
         $highlightKey = str_replace(' ', '+', $highlightKey);
95 95
     }
96 96
     $criteria = new \CriteriaCompo();
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
         $post                  = $posts[$id];
132 132
         $post_data             = $post->getPostBody();
133 133
         $ret[$i]['topic_id']   = $post->getVar('topic_id');
134
-        $ret[$i]['link']       = XOOPS_URL . '/modules/newbb/viewtopic.php?post_id=' . $post->getVar('post_id') . $highlightKey; // add highlight key
134
+        $ret[$i]['link']       = XOOPS_URL.'/modules/newbb/viewtopic.php?post_id='.$post->getVar('post_id').$highlightKey; // add highlight key
135 135
         $ret[$i]['title']      = $post_data['subject'];
136 136
         $ret[$i]['time']       = $post_data['date'];
137 137
         $ret[$i]['forum_name'] = $myts->htmlSpecialChars($forum_list[$post->getVar('forum_id')]['forum_name']);
138
-        $ret[$i]['forum_link'] = XOOPS_URL . '/modules/newbb/viewforum.php?forum=' . $post->getVar('forum_id');
138
+        $ret[$i]['forum_link'] = XOOPS_URL.'/modules/newbb/viewforum.php?forum='.$post->getVar('forum_id');
139 139
         $ret[$i]['post_text']  = $post_data['text'];
140 140
         $ret[$i]['uid']        = $post->getVar('uid');
141
-        $ret[$i]['poster']     = $post->getVar('uid') ? '<a href="' . XOOPS_URL . '/userinfo.php?uid=' . $ret[$i]['uid'] . '">' . $post_data['author'] . '</a>' : $post_data['author'];
141
+        $ret[$i]['poster']     = $post->getVar('uid') ? '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$ret[$i]['uid'].'">'.$post_data['author'].'</a>' : $post_data['author'];
142 142
         ++$i;
143 143
     }
144 144
 
Please login to merge, or discard this patch.
include/plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 // MENU handler
75 75
 /* You could remove anyone by commenting out in order to disable it */
76 76
 $customConfig['valid_menumodes'] = [
77
-    0 => _MD_NEWBB_MENU_SELECT,    // for selectbox
77
+    0 => _MD_NEWBB_MENU_SELECT, // for selectbox
78 78
     //1 => _MD_NEWBB_MENU_CLICK,    // for "click to expand"
79 79
     //2 => _MD_NEWBB_MENU_HOVER        // for "mouse hover to expand"
80 80
 ];
Please login to merge, or discard this patch.
include/plugin.dist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
 // MENU handler
73 73
 /* You could remove anyone by commenting out in order to disable it */
74 74
 $valid_menumodes = [
75
-    0 => _MD_NEWBB_MENU_SELECT,    // for selectbox
76
-    1 => _MD_NEWBB_MENU_CLICK,    // for 'click to expand'
75
+    0 => _MD_NEWBB_MENU_SELECT, // for selectbox
76
+    1 => _MD_NEWBB_MENU_CLICK, // for 'click to expand'
77 77
     2 => _MD_NEWBB_MENU_HOVER        // for 'mouse hover to expand'
78 78
 ];
79 79
 
Please login to merge, or discard this patch.
include/images.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 $forumImage['facebook'] = $forumImage['twitter'] = $forumImage['linkedin'] = $forumImage['googleplus'] = $forumImage['stumbleupon'] = $forumImage['friendfeed'] = $forumImage['digg'] = $forumImage['reddit'] = $forumImage['delicious'] = $forumImage['technorati'] = $forumImage['wong'] = $forumImage['anonym'] = $forumImage['more'] = $forumImage['less'] = 'icon';
49 49
 
50 50
 for ($i = 1; $i <= 5; ++$i) {
51
-    $forumImage['rate' . $i] = 'icon';
51
+    $forumImage['rate'.$i] = 'icon';
52 52
 }
53 53
 
54 54
 $forumImage['p_delete'] = $forumImage['p_reply'] = $forumImage['p_quote'] = $forumImage['p_edit'] = $forumImage['p_report'] =
Please login to merge, or discard this patch.
admin/admin_footer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
 global $pathIcon32;
21 21
 if (!class_exists('\Xoops', false)) {
22
-    echo "<div class='adminfooter'>\n" . "  <div style='text-align: center;'>\n" . "    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . "  </div>\n" . '  ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . "</div>\n";
22
+    echo "<div class='adminfooter'>\n"."  <div style='text-align: center;'>\n"."    <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"."  </div>\n".'  '._AM_MODULEADMIN_ADMIN_FOOTER."\n"."</div>\n";
23 23
 }
24 24
 
25 25
 xoops_cp_footer();
Please login to merge, or discard this patch.
include/form.forum.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 require_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
29 29
 
30 30
 // The forum instanciation
31
-$form_forum = new \XoopsThemeForm(_AM_NEWBB_EDITTHISFORUM . ' ' . $forumObject->getVar('forum_name'), 'form_forum', xoops_getenv('PHP_SELF'));
31
+$form_forum = new \XoopsThemeForm(_AM_NEWBB_EDITTHISFORUM.' '.$forumObject->getVar('forum_name'), 'form_forum', xoops_getenv('PHP_SELF'));
32 32
 
33 33
 // Forum name
34 34
 $form_forum->addElement(new \XoopsFormText(_AM_NEWBB_FORUMNAME, 'forum_name', 50, 80, $forumObject->getVar('forum_name', 'E')), true);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $perm_checkbox = new \XoopsFormCheckBox('', 'perm_template', $forumObject->isNew());
66 66
 $perm_checkbox->addOption(1, _AM_NEWBB_PERM_TEMPLATEAPP);
67 67
 $perm_tray->addElement($perm_checkbox);
68
-$perm_tray->addElement(new \XoopsFormLabel('', '<a href="admin_permissions.php?action=template" rel="external" title="">' . _AM_NEWBB_PERM_TEMPLATE . '</a>'));
68
+$perm_tray->addElement(new \XoopsFormLabel('', '<a href="admin_permissions.php?action=template" rel="external" title="">'._AM_NEWBB_PERM_TEMPLATE.'</a>'));
69 69
 $form_forum->addElement($perm_tray);
70 70
 
71 71
 $form_forum->addElement(new \XoopsFormHidden('forum', $forumObject->getVar('forum_id')));
Please login to merge, or discard this patch.
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/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.