@@ -44,7 +44,7 @@ |
||
44 | 44 | // paypal |
45 | 45 | $modversion['paypal'] = array( |
46 | 46 | 'business' => '[email protected]', |
47 | - 'item_name' => 'Donation : ' . _PROFILE_MI_DESC, |
|
47 | + 'item_name' => 'Donation : '._PROFILE_MI_DESC, |
|
48 | 48 | 'amount' => 0, |
49 | 49 | 'currency_code' => 'USD', |
50 | 50 | ); |
@@ -24,16 +24,16 @@ discard block |
||
24 | 24 | * @author trabis <[email protected]> |
25 | 25 | */ |
26 | 26 | |
27 | -include __DIR__ . '/header.php'; |
|
27 | +include __DIR__.'/header.php'; |
|
28 | 28 | $xoops = Xoops::getInstance(); |
29 | 29 | |
30 | 30 | if ($xoops->isUser()) { |
31 | - header('location: userinfo.php?uid= ' . $xoops->user->getVar('uid')); |
|
31 | + header('location: userinfo.php?uid= '.$xoops->user->getVar('uid')); |
|
32 | 32 | exit(); |
33 | 33 | } |
34 | 34 | |
35 | 35 | if (!empty($_GET['op']) && in_array($_GET['op'], array('actv', 'activate'))) { |
36 | - header("location: ./activate.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING'])); |
|
36 | + header("location: ./activate.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
37 | 37 | exit(); |
38 | 38 | } |
39 | 39 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $regstep_handler = \Xoops::getModuleHelper('profile')->getHandler('regstep'); |
60 | 60 | |
61 | 61 | if (!$steps = $regstep_handler->getAll($criteria, null, false, false)) { |
62 | - $xoops->redirect(\XoopsBaseConfig::get('url') . '/', 6, _PROFILE_MA_NOSTEPSAVAILABLE); |
|
62 | + $xoops->redirect(\XoopsBaseConfig::get('url').'/', 6, _PROFILE_MA_NOSTEPSAVAILABLE); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | foreach (array_keys($steps) as $key) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $xoops->tpl()->assign('lang_register_steps', _PROFILE_MA_REGISTER_STEPS); |
73 | 73 | |
74 | 74 | $xoops->registry()->get('profile_breadcrumbs')->addItem( |
75 | - new Link(['caption' => _PROFILE_MA_REGISTER, 'link' => $xoops->url('modules/profile/register.php'),]) |
|
75 | + new Link(['caption' => _PROFILE_MA_REGISTER, 'link' => $xoops->url('modules/profile/register.php'), ]) |
|
76 | 76 | ); |
77 | 77 | |
78 | 78 | if (isset($steps[$current_step])) { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | if (isset($_POST['step']) && isset($_SESSION['profile_required'])) { |
161 | 161 | foreach ($_SESSION['profile_required'] as $name => $title) { |
162 | 162 | if (!isset($_POST[$name]) || empty($_POST[$name])) { |
163 | - $stop .= sprintf(XoopsLocale::F_ENTER, $title) . '<br />'; |
|
163 | + $stop .= sprintf(XoopsLocale::F_ENTER, $title).'<br />'; |
|
164 | 164 | } |
165 | 165 | } |
166 | 166 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | if ($xoops->getConfig('reg_dispdsclmr') != 0 && $xoops->getConfig('reg_disclaimer') != '') { |
178 | 178 | if (empty($agree_disc)) { |
179 | - $stop .= XoopsLocale::E_YOU_HAVE_TO_AGREE_TO_DISCLAIMER . '<br />'; |
|
179 | + $stop .= XoopsLocale::E_YOU_HAVE_TO_AGREE_TO_DISCLAIMER.'<br />'; |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | // Insert/update user and check if we have succeded |
225 | 225 | if (!$member_handler->insertUser($newuser)) { |
226 | - $stop .= XoopsLocale::E_USER_NOT_REGISTERED . "<br />"; |
|
226 | + $stop .= XoopsLocale::E_USER_NOT_REGISTERED."<br />"; |
|
227 | 227 | $stop .= implode('<br />', $newuser->getErrors()); |
228 | 228 | } else { |
229 | 229 | // User inserted! Now insert custom profile fields |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | |
247 | 247 | $message = ""; |
248 | 248 | if (!$member_handler->addUserToGroup(FixedGroups::USERS, $newuser->getVar('uid'))) { |
249 | - $message = _PROFILE_MA_REGISTER_NOTGROUP . "<br />"; |
|
249 | + $message = _PROFILE_MA_REGISTER_NOTGROUP."<br />"; |
|
250 | 250 | } else { |
251 | 251 | if ($xoops->getConfig('activation_type') == 1) { |
252 | 252 | XoopsUserUtility::sendWelcome($newuser); |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $xoopsMailer->setTemplate('register.tpl'); |
259 | 259 | $xoopsMailer->assign('SITENAME', $xoops->getConfig('sitename')); |
260 | 260 | $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); |
261 | - $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url') . "/"); |
|
261 | + $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url')."/"); |
|
262 | 262 | $xoopsMailer->assign('X_UPASS', $_POST['vpass']); |
263 | 263 | $xoopsMailer->setToUsers($newuser); |
264 | 264 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
@@ -277,10 +277,10 @@ discard block |
||
277 | 277 | $xoopsMailer->setTemplate('adminactivate.tpl'); |
278 | 278 | $xoopsMailer->assign('USERNAME', $newuser->getVar('uname')); |
279 | 279 | $xoopsMailer->assign('USEREMAIL', $newuser->getVar('email')); |
280 | - $xoopsMailer->assign('USERACTLINK', \XoopsBaseConfig::get('url') . "/modules/" . $xoops->module->getVar('dirname', 'n') . '/activate.php?id=' . $newuser->getVar('uid') . '&actkey=' . $newuser->getVar('actkey', 'n')); |
|
280 | + $xoopsMailer->assign('USERACTLINK', \XoopsBaseConfig::get('url')."/modules/".$xoops->module->getVar('dirname', 'n').'/activate.php?id='.$newuser->getVar('uid').'&actkey='.$newuser->getVar('actkey', 'n')); |
|
281 | 281 | $xoopsMailer->assign('SITENAME', $xoops->getConfig('sitename')); |
282 | 282 | $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); |
283 | - $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url') . "/"); |
|
283 | + $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url')."/"); |
|
284 | 284 | $xoopsMailer->setToGroups($member_handler->getGroup($xoops->getConfig('activation_group'))); |
285 | 285 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
286 | 286 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | } |
304 | 304 | |
305 | 305 | if (!empty($stop) || isset($steps[$current_step])) { |
306 | - include_once __DIR__ . '/include/forms.php'; |
|
306 | + include_once __DIR__.'/include/forms.php'; |
|
307 | 307 | $current_step = empty($stop) ? $current_step : $current_step - 1; |
308 | 308 | $reg_form = profile_getRegisterForm($newuser, $profile, $steps[$current_step]); |
309 | 309 | $reg_form->assign($xoops->tpl()); |
@@ -321,14 +321,14 @@ discard block |
||
321 | 321 | if (isset($_SESSION['profile_post']['_message_'])) { |
322 | 322 | //todo, if user is activated by admin, then we should inform it along with error messages. _US_YOURREGMAILNG is not enough |
323 | 323 | $messages = array( |
324 | - XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY, |
|
325 | - XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_BEEN_SENT_WITH_ACTIVATION_KEY, |
|
326 | - XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY, |
|
327 | - XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::PLEASE_WAIT_FOR_ACCOUNT_ACTIVATION |
|
324 | + XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY, |
|
325 | + XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_BEEN_SENT_WITH_ACTIVATION_KEY, |
|
326 | + XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY, |
|
327 | + XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::PLEASE_WAIT_FOR_ACCOUNT_ACTIVATION |
|
328 | 328 | ); |
329 | 329 | $xoops->tpl()->assign('finish_message', $messages[$_SESSION['profile_post']['_message_']]); |
330 | 330 | } |
331 | 331 | $_SESSION['profile_post'] = null; |
332 | 332 | } |
333 | 333 | |
334 | -include __DIR__ . '/footer.php'; |
|
334 | +include __DIR__.'/footer.php'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @author Taiwen Jiang <[email protected]> |
26 | 26 | */ |
27 | 27 | |
28 | -include __DIR__ . '/header.php'; |
|
28 | +include __DIR__.'/header.php'; |
|
29 | 29 | $xoops = Xoops::getInstance(); |
30 | 30 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
31 | 31 | |
@@ -82,11 +82,11 @@ discard block |
||
82 | 82 | switch ($fields[$i]->getVar('field_type')) { |
83 | 83 | case "textbox": |
84 | 84 | if ($fields[$i]->getVar('field_valuetype') == Dtype::TYPE_INTEGER) { |
85 | - $searchform->addElement(new Xoops\Form\Text(sprintf(_PROFILE_MA_LARGERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . "_larger", 35, 35)); |
|
86 | - $searchform->addElement(new Xoops\Form\Text(sprintf(_PROFILE_MA_SMALLERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . "_smaller", 35, 35)); |
|
85 | + $searchform->addElement(new Xoops\Form\Text(sprintf(_PROFILE_MA_LARGERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_larger", 35, 35)); |
|
86 | + $searchform->addElement(new Xoops\Form\Text(sprintf(_PROFILE_MA_SMALLERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_smaller", 35, 35)); |
|
87 | 87 | } else { |
88 | 88 | $tray = new Xoops\Form\ElementTray($fields[$i]->getVar('field_title')); |
89 | - $tray->addElement(new Xoops\Form\SelectMatchOption('', $fields[$i]->getVar('field_name') . "_match")); |
|
89 | + $tray->addElement(new Xoops\Form\SelectMatchOption('', $fields[$i]->getVar('field_name')."_match")); |
|
90 | 90 | $tray->addElement(new Xoops\Form\Text('', $fields[$i]->getVar('field_name'), 35, $fields[$i]->getVar('field_maxlength'))); |
91 | 91 | $searchform->addElement($tray); |
92 | 92 | unset($tray); |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | |
115 | 115 | case "date": |
116 | 116 | case "datetime": |
117 | - $dt1 = new Xoops\Form\DateSelect(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . "_larger"); |
|
118 | - $dt1->set('value',''); |
|
117 | + $dt1 = new Xoops\Form\DateSelect(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_larger"); |
|
118 | + $dt1->set('value', ''); |
|
119 | 119 | $searchform->addElement(clone $dt1); |
120 | - $dt2 = new Xoops\Form\DateSelect(sprintf(_PROFILE_MA_EARLIERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . "_smaller", ''); |
|
121 | - $dt2->set('value',''); |
|
120 | + $dt2 = new Xoops\Form\DateSelect(sprintf(_PROFILE_MA_EARLIERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name')."_smaller", ''); |
|
121 | + $dt2->set('value', ''); |
|
122 | 122 | $searchform->addElement(clone $dt2); |
123 | 123 | break; |
124 | 124 | |
@@ -193,16 +193,16 @@ discard block |
||
193 | 193 | break; |
194 | 194 | |
195 | 195 | case XOOPS_MATCH_END: |
196 | - $string = "%" . $string; |
|
196 | + $string = "%".$string; |
|
197 | 197 | break; |
198 | 198 | |
199 | 199 | case XOOPS_MATCH_CONTAIN: |
200 | - $string = "%" . $string . "%"; |
|
200 | + $string = "%".$string."%"; |
|
201 | 201 | break; |
202 | 202 | } |
203 | 203 | $criteria->add(new Criteria('uname', $string, "LIKE")); |
204 | - $search_url[] = "uname=" . $_REQUEST['uname']; |
|
205 | - $search_url[] = "uname_match=" . $_REQUEST['uname_match']; |
|
204 | + $search_url[] = "uname=".$_REQUEST['uname']; |
|
205 | + $search_url[] = "uname_match=".$_REQUEST['uname_match']; |
|
206 | 206 | $searchvars[] = "uname"; |
207 | 207 | } |
208 | 208 | if (isset($_REQUEST['email']) && $_REQUEST['email'] != '') { |
@@ -213,16 +213,16 @@ discard block |
||
213 | 213 | break; |
214 | 214 | |
215 | 215 | case XOOPS_MATCH_END: |
216 | - $string = "%" . $string; |
|
216 | + $string = "%".$string; |
|
217 | 217 | break; |
218 | 218 | |
219 | 219 | case XOOPS_MATCH_CONTAIN: |
220 | - $string = "%" . $string . "%"; |
|
220 | + $string = "%".$string."%"; |
|
221 | 221 | break; |
222 | 222 | } |
223 | 223 | $searchvars[] = "email"; |
224 | - $search_url[] = "email=" . $_REQUEST['email']; |
|
225 | - $search_url[] = "email_match=" . $_REQUEST['email_match']; |
|
224 | + $search_url[] = "email=".$_REQUEST['email']; |
|
225 | + $search_url[] = "email_match=".$_REQUEST['email_match']; |
|
226 | 226 | $criteria->add(new Criteria('email', $string, "LIKE")); |
227 | 227 | $criteria->add(new Criteria('user_viewemail', 1)); |
228 | 228 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | case Dtype::TYPE_INTEGER: |
245 | 245 | $value = array_map('intval', $_REQUEST[$fieldname]); |
246 | 246 | $searchvars[] = $fieldname; |
247 | - $criteria->add(new Criteria($fieldname, "(" . implode(',', $value) . ")", "IN")); |
|
247 | + $criteria->add(new Criteria($fieldname, "(".implode(',', $value).")", "IN")); |
|
248 | 248 | break; |
249 | 249 | |
250 | 250 | case Dtype::TYPE_URL: |
@@ -252,11 +252,11 @@ discard block |
||
252 | 252 | case Dtype::TYPE_TEXT_AREA: |
253 | 253 | $value = array_map(array($xoopsDB, "quoteString"), $_REQUEST[$fieldname]); |
254 | 254 | $searchvars[] = $fieldname; |
255 | - $criteria->add(new Criteria($fieldname, "(" . implode(',', $value) . ")", "IN")); |
|
255 | + $criteria->add(new Criteria($fieldname, "(".implode(',', $value).")", "IN")); |
|
256 | 256 | break; |
257 | 257 | } |
258 | 258 | foreach ($_REQUEST[$fieldname] as $value) { |
259 | - $search_url[] = $fieldname . "[]=" . $value; |
|
259 | + $search_url[] = $fieldname."[]=".$value; |
|
260 | 260 | } |
261 | 261 | } else { |
262 | 262 | //Other fields (not radio, not select) |
@@ -266,25 +266,25 @@ discard block |
||
266 | 266 | switch ($fields[$i]->getVar('field_type')) { |
267 | 267 | case "date": |
268 | 268 | case "datetime": |
269 | - if (isset($_REQUEST[$fieldname . "_larger"])) { |
|
270 | - $value = $_REQUEST[$fieldname . "_larger"]; |
|
271 | - if (!($value = strtotime($_REQUEST[$fieldname . "_larger"]))) { |
|
272 | - $value = (int)($_REQUEST[$fieldname . "_larger"]); |
|
269 | + if (isset($_REQUEST[$fieldname."_larger"])) { |
|
270 | + $value = $_REQUEST[$fieldname."_larger"]; |
|
271 | + if (!($value = strtotime($_REQUEST[$fieldname."_larger"]))) { |
|
272 | + $value = (int)($_REQUEST[$fieldname."_larger"]); |
|
273 | 273 | } |
274 | 274 | if ($value > 0) { |
275 | - $search_url[] = $fieldname . "_larger=" . $value; |
|
275 | + $search_url[] = $fieldname."_larger=".$value; |
|
276 | 276 | $searchvars[] = $fieldname; |
277 | 277 | $criteria->add(new Criteria($fieldname, $value, ">=")); |
278 | 278 | } |
279 | 279 | } |
280 | 280 | |
281 | - if (isset($_REQUEST[$fieldname . "_smaller"])) { |
|
282 | - $value = $_REQUEST[$fieldname . "_smaller"]; |
|
283 | - if (!($value = strtotime($_REQUEST[$fieldname . "_smaller"]))) { |
|
284 | - $value = (int)($_REQUEST[$fieldname . "_smaller"]); |
|
281 | + if (isset($_REQUEST[$fieldname."_smaller"])) { |
|
282 | + $value = $_REQUEST[$fieldname."_smaller"]; |
|
283 | + if (!($value = strtotime($_REQUEST[$fieldname."_smaller"]))) { |
|
284 | + $value = (int)($_REQUEST[$fieldname."_smaller"]); |
|
285 | 285 | } |
286 | 286 | if ($value > 0) { |
287 | - $search_url[] = $fieldname . "_smaller=" . $value; |
|
287 | + $search_url[] = $fieldname."_smaller=".$value; |
|
288 | 288 | $searchvars[] = $fieldname; |
289 | 289 | $criteria->add(new Criteria($fieldname, $value + 24 * 3600, "<=")); |
290 | 290 | } |
@@ -293,33 +293,33 @@ discard block |
||
293 | 293 | break; |
294 | 294 | |
295 | 295 | default: |
296 | - if (isset($_REQUEST[$fieldname . "_larger"]) && (int)($_REQUEST[$fieldname . "_larger"]) != 0) { |
|
297 | - $value = (int)($_REQUEST[$fieldname . "_larger"]); |
|
298 | - $search_url[] = $fieldname . "_larger=" . $value; |
|
296 | + if (isset($_REQUEST[$fieldname."_larger"]) && (int)($_REQUEST[$fieldname."_larger"]) != 0) { |
|
297 | + $value = (int)($_REQUEST[$fieldname."_larger"]); |
|
298 | + $search_url[] = $fieldname."_larger=".$value; |
|
299 | 299 | $searchvars[] = $fieldname; |
300 | 300 | $criteria->add(new Criteria($fieldname, $value, ">=")); |
301 | 301 | } |
302 | 302 | |
303 | - if (isset($_REQUEST[$fieldname . "_smaller"]) && (int)($_REQUEST[$fieldname . "_smaller"]) != 0) { |
|
304 | - $value = (int)($_REQUEST[$fieldname . "_smaller"]); |
|
305 | - $search_url[] = $fieldname . "_smaller=" . $value; |
|
303 | + if (isset($_REQUEST[$fieldname."_smaller"]) && (int)($_REQUEST[$fieldname."_smaller"]) != 0) { |
|
304 | + $value = (int)($_REQUEST[$fieldname."_smaller"]); |
|
305 | + $search_url[] = $fieldname."_smaller=".$value; |
|
306 | 306 | $searchvars[] = $fieldname; |
307 | 307 | $criteria->add(new Criteria($fieldname, $value, "<=")); |
308 | 308 | } |
309 | 309 | break; |
310 | 310 | } |
311 | 311 | |
312 | - if (isset($_REQUEST[$fieldname]) && !isset($_REQUEST[$fieldname . "_smaller"]) && !isset($_REQUEST[$fieldname . "_larger"])) { |
|
312 | + if (isset($_REQUEST[$fieldname]) && !isset($_REQUEST[$fieldname."_smaller"]) && !isset($_REQUEST[$fieldname."_larger"])) { |
|
313 | 313 | if (!is_array($_REQUEST[$fieldname])) { |
314 | 314 | $value = (int)($_REQUEST[$fieldname]); |
315 | - $search_url[] = $fieldname . "=" . $value; |
|
315 | + $search_url[] = $fieldname."=".$value; |
|
316 | 316 | $criteria->add(new Criteria($fieldname, $value, "=")); |
317 | 317 | } else { |
318 | 318 | $value = array_map("intval", $_REQUEST[$fieldname]); |
319 | 319 | foreach ($value as $thisvalue) { |
320 | - $search_url[] = $fieldname . "[]=" . $thisvalue; |
|
320 | + $search_url[] = $fieldname."[]=".$thisvalue; |
|
321 | 321 | } |
322 | - $criteria->add(new Criteria($fieldname, "(" . implode(',', $value) . ")", "IN")); |
|
322 | + $criteria->add(new Criteria($fieldname, "(".implode(',', $value).")", "IN")); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | $searchvars[] = $fieldname; |
@@ -330,11 +330,11 @@ discard block |
||
330 | 330 | if (isset($_REQUEST[$fieldname]) && $_REQUEST[$fieldname] != "") { |
331 | 331 | $workingArray = Request::getArray($fieldname, []); |
332 | 332 | foreach ($workingArray as $tempValue) { |
333 | - $inArray[] = "'" . $tempValue . "'"; |
|
333 | + $inArray[] = "'".$tempValue."'"; |
|
334 | 334 | } |
335 | 335 | $value = implode(',', $inArray); |
336 | - $search_url[] = $fieldname . "=" . implode(',', $workingArray); |
|
337 | - $criteria->add(new Criteria($fieldname, '(' . $value . ')', 'IN')); |
|
336 | + $search_url[] = $fieldname."=".implode(',', $workingArray); |
|
337 | + $criteria->add(new Criteria($fieldname, '('.$value.')', 'IN')); |
|
338 | 338 | $searchvars[] = $fieldname; |
339 | 339 | } |
340 | 340 | break; |
@@ -344,21 +344,21 @@ discard block |
||
344 | 344 | case Dtype::TYPE_TEXT_AREA: |
345 | 345 | if (isset($_REQUEST[$fieldname]) && $_REQUEST[$fieldname] != "") { |
346 | 346 | $value = trim($_REQUEST[$fieldname]); |
347 | - switch ($_REQUEST[$fieldname . '_match']) { |
|
347 | + switch ($_REQUEST[$fieldname.'_match']) { |
|
348 | 348 | case XOOPS_MATCH_START: |
349 | 349 | $value .= "%"; |
350 | 350 | break; |
351 | 351 | |
352 | 352 | case XOOPS_MATCH_END: |
353 | - $value = "%" . $value; |
|
353 | + $value = "%".$value; |
|
354 | 354 | break; |
355 | 355 | |
356 | 356 | case XOOPS_MATCH_CONTAIN: |
357 | - $value = "%" . $value . "%"; |
|
357 | + $value = "%".$value."%"; |
|
358 | 358 | break; |
359 | 359 | } |
360 | - $search_url[] = $fieldname . "=" . $_REQUEST[$fieldname]; |
|
361 | - $search_url[] = $fieldname . "_match=" . $_REQUEST[$fieldname . '_match']; |
|
360 | + $search_url[] = $fieldname."=".$_REQUEST[$fieldname]; |
|
361 | + $search_url[] = $fieldname."_match=".$_REQUEST[$fieldname.'_match']; |
|
362 | 362 | $operator = "LIKE"; |
363 | 363 | $criteria->add(new Criteria($fieldname, $value, $operator)); |
364 | 364 | $searchvars[] = $fieldname; |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | if ($xoops->isAdmin()) { |
391 | 391 | $searchgroups = empty($_REQUEST['selgroups']) ? array() : array_map("intval", $_REQUEST['selgroups']); |
392 | 392 | foreach ($searchgroups as $group) { |
393 | - $search_url[] = 'selgroups[]=' . $group; |
|
393 | + $search_url[] = 'selgroups[]='.$group; |
|
394 | 394 | } |
395 | 395 | } |
396 | 396 | |
@@ -405,13 +405,13 @@ discard block |
||
405 | 405 | |
406 | 406 | list($users, $profiles, $total_users) = $profile_handler->search($criteria, $searchvars, $searchgroups); |
407 | 407 | |
408 | - $total = sprintf(_PROFILE_MA_FOUNDUSER, "<span class='red'>{$total_users}</span>") . " "; |
|
408 | + $total = sprintf(_PROFILE_MA_FOUNDUSER, "<span class='red'>{$total_users}</span>")." "; |
|
409 | 409 | $xoops->tpl()->assign('total_users', $total); |
410 | 410 | |
411 | 411 | //Sort information |
412 | 412 | foreach (array_keys($users) as $k) { |
413 | 413 | $userarray = array(); |
414 | - $userarray["output"][] = "<a href='userinfo.php?uid=" . $users[$k]->getVar('uid') . "' title=''>" . $users[$k]->getVar('uname') . "</a>"; |
|
414 | + $userarray["output"][] = "<a href='userinfo.php?uid=".$users[$k]->getVar('uid')."' title=''>".$users[$k]->getVar('uname')."</a>"; |
|
415 | 415 | $userarray["output"][] = ($users[$k]->getVar('user_viewemail') == 1 || $xoops->user->isAdmin()) |
416 | 416 | ? $users[$k]->getVar('email') : ""; |
417 | 417 | |
@@ -436,9 +436,9 @@ discard block |
||
436 | 436 | |
437 | 437 | if ($total_users > $limit) { |
438 | 438 | $search_url[] = "op=results"; |
439 | - $search_url[] = "order=" . $order; |
|
440 | - $search_url[] = "sortby=" . htmlspecialchars($sortby); |
|
441 | - $search_url[] = "limit=" . $limit; |
|
439 | + $search_url[] = "order=".$order; |
|
440 | + $search_url[] = "sortby=".htmlspecialchars($sortby); |
|
441 | + $search_url[] = "limit=".$limit; |
|
442 | 442 | if (isset($search_url)) { |
443 | 443 | $args = implode("&", $search_url); |
444 | 444 | } |
@@ -447,4 +447,4 @@ discard block |
||
447 | 447 | } |
448 | 448 | break; |
449 | 449 | } |
450 | -include __DIR__ . '/footer.php'; |
|
450 | +include __DIR__.'/footer.php'; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $op = trim($_GET['op']); |
44 | 44 | } |
45 | 45 | if ($op !== 'login' && (empty($_GET['from']) || 'profile' !== $_GET['from'])) { |
46 | - \Xoops::simpleRedirect("./modules/profile/user.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING'])); |
|
46 | + \Xoops::simpleRedirect("./modules/profile/user.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | static public function eventCoreEdituserStart($args) |
56 | 56 | { |
57 | - \Xoops::simpleRedirect("./modules/profile/edituser.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING'])); |
|
57 | + \Xoops::simpleRedirect("./modules/profile/edituser.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $email = isset($_GET['email']) ? trim($_GET['email']) : ''; |
68 | 68 | $email = isset($_POST['email']) ? trim($_POST['email']) : $email; |
69 | - \Xoops::simpleRedirect("./modules/profile/lostpass.php?email={$email}" . (empty($_GET['code']) ? "" : "&" . $_GET['code'])); |
|
69 | + \Xoops::simpleRedirect("./modules/profile/lostpass.php?email={$email}".(empty($_GET['code']) ? "" : "&".$_GET['code'])); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | static function eventCoreRegisterStart($args) |
78 | 78 | { |
79 | - \Xoops::simpleRedirect("./modules/profile/register.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING']) ); |
|
79 | + \Xoops::simpleRedirect("./modules/profile/register.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -86,6 +86,6 @@ discard block |
||
86 | 86 | */ |
87 | 87 | static function eventCoreUserinfoStart($args) |
88 | 88 | { |
89 | - \Xoops::simpleRedirect("./modules/profile/userinfo.php" . (empty($_SERVER['QUERY_STRING']) ? "" : "?" . $_SERVER['QUERY_STRING']) ); |
|
89 | + \Xoops::simpleRedirect("./modules/profile/userinfo.php".(empty($_SERVER['QUERY_STRING']) ? "" : "?".$_SERVER['QUERY_STRING'])); |
|
90 | 90 | } |
91 | 91 | } |
@@ -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 | $xoops->header(); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } else { |
44 | 44 | if ($thisuser->getVar('level') > 0) { |
45 | 45 | $xoops->redirect( |
46 | - $xoops->url('modules/' . $xoops->module->getVar('dirname', 'n'). '/index.php'), |
|
46 | + $xoops->url('modules/'.$xoops->module->getVar('dirname', 'n').'/index.php'), |
|
47 | 47 | 5, |
48 | 48 | XoopsLocale::E_SELECTED_ACCOUNT_IS_ALREADY_ACTIVATED, |
49 | 49 | false |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $xoopsMailer->setTemplate('activated.tpl'); |
59 | 59 | $xoopsMailer->assign('SITENAME', $xoops->getConfig('sitename')); |
60 | 60 | $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); |
61 | - $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url') . "/"); |
|
61 | + $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url')."/"); |
|
62 | 62 | $xoopsMailer->setToUsers($thisuser); |
63 | 63 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
64 | 64 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | } else { |
70 | 70 | printf(XoopsLocale::SF_NOTIFICATION_EMAIL_SENT_TO, $thisuser->getVar('uname')); |
71 | 71 | } |
72 | - include __DIR__ . '/footer.php'; |
|
72 | + include __DIR__.'/footer.php'; |
|
73 | 73 | } else { |
74 | 74 | $xoops->redirect( |
75 | - $xoops->url('modules/' . $xoops->module->getVar('dirname', 'n') . '/user.php'), |
|
75 | + $xoops->url('modules/'.$xoops->module->getVar('dirname', 'n').'/user.php'), |
|
76 | 76 | 5, |
77 | - XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED . ' ' . XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD, |
|
77 | + XoopsLocale::S_YOUR_ACCOUNT_ACTIVATED.' '.XoopsLocale::LOGIN_WITH_REGISTERED_PASSWORD, |
|
78 | 78 | false |
79 | 79 | ); |
80 | 80 | } |
@@ -101,15 +101,15 @@ discard block |
||
101 | 101 | $xoopsMailer->setTemplate('register.tpl'); |
102 | 102 | $xoopsMailer->assign('SITENAME', $xoops->getConfig('sitename')); |
103 | 103 | $xoopsMailer->assign('ADMINMAIL', $xoops->getConfig('adminmail')); |
104 | - $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url') . "/"); |
|
104 | + $xoopsMailer->assign('SITEURL', \XoopsBaseConfig::get('url')."/"); |
|
105 | 105 | $xoopsMailer->setToUsers($getuser[0]); |
106 | 106 | $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); |
107 | 107 | $xoopsMailer->setFromName($xoops->getConfig('sitename')); |
108 | 108 | $xoopsMailer->setSubject(sprintf(XoopsLocale::F_USER_ACTIVATION_KEY_FOR, $getuser->getVar('uname'))); |
109 | 109 | if (!$xoopsMailer->send()) { |
110 | - echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
110 | + echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_NOT_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
111 | 111 | } else { |
112 | - echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED . ' ' . XoopsLocale::EMAIL_HAS_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
112 | + echo XoopsLocale::S_YOU_ARE_NOW_REGISTERED.' '.XoopsLocale::EMAIL_HAS_BEEN_SENT_WITH_ACTIVATION_KEY; |
|
113 | 113 | } |
114 | 114 | } else { |
115 | 115 | $form = new Xoops\Form\ThemeForm('', 'form', 'activate.php'); |
@@ -120,4 +120,4 @@ discard block |
||
120 | 120 | |
121 | 121 | $xoops->registry()->get('profile_breadcrumbs')->addItem(new Link(['caption' => _PROFILE_MA_REGISTER])); |
122 | 122 | |
123 | -include __DIR__ . '/footer.php'; |
|
123 | +include __DIR__.'/footer.php'; |
@@ -30,23 +30,23 @@ discard block |
||
30 | 30 | $xoops = Xoops::getInstance(); |
31 | 31 | |
32 | 32 | if ($oldversion < 162) { |
33 | - $xoopsDB->queryF("UPDATE `" . $xoopsDB->prefix("profile_field") . " SET field_valuetype=2 WHERE field_name=umode"); |
|
33 | + $xoopsDB->queryF("UPDATE `".$xoopsDB->prefix("profile_field")." SET field_valuetype=2 WHERE field_name=umode"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | if ($oldversion < 100) { |
37 | 37 | |
38 | 38 | // Drop old category table |
39 | - $sql = "DROP TABLE " . $xoopsDB->prefix("profile_category"); |
|
39 | + $sql = "DROP TABLE ".$xoopsDB->prefix("profile_category"); |
|
40 | 40 | $xoopsDB->queryF($sql); |
41 | 41 | |
42 | 42 | // Drop old field-category link table |
43 | - $sql = "DROP TABLE " . $xoopsDB->prefix("profile_fieldcategory"); |
|
43 | + $sql = "DROP TABLE ".$xoopsDB->prefix("profile_fieldcategory"); |
|
44 | 44 | $xoopsDB->queryF($sql); |
45 | 45 | |
46 | 46 | // Create new tables for new profile module |
47 | - $xoopsDB->queryFromFile(\XoopsBaseConfig::get('root-path') . "/modules/" . $module->getVar('dirname', 'n') . "/sql/mysql.sql"); |
|
47 | + $xoopsDB->queryFromFile(\XoopsBaseConfig::get('root-path')."/modules/".$module->getVar('dirname', 'n')."/sql/mysql.sql"); |
|
48 | 48 | |
49 | - include_once __DIR__ . "/install.php"; |
|
49 | + include_once __DIR__."/install.php"; |
|
50 | 50 | xoops_module_install_profile($module); |
51 | 51 | $goupperm_handler = $xoops->getHandlerGroupPermission(); |
52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $skip_fields = $field_handler->getUserVars(); |
56 | 56 | $skip_fields[] = 'newemail'; |
57 | 57 | $skip_fields[] = 'pm_link'; |
58 | - $sql = "SELECT * FROM `" . $xoopsDB->prefix("user_profile_field") . "` WHERE `field_name` NOT IN ('" . implode("', '", $skip_fields) . "')"; |
|
58 | + $sql = "SELECT * FROM `".$xoopsDB->prefix("user_profile_field")."` WHERE `field_name` NOT IN ('".implode("', '", $skip_fields)."')"; |
|
59 | 59 | $result = $xoopsDB->query($sql); |
60 | 60 | $fields = array(); |
61 | 61 | while (false !== ($myrow = $xoopsDB->fetchArray($result))) { |
@@ -72,14 +72,14 @@ discard block |
||
72 | 72 | $field_handler->insert($object, true); |
73 | 73 | |
74 | 74 | $gperm_itemid = $object->getVar('field_id'); |
75 | - $sql = "UPDATE " . $xoopsDB->prefix("system_permission") . " SET gperm_itemid = " . $gperm_itemid . " WHERE gperm_itemid = " . $myrow['fieldid'] . " AND gperm_modid = " . $module->getVar('mid') . " AND gperm_name IN ('profile_edit', 'profile_search')"; |
|
75 | + $sql = "UPDATE ".$xoopsDB->prefix("system_permission")." SET gperm_itemid = ".$gperm_itemid." WHERE gperm_itemid = ".$myrow['fieldid']." AND gperm_modid = ".$module->getVar('mid')." AND gperm_name IN ('profile_edit', 'profile_search')"; |
|
76 | 76 | $xoopsDB->queryF($sql); |
77 | 77 | |
78 | 78 | $groups_visible = $goupperm_handler->getGroupIds("profile_visible", $myrow['fieldid'], $module->getVar('mid')); |
79 | 79 | $groups_show = $goupperm_handler->getGroupIds("profile_show", $myrow['fieldid'], $module->getVar('mid')); |
80 | 80 | foreach ($groups_visible as $ugid) { |
81 | 81 | foreach ($groups_show as $pgid) { |
82 | - $sql = "INSERT INTO " . $xoopsDB->prefix("profile_visibility") . " (field_id, user_group, profile_group) " . " VALUES " . " ({$gperm_itemid}, {$ugid}, {$pgid})"; |
|
82 | + $sql = "INSERT INTO ".$xoopsDB->prefix("profile_visibility")." (field_id, user_group, profile_group) "." VALUES "." ({$gperm_itemid}, {$ugid}, {$pgid})"; |
|
83 | 83 | $xoopsDB->queryF($sql); |
84 | 84 | } |
85 | 85 | } |
@@ -90,19 +90,19 @@ discard block |
||
90 | 90 | |
91 | 91 | // Copy data from profile table |
92 | 92 | foreach ($fields as $field) { |
93 | - $xoopsDB->queryF("UPDATE `" . $xoopsDB->prefix("profile_profile") . "` u, `" . $xoopsDB->prefix("user_profile") . "` p SET u.{$field} = p.{$field} WHERE u.profile_id=p.profileid"); |
|
93 | + $xoopsDB->queryF("UPDATE `".$xoopsDB->prefix("profile_profile")."` u, `".$xoopsDB->prefix("user_profile")."` p SET u.{$field} = p.{$field} WHERE u.profile_id=p.profileid"); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | // Drop old profile table |
97 | - $sql = "DROP TABLE " . $xoopsDB->prefix("user_profile"); |
|
97 | + $sql = "DROP TABLE ".$xoopsDB->prefix("user_profile"); |
|
98 | 98 | $xoopsDB->queryF($sql); |
99 | 99 | |
100 | 100 | // Drop old field module |
101 | - $sql = "DROP TABLE " . $xoopsDB->prefix("user_profile_field"); |
|
101 | + $sql = "DROP TABLE ".$xoopsDB->prefix("user_profile_field"); |
|
102 | 102 | $xoopsDB->queryF($sql); |
103 | 103 | |
104 | 104 | // Remove not used items |
105 | - $sql = "DELETE FROM " . $xoopsDB->prefix("system_permission") . " WHERE `gperm_modid` = " . $module->getVar('mid') . " AND `gperm_name` IN ('profile_show', 'profile_visible')"; |
|
105 | + $sql = "DELETE FROM ".$xoopsDB->prefix("system_permission")." WHERE `gperm_modid` = ".$module->getVar('mid')." AND `gperm_name` IN ('profile_show', 'profile_visible')"; |
|
106 | 106 | $xoopsDB->queryF($sql); |
107 | 107 | } |
108 | 108 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $profile_handler->cleanOrphan($xoopsDB->prefix("system_user"), "uid", "profile_id"); |
111 | 111 | $field_handler = $xoops->getModuleHandler('field', $module->getVar('dirname', 'n')); |
112 | 112 | $user_fields = $field_handler->getUserVars(); |
113 | - $criteria = new Criteria("field_name", "('" . implode("', '", $user_fields) . "')", "IN"); |
|
113 | + $criteria = new Criteria("field_name", "('".implode("', '", $user_fields)."')", "IN"); |
|
114 | 114 | $field_handler->updateAll("field_config", 0, $criteria); |
115 | 115 | |
116 | 116 | return true; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $myts = \Xoops\Core\Text\Sanitizer::getInstance(); |
98 | 98 | if ($step_no == 1 && $xoops->getConfig('reg_dispdsclmr') != 0 && $xoops->getConfig('reg_disclaimer') != '') { |
99 | 99 | $disc_tray = new Xoops\Form\ElementTray(XoopsLocale::DISCLAIMER, '<br />'); |
100 | - $disc_text = new Xoops\Form\Label("", "<div class=\"pad5\">" . $myts->displayTarea($xoops->getConfig('reg_disclaimer'), 1) . "</div>"); |
|
100 | + $disc_text = new Xoops\Form\Label("", "<div class=\"pad5\">".$myts->displayTarea($xoops->getConfig('reg_disclaimer'), 1)."</div>"); |
|
101 | 101 | $disc_tray->addElement($disc_text); |
102 | 102 | $agree_chk = new Xoops\Form\Checkbox('', 'agree_disc'); |
103 | 103 | $agree_chk->addOption(1, XoopsLocale::I_AGREE_TO_THE_ABOVE); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | //If the user is an admin and is editing someone else |
170 | 170 | $pwd_text = new Xoops\Form\Password('', 'password'); |
171 | 171 | $pwd_text2 = new Xoops\Form\Password('', 'vpass'); |
172 | - $pwd_tray = new Xoops\Form\ElementTray(XoopsLocale::PASSWORD . '<br />' . XoopsLocale::TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT); |
|
172 | + $pwd_tray = new Xoops\Form\ElementTray(XoopsLocale::PASSWORD.'<br />'.XoopsLocale::TYPE_NEW_PASSWORD_TWICE_TO_CHANGE_IT); |
|
173 | 173 | $pwd_tray->addElement($pwd_text); |
174 | 174 | $pwd_tray->addElement($pwd_text2); |
175 | 175 | $elements[0][] = array('element' => $pwd_tray, 'required' => 0); //cannot set an element tray required |
@@ -238,8 +238,8 @@ discard block |
||
238 | 238 | $title = isset($categories[$k]) ? $categories[$k]['cat_title'] : _PROFILE_MA_DEFAULT; |
239 | 239 | $desc = isset($categories[$k]) ? $categories[$k]['cat_description'] : ""; |
240 | 240 | //$form->addElement(new Xoops\Form\Label("<div class='break'>{$title}</div>", $desc), false); |
241 | - $desc = ($desc != '' ? ' - ' . $desc : ''); |
|
242 | - $form->insertBreak($title . $desc); |
|
241 | + $desc = ($desc != '' ? ' - '.$desc : ''); |
|
242 | + $form->insertBreak($title.$desc); |
|
243 | 243 | foreach (array_keys($elements[$k]) as $i) { |
244 | 244 | $form->addElement($elements[$k][$i]['element'], $elements[$k][$i]['required']); |
245 | 245 | } |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | global $xoopsDB; |
79 | 79 | $module_id = $xoops->registry()->get('profile_id'); |
80 | 80 | |
81 | - $xoopsDB->queryF("INSERT INTO " . $xoopsDB->prefix("profile_profile") . " (profile_id) " . " SELECT uid " . " FROM " . $xoopsDB->prefix("system_user")); |
|
81 | + $xoopsDB->queryF("INSERT INTO ".$xoopsDB->prefix("profile_profile")." (profile_id) "." SELECT uid "." FROM ".$xoopsDB->prefix("system_user")); |
|
82 | 82 | |
83 | - $sql = "INSERT INTO " . $xoopsDB->prefix("system_permission") . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) " . " VALUES " . " (" . FixedGroups::ADMIN . ", " . FixedGroups::ADMIN . ", {$module_id}, 'profile_access'), " . " (" . FixedGroups::ADMIN . ", " . FixedGroups::USERS . ", {$module_id}, 'profile_access'), " . " (" . FixedGroups::USERS . ", " . FixedGroups::USERS . ", {$module_id}, 'profile_access'), " . " (" . FixedGroups::ANONYMOUS . ", " . FixedGroups::USERS . ", {$module_id}, 'profile_access') " . " "; |
|
83 | + $sql = "INSERT INTO ".$xoopsDB->prefix("system_permission")." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) "." VALUES "." (".FixedGroups::ADMIN.", ".FixedGroups::ADMIN.", {$module_id}, 'profile_access'), "." (".FixedGroups::ADMIN.", ".FixedGroups::USERS.", {$module_id}, 'profile_access'), "." (".FixedGroups::USERS.", ".FixedGroups::USERS.", {$module_id}, 'profile_access'), "." (".FixedGroups::ANONYMOUS.", ".FixedGroups::USERS.", {$module_id}, 'profile_access') "." "; |
|
84 | 84 | $xoopsDB->queryF($sql); |
85 | 85 | |
86 | 86 | } |
@@ -171,22 +171,22 @@ discard block |
||
171 | 171 | global $xoopsDB; |
172 | 172 | $gperm_itemid = $field_id; |
173 | 173 | $gperm_modid = $module_id; |
174 | - $sql = "INSERT INTO " . $xoopsDB->prefix("system_permission") . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) " . " VALUES " . ($canedit |
|
175 | - ? " (" . FixedGroups::ADMIN . ", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " : "") . ($canedit == 1 |
|
176 | - ? " (" . FixedGroups::USERS . ", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " |
|
177 | - : "") . " (" . FixedGroups::ADMIN . ", {$gperm_itemid}, {$gperm_modid}, 'profile_search'), " . " (" . FixedGroups::USERS . ", {$gperm_itemid}, {$gperm_modid}, 'profile_search') " . " "; |
|
174 | + $sql = "INSERT INTO ".$xoopsDB->prefix("system_permission")." (gperm_groupid, gperm_itemid, gperm_modid, gperm_name) "." VALUES ".($canedit |
|
175 | + ? " (".FixedGroups::ADMIN.", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " : "").($canedit == 1 |
|
176 | + ? " (".FixedGroups::USERS.", {$gperm_itemid}, {$gperm_modid}, 'profile_edit'), " |
|
177 | + : "")." (".FixedGroups::ADMIN.", {$gperm_itemid}, {$gperm_modid}, 'profile_search'), "." (".FixedGroups::USERS.", {$gperm_itemid}, {$gperm_modid}, 'profile_search') "." "; |
|
178 | 178 | $xoopsDB->queryF($sql); |
179 | 179 | |
180 | 180 | if ($visible) { |
181 | - $sql = "INSERT INTO " . $xoopsDB->prefix("profile_visibility") |
|
181 | + $sql = "INSERT INTO ".$xoopsDB->prefix("profile_visibility") |
|
182 | 182 | . " (field_id, user_group, profile_group) " |
183 | 183 | . " VALUES " |
184 | - . " ({$gperm_itemid}, " . FixedGroups::ADMIN . ", " . FixedGroups::ADMIN . "), " |
|
185 | - . " ({$gperm_itemid}, " . FixedGroups::ADMIN . ", " . FixedGroups::USERS . "), " |
|
186 | - . " ({$gperm_itemid}, " . FixedGroups::USERS . ", " . FixedGroups::ADMIN . "), " |
|
187 | - . " ({$gperm_itemid}, " . FixedGroups::USERS . ", " . FixedGroups::USERS . "), " |
|
188 | - . " ({$gperm_itemid}, " . FixedGroups::ANONYMOUS . ", " . FixedGroups::ADMIN . "), " |
|
189 | - . " ({$gperm_itemid}, " . FixedGroups::ANONYMOUS . ", " . FixedGroups::USERS . ")" . " "; |
|
184 | + . " ({$gperm_itemid}, ".FixedGroups::ADMIN.", ".FixedGroups::ADMIN."), " |
|
185 | + . " ({$gperm_itemid}, ".FixedGroups::ADMIN.", ".FixedGroups::USERS."), " |
|
186 | + . " ({$gperm_itemid}, ".FixedGroups::USERS.", ".FixedGroups::ADMIN."), " |
|
187 | + . " ({$gperm_itemid}, ".FixedGroups::USERS.", ".FixedGroups::USERS."), " |
|
188 | + . " ({$gperm_itemid}, ".FixedGroups::ANONYMOUS.", ".FixedGroups::ADMIN."), " |
|
189 | + . " ({$gperm_itemid}, ".FixedGroups::ANONYMOUS.", ".FixedGroups::USERS.")"." "; |
|
190 | 190 | $xoopsDB->queryF($sql); |
191 | 191 | } |
192 | 192 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $xoops = Xoops::getInstance(); |
200 | 200 | $xoops->db(); |
201 | 201 | global $xoopsDB; |
202 | - $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("profile_category") . " VALUES (0, " . $xoopsDB->quote($name) . ", '', {$weight})"); |
|
202 | + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("profile_category")." VALUES (0, ".$xoopsDB->quote($name).", '', {$weight})"); |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
@@ -212,5 +212,5 @@ discard block |
||
212 | 212 | $xoops = Xoops::getInstance(); |
213 | 213 | $xoops->db(); |
214 | 214 | global $xoopsDB; |
215 | - $xoopsDB->query("INSERT INTO " . $xoopsDB->prefix("profile_regstep") . " VALUES (0, " . $xoopsDB->quote($name) . ", " . $xoopsDB->quote($desc) . ", {$order}, {$save})"); |
|
215 | + $xoopsDB->query("INSERT INTO ".$xoopsDB->prefix("profile_regstep")." VALUES (0, ".$xoopsDB->quote($name).", ".$xoopsDB->quote($desc).", {$order}, {$save})"); |
|
216 | 216 | } |
@@ -54,4 +54,4 @@ |
||
54 | 54 | define("_PROFILE_MI_ABOUT", "About"); |
55 | 55 | define("_PROFILE_MI_HOME", "Home"); |
56 | 56 | |
57 | -define("_PROFILE_MA_THEME","Theme"); |
|
57 | +define("_PROFILE_MA_THEME", "Theme"); |