caboose-cms 0.5.228 → 0.5.229

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmU1ZDMxMTQwNjIyYTBmMzBjMTRkODRlMzFhODk0YzAwMjhmMjU3MQ==
4
+ MzI4M2UxMzRhNjIyNjlmNWI5MTgyNzFiNDQ4ZDU0MGI3YjUyODc5NA==
5
5
  data.tar.gz: !binary |-
6
- ZWViOGE1NDYzYzBlZWRkMWQwOTU5NWNjODlkOTAyZTlhZWE1MjdlZQ==
6
+ OWQ1ZWUzYmU0ZjE4NTE5ZWI5M2FiMGQxYjMyNzk5ZTdhYjBjYWZmYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzBkYzc1YTZlMGRjMjU5ZmI1ZTY5MGQyN2FkOTJkZWY3NDYwZTBlZmU5M2Mz
10
- ZDM3MzNiNmEwMmYxOGY2NmYyY2Y0YWVhYjRlNjkyOGZiYWExMDE5NjdmZjgz
11
- N2UzZmJiNzk5MmVjNmZkMDVhNWM1MDE0YTQ4MmZkNzA3MmNmMWI=
9
+ MjcxMGNhODYxZjBiNzM2ZDBjNDUwY2FmMDk4NWYyMmU0YTJmNzAxM2JmZTU3
10
+ Yzg0NGU5ZjA2ZjRhZTQ5ODI4NTE2ZTAyZWExNTUxMTEzMjRiNzI3NGUxM2Y1
11
+ ZjRkYzRhNTdiNzAyNjI3MzE2OGZjOTJiMjg5ZDk0NTQ2OGFhNjk=
12
12
  data.tar.gz: !binary |-
13
- NDU0ZWZlZGZhMWZkZWQzYjY3N2JiYjY2MzYzY2I5YmEyYjhiMmI1MmUwZjQ5
14
- NjUxY2M1M2M3MWMzN2I2NmE3ZjdkYjRkNDA2YzQ2YmY0NjkxYTAxOTNlZWMw
15
- ZTA5YzYzOTQzZGVmN2I1NzRhMDliMmFiYWYyMGQyZWYyMjBmZjU=
13
+ NzUzZGZhMGU0OWZjMmI5YjFkNjFmMDkyNDQ0OTI2Yjk2YmU3MTRmNWJiNTcz
14
+ MDdkZmY4ZDQxZTg1ZGYyZTdhZWM3ZWNjOTQ1MWI3Y2NhMGM2YzZhNDBkOGE5
15
+ MWUzYTIxZTBkZmJlNGNjYzE2YTUxZGExYWE0NWIxYzBmMWNmMDk=
@@ -506,7 +506,8 @@ class Caboose::Block < ActiveRecord::Base
506
506
 
507
507
  site_id = self.page_id ? self.page.site_id : self.post.site_id
508
508
  cat = Caboose::MediaCategory.top_category(site_id)
509
- m = Caboose::Media.create(:media_category_id => cat.id, :original_name => self.image_file_name, :name => Caboose::Media.upload_name(self.image_file_name))
509
+ m = self.media
510
+ m = Caboose::Media.create(:media_category_id => cat.id, :original_name => self.image_file_name, :name => Caboose::Media.upload_name(self.image_file_name)) if m.nil?
510
511
  m.image = URI.parse(self.image.url(:original))
511
512
  m.processed = true
512
513
  m.save
@@ -517,8 +518,9 @@ class Caboose::Block < ActiveRecord::Base
517
518
  elsif self.block_type.field_type == 'file' && !self.file_file_name.nil? && self.media_id.nil?
518
519
 
519
520
  site_id = self.page_id ? self.page.site_id : self.post.site_id
520
- cat = Caboose::MediaCategory.top_category(site_id)
521
- m = Caboose::Media.create(:media_category_id => cat.id, :original_name => self.file_file_name, :name => Caboose::Media.upload_name(self.file_file_name))
521
+ cat = Caboose::MediaCategory.top_category(site_id)
522
+ m = self.media
523
+ m = Caboose::Media.create(:media_category_id => cat.id, :original_name => self.file_file_name, :name => Caboose::Media.upload_name(self.file_file_name)) if m.nil?
522
524
  m.file = URI.parse(self.file.url)
523
525
  m.processed = true
524
526
  m.save
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.228'
2
+ VERSION = '0.5.229'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.228
4
+ version: 0.5.229
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry