Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/publics_controller.rb')
-rw-r--r--app/controllers/publics_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/publics_controller.rb b/app/controllers/publics_controller.rb
index 1b59bd1ef..c58b7f917 100644
--- a/app/controllers/publics_controller.rb
+++ b/app/controllers/publics_controller.rb
@@ -66,7 +66,12 @@ class PublicsController < ApplicationController
end
def post
- @post = Post.where(:guid => params[:guid], :public => true).includes(:author, :comments => :author).first
+
+ if params[:guid].to_s.length <= 8
+ @post = Post.where(:id => params[:guid], :public => true).includes(:author, :comments => :author).first
+ else
+ @post = Post.where(:guid => params[:guid], :public => true).includes(:author, :comments => :author).first
+ end
#hax to upgrade logged in users who can comment
if @post