Completed
Push — master ( 5061b6...54eaec )
by Michael
12:20 queued 12:16
created
htdocs/modules/profile/class/plugin/menus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         if (\Xoops::getInstance()->isUser()) {
40 40
             $ret[] = array('name' => _PROFILE_MI_EDITACCOUNT, 'url' => "edituser.php");
41 41
             $ret[] = array('name' => _PROFILE_MI_PAGE_SEARCH, 'url' => "search.php");
42
-            $ret[] = array('name' => _PROFILE_MI_CHANGEPASS,  'url' => "changepass.php");
42
+            $ret[] = array('name' => _PROFILE_MI_CHANGEPASS, 'url' => "changepass.php");
43 43
         }
44 44
         return $ret;
45 45
     }
Please login to merge, or discard this patch.
htdocs/modules/profile/class/profile.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -227,9 +227,9 @@  discard block
 block discarded – undo
227 227
             $field->setVar('field_options', array());
228 228
         }
229 229
         if ($this->insertField($field)) {
230
-            $msg = '&nbsp;&nbsp;Field <strong>' . $vars['name'] . '</strong> added to the database';
230
+            $msg = '&nbsp;&nbsp;Field <strong>'.$vars['name'].'</strong> added to the database';
231 231
         } else {
232
-            $msg = '&nbsp;&nbsp;<span class="red">ERROR: Could not insert field <strong>' . $vars['name'] . '</strong> into the database. ' . implode(' ', $field->getErrors()) . $this->db2->errorInfo() . '</span>';
232
+            $msg = '&nbsp;&nbsp;<span class="red">ERROR: Could not insert field <strong>'.$vars['name'].'</strong> into the database. '.implode(' ', $field->getErrors()).$this->db2->errorInfo().'</span>';
233 233
         }
234 234
         unset($field);
235 235
         return $msg;
@@ -283,10 +283,10 @@  discard block
 block discarded – undo
283 283
         $searchvars_profile = array_diff($searchvars, $uservars);
284 284
         $sv = array('u.uid, u.uname, u.email, u.user_viewemail');
285 285
         if (!empty($searchvars_user)) {
286
-            $sv[0] .= ",u." . implode(", u.", $searchvars_user);
286
+            $sv[0] .= ",u.".implode(", u.", $searchvars_user);
287 287
         }
288 288
         if (!empty($searchvars_profile)) {
289
-            $sv[] = "p." . implode(", p.", $searchvars_profile);
289
+            $sv[] = "p.".implode(", p.", $searchvars_profile);
290 290
         }
291 291
 
292 292
         $qb = $xoops->db()->createXoopsQueryBuilder();
Please login to merge, or discard this patch.
htdocs/modules/profile/class/form/field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
                     $this->addElement($remove_options);
125 125
                 }
126 126
 
127
-                $option_text = "<table  cellspacing='1'><tr><td class='width20'>" . _PROFILE_AM_KEY . "</td><td>" . _PROFILE_AM_VALUE . "</td></tr>";
127
+                $option_text = "<table  cellspacing='1'><tr><td class='width20'>"._PROFILE_AM_KEY."</td><td>"._PROFILE_AM_VALUE."</td></tr>";
128 128
                 for ($i = 0; $i < 3; ++$i) {
129 129
                     $option_text .= "<tr><td><input type='text' name='addOption[{$i}][key]' id='addOption[{$i}][key]' size='15' /></td><td><input type='text' name='addOption[{$i}][value]' id='addOption[{$i}][value]' size='35' /></td></tr>";
130 130
                     $option_text .= "<tr height='3px'><td colspan='2'> </td></tr>";
Please login to merge, or discard this patch.
htdocs/modules/profile/class/field.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
                     $eltmsg = empty($caption) ? sprintf(XoopsLocale::F_ENTER, $name) : sprintf(XoopsLocale::F_ENTER, $caption);
145 145
                     $eltmsg = str_replace('"', '\"', stripslashes($eltmsg));
146
-                    $element->addCustomValidationCode("\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; }");
146
+                    $element->addCustomValidationCode("\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; }");
147 147
                 }
148 148
                 $element->addOptionArray($options);
149 149
                 break;
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
209 209
             case 'theme':
210 210
                 $element = new Xoops\Form\Select($caption, $name, $value);
211 211
                 $element->addOption("0", _PROFILE_MA_SITEDEFAULT);
212
-                $handle = opendir(\XoopsBaseConfig::get('themes-path') . '/');
212
+                $handle = opendir(\XoopsBaseConfig::get('themes-path').'/');
213 213
                 $dirlist = array();
214 214
                 while (false !== ($file = readdir($handle))) {
215
-                    if (is_dir(\XoopsBaseConfig::get('themes-path') . '/' . $file) && !preg_match("/^[.]{1,2}$/", $file) && strtolower($file) !== 'cvs') {
216
-                        if (XoopsLoad::fileExists(\XoopsBaseConfig::get('themes-path') . "/" . $file . "/theme.tpl") && in_array($file, $xoops->getConfig('theme_set_allowed'))) {
215
+                    if (is_dir(\XoopsBaseConfig::get('themes-path').'/'.$file) && !preg_match("/^[.]{1,2}$/", $file) && strtolower($file) !== 'cvs') {
216
+                        if (XoopsLoad::fileExists(\XoopsBaseConfig::get('themes-path')."/".$file."/theme.tpl") && in_array($file, $xoops->getConfig('theme_set_allowed'))) {
217 217
                             $dirlist[$file] = $file;
218 218
                         }
219 219
                     }
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             default:
252 252
             case "textbox":
253 253
                 if ($this->getVar('field_name') === 'url' && $value != '') {
254
-                    return '<a href="' . $xoops->formatURL($value) . '" rel="external">' . $value . '</a>';
254
+                    return '<a href="'.$xoops->formatURL($value).'" rel="external">'.$value.'</a>';
255 255
                 } else {
256 256
                     return $value;
257 257
                 }
@@ -341,9 +341,9 @@  discard block
 block discarded – undo
341 341
                 $userrank = $user->rank();
342 342
                 $user_rankimage = "";
343 343
                 if (isset($userrank['image']) && $userrank['image'] != "") {
344
-                    $user_rankimage = '<img src="' . $userrank['image'] . '" alt="' . $userrank['title'] . '" /><br />';
344
+                    $user_rankimage = '<img src="'.$userrank['image'].'" alt="'.$userrank['title'].'" /><br />';
345 345
                 }
346
-                return $user_rankimage . $userrank['title'];
346
+                return $user_rankimage.$userrank['title'];
347 347
                 break;
348 348
 
349 349
             case "yesno":
@@ -518,9 +518,9 @@  discard block
 block discarded – undo
518 518
                 $changetype = "ADD";
519 519
             } else {
520 520
                 //update column information
521
-                $changetype = "CHANGE `" . $obj->getVar('field_name', 'n') . "`";
521
+                $changetype = "CHANGE `".$obj->getVar('field_name', 'n')."`";
522 522
             }
523
-            $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? "(" . $obj->getVar('field_maxlength') . ")" : "";
523
+            $maxlengthstring = $obj->getVar('field_maxlength') > 0 ? "(".$obj->getVar('field_maxlength').")" : "";
524 524
 
525 525
             //set type
526 526
             switch ($obj->getVar('field_valuetype')) {
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
                     break;
563 563
             }
564 564
 
565
-            $sql = "ALTER TABLE `" . $profile_handler->table . "` " . $changetype . " `" . $obj->cleanVars['field_name'] . "` " . $type . $maxlengthstring . ' NULL';
565
+            $sql = "ALTER TABLE `".$profile_handler->table."` ".$changetype." `".$obj->cleanVars['field_name']."` ".$type.$maxlengthstring.' NULL';
566 566
             if ($force) {
567 567
                 $this->db2->setForce(true);
568 568
             }
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
         $xoops = Xoops::getInstance();
593 593
         $profile_handler = \Xoops::getModuleHelper('profile')->getHandler('profile');
594 594
         // remove column from table
595
-        $sql = "ALTER TABLE " . $profile_handler->table . " DROP `" . $obj->getVar('field_name', 'n') . "`";
595
+        $sql = "ALTER TABLE ".$profile_handler->table." DROP `".$obj->getVar('field_name', 'n')."`";
596 596
         if ($this->db2->query($sql)) {
597 597
             //change this to update the cached field information storage
598 598
             if (!parent::delete($obj, $force)) {
Please login to merge, or discard this patch.
htdocs/modules/profile/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  * @author          Taiwen Jiang <[email protected]>
23 23
  */
24 24
 
25
-include __DIR__ . '/header.php';
25
+include __DIR__.'/header.php';
26 26
 $xoops = Xoops::getInstance();
27 27
 
28 28
 $op = 'main';
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $xoops->tpl()->assign('lang_youremail', XoopsLocale::C_YOUR_EMAIL);
51 51
         $xoops->tpl()->assign('lang_sendpassword', XoopsLocale::SEND_PASSWORD);
52 52
         $xoops->tpl()->assign('mailpasswd_token', $xoops->security()->createToken());
53
-        include __DIR__ . '/footer.php';
53
+        include __DIR__.'/footer.php';
54 54
     }
55 55
     if (!empty($_GET['xoops_redirect'])) {
56 56
         $redirect = trim($_GET['xoops_redirect']);
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
             }
63 63
         }
64 64
         if (!$isExternal) {
65
-            header('Location: ' . $redirect);
65
+            header('Location: '.$redirect);
66 66
             exit();
67 67
         }
68 68
     }
69
-    header('Location: ./userinfo.php?uid=' . $xoops->user->getVar('uid'));
69
+    header('Location: ./userinfo.php?uid='.$xoops->user->getVar('uid'));
70 70
     exit();
71 71
 }
72 72
 
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
     if ($xoops->isUser()) {
84 84
         $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid'));
85 85
     }
86
-    $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT . '<br />' . XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE;
87
-    $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 1, $message);
86
+    $message = XoopsLocale::S_YOU_ARE_NOW_LOGGED_OUT.'<br />'.XoopsLocale::S_THANK_YOU_FOR_VISITING_OUR_SITE;
87
+    $xoops->redirect(\XoopsBaseConfig::get('url').'/', 1, $message);
88 88
 }
89 89
 
90 90
 if ($op === 'actv') {
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
 
96 96
 if ($op === 'delete') {
97 97
     if (!$xoops->isUser() || $xoops->getConfig('self_delete') != 1) {
98
-        $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION);
98
+        $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_NO_ACTION_PERMISSION);
99 99
     } else {
100 100
         $groups = $xoops->user->getGroups();
101 101
         if (in_array(FixedGroups::ADMIN, $groups)) {
102 102
             // users in the webmasters group may not be deleted
103
-            $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 5, XoopsLocale::E_USER_IN_WEBMASTER_GROUP_CANNOT_BE_REMOVED);
103
+            $xoops->redirect(\XoopsBaseConfig::get('url').'/', 5, XoopsLocale::E_USER_IN_WEBMASTER_GROUP_CANNOT_BE_REMOVED);
104 104
         }
105 105
         $ok = !isset($_POST['ok']) ? 0 : (int)($_POST['ok']);
106 106
         if ($ok != 1) {
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
             echo $xoops->confirm(
109 109
                 array('op' => 'delete', 'ok' => 1),
110 110
                 'user.php',
111
-                XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT . '<br/>' . XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO
111
+                XoopsLocale::Q_ARE_YOU_SURE_TO_DELETE_ACCOUNT.'<br/>'.XoopsLocale::THIS_WILL_REMOVE_ALL_YOUR_INFO
112 112
             );
113
-            include __DIR__ . '/footer.php';
113
+            include __DIR__.'/footer.php';
114 114
         } else {
115 115
             $del_uid = $xoops->user->getVar("uid");
116 116
             if (false != $xoops->getHandlerMember()->deleteUser($xoops->user)) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 }
123 123
                 $xoops->redirect('index.php', 5, XoopsLocale::S_YOUR_ACCOUNT_DELETED);
124 124
             }
125
-            $xoops->redirect(XOOPS_URL . '/', 5, XoopsLocale::E_NO_ACTION_PERMISSION);
125
+            $xoops->redirect(XOOPS_URL.'/', 5, XoopsLocale::E_NO_ACTION_PERMISSION);
126 126
         }
127 127
     }
128 128
 }
Please login to merge, or discard this patch.
htdocs/modules/profile/header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  * @author          Taiwen Jiang <[email protected]>
24 24
  */
25 25
 
26
-include dirname(dirname(__DIR__)) . '/mainfile.php';
26
+include dirname(dirname(__DIR__)).'/mainfile.php';
27 27
 $xoops = Xoops::getInstance();
28 28
 
29 29
 $xoops->registry()->set('profile_breadcrumbs', new ItemList());
Please login to merge, or discard this patch.
htdocs/modules/pdf/admin/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  * @since           2.6.0
19 19
  * @author          Mage Grégory (AKA Mage)
20 20
  */
21
-include __DIR__ . '/header.php';
21
+include __DIR__.'/header.php';
22 22
 
23 23
 $xoops = Xoops::getInstance();
24 24
 
Please login to merge, or discard this patch.
htdocs/modules/pdf/preloads/preload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public static function eventCoreServiceLocateHtmlToPdf(Provider $provider)
35 35
     {
36 36
         if (is_a($provider, '\Xoops\Core\Service\Provider')) {
37
-            $path = dirname(__DIR__) . '/class/HtmlToPdfProvider.php';
37
+            $path = dirname(__DIR__).'/class/HtmlToPdfProvider.php';
38 38
             require $path;
39 39
             $object = new HtmlToPdfProvider();
40 40
             $provider->register($object);
Please login to merge, or discard this patch.
htdocs/modules/pdf/class/HtmlToPdfProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
         $this->pdfKeywords = $pdfKeywords;
345 345
         if (isset($this->pdfEngine)) {
346 346
             $keywords =
347
-                is_array($this->pdfKeywords) ? implode(', ', $this->pdfKeywords) : (string) $this->pdfKeywords;
347
+                is_array($this->pdfKeywords) ? implode(', ', $this->pdfKeywords) : (string)$this->pdfKeywords;
348 348
             $this->pdfEngine->SetKeywords($keywords);
349 349
         }
350 350
     }
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             }
436 436
             if (isset($this->pdfKeywords)) {
437 437
                 $keywords =
438
-                    is_array($this->pdfKeywords) ? implode(', ', $this->pdfKeywords) : (string) $this->pdfKeywords;
438
+                    is_array($this->pdfKeywords) ? implode(', ', $this->pdfKeywords) : (string)$this->pdfKeywords;
439 439
                 $this->pdfEngine->SetKeywords($keywords);
440 440
             }
441 441
             if (!empty($this->pdfCreator)) {
@@ -466,21 +466,21 @@  discard block
 block discarded – undo
466 466
      */
467 467
     private function decodeEntities($text)
468 468
     {
469
-        $text= html_entity_decode($text, ENT_QUOTES, "UTF-8");
470
-        $text= preg_replace_callback(
469
+        $text = html_entity_decode($text, ENT_QUOTES, "UTF-8");
470
+        $text = preg_replace_callback(
471 471
             '/&#(\d+);/m',
472
-            function ($m) {
472
+            function($m) {
473 473
                 return utf8_encode(chr($m[1]));
474 474
             },
475 475
             $text
476 476
         ); // decimal notation
477
-        $text= preg_replace_callback(
477
+        $text = preg_replace_callback(
478 478
             '/&#x([a-f0-9]+);/mi',
479
-            function ($m) {
479
+            function($m) {
480 480
                 return utf8_encode(chr('0x'.$m[1]));
481 481
             },
482 482
             $text
483
-        );  //hex notation
483
+        ); //hex notation
484 484
         return $text;
485 485
     }
486 486
 }
Please login to merge, or discard this patch.