Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug letting already logged in users see login and forgot password forms #728

Merged
merged 14 commits into from
Sep 12, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make mail_new_activity no-op silently
  • Loading branch information
arandomandy committed Sep 4, 2019
commit 4a8b75e81b909550086ede9e8865e5e5c5204bb9
5 changes: 2 additions & 3 deletions script/mail_new_activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def story_subject(story, prefix = "")

mailing_list_users = User.where("mailing_list_mode > 0").select(&:is_active?)

last_story_id = (Keystore.value_for(LAST_STORY_KEY) || Story.last.id).to_i
last_story_id = (Keystore.value_for(LAST_STORY_KEY) || Story.last && Story.last.id).to_i

Story.where("id > ? AND is_expired = ?", last_story_id, false).order(:id).each do |s|
s.fetch_story_cache!
Expand Down Expand Up @@ -142,8 +142,7 @@ def story_subject(story, prefix = "")

# repeat for comments

last_comment_id = (Keystore.value_for(LAST_COMMENT_KEY) ||
Comment.last.id).to_i
last_comment_id = (Keystore.value_for(LAST_COMMENT_KEY) || Comment.last && Comment.last.id).to_i

Comment.where(
"id > ? AND (is_deleted = ? AND is_moderated = ?)",
Expand Down