Commit 163d7b83b547e725c0cda92ffb9125844a8c1a28

Authored by Francisco Marcelo de Araújo Lima Júnior
1 parent 4e9672e7

change default return value

app/controllers/embed_controller.rb
... ... @@ -4,7 +4,7 @@ class EmbedController < ApplicationController
4 4 block = Block.find(params[:id])
5 5 source = params[:source]
6 6  
7   - if !block.visible?
  7 + if !block.embedable? || !block.visible?
8 8 render :template => 'shared/embed_denied.rhtml', :status => 403, :layout => "embed"
9 9 else
10 10 locals = {:source => source, :block => block}
... ...
app/models/block.rb
... ... @@ -17,7 +17,7 @@ class Block < ActiveRecord::Base
17 17 named_scope :enabled, :conditions => { :enabled => true }
18 18  
19 19 def embedable?
20   - true
  20 + false
21 21 end
22 22  
23 23 def embed_code(url)
... ...
app/views/shared/embed_denied.rhtml
1 1 <div id='not-found'>
2   - <p><%= _('Embed denied. The requested embed is disable.') %></p>
  2 + <p><%= _('Embed denied.') %></p>
3 3 </div>
... ...