|
65 | 65 |
|
66 | 66 | if (!empty($_POST['change']) && ($access == 'owner' || $access == 'all')) { |
67 | 67 | if (!verifyToken()) { |
68 | | - echo Error($GLOBALS['I18N']->get('Invalid security token, please reload the page and try again')); |
| 68 | + echo Error(s('Invalid security token, please reload the page and try again')); |
69 | 69 |
|
70 | 70 | return; |
71 | 71 | } |
|
146 | 146 | Sql_Query(sprintf('replace into %s (userid,attributeid,value) |
147 | 147 | values(%d,%d,"%s")', $tables['user_attribute'], $id, $key, base64_encode($avatar))); |
148 | 148 | } elseif ($size) { |
149 | | - echo Error($GLOBALS['I18N']->get('Uploaded avatar file too big')); |
| 149 | + echo Error(s('Uploaded avatar file too big')); |
150 | 150 | } |
151 | 151 | } |
152 | 152 | } |
|
230 | 230 | if (count($subscribed_to)) { |
231 | 231 | foreach ($subscribed_to as $listID => $listName) { |
232 | 232 | Sql_Query("insert into {$tables['listuser']} (userid,listid,entered,modified) values($id,$listID,now(),now())"); |
233 | | - $feedback .= '<br/>'.sprintf($GLOBALS['I18N']->get('Subscriber added to list %s'), $listName); |
| 233 | + $feedback .= '<br/>'.sprintf(s('Subscriber added to list %s'), $listName); |
234 | 234 | } |
235 | 235 | $feedback .= '<br/>'; |
236 | 236 | } |
|
322 | 322 | } |
323 | 323 |
|
324 | 324 | if (!$membership) { |
325 | | - $membership = $GLOBALS['I18N']->get('No Lists'); |
| 325 | + $membership = s('No Lists'); |
326 | 326 | } |
327 | 327 |
|
328 | 328 | echo '<div class="actions">'; |
329 | | - echo ' '.PageLinkButton("userhistory&id=$id", $GLOBALS['I18N']->get('History')); |
| 329 | + echo PageLinkButton("userhistory&id=$id", s('History')); |
| 330 | + echo |
| 331 | + '<a |
| 332 | + class="confirm btn btn-default" |
| 333 | + href="'.getConfig('preferencesurl')."&uid=".$user['uniqid'].'">'. |
| 334 | + s('Preferences page').' |
| 335 | + </a>'; |
| 336 | + |
| 337 | + // Trigger hook to add additional buttons from plugins |
330 | 338 | if (!empty($GLOBALS['config']['plugins']) && is_array($GLOBALS['config']['plugins'])) { |
331 | 339 | foreach ($GLOBALS['config']['plugins'] as $pluginName => $plugin) { |
332 | 340 | echo $plugin->userpageLink($id); |
|
392 | 400 | if ($key == 'confirmed') { |
393 | 401 | if (!$require_login || ($require_login && isSuperUser())) { |
394 | 402 | $userdetailsHTML .= sprintf('<tr><td class="dataname">%s (1/0)</td><td><input type="text" name="%s" value="%s" size="5" /></td></tr>'."\n", |
395 | | - $GLOBALS['I18N']->get($b), $key, htmlspecialchars(stripslashes($user[$key]))); |
| 403 | + s($b), $key, htmlspecialchars(stripslashes($user[$key]))); |
396 | 404 | } else { |
397 | 405 | $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td>%s</td></tr>', $b, |
398 | 406 | stripslashes($user[$key])); |
|
401 | 409 | $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td><input type="text" name="%s" value="%s" size="30" /></td></tr>'."\n", |
402 | 410 | $val[1], $key, ''); |
403 | 411 | } elseif ($key == 'blacklisted') { |
404 | | - $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td>%s', $GLOBALS['I18N']->get($b), |
| 412 | + $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td>%s', s($b), |
405 | 413 | $user[$key] || isBlackListed($user['email']) ? s('Yes') : s('No')); |
406 | 414 |
|
407 | 415 | if (!($user[$key] || isBlackListed($user['email']))) { |
|
416 | 424 | if (!strpos($key, '_')) { |
417 | 425 | if (strpos($a, 'sys') !== false) { |
418 | 426 | $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td>%s</td></tr>', |
419 | | - $GLOBALS['I18N']->get($b), stripslashes($user[$key])); |
| 427 | + s($b), stripslashes($user[$key])); |
420 | 428 | } elseif ($val[1]) { |
421 | 429 | $userdetailsHTML .= sprintf('<tr><td class="dataname">%s</td><td><input type="text" name="%s" value="%s" size="30" /></td></tr>'."\n", |
422 | | - $GLOBALS['I18N']->get($val[1]), $key, htmlspecialchars(stripslashes($user[$key]))); |
| 430 | + s($val[1]), $key, htmlspecialchars(stripslashes($user[$key]))); |
423 | 431 | } |
424 | 432 | } |
425 | 433 | } |
|
485 | 493 | } |
486 | 494 |
|
487 | 495 | if ($access != 'view') { |
488 | | - $userdetailsHTML .= '<tr><td colspan="2" class="bgwhite"><input class="submit" type="submit" name="change" value="'.$GLOBALS['I18N']->get('Save Changes').'" /></td></tr>'; |
| 496 | + $userdetailsHTML .= '<tr><td colspan="2" class="bgwhite"><input class="submit" type="submit" name="change" value="'.s('Save Changes').'" /></td></tr>'; |
489 | 497 | } |
490 | 498 | $userdetailsHTML .= '</table>'; |
491 | 499 |
|
492 | | -$mailinglistsHTML .= '<h3>'.$GLOBALS['I18N']->get('Mailinglist membership').':</h3>'; |
| 500 | +$mailinglistsHTML .= '<h3>'.s('Mailinglist membership').':</h3>'; |
493 | 501 | // a dummy entry, to make the array show up in POST even if all checkboxes are unchecked |
494 | 502 | $mailinglistsHTML .= '<input type="hidden" name="subscribe[]" value="-1" />'; |
495 | 503 | $mailinglistsHTML .= '<table class="userListing" border="1"><tr>'; |
|
512 | 520 | } |
513 | 521 | $mailinglistsHTML .= '</tr>'; |
514 | 522 | if ($access != 'view') { |
515 | | - $mailinglistsHTML .= '<tr><td class="bgwhite"><input class="submit" type="submit" name="change" value="'.$GLOBALS['I18N']->get('Save Changes').'" /></td></tr>'; |
| 523 | + $mailinglistsHTML .= '<tr><td class="bgwhite"><input class="submit" type="submit" name="change" value="'.s('Save Changes').'" /></td></tr>'; |
516 | 524 | } |
517 | 525 |
|
518 | 526 | $mailinglistsHTML .= '</table>'; |
519 | 527 |
|
520 | 528 | echo '<div class="tabbed">'; |
521 | 529 | echo '<ul>'; |
522 | | -echo '<li><a href="#details">'.ucfirst($GLOBALS['I18N']->get('Details')).'</a></li>'; |
523 | | -echo '<li><a href="#lists">'.ucfirst($GLOBALS['I18N']->get('Lists')).'</a></li>'; |
| 530 | +echo '<li><a href="#details">'.ucfirst(s('Details')).'</a></li>'; |
| 531 | +echo '<li><a href="#lists">'.ucfirst(s('Lists')).'</a></li>'; |
524 | 532 |
|
525 | 533 | echo '</ul>'; |
526 | 534 |
|
|
0 commit comments