url for confirmation email is better, fancy url

darcs-hash:20080624220335-34904-2c4089bf6d1b37b6f613ce89c6fad104727e7487.gz
This commit is contained in:
Evan Prodromou 2008-06-24 18:03:35 -04:00
parent 589a6c05f7
commit bb3c796c25
3 changed files with 8 additions and 2 deletions

View File

@ -175,7 +175,7 @@ class RecoverpasswordAction extends Action {
$body .= "\n\n"; $body .= "\n\n";
$body .= 'If it was you, and you want to confirm, use the URL below:'; $body .= 'If it was you, and you want to confirm, use the URL below:';
$body .= "\n\n"; $body .= "\n\n";
$body .= "\t".common_local_url('confirmaddress', $body .= "\t".common_local_url('recoverpassword',
array('code' => $confirm->code)); array('code' => $confirm->code));
$body .= "\n\n"; $body .= "\n\n";
$body .= 'If not, just ignore this message.'; $body .= 'If not, just ignore this message.';
@ -190,7 +190,7 @@ class RecoverpasswordAction extends Action {
common_show_header(_('Password recovery requested')); common_show_header(_('Password recovery requested'));
common_element('p', NULL, common_element('p', NULL,
_t('Instructions for recovering your password ' . _t('Instructions for recovering your password ' .
'have been sent to the email registered to your ' . 'have been sent to the email address registered to your ' .
'account.')); 'account.'));
common_show_footer(); common_show_footer();
} }

View File

@ -18,6 +18,8 @@ RewriteRule ^main/subscribe$ index.php?action=subscribe [L,QSA]
RewriteRule ^main/unsubscribe$ index.php?action=unsubscribe [L,QSA] RewriteRule ^main/unsubscribe$ index.php?action=unsubscribe [L,QSA]
RewriteRule ^main/confirmaddress$ index.php?action=confirmaddress [L,QSA] RewriteRule ^main/confirmaddress$ index.php?action=confirmaddress [L,QSA]
RewriteRule ^main/confirmaddress/(.*)$ index.php?action=confirmaddress&code=$1 [L,QSA] RewriteRule ^main/confirmaddress/(.*)$ index.php?action=confirmaddress&code=$1 [L,QSA]
RewriteRule ^main/recoverpassword$ index.php?action=recoverpassword [L,QSA]
RewriteRule ^main/recoverpassword/(.*)$ index.php?action=recoverpassword&code=$1 [L,QSA]
RewriteRule ^settings/avatar$ index.php?action=avatar [L,QSA] RewriteRule ^settings/avatar$ index.php?action=avatar [L,QSA]
RewriteRule ^settings/password$ index.php?action=password [L,QSA] RewriteRule ^settings/password$ index.php?action=password [L,QSA]

View File

@ -684,6 +684,10 @@ function common_fancy_url($action, $args=NULL) {
return common_path('main/confirmaddress/'.$args['code']); return common_path('main/confirmaddress/'.$args['code']);
case 'userbyid': case 'userbyid':
return common_path('user/'.$args['id']); return common_path('user/'.$args['id']);
case 'recoverpassword':
return common_path('main/recoverpassword' .
($args['code']) ? ('/' . $args['code']) :
'');
default: default:
return common_simple_url($action, $args); return common_simple_url($action, $args);
} }