summaryrefslogtreecommitdiff
path: root/lib/settingsaction.php
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-08 05:45:31 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-08 05:45:31 -0400
commit87b494f1ebbe7640d194ef322af12fdf378295df (patch)
treef4b616fd8306bb92d3063d4e86dd1b87607163f4 /lib/settingsaction.php
parenta25f5010e682a0fc950e2ef2476af7b631ada5bf (diff)
Convert _t() to _() for gettext.
darcs-hash:20080708094531-533db-83399a46e6ec4c0fcc6249b0235961f969d1ae73.gz
Diffstat (limited to 'lib/settingsaction.php')
-rw-r--r--lib/settingsaction.php43
1 files changed, 26 insertions, 17 deletions
diff --git a/lib/settingsaction.php b/lib/settingsaction.php
index 1fbf88ecb..22be36720 100644
--- a/lib/settingsaction.php
+++ b/lib/settingsaction.php
@@ -24,7 +24,7 @@ class SettingsAction extends Action {
function handle($args) {
parent::handle($args);
if (!common_logged_in()) {
- common_user_error(_t('Not logged in.'));
+ common_user_error(_('Not logged in.'));
return;
} else if (!common_is_real_login()) {
# Cookie theft means that automatic logins can't
@@ -80,21 +80,30 @@ class SettingsAction extends Action {
function settings_menu() {
# action => array('prompt', 'title')
static $menu =
- array('profilesettings' =>
- array('Profile',
- 'Change your profile settings'),
- 'avatar' =>
- array('Avatar',
- 'Upload a new profile image'),
- 'password' =>
- array('Password',
- 'Change your password'),
- 'openidsettings' =>
- array('OpenID',
- 'Add or remove OpenIDs'),
- 'imsettings' =>
- array('IM',
- 'Updates by instant messenger (IM)'));
- $this->nav_menu($menu);
+ array('profilesettings' =>
+ array('Profile',
+ 'Change your profile settings'),
+ 'avatar' =>
+ array('Avatar',
+ 'Upload a new profile image'),
+ 'password' =>
+ array('Password',
+ 'Change your password'),
+ 'openidsettings' =>
+ array('OpenID',
+ 'Add or remove OpenIDs'),
+ 'imsettings' =>
+ array('IM',
+ 'Updates by instant messenger (IM)'));
+
+ $action = $this->trimmed('action');
+ common_element_start('ul', array('id' => 'nav_views'));
+ foreach ($menu as $menuaction => $menudesc) {
+ common_menu_item(common_local_url($menuaction),
+ _t($menudesc[0]),
+ _t($menudesc[1]),
+ $action == $menuaction);
+ }
+ common_element_end('ul');
}
}