From: Evan Prodromou <evan@controlezvous.ca>
Date: Tue, 24 Jun 2008 22:03:35 +0000 (-0400)
Subject: url for confirmation email is better, fancy url
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bb3c796c25f989b529af0e985faa857689e0b25f;p=quix0rs-gnu-social.git

url for confirmation email is better, fancy url

darcs-hash:20080624220335-34904-2c4089bf6d1b37b6f613ce89c6fad104727e7487.gz
---

diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php
index 8bcfa9755c..4d1dd6f44b 100644
--- a/actions/recoverpassword.php
+++ b/actions/recoverpassword.php
@@ -175,7 +175,7 @@ class RecoverpasswordAction extends Action {
 		$body .= "\n\n";
 		$body .= 'If it was you, and you want to confirm, use the URL below:';
 		$body .= "\n\n";
-		$body .= "\t".common_local_url('confirmaddress',
+		$body .= "\t".common_local_url('recoverpassword',
 								   array('code' => $confirm->code));
 		$body .= "\n\n";
 		$body .= 'If not, just ignore this message.';
@@ -190,7 +190,7 @@ class RecoverpasswordAction extends Action {
 		common_show_header(_('Password recovery requested'));
 		common_element('p', NULL,
 		               _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.'));
 		common_show_footer();
 	}
diff --git a/htaccess.sample b/htaccess.sample
index 37575d2903..a5d2cd4e0a 100644
--- a/htaccess.sample
+++ b/htaccess.sample
@@ -18,6 +18,8 @@ RewriteRule ^main/subscribe$ index.php?action=subscribe [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&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/password$ index.php?action=password [L,QSA]
diff --git a/lib/util.php b/lib/util.php
index 88a71273dd..e2c9c67a1e 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -684,6 +684,10 @@ function common_fancy_url($action, $args=NULL) {
 		return common_path('main/confirmaddress/'.$args['code']);
 	 case 'userbyid':
 	 	return common_path('user/'.$args['id']);
+	 case 'recoverpassword':
+	    return common_path('main/recoverpassword' .
+	                       ($args['code']) ? ('/' . $args['code']) :
+	                       '');
 	 default:
 		return common_simple_url($action, $args);
 	}