Skip to content
Snippets Groups Projects
Unverified Commit df45ffdf authored by ArtOfCode's avatar ArtOfCode Committed by GitHub
Browse files

Merge pull request #126 from codidact/luap42/patches

Patches
parents d96ae718 8f43898a
Branches
Tags
No related merge requests found
......@@ -59,7 +59,11 @@ class PinnedLinksController < ApplicationController
private
def set_pinned_link
@link = PinnedLink.find params[:id]
@link = if current_user.is_global_moderator
PinnedLink.unscoped.find params[:id]
else
PinnedLink.find params[:id]
end
end
def pinned_link_params
......
......@@ -14,7 +14,13 @@ class VotesController < ApplicationController
max_votes_per_day = SiteSetting['FreeVotes'] + (@current_user.reputation - SiteSetting['NewUserInitialRep'])
if recent_votes >= max_votes_per_day
vote_limit_msg = 'You have used your daily vote limit: ' + recent_votes.to_s + '/' + max_votes_per_day.to_s
vote_limit_msg = 'You have used your daily vote limit of ' + recent_votes.to_s + 'votes. Gain more reputation' \
' or come back tomorrow to continue voting.'
if max_votes_per_day <= 0
vote_limit_msg = 'You need to gain some reputation on this site before you can start voting.'
end
render json: { status: 'failed', message: vote_limit_msg }, status: 403
return
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment