From 709e80673697492baa637ef5da95ece803f78e2b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 30 Mar 2011 23:16:21 -0400 Subject: v2, v3: dal_images, image path setting * ruby1.9.2 transition related --- data/doc/sisu/CHANGELOG_v2 | 1 + data/doc/sisu/CHANGELOG_v3 | 1 + lib/sisu/v2/dal_images.rb | 5 +++-- lib/sisu/v3/dal_images.rb | 5 +++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2 index ee3fb663..94db9176 100644 --- a/data/doc/sisu/CHANGELOG_v2 +++ b/data/doc/sisu/CHANGELOG_v2 @@ -16,6 +16,7 @@ Reverse Chronological: http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.6-1 * (ruby 1.9.2 (transition related) fixes) + * dal_images, image path setting * param, nested regex match backport from v3 * cgi sample-search-form, string output (also cleaned unused help text) diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index b319bc6b..2481d41b 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -21,6 +21,7 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.6.orig.tar.gz sisu_3.0.6-1.debian.tar.gz * (ruby 1.9.2 (transition related) fixes) + * dal_images, image path setting * cgi sample-search-form, string output (also cleaned unused help text) * sysenv, remove repeated method diff --git a/lib/sisu/v2/dal_images.rb b/lib/sisu/v2/dal_images.rb index ed537f22..2f9eb79d 100644 --- a/lib/sisu/v2/dal_images.rb +++ b/lib/sisu/v2/dal_images.rb @@ -92,8 +92,9 @@ module SiSU_images dir=SiSU_Env::Info_env.new(@md.fns) path_image=[dir.path.image_source_local_tex,dir.path.image_source_remote_tex,dir.path.image_source_tex] image_path=nil - path_image.each do |image_path| - break if FileTest.exist?("#{image_path}/#{image}") + path_image.each do |img_pth| + image_path=img_pth + break if FileTest.exist?("#{img_pth}/#{image}") end if FileTest.exist?("#{image_path}/#{image}") if @rmgk diff --git a/lib/sisu/v3/dal_images.rb b/lib/sisu/v3/dal_images.rb index 0d541a13..8c7e9f94 100644 --- a/lib/sisu/v3/dal_images.rb +++ b/lib/sisu/v3/dal_images.rb @@ -92,8 +92,9 @@ module SiSU_images dir=SiSU_Env::Info_env.new(@md.fns) path_image=[dir.path.image_source_include_local,dir.path.image_source_include_remote,dir.path.image_source_include] image_path=nil - path_image.each do |image_path| - break if FileTest.exist?("#{image_path}/#{image}") + path_image.each do |img_pth| + image_path=img_pth + break if FileTest.exist?("#{img_pth}/#{image}") end if FileTest.exist?("#{image_path}/#{image}") if @rmgk -- cgit v1.2.3