Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/include/notification_functions.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     if (!isset($module_id)) {
75 75
         global $xoopsModule;
76 76
         $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
77
-        $module    =& $xoopsModule;
77
+        $module    = & $xoopsModule;
78 78
     } else {
79 79
         /* @var $module_handler XoopsModuleHandler */
80 80
         $module_handler = xoops_getHandler('module');
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
 function &notificationCommentCategoryInfo($module_id = null)
111 111
 {
112 112
     $ret            = false;
113
-    $all_categories =& notificationCategoryInfo('', $module_id);
113
+    $all_categories = & notificationCategoryInfo('', $module_id);
114 114
     if (empty($all_categories)) {
115 115
         return $ret;
116 116
     }
117 117
     foreach ($all_categories as $category) {
118
-        $all_events =& notificationEvents($category['name'], false, $module_id);
118
+        $all_events = & notificationEvents($category['name'], false, $module_id);
119 119
         if (empty($all_events)) {
120 120
             continue;
121 121
         }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     if (!isset($module_id)) {
146 146
         global $xoopsModule;
147 147
         $module_id = !empty($xoopsModule) ? $xoopsModule->getVar('mid') : 0;
148
-        $module    =& $xoopsModule;
148
+        $module    = & $xoopsModule;
149 149
     } else {
150 150
         /* @var $module_handler XoopsModuleHandler */
151 151
         $module_handler = xoops_getHandler('module');
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     $config_handler = xoops_getHandler('config');
157 157
     $mod_config     = $config_handler->getConfigsByCat(0, $module_id);
158 158
 
159
-    $category =& notificationCategoryInfo($category_name, $module_id);
159
+    $category = & notificationCategoryInfo($category_name, $module_id);
160 160
 
161 161
     global $xoopsConfig;
162 162
     $event_array = array();
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 
168 168
     foreach ($not_config['event'] as $event) {
169 169
         if ($event['category'] == $category_name) {
170
-            if (!is_dir($dir = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/language/' . $xoopsConfig['language'] . '/mail_template/')) {
171
-                $dir = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/language/english/mail_template/';
170
+            if (!is_dir($dir = XOOPS_ROOT_PATH.'/modules/'.$module->getVar('dirname').'/language/'.$xoopsConfig['language'].'/mail_template/')) {
171
+                $dir = XOOPS_ROOT_PATH.'/modules/'.$module->getVar('dirname').'/language/english/mail_template/';
172 172
             }
173 173
             $event['mail_template_dir'] = $dir;
174 174
             if (!$enabled_only || notificationEventEnabled($category, $event, $module)) {
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
     if ($module->getVar('hascomments')) {
193 193
         $com_config = $module->getInfo('comments');
194 194
         if (!empty($category['item_name']) && $category['item_name'] == $com_config['itemName']) {
195
-            if (!is_dir($dir = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/mail_template/')) {
196
-                $dir = XOOPS_ROOT_PATH . '/language/english/mail_template/';
195
+            if (!is_dir($dir = XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/mail_template/')) {
196
+                $dir = XOOPS_ROOT_PATH.'/language/english/mail_template/';
197 197
             }
198 198
             $mail_template_dir = $dir;
199 199
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
  */
320 320
 function &notificationEventInfo($category_name, $event_name, $module_id = null)
321 321
 {
322
-    $all_events =& notificationEvents($category_name, false, $module_id);
322
+    $all_events = & notificationEvents($category_name, false, $module_id);
323 323
     foreach ($all_events as $event) {
324 324
         if ($event['name'] == $event_name) {
325 325
             return $event;
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
 function &notificationSubscribableCategoryInfo($module_id = null)
342 342
 {
343
-    $all_categories =& notificationCategoryInfo('', $module_id);
343
+    $all_categories = & notificationCategoryInfo('', $module_id);
344 344
 
345 345
     // FIXME: better or more standardized way to do this?
346 346
     $script_url  = explode('/', $_SERVER['PHP_SELF']);
@@ -403,10 +403,10 @@  discard block
 block discarded – undo
403 403
     switch ($type) {
404 404
         case 'option_value':
405 405
         case 'name':
406
-            return 'notify:' . $category['name'] . '-' . $event['name'];
406
+            return 'notify:'.$category['name'].'-'.$event['name'];
407 407
             break;
408 408
         case 'option_name':
409
-            return $category['name'] . '-' . $event['name'];
409
+            return $category['name'].'-'.$event['name'];
410 410
             break;
411 411
         default:
412 412
             return false;
Please login to merge, or discard this patch.
htdocs/include/checklogin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 $redirect = XoopsRequest::getUrl('xoops_redirect', '', 'POST');
27 27
 
28 28
 if ($uname == '' || $pass == '') {
29
-    redirect_header(XOOPS_URL . '/user.php', 1, _US_INCORRECTLOGIN);
29
+    redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN);
30 30
 }
31 31
 
32 32
 /* @var $member_handler XoopsMemberHandler */
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
 if (false !== $user) {
44 44
     if (0 == $user->getVar('level')) {
45
-        redirect_header(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM);
45
+        redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
46 46
     }
47 47
     if ($xoopsConfig['closesite'] == 1) {
48 48
         $allowed = false;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             }
54 54
         }
55 55
         if (!$allowed) {
56
-            redirect_header(XOOPS_URL . '/index.php', 1, _NOPERM);
56
+            redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
57 57
         }
58 58
     }
59 59
     $user->setVar('last_login', time());
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $claims = array(
77 77
                 'uid' => $_SESSION['xoopsUserId'],
78 78
             );
79
-            $rememberTime = 60*60*24*30;
79
+            $rememberTime = 60 * 60 * 24 * 30;
80 80
             $token = \Xmf\Jwt\TokenFactory::build('rememberme', $claims, $rememberTime);
81 81
             setcookie(
82 82
                 $GLOBALS['xoopsConfig']['usercookie'],
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     if (!empty($redirect) && !strpos($redirect, 'register')) {
96 96
         $xoops_redirect = rawurldecode($redirect);
97 97
         $parsed         = parse_url(XOOPS_URL);
98
-        $url            = isset($parsed['scheme']) ? $parsed['scheme'] . '://' : 'http://';
98
+        $url            = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://';
99 99
         if (isset($parsed['host'])) {
100 100
             $url .= $parsed['host'];
101 101
             if (isset($parsed['port'])) {
102
-                $url .= ':' . $parsed['port'];
102
+                $url .= ':'.$parsed['port'];
103 103
             }
104 104
         } else {
105 105
             $url .= $_SERVER['HTTP_HOST'];
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         }
112 112
         $url .= $xoops_redirect;
113 113
     } else {
114
-        $url = XOOPS_URL . '/index.php';
114
+        $url = XOOPS_URL.'/index.php';
115 115
     }
116 116
 
117 117
     // RMV-NOTIFY
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 
122 122
     redirect_header($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')), false);
123 123
 } elseif (empty($redirect)) {
124
-    redirect_header(XOOPS_URL . '/user.php', 5, $xoopsAuth->getHtmlErrors());
124
+    redirect_header(XOOPS_URL.'/user.php', 5, $xoopsAuth->getHtmlErrors());
125 125
 } else {
126
-    redirect_header(XOOPS_URL . '/user.php?xoops_redirect=' . urlencode($redirect), 5, $xoopsAuth->getHtmlErrors(), false);
126
+    redirect_header(XOOPS_URL.'/user.php?xoops_redirect='.urlencode($redirect), 5, $xoopsAuth->getHtmlErrors(), false);
127 127
 }
128 128
 exit();
Please login to merge, or discard this patch.
htdocs/include/functions.legacy.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // Backward compatibility for 2.2*
29 29
 function xoops_load_lang_file($name, $module = '', $default = 'english')
30 30
 {
31
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_loadLanguage() instead');
31
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_loadLanguage() instead');
32 32
 
33 33
     return xoops_loadLanguage($name, $module);
34 34
 }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
  */
41 41
 function xoops_refcheck($docheck = 1)
42 42
 {
43
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoopsSecurity::checkReferer instead');
43
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoopsSecurity::checkReferer instead');
44 44
 
45 45
     return $GLOBALS['xoopsSecurity']->checkReferer($docheck);
46 46
 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
  */
53 53
 function xoops_getLinkedUnameFromId($userid)
54 54
 {
55
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use XoopsUserUtility::getUnameFromId() instead');
55
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use XoopsUserUtility::getUnameFromId() instead');
56 56
     xoops_load('XoopsUserUtility');
57 57
 
58 58
     return XoopsUserUtility::getUnameFromId($userid, false, true);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  */
64 64
 function showbanner()
65 65
 {
66
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getbanner instead');
66
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_getbanner instead');
67 67
     echo xoops_getbanner();
68 68
 }
69 69
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
  */
73 73
 function getTheme()
74 74
 {
75
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . "() is deprecated, use \$xoopsConfig['theme_set'] directly");
75
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__."() is deprecated, use \$xoopsConfig['theme_set'] directly");
76 76
 
77 77
     return $GLOBALS['xoopsConfig']['theme_set'];
78 78
 }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
  */
89 89
 function getcss($theme = '')
90 90
 {
91
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getcss instead');
91
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_getcss instead');
92 92
 
93 93
     return xoops_getcss($theme);
94 94
 }
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
  */
99 99
 function &getMailer()
100 100
 {
101
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated, use xoops_getMailer instead');
102
-    $mailer =& xoops_getMailer();
101
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated, use xoops_getMailer instead');
102
+    $mailer = & xoops_getMailer();
103 103
 
104 104
     return $mailer;
105 105
 }
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
  */
110 110
 function OpenWaitBox()
111 111
 {
112
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated');
112
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated');
113 113
     echo "<div id='waitDiv' style='position:absolute;left:40%;top:50%;visibility:hidden;text-align: center;'>
114 114
     <table cellpadding='6' border='2' class='bg2'>
115 115
       <tr>
116
-        <td align='center'><strong><big>" . _FETCHING . "</big></strong><br><img src='" . XOOPS_URL . "/images/await.gif' alt='' /><br>" . _PLEASEWAIT . "</td>
116
+        <td align='center'><strong><big>" . _FETCHING."</big></strong><br><img src='".XOOPS_URL."/images/await.gif' alt='' /><br>"._PLEASEWAIT."</td>
117 117
       </tr>
118 118
     </table>
119 119
     </div>
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 function CloseWaitBox()
156 156
 {
157
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . '() is deprecated');
157
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.'() is deprecated');
158 158
     echo "<script type='text/javascript'>
159 159
     <!--//
160 160
     ap_showWaitMessage('waitDiv', 0);
Please login to merge, or discard this patch.
htdocs/include/comment_view.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         }
59 59
         if ($com_order != XOOPS_COMMENT_OLD1ST) {
60 60
             $xoopsTpl->assign(array(
61
-                                  'comment_order' => XOOPS_COMMENT_NEW1ST,
62
-                                  'order_other'   => XOOPS_COMMENT_OLD1ST));
61
+                                    'comment_order' => XOOPS_COMMENT_NEW1ST,
62
+                                    'order_other'   => XOOPS_COMMENT_OLD1ST));
63 63
             $com_dborder = 'DESC';
64 64
         } else {
65 65
             $xoopsTpl->assign(array(
66
-                                  'comment_order' => XOOPS_COMMENT_OLD1ST,
67
-                                  'order_other'   => XOOPS_COMMENT_NEW1ST));
66
+                                    'comment_order' => XOOPS_COMMENT_OLD1ST,
67
+                                    'order_other'   => XOOPS_COMMENT_NEW1ST));
68 68
             $com_dborder = 'ASC';
69 69
         }
70 70
         // admins can view all comments and IPs, others can only view approved(active) comments
@@ -289,24 +289,24 @@  discard block
 block discarded – undo
289 289
         // End add by voltan
290 290
 
291 291
         $xoopsTpl->assign(array(
292
-                              'commentsnav'        => $navbar,
293
-                              'editcomment_link'   => 'comment_edit.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra,
294
-                              'deletecomment_link' => 'comment_delete.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra,
295
-                              'replycomment_link'  => 'comment_reply.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra));
292
+                                'commentsnav'        => $navbar,
293
+                                'editcomment_link'   => 'comment_edit.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra,
294
+                                'deletecomment_link' => 'comment_delete.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra,
295
+                                'replycomment_link'  => 'comment_reply.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra));
296 296
 
297 297
         // assign some lang variables
298 298
         $xoopsTpl->assign(array(
299
-                              'lang_from'    => _CM_FROM,
300
-                              'lang_joined'  => _CM_JOINED,
301
-                              'lang_posts'   => _CM_POSTS,
302
-                              'lang_poster'  => _CM_POSTER,
303
-                              'lang_thread'  => _CM_THREAD,
304
-                              'lang_edit'    => _EDIT,
305
-                              'lang_delete'  => _DELETE,
306
-                              'lang_reply'   => _REPLY,
307
-                              'lang_subject' => _CM_REPLIES,
308
-                              'lang_posted'  => _CM_POSTED,
309
-                              'lang_updated' => _CM_UPDATED,
310
-                              'lang_notice'  => _CM_NOTICE));
299
+                                'lang_from'    => _CM_FROM,
300
+                                'lang_joined'  => _CM_JOINED,
301
+                                'lang_posts'   => _CM_POSTS,
302
+                                'lang_poster'  => _CM_POSTER,
303
+                                'lang_thread'  => _CM_THREAD,
304
+                                'lang_edit'    => _EDIT,
305
+                                'lang_delete'  => _DELETE,
306
+                                'lang_reply'   => _REPLY,
307
+                                'lang_subject' => _CM_REPLIES,
308
+                                'lang_posted'  => _CM_POSTED,
309
+                                'lang_updated' => _CM_UPDATED,
310
+                                'lang_notice'  => _CM_NOTICE));
311 311
     }
312 312
 }
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -85,25 +85,25 @@  discard block
 block discarded – undo
85 85
             $renderer->renderFlatView($admin_view);
86 86
         } elseif ($com_mode === 'thread') {
87 87
             // RMV-FIX... added extraParam stuff here
88
-            $comment_url = $comment_config['pageName'] . '?';
88
+            $comment_url = $comment_config['pageName'].'?';
89 89
             if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
90 90
                 $extra_params = '';
91 91
                 foreach ($comment_config['extraParams'] as $extra_param) {
92 92
                     // This page is included in the module hosting page -- param could be from anywhere
93 93
                     if (isset(${$extra_param})) {
94
-                        $extra_params .= $extra_param . '=' . ${$extra_param} . '&amp;';
94
+                        $extra_params .= $extra_param.'='.${$extra_param}.'&amp;';
95 95
                     } elseif (isset($_POST[$extra_param])) {
96
-                        $extra_params .= $extra_param . '=' . $_POST[$extra_param] . '&amp;';
96
+                        $extra_params .= $extra_param.'='.$_POST[$extra_param].'&amp;';
97 97
                     } elseif (isset($_GET[$extra_param])) {
98
-                        $extra_params .= $extra_param . '=' . $_GET[$extra_param] . '&amp;';
98
+                        $extra_params .= $extra_param.'='.$_GET[$extra_param].'&amp;';
99 99
                     } else {
100
-                        $extra_params .= $extra_param . '=&amp;';
100
+                        $extra_params .= $extra_param.'=&amp;';
101 101
                     }
102 102
                     //$extra_params .= isset(${$extra_param}) ? $extra_param .'='.${$extra_param}.'&amp;' : $extra_param .'=&amp;';
103 103
                 }
104 104
                 $comment_url .= $extra_params;
105 105
             }
106
-            $xoopsTpl->assign('comment_url', $comment_url . $comment_config['itemName'] . '=' . $com_itemid . '&amp;com_mode=thread&amp;com_order=' . $com_order);
106
+            $xoopsTpl->assign('comment_url', $comment_url.$comment_config['itemName'].'='.$com_itemid.'&amp;com_mode=thread&amp;com_order='.$com_order);
107 107
             if (!empty($com_id) && !empty($com_rootid) && ($com_id != $com_rootid)) {
108 108
                 // Show specific thread tree
109 109
                 $comments = $comment_handler->getThread($com_rootid, $com_id);
@@ -168,19 +168,19 @@  discard block
 block discarded – undo
168 168
 
169 169
         unset($postcomment_link);
170 170
         if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) {
171
-            $postcomment_link = 'comment_new.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode;
171
+            $postcomment_link = 'comment_new.php?com_itemid='.$com_itemid.'&amp;com_order='.$com_order.'&amp;com_mode='.$com_mode;
172 172
 
173 173
             $xoopsTpl->assign('anon_canpost', true); // to main template
174 174
         }
175 175
 
176 176
         $commentBarHidden = '';
177
-        $commentBarHidden .= '<input type="hidden" name="' . $comment_config['itemName']
178
-            . '" value="' . $com_itemid . '" />';
177
+        $commentBarHidden .= '<input type="hidden" name="'.$comment_config['itemName']
178
+            . '" value="'.$com_itemid.'" />';
179 179
         $link_extra = '';
180 180
         if (isset($comment_config['extraParams']) && is_array($comment_config['extraParams'])) {
181 181
             foreach ($comment_config['extraParams'] as $extra_param) {
182 182
                 if (isset(${$extra_param})) {
183
-                    $link_extra .= '&amp;' . $extra_param . '=' . ${$extra_param};
183
+                    $link_extra .= '&amp;'.$extra_param.'='.${$extra_param};
184 184
                     $hidden_value    = htmlspecialchars(${$extra_param}, ENT_QUOTES);
185 185
                     $extra_param_val = ${$extra_param};
186 186
                 } elseif (isset($_POST[$extra_param])) {
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
                     $extra_param_val = $_GET[$extra_param];
190 190
                 }
191 191
                 if (isset($extra_param_val)) {
192
-                    $link_extra .= '&amp;' . $extra_param . '=' . $extra_param_val;
192
+                    $link_extra .= '&amp;'.$extra_param.'='.$extra_param_val;
193 193
                     $hidden_value = htmlspecialchars($extra_param_val, ENT_QUOTES);
194
-                    $commentBarHidden .= '<input type="hidden" name="' . $extra_param . '" value="' . $hidden_value . '" />';
194
+                    $commentBarHidden .= '<input type="hidden" name="'.$extra_param.'" value="'.$hidden_value.'" />';
195 195
                 }
196 196
             }
197 197
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $commentPostButton = false;
200 200
         if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) {
201 201
             $commentPostButton = new XoopsFormButton('', 'com_post', _CM_POSTCOMMENT, 'button');
202
-            $commentPostButton->setExtra(' onclick="self.location.href=\'' . $postcomment_link . $link_extra . '\'"');
202
+            $commentPostButton->setExtra(' onclick="self.location.href=\''.$postcomment_link.$link_extra.'\'"');
203 203
         }
204 204
         $commentTpl->assign('commentPostButton', $commentPostButton);
205 205
         $commentTpl->assign('commentPostHidden', $commentBarHidden);
@@ -207,14 +207,14 @@  discard block
 block discarded – undo
207 207
         $navbar = $commentTpl->fetch('db:system_comments_controls.tpl');
208 208
 
209 209
         if (!empty($xoopsModuleConfig['com_anonpost']) || is_object($xoopsUser)) {
210
-            if (file_exists($GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/comment_fast.php'))) {
211
-                include_once $GLOBALS['xoops']->path('modules/' . $xoopsModule->getVar('dirname') . '/comment_fast.php');
210
+            if (file_exists($GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/comment_fast.php'))) {
211
+                include_once $GLOBALS['xoops']->path('modules/'.$xoopsModule->getVar('dirname').'/comment_fast.php');
212 212
             }
213 213
             if (isset($com_replytitle)) {
214 214
                 $myts      = MyTextSanitizer::getInstance();
215 215
                 $com_title = $myts->htmlSpecialChars($com_replytitle);
216
-                if (!preg_match('/^' . _RE . '/i', $com_title)) {
217
-                    $com_title = _RE . ' ' . xoops_substr($com_title, 0, 56);
216
+                if (!preg_match('/^'._RE.'/i', $com_title)) {
217
+                    $com_title = _RE.' '.xoops_substr($com_title, 0, 56);
218 218
                 }
219 219
             } else {
220 220
                 $com_title = '';
@@ -290,9 +290,9 @@  discard block
 block discarded – undo
290 290
 
291 291
         $xoopsTpl->assign(array(
292 292
                               'commentsnav'        => $navbar,
293
-                              'editcomment_link'   => 'comment_edit.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra,
294
-                              'deletecomment_link' => 'comment_delete.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra,
295
-                              'replycomment_link'  => 'comment_reply.php?com_itemid=' . $com_itemid . '&amp;com_order=' . $com_order . '&amp;com_mode=' . $com_mode . '' . $link_extra));
293
+                              'editcomment_link'   => 'comment_edit.php?com_itemid='.$com_itemid.'&amp;com_order='.$com_order.'&amp;com_mode='.$com_mode.''.$link_extra,
294
+                              'deletecomment_link' => 'comment_delete.php?com_itemid='.$com_itemid.'&amp;com_order='.$com_order.'&amp;com_mode='.$com_mode.''.$link_extra,
295
+                              'replycomment_link'  => 'comment_reply.php?com_itemid='.$com_itemid.'&amp;com_order='.$com_order.'&amp;com_mode='.$com_mode.''.$link_extra));
296 296
 
297 297
         // assign some lang variables
298 298
         $xoopsTpl->assign(array(
Please login to merge, or discard this patch.
htdocs/header.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $xoopsLogger->stopTime('Module init');
30 30
 $xoopsLogger->startTime('XOOPS output init');
31 31
 
32
-if ($xoopsConfig['theme_set'] !== 'default' && file_exists(XOOPS_THEME_PATH . '/' . $xoopsConfig['theme_set'] . '/theme.php')) {
32
+if ($xoopsConfig['theme_set'] !== 'default' && file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/theme.php')) {
33 33
     require_once $GLOBALS['xoops']->path('include/xoops13_header.php');
34 34
 } else {
35 35
     global $xoopsOption, $xoopsConfig, $xoopsModule;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     if (@$GLOBALS['xoopsOption']['template_main']) {
45 45
         if (false === strpos($GLOBALS['xoopsOption']['template_main'], ':')) {
46
-            $GLOBALS['xoopsOption']['template_main'] = 'db:' . $GLOBALS['xoopsOption']['template_main'];
46
+            $GLOBALS['xoopsOption']['template_main'] = 'db:'.$GLOBALS['xoopsOption']['template_main'];
47 47
         }
48 48
     }
49 49
 
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
     // Temporary solution for start page redirection
64 64
     if (defined('XOOPS_STARTPAGE_REDIRECTED')) {
65 65
         $params = $content = $tpl = $repeat = null;
66
-        $xoTheme->headContent($params, "<base href='" . XOOPS_URL . '/modules/' . $xoopsConfig['startpage'] . "/' />", $tpl, $repeat);
66
+        $xoTheme->headContent($params, "<base href='".XOOPS_URL.'/modules/'.$xoopsConfig['startpage']."/' />", $tpl, $repeat);
67 67
     }
68 68
 
69 69
     if (@is_object($xoTheme->plugins['xos_logos_PageBuilder'])) {
70
-        $aggreg =& $xoTheme->plugins['xos_logos_PageBuilder'];
70
+        $aggreg = & $xoTheme->plugins['xos_logos_PageBuilder'];
71 71
         // Backward compatibility code for pre 2.0.14 themes
72 72
         $xoopsTpl->assign_by_ref('xoops_lblocks', $aggreg->blocks['canvas_left']);
73 73
         $xoopsTpl->assign_by_ref('xoops_rblocks', $aggreg->blocks['canvas_right']);
Please login to merge, or discard this patch.
htdocs/register.php 2 patches
Switch Indentation   +189 added lines, -189 removed lines patch added patch discarded remove patch
@@ -120,33 +120,33 @@  discard block
 block discarded – undo
120 120
 }
121 121
 
122 122
 switch ($op) {
123
-    case 'newuser':
124
-        $xoopsOption['xoops_pagetitle'] = _US_USERREG;
125
-        include $GLOBALS['xoops']->path('header.php');
126
-        $stop = '';
127
-        if (!$GLOBALS['xoopsSecurity']->check()) {
128
-            $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) . '<br>';
129
-        }
130
-        if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
131
-            if (empty($agree_disc)) {
132
-                $stop .= _US_UNEEDAGREE . '<br>';
123
+        case 'newuser':
124
+            $xoopsOption['xoops_pagetitle'] = _US_USERREG;
125
+            include $GLOBALS['xoops']->path('header.php');
126
+            $stop = '';
127
+            if (!$GLOBALS['xoopsSecurity']->check()) {
128
+                $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) . '<br>';
133 129
             }
134
-        }
135
-        $stop .= XoopsUserUtility::validate($uname, $email, $pass, $vpass);
136
-        if (empty($stop)) {
137
-            echo _US_USERNAME . ': ' . $myts->htmlSpecialChars($uname) . '<br>';
138
-            echo _US_EMAIL . ': ' . $myts->htmlSpecialChars($email) . '<br>';
139
-            if ($url != '') {
140
-                $url = formatURL($url);
141
-                echo _US_WEBSITE . ': ' . $myts->htmlSpecialChars($url) . '<br>';
130
+            if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
131
+                if (empty($agree_disc)) {
132
+                    $stop .= _US_UNEEDAGREE . '<br>';
133
+                }
142 134
             }
143
-            $f_timezone = ($timezone_offset < 0) ? 'GMT ' . $timezone_offset : 'GMT +' . $timezone_offset;
144
-            echo _US_TIMEZONE . ": $f_timezone<br>";
145
-            echo "<form action='register.php' method='post'>";
146
-            xoops_load('XoopsFormCaptcha');
147
-            $cpatcha = new XoopsFormCaptcha();
148
-            echo '<br>' . $cpatcha->getCaption() . ': ' . $cpatcha->render();
149
-            echo "<input type='hidden' name='uname' value='" . $myts->htmlSpecialChars($uname) . "' />
135
+            $stop .= XoopsUserUtility::validate($uname, $email, $pass, $vpass);
136
+            if (empty($stop)) {
137
+                echo _US_USERNAME . ': ' . $myts->htmlSpecialChars($uname) . '<br>';
138
+                echo _US_EMAIL . ': ' . $myts->htmlSpecialChars($email) . '<br>';
139
+                if ($url != '') {
140
+                    $url = formatURL($url);
141
+                    echo _US_WEBSITE . ': ' . $myts->htmlSpecialChars($url) . '<br>';
142
+                }
143
+                $f_timezone = ($timezone_offset < 0) ? 'GMT ' . $timezone_offset : 'GMT +' . $timezone_offset;
144
+                echo _US_TIMEZONE . ": $f_timezone<br>";
145
+                echo "<form action='register.php' method='post'>";
146
+                xoops_load('XoopsFormCaptcha');
147
+                $cpatcha = new XoopsFormCaptcha();
148
+                echo '<br>' . $cpatcha->getCaption() . ': ' . $cpatcha->render();
149
+                echo "<input type='hidden' name='uname' value='" . $myts->htmlSpecialChars($uname) . "' />
150 150
                   <input type='hidden' name='email' value='" . $myts->htmlSpecialChars($email) . "' />
151 151
                   <input type='hidden' name='user_viewemail' value='" . $user_viewemail . "' />
152 152
                   <input type='hidden' name='timezone_offset' value='" . (float)$timezone_offset . "' />
@@ -155,186 +155,186 @@  discard block
 block discarded – undo
155 155
                   <input type='hidden' name='vpass' value='" . $myts->htmlSpecialChars($vpass) . "' />
156 156
                   <input type='hidden' name='user_mailok' value='" . $user_mailok . "' />
157 157
                   <br><br><input type='hidden' name='op' value='finish' />" . $GLOBALS['xoopsSecurity']->getTokenHTML() . "<input type='submit' value='" . _US_FINISH . "' /></form>";
158
-        } else {
159
-            echo "<span class='red'>$stop</span>";
160
-            include $GLOBALS['xoops']->path('include/registerform.php');
161
-            $reg_form->display();
162
-        }
163
-        include $GLOBALS['xoops']->path('footer.php');
164
-        break;
165
-
166
-    case 'finish':
167
-        include $GLOBALS['xoops']->path('header.php');
168
-        $stop = XoopsUserUtility::validate($uname, $email, $pass, $vpass);
169
-        if (!$GLOBALS['xoopsSecurity']->check()) {
170
-            $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) . '<br>';
171
-        }
172
-        xoops_load('XoopsCaptcha');
173
-        $xoopsCaptcha = XoopsCaptcha::getInstance();
174
-        if (!$xoopsCaptcha->verify()) {
175
-            $stop .= $xoopsCaptcha->getMessage() . '<br>';
176
-        }
177
-        if (empty($stop)) {
178
-            /* @var $member_handler XoopsMemberHandler */
179
-            $member_handler = xoops_getHandler('member');
180
-            $newuser        = $member_handler->createUser();
181
-            $newuser->setVar('user_viewemail', $user_viewemail, true);
182
-            $newuser->setVar('uname', $uname, true);
183
-            $newuser->setVar('email', $email, true);
184
-            if ($url != '') {
185
-                $newuser->setVar('url', formatURL($url), true);
186
-            }
187
-            $newuser->setVar('user_avatar', 'avatars/blank.gif', true);
188
-            $actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
189
-            $newuser->setVar('actkey', $actkey, true);
190
-            $newuser->setVar('pass', password_hash($pass, PASSWORD_DEFAULT), true);
191
-            $newuser->setVar('timezone_offset', $timezone_offset, true);
192
-            $newuser->setVar('user_regdate', time(), true);
193
-            $newuser->setVar('uorder', $GLOBALS['xoopsConfig']['com_order'], true);
194
-            $newuser->setVar('umode', $GLOBALS['xoopsConfig']['com_mode'], true);
195
-            $newuser->setVar('theme', $GLOBALS['xoopsConfig']['theme_set'], true);
196
-            $newuser->setVar('user_mailok', $user_mailok, true);
197
-            if ($xoopsConfigUser['activation_type'] == 1) {
198
-                $newuser->setVar('level', 1, true);
199 158
             } else {
200
-                $newuser->setVar('level', 0, true);
159
+                echo "<span class='red'>$stop</span>";
160
+                include $GLOBALS['xoops']->path('include/registerform.php');
161
+                $reg_form->display();
201 162
             }
202
-            if (!$member_handler->insertUser($newuser)) {
203
-                echo _US_REGISTERNG;
204
-                include $GLOBALS['xoops']->path('footer.php');
205
-                exit();
206
-            }
207
-            $newid = $newuser->getVar('uid');
208
-            if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
209
-                echo _US_REGISTERNG;
210
-                include $GLOBALS['xoops']->path('footer.php');
211
-                exit();
163
+            include $GLOBALS['xoops']->path('footer.php');
164
+            break;
165
+
166
+        case 'finish':
167
+            include $GLOBALS['xoops']->path('header.php');
168
+            $stop = XoopsUserUtility::validate($uname, $email, $pass, $vpass);
169
+            if (!$GLOBALS['xoopsSecurity']->check()) {
170
+                $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) . '<br>';
212 171
             }
213
-            if ($xoopsConfigUser['activation_type'] == 1) {
214
-                XoopsUserUtility::sendWelcome($newuser);
215
-                redirect_header('index.php', 4, _US_ACTLOGIN);
172
+            xoops_load('XoopsCaptcha');
173
+            $xoopsCaptcha = XoopsCaptcha::getInstance();
174
+            if (!$xoopsCaptcha->verify()) {
175
+                $stop .= $xoopsCaptcha->getMessage() . '<br>';
216 176
             }
217
-            // Sending notification email to user for self activation
218
-            if ($xoopsConfigUser['activation_type'] == 0) {
219
-                $xoopsMailer = xoops_getMailer();
220
-                $xoopsMailer->useMail();
221
-                $xoopsMailer->setTemplate('register.tpl');
222
-                $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
223
-                $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
224
-                $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
225
-                $xoopsMailer->setToUsers(new XoopsUser($newid));
226
-                $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
227
-                $xoopsMailer->setFromName($xoopsConfig['sitename']);
228
-                $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $uname));
229
-                if (!$xoopsMailer->send()) {
230
-                    echo _US_YOURREGMAILNG;
231
-                } else {
232
-                    echo _US_YOURREGISTERED;
233
-                }
234
-                // Sending notification email to administrator for activation
235
-            } elseif ($xoopsConfigUser['activation_type'] == 2) {
236
-                $xoopsMailer = xoops_getMailer();
237
-                $xoopsMailer->useMail();
238
-                $xoopsMailer->setTemplate('adminactivate.tpl');
239
-                $xoopsMailer->assign('USERNAME', $uname);
240
-                $xoopsMailer->assign('USEREMAIL', $email);
241
-                $xoopsMailer->assign('USERACTLINK', XOOPS_URL . '/register.php?op=actv&id=' . $newid . '&actkey=' . $actkey);
242
-                $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
243
-                $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
244
-                $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
177
+            if (empty($stop)) {
245 178
                 /* @var $member_handler XoopsMemberHandler */
246 179
                 $member_handler = xoops_getHandler('member');
247
-                $xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['activation_group']));
248
-                $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
249
-                $xoopsMailer->setFromName($xoopsConfig['sitename']);
250
-                $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $uname));
251
-                if (!$xoopsMailer->send()) {
252
-                    echo _US_YOURREGMAILNG;
180
+                $newuser        = $member_handler->createUser();
181
+                $newuser->setVar('user_viewemail', $user_viewemail, true);
182
+                $newuser->setVar('uname', $uname, true);
183
+                $newuser->setVar('email', $email, true);
184
+                if ($url != '') {
185
+                    $newuser->setVar('url', formatURL($url), true);
186
+                }
187
+                $newuser->setVar('user_avatar', 'avatars/blank.gif', true);
188
+                $actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
189
+                $newuser->setVar('actkey', $actkey, true);
190
+                $newuser->setVar('pass', password_hash($pass, PASSWORD_DEFAULT), true);
191
+                $newuser->setVar('timezone_offset', $timezone_offset, true);
192
+                $newuser->setVar('user_regdate', time(), true);
193
+                $newuser->setVar('uorder', $GLOBALS['xoopsConfig']['com_order'], true);
194
+                $newuser->setVar('umode', $GLOBALS['xoopsConfig']['com_mode'], true);
195
+                $newuser->setVar('theme', $GLOBALS['xoopsConfig']['theme_set'], true);
196
+                $newuser->setVar('user_mailok', $user_mailok, true);
197
+                if ($xoopsConfigUser['activation_type'] == 1) {
198
+                    $newuser->setVar('level', 1, true);
253 199
                 } else {
254
-                    echo _US_YOURREGISTERED2;
200
+                    $newuser->setVar('level', 0, true);
255 201
                 }
202
+                if (!$member_handler->insertUser($newuser)) {
203
+                    echo _US_REGISTERNG;
204
+                    include $GLOBALS['xoops']->path('footer.php');
205
+                    exit();
206
+                }
207
+                $newid = $newuser->getVar('uid');
208
+                if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
209
+                    echo _US_REGISTERNG;
210
+                    include $GLOBALS['xoops']->path('footer.php');
211
+                    exit();
212
+                }
213
+                if ($xoopsConfigUser['activation_type'] == 1) {
214
+                    XoopsUserUtility::sendWelcome($newuser);
215
+                    redirect_header('index.php', 4, _US_ACTLOGIN);
216
+                }
217
+                // Sending notification email to user for self activation
218
+                if ($xoopsConfigUser['activation_type'] == 0) {
219
+                    $xoopsMailer = xoops_getMailer();
220
+                    $xoopsMailer->useMail();
221
+                    $xoopsMailer->setTemplate('register.tpl');
222
+                    $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
223
+                    $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
224
+                    $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
225
+                    $xoopsMailer->setToUsers(new XoopsUser($newid));
226
+                    $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
227
+                    $xoopsMailer->setFromName($xoopsConfig['sitename']);
228
+                    $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $uname));
229
+                    if (!$xoopsMailer->send()) {
230
+                        echo _US_YOURREGMAILNG;
231
+                    } else {
232
+                        echo _US_YOURREGISTERED;
233
+                    }
234
+                    // Sending notification email to administrator for activation
235
+                } elseif ($xoopsConfigUser['activation_type'] == 2) {
236
+                    $xoopsMailer = xoops_getMailer();
237
+                    $xoopsMailer->useMail();
238
+                    $xoopsMailer->setTemplate('adminactivate.tpl');
239
+                    $xoopsMailer->assign('USERNAME', $uname);
240
+                    $xoopsMailer->assign('USEREMAIL', $email);
241
+                    $xoopsMailer->assign('USERACTLINK', XOOPS_URL . '/register.php?op=actv&id=' . $newid . '&actkey=' . $actkey);
242
+                    $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
243
+                    $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
244
+                    $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
245
+                    /* @var $member_handler XoopsMemberHandler */
246
+                    $member_handler = xoops_getHandler('member');
247
+                    $xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['activation_group']));
248
+                    $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
249
+                    $xoopsMailer->setFromName($xoopsConfig['sitename']);
250
+                    $xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $uname));
251
+                    if (!$xoopsMailer->send()) {
252
+                        echo _US_YOURREGMAILNG;
253
+                    } else {
254
+                        echo _US_YOURREGISTERED2;
255
+                    }
256
+                }
257
+                if ($xoopsConfigUser['new_user_notify'] == 1 && !empty($xoopsConfigUser['new_user_notify_group'])) {
258
+                    $xoopsMailer = xoops_getMailer();
259
+                    $xoopsMailer->reset();
260
+                    $xoopsMailer->useMail();
261
+                    /* @var $member_handler XoopsMemberHandler */
262
+                    $member_handler = xoops_getHandler('member');
263
+                    $xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['new_user_notify_group']));
264
+                    $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
265
+                    $xoopsMailer->setFromName($xoopsConfig['sitename']);
266
+                    $xoopsMailer->setSubject(sprintf(_US_NEWUSERREGAT, $xoopsConfig['sitename']));
267
+                    $xoopsMailer->setBody(sprintf(_US_HASJUSTREG, $uname));
268
+                    $xoopsMailer->send();
269
+                }
270
+            } else {
271
+                echo "<span class='red bold'>{$stop}</span>";
272
+                include $GLOBALS['xoops']->path('include/registerform.php');
273
+                $reg_form->display();
256 274
             }
257
-            if ($xoopsConfigUser['new_user_notify'] == 1 && !empty($xoopsConfigUser['new_user_notify_group'])) {
258
-                $xoopsMailer = xoops_getMailer();
259
-                $xoopsMailer->reset();
260
-                $xoopsMailer->useMail();
261
-                /* @var $member_handler XoopsMemberHandler */
262
-                $member_handler = xoops_getHandler('member');
263
-                $xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['new_user_notify_group']));
264
-                $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
265
-                $xoopsMailer->setFromName($xoopsConfig['sitename']);
266
-                $xoopsMailer->setSubject(sprintf(_US_NEWUSERREGAT, $xoopsConfig['sitename']));
267
-                $xoopsMailer->setBody(sprintf(_US_HASJUSTREG, $uname));
268
-                $xoopsMailer->send();
269
-            }
270
-        } else {
271
-            echo "<span class='red bold'>{$stop}</span>";
272
-            include $GLOBALS['xoops']->path('include/registerform.php');
273
-            $reg_form->display();
274
-        }
275
-        include $GLOBALS['xoops']->path('footer.php');
276
-        break;
275
+            include $GLOBALS['xoops']->path('footer.php');
276
+            break;
277 277
 
278
-    case 'actv':
279
-    case 'activate':
280
-        $id     = $clean_id;
281
-        $actkey = $clean_actkey;
282
-        if (empty($id)) {
283
-            redirect_header('index.php', 1, '');
284
-        }
285
-    /* @var $member_handler XoopsMemberHandler */
286
-        $member_handler = xoops_getHandler('member');
287
-        $thisuser       = $member_handler->getUser($id);
288
-        if (!is_object($thisuser)) {
289
-            exit();
290
-        }
291
-        if ($thisuser->getVar('actkey') != $actkey) {
292
-            redirect_header('index.php', 5, _US_ACTKEYNOT);
293
-        } else {
294
-            if ($thisuser->getVar('level') > 0) {
295
-                redirect_header('user.php', 5, _US_ACONTACT, false);
278
+        case 'actv':
279
+        case 'activate':
280
+            $id     = $clean_id;
281
+            $actkey = $clean_actkey;
282
+            if (empty($id)) {
283
+                redirect_header('index.php', 1, '');
284
+            }
285
+        /* @var $member_handler XoopsMemberHandler */
286
+            $member_handler = xoops_getHandler('member');
287
+            $thisuser       = $member_handler->getUser($id);
288
+            if (!is_object($thisuser)) {
289
+                exit();
290
+            }
291
+            if ($thisuser->getVar('actkey') != $actkey) {
292
+                redirect_header('index.php', 5, _US_ACTKEYNOT);
296 293
             } else {
297
-                if (false !== $member_handler->activateUser($thisuser)) {
298
-                    $xoopsPreload->triggerEvent('core.behavior.user.activate', $thisuser);
299
-                    $config_handler  = xoops_getHandler('config');
300
-                    $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
301
-                    if ($xoopsConfigUser['activation_type'] == 2) {
302
-                        $myts        = MyTextSanitizer::getInstance();
303
-                        $xoopsMailer = xoops_getMailer();
304
-                        $xoopsMailer->useMail();
305
-                        $xoopsMailer->setTemplate('activated.tpl');
306
-                        $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
307
-                        $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
308
-                        $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
309
-                        $xoopsMailer->setToUsers($thisuser);
310
-                        $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
311
-                        $xoopsMailer->setFromName($xoopsConfig['sitename']);
312
-                        $xoopsMailer->setSubject(sprintf(_US_YOURACCOUNT, $xoopsConfig['sitename']));
313
-                        include $GLOBALS['xoops']->path('header.php');
314
-                        if (!$xoopsMailer->send()) {
315
-                            printf(_US_ACTVMAILNG, $thisuser->getVar('uname'));
294
+                if ($thisuser->getVar('level') > 0) {
295
+                    redirect_header('user.php', 5, _US_ACONTACT, false);
296
+                } else {
297
+                    if (false !== $member_handler->activateUser($thisuser)) {
298
+                        $xoopsPreload->triggerEvent('core.behavior.user.activate', $thisuser);
299
+                        $config_handler  = xoops_getHandler('config');
300
+                        $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
301
+                        if ($xoopsConfigUser['activation_type'] == 2) {
302
+                            $myts        = MyTextSanitizer::getInstance();
303
+                            $xoopsMailer = xoops_getMailer();
304
+                            $xoopsMailer->useMail();
305
+                            $xoopsMailer->setTemplate('activated.tpl');
306
+                            $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
307
+                            $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
308
+                            $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
309
+                            $xoopsMailer->setToUsers($thisuser);
310
+                            $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
311
+                            $xoopsMailer->setFromName($xoopsConfig['sitename']);
312
+                            $xoopsMailer->setSubject(sprintf(_US_YOURACCOUNT, $xoopsConfig['sitename']));
313
+                            include $GLOBALS['xoops']->path('header.php');
314
+                            if (!$xoopsMailer->send()) {
315
+                                printf(_US_ACTVMAILNG, $thisuser->getVar('uname'));
316
+                            } else {
317
+                                printf(_US_ACTVMAILOK, $thisuser->getVar('uname'));
318
+                            }
319
+                            include $GLOBALS['xoops']->path('footer.php');
316 320
                         } else {
317
-                            printf(_US_ACTVMAILOK, $thisuser->getVar('uname'));
321
+                            redirect_header('user.php', 5, _US_ACTLOGIN, false);
318 322
                         }
319
-                        include $GLOBALS['xoops']->path('footer.php');
320 323
                     } else {
321
-                        redirect_header('user.php', 5, _US_ACTLOGIN, false);
324
+                        redirect_header('index.php', 5, _US_ACTFAILD);
322 325
                     }
323
-                } else {
324
-                    redirect_header('index.php', 5, _US_ACTFAILD);
325 326
                 }
326 327
             }
327
-        }
328
-        break;
328
+            break;
329 329
 
330
-    case 'register':
331
-    default:
332
-        $xoopsOption['xoops_pagetitle'] = _US_USERREG;
333
-        include $GLOBALS['xoops']->path('header.php');
334
-        $xoTheme->addMeta('meta', 'keywords', _US_USERREG . ', ' . _US_NICKNAME); // FIXME!
335
-        $xoTheme->addMeta('meta', 'description', strip_tags($xoopsConfigUser['reg_disclaimer']));
336
-        include $GLOBALS['xoops']->path('include/registerform.php');
337
-        $reg_form->display();
338
-        include $GLOBALS['xoops']->path('footer.php');
339
-        break;
330
+        case 'register':
331
+        default:
332
+            $xoopsOption['xoops_pagetitle'] = _US_USERREG;
333
+            include $GLOBALS['xoops']->path('header.php');
334
+            $xoTheme->addMeta('meta', 'keywords', _US_USERREG . ', ' . _US_NICKNAME); // FIXME!
335
+            $xoTheme->addMeta('meta', 'description', strip_tags($xoopsConfigUser['reg_disclaimer']));
336
+            include $GLOBALS['xoops']->path('include/registerform.php');
337
+            $reg_form->display();
338
+            include $GLOBALS['xoops']->path('footer.php');
339
+            break;
340 340
 }
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  * @since               2.0.0
22 22
  * @author              Kazumi Ono <[email protected]>
23 23
  */
24
-include __DIR__ . '/mainfile.php';
24
+include __DIR__.'/mainfile.php';
25 25
 $xoopsPreload = XoopsPreload::getInstance();
26 26
 $xoopsPreload->triggerEvent('core.register.start');
27 27
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
  */
48 48
 function userCheck($uname, $email, $pass, $vpass)
49 49
 {
50
-    $GLOBALS['xoopsLogger']->addDeprecated('Function ' . __FUNCTION__ . ' is deprecated, use XoopsUserUtility::validate() instead');
50
+    $GLOBALS['xoopsLogger']->addDeprecated('Function '.__FUNCTION__.' is deprecated, use XoopsUserUtility::validate() instead');
51 51
 
52 52
     return XoopsUserUtility::validate($uname, $email, $pass, $vpass);
53 53
 }
@@ -125,36 +125,36 @@  discard block
 block discarded – undo
125 125
         include $GLOBALS['xoops']->path('header.php');
126 126
         $stop = '';
127 127
         if (!$GLOBALS['xoopsSecurity']->check()) {
128
-            $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) . '<br>';
128
+            $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()).'<br>';
129 129
         }
130 130
         if ($xoopsConfigUser['reg_dispdsclmr'] != 0 && $xoopsConfigUser['reg_disclaimer'] != '') {
131 131
             if (empty($agree_disc)) {
132
-                $stop .= _US_UNEEDAGREE . '<br>';
132
+                $stop .= _US_UNEEDAGREE.'<br>';
133 133
             }
134 134
         }
135 135
         $stop .= XoopsUserUtility::validate($uname, $email, $pass, $vpass);
136 136
         if (empty($stop)) {
137
-            echo _US_USERNAME . ': ' . $myts->htmlSpecialChars($uname) . '<br>';
138
-            echo _US_EMAIL . ': ' . $myts->htmlSpecialChars($email) . '<br>';
137
+            echo _US_USERNAME.': '.$myts->htmlSpecialChars($uname).'<br>';
138
+            echo _US_EMAIL.': '.$myts->htmlSpecialChars($email).'<br>';
139 139
             if ($url != '') {
140 140
                 $url = formatURL($url);
141
-                echo _US_WEBSITE . ': ' . $myts->htmlSpecialChars($url) . '<br>';
141
+                echo _US_WEBSITE.': '.$myts->htmlSpecialChars($url).'<br>';
142 142
             }
143
-            $f_timezone = ($timezone_offset < 0) ? 'GMT ' . $timezone_offset : 'GMT +' . $timezone_offset;
144
-            echo _US_TIMEZONE . ": $f_timezone<br>";
143
+            $f_timezone = ($timezone_offset < 0) ? 'GMT '.$timezone_offset : 'GMT +'.$timezone_offset;
144
+            echo _US_TIMEZONE.": $f_timezone<br>";
145 145
             echo "<form action='register.php' method='post'>";
146 146
             xoops_load('XoopsFormCaptcha');
147 147
             $cpatcha = new XoopsFormCaptcha();
148
-            echo '<br>' . $cpatcha->getCaption() . ': ' . $cpatcha->render();
149
-            echo "<input type='hidden' name='uname' value='" . $myts->htmlSpecialChars($uname) . "' />
150
-                  <input type='hidden' name='email' value='" . $myts->htmlSpecialChars($email) . "' />
151
-                  <input type='hidden' name='user_viewemail' value='" . $user_viewemail . "' />
152
-                  <input type='hidden' name='timezone_offset' value='" . (float)$timezone_offset . "' />
153
-                  <input type='hidden' name='url' value='" . $myts->htmlSpecialChars($url) . "' />
154
-                  <input type='hidden' name='pass' value='" . $myts->htmlSpecialChars($pass) . "' />
155
-                  <input type='hidden' name='vpass' value='" . $myts->htmlSpecialChars($vpass) . "' />
156
-                  <input type='hidden' name='user_mailok' value='" . $user_mailok . "' />
157
-                  <br><br><input type='hidden' name='op' value='finish' />" . $GLOBALS['xoopsSecurity']->getTokenHTML() . "<input type='submit' value='" . _US_FINISH . "' /></form>";
148
+            echo '<br>'.$cpatcha->getCaption().': '.$cpatcha->render();
149
+            echo "<input type='hidden' name='uname' value='".$myts->htmlSpecialChars($uname)."' />
150
+                  <input type='hidden' name='email' value='" . $myts->htmlSpecialChars($email)."' />
151
+                  <input type='hidden' name='user_viewemail' value='" . $user_viewemail."' />
152
+                  <input type='hidden' name='timezone_offset' value='" . (float)$timezone_offset."' />
153
+                  <input type='hidden' name='url' value='" . $myts->htmlSpecialChars($url)."' />
154
+                  <input type='hidden' name='pass' value='" . $myts->htmlSpecialChars($pass)."' />
155
+                  <input type='hidden' name='vpass' value='" . $myts->htmlSpecialChars($vpass)."' />
156
+                  <input type='hidden' name='user_mailok' value='" . $user_mailok."' />
157
+                  <br><br><input type='hidden' name='op' value='finish' />" . $GLOBALS['xoopsSecurity']->getTokenHTML()."<input type='submit' value='"._US_FINISH."' /></form>";
158 158
         } else {
159 159
             echo "<span class='red'>$stop</span>";
160 160
             include $GLOBALS['xoops']->path('include/registerform.php');
@@ -167,12 +167,12 @@  discard block
 block discarded – undo
167 167
         include $GLOBALS['xoops']->path('header.php');
168 168
         $stop = XoopsUserUtility::validate($uname, $email, $pass, $vpass);
169 169
         if (!$GLOBALS['xoopsSecurity']->check()) {
170
-            $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()) . '<br>';
170
+            $stop .= implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()).'<br>';
171 171
         }
172 172
         xoops_load('XoopsCaptcha');
173 173
         $xoopsCaptcha = XoopsCaptcha::getInstance();
174 174
         if (!$xoopsCaptcha->verify()) {
175
-            $stop .= $xoopsCaptcha->getMessage() . '<br>';
175
+            $stop .= $xoopsCaptcha->getMessage().'<br>';
176 176
         }
177 177
         if (empty($stop)) {
178 178
             /* @var $member_handler XoopsMemberHandler */
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 $xoopsMailer->setTemplate('register.tpl');
222 222
                 $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
223 223
                 $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
224
-                $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
224
+                $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
225 225
                 $xoopsMailer->setToUsers(new XoopsUser($newid));
226 226
                 $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
227 227
                 $xoopsMailer->setFromName($xoopsConfig['sitename']);
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
                 $xoopsMailer->setTemplate('adminactivate.tpl');
239 239
                 $xoopsMailer->assign('USERNAME', $uname);
240 240
                 $xoopsMailer->assign('USEREMAIL', $email);
241
-                $xoopsMailer->assign('USERACTLINK', XOOPS_URL . '/register.php?op=actv&id=' . $newid . '&actkey=' . $actkey);
241
+                $xoopsMailer->assign('USERACTLINK', XOOPS_URL.'/register.php?op=actv&id='.$newid.'&actkey='.$actkey);
242 242
                 $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
243 243
                 $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
244
-                $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
244
+                $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
245 245
                 /* @var $member_handler XoopsMemberHandler */
246 246
                 $member_handler = xoops_getHandler('member');
247 247
                 $xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['activation_group']));
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                         $xoopsMailer->setTemplate('activated.tpl');
306 306
                         $xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
307 307
                         $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
308
-                        $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
308
+                        $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
309 309
                         $xoopsMailer->setToUsers($thisuser);
310 310
                         $xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
311 311
                         $xoopsMailer->setFromName($xoopsConfig['sitename']);
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     default:
332 332
         $xoopsOption['xoops_pagetitle'] = _US_USERREG;
333 333
         include $GLOBALS['xoops']->path('header.php');
334
-        $xoTheme->addMeta('meta', 'keywords', _US_USERREG . ', ' . _US_NICKNAME); // FIXME!
334
+        $xoTheme->addMeta('meta', 'keywords', _US_USERREG.', '._US_NICKNAME); // FIXME!
335 335
         $xoTheme->addMeta('meta', 'description', strip_tags($xoopsConfigUser['reg_disclaimer']));
336 336
         include $GLOBALS['xoops']->path('include/registerform.php');
337 337
         $reg_form->display();
Please login to merge, or discard this patch.
htdocs/browse.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
 defined('NWLINE') or define('NWLINE', "\n");
21 21
 
22 22
 $xoopsOption['nocommon'] = true;
23
-require_once __DIR__ . DS . 'mainfile.php';
23
+require_once __DIR__.DS.'mainfile.php';
24 24
 
25 25
 error_reporting(0);
26 26
 
27
-include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'defines.php';
28
-include_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'version.php';
29
-require_once XOOPS_ROOT_PATH . DS . 'class' . DS . 'xoopsload.php';
27
+include_once XOOPS_ROOT_PATH.DS.'include'.DS.'defines.php';
28
+include_once XOOPS_ROOT_PATH.DS.'include'.DS.'version.php';
29
+require_once XOOPS_ROOT_PATH.DS.'class'.DS.'xoopsload.php';
30 30
 
31 31
 XoopsLoad::load('xoopskernel');
32 32
 $xoops = new xos_kernel_Xoops2();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     $path      = (substr($path, 0, 1) === '/') ? substr($path, 1) : $path;
39 39
     $path_type = substr($path, 0, strpos($path, '/'));
40 40
     if (!isset($xoops->paths[$path_type])) {
41
-        $path      = 'XOOPS/' . $path;
41
+        $path      = 'XOOPS/'.$path;
42 42
         $path_type = 'XOOPS';
43 43
     }
44 44
 }
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 // seconds, minutes, hours, days
85 85
 $expires = 60 * 60 * 24 * 15;
86 86
 header('Pragma: public');
87
-header('Cache-Control: maxage=' . $expires);
88
-header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $expires) . ' GMT');
89
-header('Content-type: ' . $types[$ext]);
87
+header('Cache-Control: maxage='.$expires);
88
+header('Expires: '.gmdate('D, d M Y H:i:s', time() + $expires).' GMT');
89
+header('Content-type: '.$types[$ext]);
90 90
 $handle = fopen($file, 'rb');
91 91
 while (!feof($handle)) {
92 92
     $buffer = fread($handle, 4096);
Please login to merge, or discard this patch.
htdocs/Frameworks/art/xoopsart.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 function loadFunctions($group = '')
28 28
     {
29
-        return include_once FRAMEWORKS_ROOT_PATH . "/art/functions.{$group}" . (empty($group) ? '' : '.') . 'php';
29
+        return include_once FRAMEWORKS_ROOT_PATH."/art/functions.{$group}".(empty($group) ? '' : '.').'php';
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
htdocs/Frameworks/art/functions.user.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     function mod_getIP($asString = false)
23 23
     {
24
-        $GLOBALS['xoopsLogger']->addDeprecated("Deprecated function '" . __FUNCTION__ . "', use XoopsUserUtility directly.");
24
+        $GLOBALS['xoopsLogger']->addDeprecated("Deprecated function '".__FUNCTION__."', use XoopsUserUtility directly.");
25 25
 
26 26
         return XoopsUserUtility::getIP($asString);
27 27
     }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     function &mod_getUnameFromIds($uid, $usereal = false, $linked = false)
37 37
     {
38
-        $GLOBALS['xoopsLogger']->addDeprecated("Deprecated function '" . __FUNCTION__ . "', use XoopsUserUtility directly.");
38
+        $GLOBALS['xoopsLogger']->addDeprecated("Deprecated function '".__FUNCTION__."', use XoopsUserUtility directly.");
39 39
         $ids = XoopsUserUtility::getUnameFromIds($uid, $usereal, $linked);
40 40
 
41 41
         return $ids;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     function mod_getUnameFromId($uid, $usereal = 0, $linked = false)
52 52
     {
53
-        $GLOBALS['xoopsLogger']->addDeprecated("Deprecated function '" . __FUNCTION__ . "', user XoopsUserUtility directly.");
53
+        $GLOBALS['xoopsLogger']->addDeprecated("Deprecated function '".__FUNCTION__."', user XoopsUserUtility directly.");
54 54
 
55 55
         return XoopsUserUtility::getUnameFromId($uid, $usereal, $linked);
56 56
     }
Please login to merge, or discard this patch.