Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/modules/profile/register.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@  discard block
 block discarded – undo
18 18
  * @author              trabis <[email protected]>
19 19
  */
20 20
 
21
-include __DIR__ . '/header.php';
21
+include __DIR__.'/header.php';
22 22
 
23 23
 if ($GLOBALS['xoopsUser']) {
24
-    header('location: userinfo.php?uid= ' . $GLOBALS['xoopsUser']->getVar('uid'));
24
+    header('location: userinfo.php?uid= '.$GLOBALS['xoopsUser']->getVar('uid'));
25 25
     exit();
26 26
 }
27 27
 
28 28
 if (!empty($_GET['op']) && in_array($_GET['op'], array('actv', 'activate'))) {
29
-    header('location: ./activate.php' . (empty($_SERVER['QUERY_STRING']) ? '' : '?' . $_SERVER['QUERY_STRING']));
29
+    header('location: ./activate.php'.(empty($_SERVER['QUERY_STRING']) ? '' : '?'.$_SERVER['QUERY_STRING']));
30 30
     exit();
31 31
 }
32 32
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 $regstep_handler = xoops_getModuleHandler('regstep');
72 72
 
73 73
 if (!$steps = $regstep_handler->getAll($criteria, null, false, false)) {
74
-    redirect_header(XOOPS_URL . '/', 6, _PROFILE_MA_NOSTEPSAVAILABLE);
74
+    redirect_header(XOOPS_URL.'/', 6, _PROFILE_MA_NOSTEPSAVAILABLE);
75 75
 }
76 76
 
77 77
 foreach (array_keys($steps) as $key) {
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 $GLOBALS['xoopsTpl']->assign('lang_register_steps', _PROFILE_MA_REGISTER_STEPS);
86 86
 
87 87
 $xoBreadcrumbs[] = array(
88
-    'link'  => XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/register.php',
88
+    'link'  => XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/register.php',
89 89
     'title' => _PROFILE_MA_REGISTER);
90 90
 if (isset($steps[$current_step])) {
91 91
     $xoBreadcrumbs[] = array('title' => $steps[$current_step]['step_name']);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 if (isset($_POST['step']) && isset($_SESSION['profile_required'])) {
168 168
     foreach ($_SESSION['profile_required'] as $name => $title) {
169 169
         if (!isset($_POST[$name]) || empty($_POST[$name])) {
170
-            $stop .= sprintf(_FORM_ENTER, $title) . '<br>';
170
+            $stop .= sprintf(_FORM_ENTER, $title).'<br>';
171 171
         }
172 172
     }
173 173
 }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
     if ($GLOBALS['xoopsConfigUser']['reg_dispdsclmr'] != 0 && $GLOBALS['xoopsConfigUser']['reg_disclaimer'] !== '') {
185 185
         if (empty($agree_disc)) {
186
-            $stop .= _US_UNEEDAGREE . '<br>';
186
+            $stop .= _US_UNEEDAGREE.'<br>';
187 187
         }
188 188
     }
189 189
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
         // Insert/update user and check if we have succeded
239 239
         if (!$member_handler->insertUser($newuser)) {
240
-            $stop .= _US_REGISTERNG . '<br>';
240
+            $stop .= _US_REGISTERNG.'<br>';
241 241
             $stop .= implode('<br>', $newuser->getErrors());
242 242
         } else {
243 243
             // User inserted! Now insert custom profile fields
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             // We are good! If this is 'was' a new user then we handle notification
248 248
             if ($isNew) {
249 249
                 if ($GLOBALS['xoopsConfigUser']['new_user_notify'] == 1 && !empty($GLOBALS['xoopsConfigUser']['new_user_notify_group'])) {
250
-                    $xoopsMailer =& xoops_getMailer();
250
+                    $xoopsMailer = & xoops_getMailer();
251 251
                     $xoopsMailer->reset();
252 252
                     $xoopsMailer->useMail();
253 253
                     $xoopsMailer->setToGroups($member_handler->getGroup($GLOBALS['xoopsConfigUser']['new_user_notify_group']));
@@ -260,19 +260,19 @@  discard block
 block discarded – undo
260 260
 
261 261
                 $message = '';
262 262
                 if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar('uid'))) {
263
-                    $message = _PROFILE_MA_REGISTER_NOTGROUP . '<br>';
263
+                    $message = _PROFILE_MA_REGISTER_NOTGROUP.'<br>';
264 264
                 } else {
265 265
                     if ($GLOBALS['xoopsConfigUser']['activation_type'] == 1) {
266 266
                         XoopsUserUtility::sendWelcome($newuser);
267 267
                     } else {
268 268
                         if ($GLOBALS['xoopsConfigUser']['activation_type'] == 0) {
269
-                            $xoopsMailer =& xoops_getMailer();
269
+                            $xoopsMailer = & xoops_getMailer();
270 270
                             $xoopsMailer->reset();
271 271
                             $xoopsMailer->useMail();
272 272
                             $xoopsMailer->setTemplate('register.tpl');
273 273
                             $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
274 274
                             $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
275
-                            $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
275
+                            $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
276 276
                             $xoopsMailer->assign('X_UPASS', $_POST['vpass']);
277 277
                             $xoopsMailer->setToUsers($newuser);
278 278
                             $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
@@ -285,16 +285,16 @@  discard block
 block discarded – undo
285 285
                             }
286 286
                         } else {
287 287
                             if ($GLOBALS['xoopsConfigUser']['activation_type'] == 2) {
288
-                                $xoopsMailer =& xoops_getMailer();
288
+                                $xoopsMailer = & xoops_getMailer();
289 289
                                 $xoopsMailer->reset();
290 290
                                 $xoopsMailer->useMail();
291 291
                                 $xoopsMailer->setTemplate('adminactivate.tpl');
292 292
                                 $xoopsMailer->assign('USERNAME', $newuser->getVar('uname'));
293 293
                                 $xoopsMailer->assign('USEREMAIL', $newuser->getVar('email'));
294
-                                $xoopsMailer->assign('USERACTLINK', XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/activate.php?id=' . $newuser->getVar('uid') . '&actkey=' . $newuser->getVar('actkey', 'n'));
294
+                                $xoopsMailer->assign('USERACTLINK', XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/activate.php?id='.$newuser->getVar('uid').'&actkey='.$newuser->getVar('actkey', 'n'));
295 295
                                 $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
296 296
                                 $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
297
-                                $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
297
+                                $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
298 298
                                 $xoopsMailer->setToGroups($member_handler->getGroup($GLOBALS['xoopsConfigUser']['activation_group']));
299 299
                                 $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
300 300
                                 $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 }
319 319
 
320 320
 if (!empty($stop) || isset($steps[$current_step])) {
321
-    include_once __DIR__ . '/include/forms.php';
321
+    include_once __DIR__.'/include/forms.php';
322 322
     $current_step = empty($stop) ? $current_step : $current_step - 1;
323 323
     $reg_form     = profile_getRegisterForm($newuser, $profile, $steps[$current_step]);
324 324
     $reg_form->assign($GLOBALS['xoopsTpl']);
@@ -341,4 +341,4 @@  discard block
 block discarded – undo
341 341
     $_SESSION['profile_post'] = null;
342 342
 }
343 343
 
344
-include __DIR__ . '/footer.php';
344
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
htdocs/modules/profile/changepass.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 $xoopsOption['pagetype'] = 'user';
21
-include __DIR__ . '/header.php';
21
+include __DIR__.'/header.php';
22 22
 if (!$GLOBALS['xoopsUser']) {
23 23
     redirect_header(XOOPS_URL, 2, _NOPERM);
24 24
 }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $msg = _PROFILE_MA_PASSWORDCHANGED;
68 68
         }
69 69
     }
70
-    redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/userinfo.php?uid=' . $GLOBALS['xoopsUser']->getVar('uid'), 2, $msg);
70
+    redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/userinfo.php?uid='.$GLOBALS['xoopsUser']->getVar('uid'), 2, $msg);
71 71
 }
72 72
 
73
-include __DIR__ . '/footer.php';
73
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
htdocs/modules/profile/activate.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 $xoopsOption['pagetype'] = 'user';
21
-include __DIR__ . '/header.php';
21
+include __DIR__.'/header.php';
22 22
 
23 23
 include $GLOBALS['xoops']->path('header.php');
24 24
 if (!empty($_GET['id']) && !empty($_GET['actkey'])) {
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
         redirect_header(XOOPS_URL, 1, '');
35 35
     }
36 36
     if ($thisuser->getVar('actkey') != $actkey) {
37
-        redirect_header(XOOPS_URL . '/', 5, _US_ACTKEYNOT);
37
+        redirect_header(XOOPS_URL.'/', 5, _US_ACTKEYNOT);
38 38
     } else {
39 39
         if ($thisuser->getVar('level') > 0) {
40
-            redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/index.php', 5, _US_ACONTACT, false);
40
+            redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/index.php', 5, _US_ACONTACT, false);
41 41
         } else {
42 42
             if (false !== $member_handler->activateUser($thisuser)) {
43 43
                 $xoopsPreload = XoopsPreload::getInstance();
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
                 $GLOBALS['xoopsConfigUser'] = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
48 48
                 if ($GLOBALS['xoopsConfigUser']['activation_type'] == 2) {
49 49
                     $myts        = MyTextSanitizer::getInstance();
50
-                    $xoopsMailer =& xoops_getMailer();
50
+                    $xoopsMailer = & xoops_getMailer();
51 51
                     $xoopsMailer->useMail();
52 52
                     $xoopsMailer->setTemplate('activated.tpl');
53 53
                     $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
54 54
                     $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
55
-                    $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
55
+                    $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
56 56
                     $xoopsMailer->setToUsers($thisuser);
57 57
                     $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
58 58
                     $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
                     } else {
64 64
                         printf(_US_ACTVMAILOK, $thisuser->getVar('uname'));
65 65
                     }
66
-                    include __DIR__ . '/footer.php';
66
+                    include __DIR__.'/footer.php';
67 67
                 } else {
68
-                    redirect_header(XOOPS_URL . '/user.php', 5, _US_ACTLOGIN, false);
68
+                    redirect_header(XOOPS_URL.'/user.php', 5, _US_ACTLOGIN, false);
69 69
                 }
70 70
             } else {
71
-                redirect_header(XOOPS_URL . '/index.php', 5, 'Activation failed!');
71
+                redirect_header(XOOPS_URL.'/index.php', 5, 'Activation failed!');
72 72
             }
73 73
         }
74 74
     }
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
     if ($getuser[0]->isActive()) {
85 85
         redirect_header(XOOPS_URL, 2, sprintf(_US_USERALREADYACTIVE, $getuser[0]->getVar('email')));
86 86
     }
87
-    $xoopsMailer =& xoops_getMailer();
87
+    $xoopsMailer = & xoops_getMailer();
88 88
     $xoopsMailer->useMail();
89 89
     $xoopsMailer->setTemplate('register.tpl');
90 90
     $xoopsMailer->assign('SITENAME', $GLOBALS['xoopsConfig']['sitename']);
91 91
     $xoopsMailer->assign('ADMINMAIL', $GLOBALS['xoopsConfig']['adminmail']);
92
-    $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
92
+    $xoopsMailer->assign('SITEURL', XOOPS_URL.'/');
93 93
     $xoopsMailer->setToUsers($getuser[0]);
94 94
     $xoopsMailer->setFromEmail($GLOBALS['xoopsConfig']['adminmail']);
95 95
     $xoopsMailer->setFromName($GLOBALS['xoopsConfig']['sitename']);
@@ -108,4 +108,4 @@  discard block
 block discarded – undo
108 108
 }
109 109
 
110 110
 $xoBreadcrumbs[] = array('title' => _PROFILE_MA_REGISTER);
111
-include __DIR__ . '/footer.php';
111
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
htdocs/modules/profile/edituser.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  */
19 19
 
20 20
 $xoopsOption['pagetype'] = 'user';
21
-include __DIR__ . '/header.php';
21
+include __DIR__.'/header.php';
22 22
 include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
23 23
 
24 24
 // If not a user, redirect
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
 
35 35
 if ($op === 'save') {
36 36
     if (!$GLOBALS['xoopsSecurity']->check()) {
37
-        redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/', 3, _US_NOEDITRIGHT . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
37
+        redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/', 3, _US_NOEDITRIGHT.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
38 38
         exit();
39 39
     }
40 40
     $uid      = $GLOBALS['xoopsUser']->getVar('uid');
41 41
     $errors   = array();
42
-    $edituser =& $GLOBALS['xoopsUser'];
42
+    $edituser = & $GLOBALS['xoopsUser'];
43 43
     if ($GLOBALS['xoopsUser']->isAdmin()) {
44 44
         $edituser->setVar('uname', trim($_POST['uname']));
45 45
         $edituser->setVar('email', trim($_POST['email']));
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             $profile->setVar('profile_id', $edituser->getVar('uid'));
84 84
             $profile_handler->insert($profile);
85 85
             unset($_SESSION['xoopsUserTheme']);
86
-            redirect_header(XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/userinfo.php?uid=' . $edituser->getVar('uid'), 2, _US_PROFUPDATED);
86
+            redirect_header(XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/userinfo.php?uid='.$edituser->getVar('uid'), 2, _US_PROFUPDATED);
87 87
         }
88 88
     }
89 89
 }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 if ($op === 'editprofile') {
92 92
     $GLOBALS['xoopsOption']['template_main'] = 'profile_editprofile.tpl';
93 93
     include_once $GLOBALS['xoops']->path('header.php');
94
-    include_once __DIR__ . '/include/forms.php';
94
+    include_once __DIR__.'/include/forms.php';
95 95
     $form = profile_getUserForm($GLOBALS['xoopsUser']);
96 96
     $form->assign($GLOBALS['xoopsTpl']);
97 97
     if (!empty($stop)) {
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 
109 109
     $oldavatar = $GLOBALS['xoopsUser']->getVar('user_avatar');
110 110
     if (!empty($oldavatar) && $oldavatar !== 'blank.gif') {
111
-        $GLOBALS['xoopsTpl']->assign('old_avatar', XOOPS_UPLOAD_URL . '/' . $oldavatar);
111
+        $GLOBALS['xoopsTpl']->assign('old_avatar', XOOPS_UPLOAD_URL.'/'.$oldavatar);
112 112
     }
113 113
     if ($GLOBALS['xoopsConfigUser']['avatar_allow_upload'] == 1 && $GLOBALS['xoopsUser']->getVar('posts') >= $GLOBALS['xoopsConfigUser']['avatar_minposts']) {
114 114
         include_once $GLOBALS['xoops']->path('class/xoopsformloader.php');
115
-        $form = new XoopsThemeForm(_US_UPLOADMYAVATAR, 'uploadavatar', XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/edituser.php', 'post', true);
115
+        $form = new XoopsThemeForm(_US_UPLOADMYAVATAR, 'uploadavatar', XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/edituser.php', 'post', true);
116 116
         $form->setExtra('enctype="multipart/form-data"');
117
-        $form->addElement(new XoopsFormLabel(_US_MAXPIXEL, $GLOBALS['xoopsConfigUser']['avatar_width'] . ' x ' . $GLOBALS['xoopsConfigUser']['avatar_height']));
117
+        $form->addElement(new XoopsFormLabel(_US_MAXPIXEL, $GLOBALS['xoopsConfigUser']['avatar_width'].' x '.$GLOBALS['xoopsConfigUser']['avatar_height']));
118 118
         $form->addElement(new XoopsFormLabel(_US_MAXIMGSZ, $GLOBALS['xoopsConfigUser']['avatar_maxsize']));
119 119
         $form->addElement(new XoopsFormFile(_US_SELFILE, 'avatarfile', $GLOBALS['xoopsConfigUser']['avatar_maxsize']), true);
120 120
         $form->addElement(new XoopsFormHidden('op', 'avatarupload'));
@@ -123,18 +123,18 @@  discard block
 block discarded – undo
123 123
         $form->assign($GLOBALS['xoopsTpl']);
124 124
     }
125 125
     $avatar_handler  = xoops_getHandler('avatar');
126
-    $form2           = new XoopsThemeForm(_US_CHOOSEAVT, 'chooseavatar', XOOPS_URL . '/modules/' . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/edituser.php', 'post', true);
126
+    $form2           = new XoopsThemeForm(_US_CHOOSEAVT, 'chooseavatar', XOOPS_URL.'/modules/'.$GLOBALS['xoopsModule']->getVar('dirname', 'n').'/edituser.php', 'post', true);
127 127
     $avatar_select   = new XoopsFormSelect('', 'user_avatar', $GLOBALS['xoopsUser']->getVar('user_avatar'));
128 128
     $avatar_list     = $avatar_handler->getList('S', true);
129 129
     $avatar_selected = $GLOBALS['xoopsUser']->getVar('user_avatar', 'E');
130 130
     //    $avatar_selected = in_array($avatar_selected, array_keys($avatar_list)) ? $avatar_selected : "blank.gif";
131 131
     $avatar_selected = array_key_exists($avatar_selected, $avatar_list) ? $avatar_selected : 'blank.gif';
132 132
     $avatar_select->addOptionArray($avatar_list);
133
-    $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"uploads\", \"\", \"" . XOOPS_URL . "\")'");
133
+    $avatar_select->setExtra("onchange='showImgSelected(\"avatar\", \"user_avatar\", \"uploads\", \"\", \"".XOOPS_URL."\")'");
134 134
     $avatar_tray = new XoopsFormElementTray(_US_AVATAR, '&nbsp;');
135 135
     $avatar_tray->addElement($avatar_select);
136
-    $avatar_tray->addElement(new XoopsFormLabel('', "<a href=\"javascript:openWithSelfMain('" . XOOPS_URL . "/misc.php?action=showpopups&amp;type=avatars','avatars',600,400);\">" . _LIST . '</a><br>'));
137
-    $avatar_tray->addElement(new XoopsFormLabel('', "<br><img src='" . XOOPS_UPLOAD_URL . '/' . $avatar_selected . "' name='avatar' id='avatar' alt='' />"));
136
+    $avatar_tray->addElement(new XoopsFormLabel('', "<a href=\"javascript:openWithSelfMain('".XOOPS_URL."/misc.php?action=showpopups&amp;type=avatars','avatars',600,400);\">"._LIST.'</a><br>'));
137
+    $avatar_tray->addElement(new XoopsFormLabel('', "<br><img src='".XOOPS_UPLOAD_URL.'/'.$avatar_selected."' name='avatar' id='avatar' alt='' />"));
138 138
     $form2->addElement($avatar_tray);
139 139
     $form2->addElement(new XoopsFormHidden('uid', $GLOBALS['xoopsUser']->getVar('uid')));
140 140
     $form2->addElement(new XoopsFormHidden('op', 'avatarchoose'));
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 if ($op === 'avatarupload') {
146 146
     if (!$GLOBALS['xoopsSecurity']->check()) {
147
-        redirect_header('index.php', 3, _US_NOEDITRIGHT . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
147
+        redirect_header('index.php', 3, _US_NOEDITRIGHT.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
148 148
         exit;
149 149
     }
150 150
     $xoops_upload_file = array();
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     }
161 161
     if ($GLOBALS['xoopsConfigUser']['avatar_allow_upload'] == 1 && $GLOBALS['xoopsUser']->getVar('posts') >= $GLOBALS['xoopsConfigUser']['avatar_minposts']) {
162 162
         include_once $GLOBALS['xoops']->path('class/uploader.php');
163
-        $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/avatars', array(
163
+        $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH.'/avatars', array(
164 164
             'image/gif',
165 165
             'image/jpeg',
166 166
             'image/pjpeg',
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
                 /* @var $avt_handler XoopsAvatarHandler */
173 173
                 $avt_handler = xoops_getHandler('avatar');
174 174
                 $avatar      = $avt_handler->create();
175
-                $avatar->setVar('avatar_file', 'avatars/' . $uploader->getSavedFileName());
175
+                $avatar->setVar('avatar_file', 'avatars/'.$uploader->getSavedFileName());
176 176
                 $avatar->setVar('avatar_name', $GLOBALS['xoopsUser']->getVar('uname'));
177 177
                 $avatar->setVar('avatar_mimetype', $uploader->getMediaType());
178 178
                 $avatar->setVar('avatar_display', 1);
@@ -185,16 +185,16 @@  discard block
 block discarded – undo
185 185
                         $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar));
186 186
                         if (!empty($avatars) && count($avatars) == 1 && is_object($avatars[0])) {
187 187
                             $avt_handler->delete($avatars[0]);
188
-                            $oldavatar_path = realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar);
188
+                            $oldavatar_path = realpath(XOOPS_UPLOAD_PATH.'/'.$oldavatar);
189 189
                             if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) {
190 190
                                 unlink($oldavatar_path);
191 191
                             }
192 192
                         }
193 193
                     }
194
-                    $sql = sprintf('UPDATE %s SET user_avatar = %s WHERE uid = %u', $GLOBALS['xoopsDB']->prefix('users'), $GLOBALS['xoopsDB']->quoteString('avatars/' . $uploader->getSavedFileName()), $GLOBALS['xoopsUser']->getVar('uid'));
194
+                    $sql = sprintf('UPDATE %s SET user_avatar = %s WHERE uid = %u', $GLOBALS['xoopsDB']->prefix('users'), $GLOBALS['xoopsDB']->quoteString('avatars/'.$uploader->getSavedFileName()), $GLOBALS['xoopsUser']->getVar('uid'));
195 195
                     $GLOBALS['xoopsDB']->query($sql);
196 196
                     $avt_handler->addUser($avatar->getVar('avatar_id'), $GLOBALS['xoopsUser']->getVar('uid'));
197
-                    redirect_header('userinfo.php?t=' . time() . '&amp;uid=' . $GLOBALS['xoopsUser']->getVar('uid'), 3, _US_PROFUPDATED);
197
+                    redirect_header('userinfo.php?t='.time().'&amp;uid='.$GLOBALS['xoopsUser']->getVar('uid'), 3, _US_PROFUPDATED);
198 198
                 }
199 199
             }
200 200
         }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 
205 205
 if ($op === 'avatarchoose') {
206 206
     if (!$GLOBALS['xoopsSecurity']->check()) {
207
-        redirect_header('index.php', 3, _US_NOEDITRIGHT . '<br>' . implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
207
+        redirect_header('index.php', 3, _US_NOEDITRIGHT.'<br>'.implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
208 208
         exit;
209 209
     }
210 210
     $uid = 0;
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         }
227 227
         unset($avatars, $criteria_avatar);
228 228
     }
229
-    $user_avatarpath = realpath(XOOPS_UPLOAD_PATH . '/' . $user_avatar);
229
+    $user_avatarpath = realpath(XOOPS_UPLOAD_PATH.'/'.$user_avatar);
230 230
     if (0 === strpos($user_avatarpath, realpath(XOOPS_UPLOAD_PATH)) && is_file($user_avatarpath)) {
231 231
         $oldavatar = $GLOBALS['xoopsUser']->getVar('user_avatar');
232 232
         $GLOBALS['xoopsUser']->setVar('user_avatar', $user_avatar);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar));
244 244
             if (!empty($avatars) && count($avatars) == 1 && is_object($avatars[0])) {
245 245
                 $avt_handler->delete($avatars[0]);
246
-                $oldavatar_path = realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar);
246
+                $oldavatar_path = realpath(XOOPS_UPLOAD_PATH.'/'.$oldavatar);
247 247
                 if (0 === strpos($oldavatar_path, realpath(XOOPS_UPLOAD_PATH)) && is_file($oldavatar_path)) {
248 248
                     unlink($oldavatar_path);
249 249
                 }
@@ -256,6 +256,6 @@  discard block
 block discarded – undo
256 256
             }
257 257
         }
258 258
     }
259
-    redirect_header('userinfo.php?uid=' . $uid, 0, _US_PROFUPDATED);
259
+    redirect_header('userinfo.php?uid='.$uid, 0, _US_PROFUPDATED);
260 260
 }
261
-include __DIR__ . '/footer.php';
261
+include __DIR__.'/footer.php';
Please login to merge, or discard this patch.
htdocs/modules/profile/class/field.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
         if (!($obj instanceof $this->className)) {
467 467
             return false;
468 468
         }
469
-         /* @var $profile_handler ProfileProfileHandler */
469
+            /* @var $profile_handler ProfileProfileHandler */
470 470
         $profile_handler = xoops_getModuleHandler('profile', 'profile');
471 471
         $obj->setVar('field_name', str_replace(' ', '_', $obj->getVar('field_name')));
472 472
         $obj->cleanVars();
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
         if (!($obj instanceof $this->className)) {
609 609
             return false;
610 610
         }
611
-         /* @var $profile_handler ProfileProfileHandler */
611
+            /* @var $profile_handler ProfileProfileHandler */
612 612
         $profile_handler = xoops_getModuleHandler('profile', 'profile');
613 613
         // remove column from table
614 614
         $sql = 'ALTER TABLE ' . $profile_handler->table . ' DROP `' . $obj->getVar('field_name', 'n') . '`';
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
                     $eltmsg                          = empty($caption) ? sprintf(_FORM_ENTER, $name) : sprintf(_FORM_ENTER, $caption);
141 141
                     $eltmsg                          = str_replace('"', '\"', stripslashes($eltmsg));
142
-                    $element->customValidationCode[] = "\nvar hasSelected = false; var selectBox = myform.{$name};" . "for (i = 0; i < selectBox.options.length; i++) { if (selectBox.options[i].selected == true && selectBox.options[i].value != '') { hasSelected = true; break; } }" . "if (!hasSelected) { window.alert(\"{$eltmsg}\"); selectBox.focus(); return false; }";
142
+                    $element->customValidationCode[] = "\nvar hasSelected = false; var selectBox = myform.{$name};"."for (i = 0; i < selectBox.options.length; i++) { if (selectBox.options[i].selected == true && selectBox.options[i].value != '') { hasSelected = true; break; } }"."if (!hasSelected) { window.alert(\"{$eltmsg}\"); selectBox.focus(); return false; }";
143 143
                 }
144 144
                 $element->addOptionArray($options);
145 145
                 break;
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      **/
227 227
     public function getOutputValue(&$user, $profile)
228 228
     {
229
-        if (file_exists($file = $GLOBALS['xoops']->path('modules/profile/language/' . $GLOBALS['xoopsConfig']['language'] . '/modinfo.php'))) {
229
+        if (file_exists($file = $GLOBALS['xoops']->path('modules/profile/language/'.$GLOBALS['xoopsConfig']['language'].'/modinfo.php'))) {
230 230
             include_once $file;
231 231
         } else {
232 232
             include_once $GLOBALS['xoops']->path('modules/profile/language/english/modinfo.php');
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             case 'textbox':
240 240
                 $value = is_array($value) ? $value[0] : $value;
241 241
                 if ($this->getVar('field_name') === 'url' && $value !== '') {
242
-                    return '<a href="' . formatURL($value) . '" rel="external">' . $value . '</a>';
242
+                    return '<a href="'.formatURL($value).'" rel="external">'.$value.'</a>';
243 243
                 } else {
244 244
                     return $value;
245 245
                 }
@@ -333,10 +333,10 @@  discard block
 block discarded – undo
333 333
                 $userrank       = $user->rank();
334 334
                 $user_rankimage = '';
335 335
                 if (isset($userrank['image']) && $userrank['image'] !== '') {
336
-                    $user_rankimage = '<img src="' . XOOPS_UPLOAD_URL . '/' . $userrank['image'] . '" alt="' . $userrank['title'] . '" /><br>';
336
+                    $user_rankimage = '<img src="'.XOOPS_UPLOAD_URL.'/'.$userrank['image'].'" alt="'.$userrank['title'].'" /><br>';
337 337
                 }
338 338
 
339
-                return $user_rankimage . $userrank['title'];
339
+                return $user_rankimage.$userrank['title'];
340 340
                 break;
341 341
 
342 342
             case 'yesno':
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
             $this->table_link = $this->db->prefix('profile_category');
444 444
             $criteria         = new Criteria('o.field_id', 0, '!=');
445 445
             $criteria->setSort('l.cat_weight ASC, o.field_weight');
446
-            $field_objs =& $this->getByLink($criteria, array('o.*'), true, 'cat_id', 'cat_id');
446
+            $field_objs = & $this->getByLink($criteria, array('o.*'), true, 'cat_id', 'cat_id');
447 447
             foreach (array_keys($field_objs) as $i) {
448 448
                 $fields[$field_objs[$i]->getVar('field_name')] = $field_objs[$i];
449 449
             }
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
                 //update column information
530 530
                 $changetype = 'MODIFY COLUMN';
531 531
             }
532
-            $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? '(' . $obj->getVar('field_maxlength') . ')' : '';
532
+            $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? '('.$obj->getVar('field_maxlength').')' : '';
533 533
 
534 534
             //set type
535 535
             switch ($obj->getVar('field_valuetype')) {
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
                     break;
580 580
             }
581 581
 
582
-            $sql = 'ALTER TABLE `' . $profile_handler->table . '` ' . $changetype . ' `' . $obj->cleanVars['field_name'] . '` ' . $type . $maxlengthstring . ' NULL';
582
+            $sql = 'ALTER TABLE `'.$profile_handler->table.'` '.$changetype.' `'.$obj->cleanVars['field_name'].'` '.$type.$maxlengthstring.' NULL';
583 583
             $result = $force ? $this->db->queryF($sql) : $this->db->query($sql);
584 584
             if (!$result) {
585 585
                 $obj->setErrors($this->db->error());
@@ -611,7 +611,7 @@  discard block
 block discarded – undo
611 611
          /* @var $profile_handler ProfileProfileHandler */
612 612
         $profile_handler = xoops_getModuleHandler('profile', 'profile');
613 613
         // remove column from table
614
-        $sql = 'ALTER TABLE ' . $profile_handler->table . ' DROP `' . $obj->getVar('field_name', 'n') . '`';
614
+        $sql = 'ALTER TABLE '.$profile_handler->table.' DROP `'.$obj->getVar('field_name', 'n').'`';
615 615
         if ($this->db->query($sql)) {
616 616
             //change this to update the cached field information storage
617 617
             if (!parent::delete($obj, $force)) {
Please login to merge, or discard this patch.
htdocs/modules/profile/class/visibility.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
     public function getVisibleFields($profile_groups, $user_groups = null)
60 60
     {
61 61
         $profile_groups[] = $user_groups[] = 0;
62
-        $sql  = "SELECT field_id FROM {$this->table} WHERE profile_group IN (" . implode(',', $profile_groups) . ')';
63
-        $sql .= ' AND user_group IN (' . implode(',', $user_groups) . ')';
62
+        $sql  = "SELECT field_id FROM {$this->table} WHERE profile_group IN (".implode(',', $profile_groups).')';
63
+        $sql .= ' AND user_group IN ('.implode(',', $user_groups).')';
64 64
         $field_ids = array();
65 65
         if ($result = $this->db->query($sql)) {
66 66
             while (false !== (list($field_id) = $this->db->fetchRow($result))) {
Please login to merge, or discard this patch.
htdocs/modules/profile/class/profile.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
             $field->setVar('field_options', array());
236 236
         }
237 237
         if ($this->insertField($field)) {
238
-            $msg = '&nbsp;&nbsp;Field <strong>' . $vars['name'] . '</strong> added to the database';
238
+            $msg = '&nbsp;&nbsp;Field <strong>'.$vars['name'].'</strong> added to the database';
239 239
         } else {
240
-            $msg = '&nbsp;&nbsp;<span class="red">ERROR: Could not insert field <strong>' . $vars['name'] . '</strong> into the database. ' . implode(' ', $field->getErrors()) . $this->db->error() . '</span>';
240
+            $msg = '&nbsp;&nbsp;<span class="red">ERROR: Could not insert field <strong>'.$vars['name'].'</strong> into the database. '.implode(' ', $field->getErrors()).$this->db->error().'</span>';
241 241
         }
242 242
         unset($field);
243 243
 
@@ -295,32 +295,32 @@  discard block
 block discarded – undo
295 295
         $searchvars_profile = array_diff($searchvars, $uservars);
296 296
         $sv                 = array('u.uid, u.uname, u.email, u.user_viewemail');
297 297
         if (!empty($searchvars_user)) {
298
-            $sv[0] .= ',u.' . implode(', u.', $searchvars_user);
298
+            $sv[0] .= ',u.'.implode(', u.', $searchvars_user);
299 299
         }
300 300
         if (!empty($searchvars_profile)) {
301
-            $sv[] = 'p.' . implode(', p.', $searchvars_profile);
301
+            $sv[] = 'p.'.implode(', p.', $searchvars_profile);
302 302
         }
303 303
 
304
-        $sql_select = 'SELECT ' . (empty($searchvars) ? 'u.*, p.*' : implode(', ', $sv));
305
-        $sql_from   = ' FROM ' . $this->db->prefix('users') . ' AS u LEFT JOIN ' . $this->table . ' AS p ON u.uid=p.profile_id' . (empty($groups) ? '' : ' LEFT JOIN ' . $this->db->prefix('groups_users_link') . ' AS g ON u.uid=g.uid');
304
+        $sql_select = 'SELECT '.(empty($searchvars) ? 'u.*, p.*' : implode(', ', $sv));
305
+        $sql_from   = ' FROM '.$this->db->prefix('users').' AS u LEFT JOIN '.$this->table.' AS p ON u.uid=p.profile_id'.(empty($groups) ? '' : ' LEFT JOIN '.$this->db->prefix('groups_users_link').' AS g ON u.uid=g.uid');
306 306
         $sql_clause = ' WHERE 1=1';
307 307
         $sql_order  = '';
308 308
 
309 309
         $limit = $start = 0;
310 310
         if (isset($criteria) && is_subclass_of($criteria, 'CriteriaElement')) {
311
-            $sql_clause .= ' AND ' . $criteria->render();
311
+            $sql_clause .= ' AND '.$criteria->render();
312 312
             if ($criteria->getSort() !== '') {
313
-                $sql_order = ' ORDER BY ' . $criteria->getSort() . ' ' . $criteria->getOrder();
313
+                $sql_order = ' ORDER BY '.$criteria->getSort().' '.$criteria->getOrder();
314 314
             }
315 315
             $limit = $criteria->getLimit();
316 316
             $start = $criteria->getStart();
317 317
         }
318 318
 
319 319
         if (!empty($groups)) {
320
-            $sql_clause .= ' AND g.groupid IN (' . implode(', ', $groups) . ')';
320
+            $sql_clause .= ' AND g.groupid IN ('.implode(', ', $groups).')';
321 321
         }
322 322
 
323
-        $sql_users = $sql_select . $sql_from . $sql_clause . $sql_order;
323
+        $sql_users = $sql_select.$sql_from.$sql_clause.$sql_order;
324 324
         $result    = $this->db->query($sql_users, $limit, $start);
325 325
 
326 326
         if (!$result) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
         $count = count($users);
349 349
         if ((!empty($limit) && $count >= $limit) || !empty($start)) {
350
-            $sql_count = 'SELECT COUNT(*)' . $sql_from . $sql_clause;
350
+            $sql_count = 'SELECT COUNT(*)'.$sql_from.$sql_clause;
351 351
             $result    = $this->db->query($sql_count);
352 352
             list($count) = $this->db->fetchRow($result);
353 353
         }
Please login to merge, or discard this patch.
htdocs/modules/profile/admin/category.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@
 block discarded – undo
89 89
             }
90 90
         } else {
91 91
             xoops_confirm(array(
92
-                              'ok' => 1,
93
-                              'id' => $_REQUEST['id'],
94
-                              'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('cat_title')));
92
+                                'ok' => 1,
93
+                                'id' => $_REQUEST['id'],
94
+                                'op' => 'delete'), $_SERVER['REQUEST_URI'], sprintf(_PROFILE_AM_RUSUREDEL, $obj->getVar('cat_title')));
95 95
         }
96 96
         break;
97 97
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
  * @author         XOOPS Development Team
18 18
  */
19 19
 
20
-include_once __DIR__ . '/admin_header.php';
20
+include_once __DIR__.'/admin_header.php';
21 21
 xoops_cp_header();
22 22
 $indexAdmin = new ModuleAdmin();
23 23
 
24
-$indexAdmin->addItemButton(_ADD . ' ' . _PROFILE_AM_CATEGORY, 'category.php?op=new', 'add', '');
24
+$indexAdmin->addItemButton(_ADD.' '._PROFILE_AM_CATEGORY, 'category.php?op=new', 'add', '');
25 25
 
26 26
 echo $indexAdmin->addNavigation(basename(__FILE__));
27 27
 echo $indexAdmin->renderButton('right', '');
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
         break;
42 42
 
43 43
     case 'new':
44
-        include_once dirname(__DIR__) . '/include/forms.php';
44
+        include_once dirname(__DIR__).'/include/forms.php';
45 45
         $obj  = $handler->create();
46 46
         $form = $obj->getForm();
47 47
         $form->display();
48 48
         break;
49 49
 
50 50
     case 'edit':
51
-        include_once dirname(__DIR__) . '/include/forms.php';
51
+        include_once dirname(__DIR__).'/include/forms.php';
52 52
         $obj  = $handler->get($_REQUEST['id']);
53 53
         $form = $obj->getForm();
54 54
         $form->display();
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         if ($handler->insert($obj)) {
70 70
             redirect_header('category.php', 3, sprintf(_PROFILE_AM_SAVEDSUCCESS, _PROFILE_AM_CATEGORY));
71 71
         }
72
-        include_once dirname(__DIR__) . '/include/forms.php';
72
+        include_once dirname(__DIR__).'/include/forms.php';
73 73
         echo $obj->getHtmlErrors();
74 74
         /* @var  $form XoopsThemeForm */
75 75
         $form = $obj->getForm();
@@ -98,4 +98,4 @@  discard block
 block discarded – undo
98 98
 if (isset($template_main)) {
99 99
     $GLOBALS['xoopsTpl']->display("db:{$template_main}");
100 100
 }
101
-include_once __DIR__ . '/admin_footer.php';
101
+include_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
htdocs/modules/profile/admin/admin_header.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 $path = dirname(dirname(dirname(__DIR__)));
20
-include_once $path . '/mainfile.php';
21
-include_once $path . '/include/cp_functions.php';
22
-require_once $path . '/include/cp_header.php';
20
+include_once $path.'/mainfile.php';
21
+include_once $path.'/include/cp_functions.php';
22
+require_once $path.'/include/cp_header.php';
23 23
 
24 24
 global $xoopsModule;
25 25
 
@@ -33,18 +33,18 @@  discard block
 block discarded – undo
33 33
 xoops_loadLanguage('modinfo', $thisModuleDir);
34 34
 xoops_loadLanguage('main', $thisModuleDir);
35 35
 
36
-$pathIcon16      = '../' . $xoopsModule->getInfo('icons16');
37
-$pathIcon32      = '../' . $xoopsModule->getInfo('icons32');
36
+$pathIcon16      = '../'.$xoopsModule->getInfo('icons16');
37
+$pathIcon32      = '../'.$xoopsModule->getInfo('icons32');
38 38
 $pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
39 39
 
40 40
 $myts = MyTextSanitizer::getInstance();
41 41
 
42 42
 if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
43
-    include_once XOOPS_ROOT_PATH . '/class/template.php';
43
+    include_once XOOPS_ROOT_PATH.'/class/template.php';
44 44
     $xoopsTpl = new XoopsTpl();
45 45
 }
46 46
 
47
-include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');
47
+include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
48 48
 
49 49
 xoops_loadLanguage('user');
50 50
 if (!isset($GLOBALS['xoopsTpl']) || !is_object($GLOBALS['xoopsTpl'])) {
Please login to merge, or discard this patch.