[Affelio-cvs 1105] CVS update: affelio/apps/diary/Diary

Back to archive index

Yoshihisa Fukuhara higef****@users*****
2006年 3月 3日 (金) 11:50:36 JST


Index: affelio/apps/diary/Diary/ShowDiary.pm
diff -u affelio/apps/diary/Diary/ShowDiary.pm:1.1 affelio/apps/diary/Diary/ShowDiary.pm:1.2
--- affelio/apps/diary/Diary/ShowDiary.pm:1.1	Wed Mar  1 14:40:35 2006
+++ affelio/apps/diary/Diary/ShowDiary.pm	Fri Mar  3 11:50:36 2006
@@ -14,7 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-# $Id: ShowDiary.pm,v 1.1 2006/03/01 05:40:35 higefuku Exp $
+# $Id: ShowDiary.pm,v 1.2 2006/03/03 02:50:36 higefuku Exp $
 
 package Diary::ShowDiary;
 {
@@ -89,7 +89,7 @@
 
 # Diary
 	my $images="";
-	if (!($entry->{contents} =~ s/<image=\"([A-Za-z0-9\-\_]*\.(jpg)|(png)|(gif)|(bmp)|(jpeg))\">/<a href=\"show_image.cgi\?id=$entry->{id}&filename=$1&size=l\"><img src=\"show_image.cgi\?id=$entry->{id}&filename=$1&size=s\" boader=\"0\"\<\/a>/ig)){
+	if (!($entry->{contents} =~ s/<image=\"([A-Za-z0-9\-\_]*\.(jpg|png|gif|bmp|jpeg))\">/<a href=\"show_image.cgi\?id=$entry->{id}&filename=$1&size=l\"><img src=\"show_image.cgi\?id=$entry->{id}&filename=$1&size=s\" boader=\"0\"\<\/a>/ig)){
 	    $images=getUploadedImages($diary, $entry->{id}, 300, 300);
 	}
 
Index: affelio/apps/diary/Diary/Top.pm
diff -u affelio/apps/diary/Diary/Top.pm:1.1 affelio/apps/diary/Diary/Top.pm:1.2
--- affelio/apps/diary/Diary/Top.pm:1.1	Wed Mar  1 14:40:35 2006
+++ affelio/apps/diary/Diary/Top.pm	Fri Mar  3 11:50:36 2006
@@ -97,7 +97,7 @@
 	    }
 
 	    my $images="";
-	    if (!($_->{contents} =~ s/<image=\"([A-Za-z0-9\-\_]*\.(jpg)|(png)|(gif)|(bmp)|(jpeg))\">/<a href=\"show_image.cgi\?id=$_->{id}&filename=$1&size=l\"><img src=\"show_image.cgi\?id=$_->{id}&filename=$1&size=s\" border=\"0\"><\/a>/ig)){
+	    if (!($_->{contents} =~ s/<image=\"([A-Za-z0-9\-\_]*\.(jpg|png|gif|bmp|jpeg))\">/<a href=\"show_image.cgi\?id=$_->{id}&filename=$1&size=l\"><img src=\"show_image.cgi\?id=$_->{id}&filename=$1&size=s\" border=\"0\"><\/a>/ig)){
 		$images=getUploadedImages($diary, $_->{id}, 300, 300);
 	    }
 	    my $username=$_->{user};
Index: affelio/apps/diary/Diary/UploadImage.pm
diff -u affelio/apps/diary/Diary/UploadImage.pm:1.1 affelio/apps/diary/Diary/UploadImage.pm:1.2
--- affelio/apps/diary/Diary/UploadImage.pm:1.1	Wed Mar  1 14:40:35 2006
+++ affelio/apps/diary/Diary/UploadImage.pm	Fri Mar  3 11:50:36 2006
@@ -116,7 +116,10 @@
 #		(eval 'use Image::Magick; 1;' ) ? ( $tmpl->param(IMAGEMAGICK => 0) ) : ( $tmpl->param(IMAGEMAGICK =>1) );                  
 		my $image = Image::Magick->new;
 		$image->Read( $distfile );
-		$image->Resize( geometry=>"300x300" );
+		my ($wg,$hg) = $image->Get('Width','Height');
+		if ($wg>300 || $hg>300){
+		    $image->Resize( geometry=>"300x300" );
+		}
 		$image->Set( quality=>75 );
 		$image->Write( $thumbfile );
 


Affelio-cvs メーリングリストの案内
Back to archive index