@@ -21,13 +21,13 @@ discard block |
||
21 | 21 | * @author Taiwen Jiang <[email protected]> |
22 | 22 | */ |
23 | 23 | |
24 | -include __DIR__ . '/header.php'; |
|
24 | +include __DIR__.'/header.php'; |
|
25 | 25 | |
26 | 26 | $xoops = Xoops::getInstance(); |
27 | 27 | $xoops->getConfigs(); |
28 | 28 | |
29 | 29 | if (!$xoops->user || $xoops->getConfig('allow_chgmail') != 1) { |
30 | - $xoops->redirect(\XoopsBaseConfig::get('url') . "/modules/" . $xoops->module->getVar('dirname', 'n') . "/", 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
30 | + $xoops->redirect(\XoopsBaseConfig::get('url')."/modules/".$xoops->module->getVar('dirname', 'n')."/", 2, XoopsLocale::E_NO_ACCESS_PERMISSION); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | $xoops->header('module:profile/profile_email.tpl'); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $xoopsMailer->setTemplate('emailchanged.tpl'); |
68 | 68 | $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); |
69 | 69 | $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); |
70 | - $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url') . "/"); |
|
70 | + $xoopsMailer->assign("SITEURL", \XoopsBaseConfig::get('url')."/"); |
|
71 | 71 | $xoopsMailer->assign("NEWEMAIL", $email); |
72 | 72 | $xoopsMailer->setToEmails($email); |
73 | 73 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
@@ -79,9 +79,9 @@ discard block |
||
79 | 79 | $msg = implode('<br />', $xoops->user->getErrors()); |
80 | 80 | } |
81 | 81 | } |
82 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/userinfo.php?uid=' . $xoops->user->getVar('uid'), 2, $msg); |
|
82 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/modules/'.$xoops->module->getVar('dirname', 'n').'/userinfo.php?uid='.$xoops->user->getVar('uid'), 2, $msg); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | $xoops->registry()->get('profile_breadcrumbs')->addItem(new Link(['caption' => _PROFILE_MA_CHANGEMAIL])); |
86 | 86 | |
87 | -include __DIR__ . '/footer.php'; |
|
87 | +include __DIR__.'/footer.php'; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | // View Account |
27 | 27 | $ret[] = [ |
28 | 28 | 'name' => XoopsLocale::VIEW_ACCOUNT, |
29 | - 'link' => $helper->url('userinfo.php?uid=' . $helper->xoops()->user->getVar('uid')), |
|
29 | + 'link' => $helper->url('userinfo.php?uid='.$helper->xoops()->user->getVar('uid')), |
|
30 | 30 | 'icon' => 'glyphicon-user', |
31 | 31 | ]; |
32 | 32 |
@@ -39,7 +39,7 @@ |
||
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 | } |
@@ -227,9 +227,9 @@ discard block |
||
227 | 227 | $field->setVar('field_options', array()); |
228 | 228 | } |
229 | 229 | if ($this->insertField($field)) { |
230 | - $msg = ' Field <strong>' . $vars['name'] . '</strong> added to the database'; |
|
230 | + $msg = ' Field <strong>'.$vars['name'].'</strong> added to the database'; |
|
231 | 231 | } else { |
232 | - $msg = ' <span class="red">ERROR: Could not insert field <strong>' . $vars['name'] . '</strong> into the database. ' . implode(' ', $field->getErrors()) . $this->db2->errorInfo() . '</span>'; |
|
232 | + $msg = ' <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 |
||
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(); |
@@ -124,7 +124,7 @@ |
||
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>"; |
@@ -143,7 +143,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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)) { |
@@ -22,7 +22,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -23,7 +23,7 @@ |
||
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()); |
@@ -18,7 +18,7 @@ |
||
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 |