diff options
-rw-r--r-- | actions/passwordsettings.php | 9 | ||||
-rw-r--r-- | lib/mail.php | 2 | ||||
-rw-r--r-- | lib/noticelist.php | 28 |
3 files changed, 23 insertions, 16 deletions
diff --git a/actions/passwordsettings.php b/actions/passwordsettings.php index 17b2de4e8..bdce61035 100644 --- a/actions/passwordsettings.php +++ b/actions/passwordsettings.php @@ -84,7 +84,7 @@ class PasswordsettingsAction extends AccountSettingsAction 'id' => 'form_password', 'class' => 'form_settings', 'action' => - common_local_url('profilesettings'))); + common_local_url('passwordsettings'))); $this->elementStart('fieldset'); $this->element('legend', null, _('Password change')); $this->hidden('token', common_session_token()); @@ -141,7 +141,12 @@ class PasswordsettingsAction extends AccountSettingsAction $newpassword = $this->arg('newpassword'); $confirm = $this->arg('confirm'); - if (0 != strcmp($newpassword, $confirm)) { + # Some validation + + if (strlen($newpassword) < 6) { + $this->showForm(_('Password must be 6 or more characters.')); + return; + } else if (0 != strcmp($newpassword, $confirm)) { $this->showForm(_('Passwords don\'t match.')); return; } diff --git a/lib/mail.php b/lib/mail.php index 5638ae9bf..1c6a10a8a 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -246,7 +246,7 @@ function mail_subscribe_notify_profile($listenee, $other) "\n".'Faithfully yours,'."\n".'%7$s.'."\n\n". "----\n". "Change your email address or ". - "notification options at %8$s\n"), + "notification options at ".'%8$s\n'), $long_name, common_config('site', 'name'), $other->profileurl, diff --git a/lib/noticelist.php b/lib/noticelist.php index 20bf3c9f1..7c88c33cc 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -440,19 +440,21 @@ class NoticeListItem extends Widget function showReplyLink() { - $reply_url = common_local_url('newnotice', - array('replyto' => $this->profile->nickname)); - - $this->out->elementStart('dl', 'notice_reply'); - $this->out->element('dt', null, _('Reply to this notice')); - $this->out->elementStart('dd'); - $this->out->elementStart('a', array('href' => $reply_url, - 'title' => _('Reply to this notice'))); - $this->out->text(_('Reply')); - $this->out->element('span', 'notice_id', $this->notice->id); - $this->out->elementEnd('a'); - $this->out->elementEnd('dd'); - $this->out->elementEnd('dl'); + if (common_logged_in()) { + $reply_url = common_local_url('newnotice', + array('replyto' => $this->profile->nickname)); + + $this->out->elementStart('dl', 'notice_reply'); + $this->out->element('dt', null, _('Reply to this notice')); + $this->out->elementStart('dd'); + $this->out->elementStart('a', array('href' => $reply_url, + 'title' => _('Reply to this notice'))); + $this->out->text(_('Reply')); + $this->out->element('span', 'notice_id', $this->notice->id); + $this->out->elementEnd('a'); + $this->out->elementEnd('dd'); + $this->out->elementEnd('dl'); + } } /** |