Image import working
* bundle update * replacement of image URLs now considers wordpress thumbnails (like -150x150) * added Guard for autotesting
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
class CreateSeoMetaForBlog < ActiveRecord::Migration
|
||||
|
||||
def self.up
|
||||
unless ::SeoMetum.table_exists?
|
||||
create_table ::SeoMetum.table_name do |t|
|
||||
t.integer :seo_meta_id
|
||||
t.string :seo_meta_type
|
||||
|
||||
t.string :browser_title
|
||||
t.string :meta_keywords
|
||||
t.text :meta_description
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index ::SeoMetum.table_name, :id
|
||||
add_index ::SeoMetum.table_name, [:seo_meta_id, :seo_meta_type]
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
# can't drop the table because someone else might be using it.
|
||||
end
|
||||
|
||||
end
|
||||
@@ -1,16 +1,20 @@
|
||||
User.find(:all).each do |user|
|
||||
user.plugins.create(:name => "refinerycms_blog",
|
||||
:position => (user.plugins.maximum(:position) || -1) +1)
|
||||
end
|
||||
::User.find(:all).each do |user|
|
||||
if user.plugins.where(:name => 'refinerycms_blog').blank?
|
||||
user.plugins.create(:name => "refinerycms_blog",
|
||||
:position => (user.plugins.maximum(:position) || -1) +1)
|
||||
end
|
||||
end if defined?(::User)
|
||||
|
||||
page = Page.create(
|
||||
:title => "Blog",
|
||||
:link_url => "/blog",
|
||||
:deletable => false,
|
||||
:position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),
|
||||
:menu_match => "^/blogs?(\/|\/.+?|)$"
|
||||
)
|
||||
if defined?(::Page)
|
||||
page = ::Page.create(
|
||||
:title => "Blog",
|
||||
:link_url => "/blog",
|
||||
:deletable => false,
|
||||
:position => ((Page.maximum(:position, :conditions => {:parent_id => nil}) || -1)+1),
|
||||
:menu_match => "^/blogs?(\/|\/.+?|)$"
|
||||
)
|
||||
|
||||
Page.default_parts.each do |default_page_part|
|
||||
page.parts.create(:title => default_page_part, :body => nil)
|
||||
end
|
||||
::Page.default_parts.each do |default_page_part|
|
||||
page.parts.create(:title => default_page_part, :body => nil)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user