Yoshihisa Fukuhara
higef****@users*****
2005年 7月 6日 (水) 22:33:17 JST
Index: affelio/apps/album/Album.pm
diff -u affelio/apps/album/Album.pm:1.15 affelio/apps/album/Album.pm:1.16
--- affelio/apps/album/Album.pm:1.15 Wed Jul 6 02:12:08 2005
+++ affelio/apps/album/Album.pm Wed Jul 6 22:33:17 2005
@@ -36,8 +36,7 @@
our $max_entries = 3000;
##############################################
-# ã³ã³ã¹ãã©ã¯ã¿
-# AffelioAppãæ¸¡ãã¾ã
+# Constructor
##############################################
sub new {
@@ -51,7 +50,7 @@
$this->{image_tb}= "album_$afap->{install_name}_images";
$this->{comment_tb}= "album_$afap->{install_name}_comments";
$this->{dbh} = undef;
- # åæå
+ #initialize
###########################
#Locale init
@@ -63,7 +62,7 @@
open(TMP,"> $this->{tmpfile}");
close(TMP);
$this->{dbh} = $afap->get_userdata_dbh();
- # æ¥è¨ãã¼ãã«
+ #Album table
my $query;
$query="id INTEGER".get_query_primarykey($this)."
title TEXT,
@@ -77,8 +76,7 @@
$this->{dbh}->do("CREATE TABLE $this->{album_tb} ($query)");
- # ã³ã¡ã³ããã¼ãã«
-
+ #Comment table
$query="pkey INTEGER".get_query_primarykey($this)."
id INTEGER,
user TEXT,
@@ -90,8 +88,8 @@
$this->{dbh}->do("CREATE TABLE $this->{comment_tb} ($query)");
- # ç»åãã¼ãã«
-#
+
+ # Image table
$query="pkey INTEGER".get_query_primarykey($this)."
id INTEGER,
image TEXT,
@@ -104,11 +102,8 @@
$this->{dbh}->do("CREATE TABLE $this->{image_tb} ($query)");
-# $this->{dbh}->disconnect;
}
else {
-# $this->{dbh} = DBI->connect("dbi:SQLite:dbname=".$this->{dbpath})
-# or die("cannot open db: ".$this->{dbpath});
$this->{dbh} = $afap->get_userdata_dbh();
}
@@ -117,8 +112,7 @@
}
##############################################
-# ãã¹ãã©ã¯ã¿
-# DBã¸ã®æ¥ç¶ãéãã¾ã
+# destructor
##############################################
sub DESTROY {
@@ -129,7 +123,6 @@
##############################################
# addAlbum
-# æ¥è¨ã«æ°ããã¨ã³ããªã追å ãã¾ãã
##############################################
sub addAlbum {
@@ -144,7 +137,7 @@
# $contents = $this->validate_entry($id, $title, $contents);
$contents = $this->validate($contents);
- # äºéæç¨¿ãé²ã
+ #
# my @same = $this->getall("SELECT id FROM $this->{album_tb} WHERE title = $title AND contents = $contents");
# if($#same >= 0) { return; }
@@ -164,7 +157,6 @@
##############################################
# addImage
-# ã¢ã«ãã DBã«æ°ããç»åãã¼ã¿ã追å ãã¾ãã
##############################################
sub addImage {
@@ -177,7 +169,7 @@
$image = $this->validate($image);
$user = $this->validate($user);
- # äºéæç¨¿ãé²ã
+ #
# my @same = $this->getall("SELECT id FROM $this->{image_tb} WHERE title = '$title' AND comment = '$comment'");
# if($#same >= 0) { return; }
my @same = $this->getall("SELECT id FROM $this->{image_tb} WHERE id = $id AND image = $image");
@@ -192,7 +184,6 @@
##############################################
# updateEntry
-# æå®ããIDã®ã¨ã³ããªãæ´æ°ãã¾ã
##############################################
sub updateEntry {
@@ -205,7 +196,6 @@
##############################################
# updateImage
-# æå®ããç»åæ
å ±ãæ´æ°ãã¾ã
##############################################
sub updateImage {
@@ -219,7 +209,6 @@
##############################################
# updateTimestamp
-# æå®ããIDã®update_timeãæ´æ°ãã¾ã
##############################################
sub updateTimestamp {
@@ -231,7 +220,6 @@
##############################################
# removeAlbum
-# æå®ããIDã®ã¨ã³ããªã¨ããã«å¯¾ããã³ã¡ã³ããåé¤ãã¾ã
##############################################
sub removeAlbum {
@@ -256,7 +244,6 @@
##############################################
# removeImage
-# æå®ããç»åæ
å ±ãåé¤ãã¾ãã
##############################################
sub removeImage {
@@ -275,7 +262,6 @@
##############################################
# removeComment
-# æå®ããã³ã¡ã³ãæ
å ±ãåé¤ãã¾ãã
##############################################
sub removeComment {
@@ -288,7 +274,6 @@
##############################################
# getEntry
-# æå®ããIDã®ã¨ã³ããªã®å
容ãåå¾ãã¾ã
##############################################
sub getEntry {
@@ -299,7 +284,6 @@
##############################################
# getImage
-# æå®ããIDã¨imageã®å
容ãåå¾ãã¾ã
##############################################
sub getImage {
@@ -320,7 +304,6 @@
##############################################
# getNewestEntries
-# æ¥æã«é¢ä¿ãªãææ°ã®ã¨ã³ããªãåå¾ãã¾ãã
##############################################
sub getNewestEntries {
@@ -331,7 +314,6 @@
##############################################
# getNewestAlbumId
-# ææ°ã¢ã«ãã ã®IDãåå¾ã
##############################################
sub getNewestAlbumId {
@@ -342,7 +324,6 @@
##############################################
# getAllEntries
-# ãã¹ã¦ã®ã¨ã³ããªãåå¾ãã¾ãã
##############################################
sub getAllEntries {
@@ -353,7 +334,6 @@
##############################################
# addComment
-# æå®ããIDã®ã¨ã³ããªã«ã³ã¡ã³ããã¤ãã¾ã
##############################################
sub addComment {
@@ -362,7 +342,7 @@
$user = $this->validate($user);
$comment = $this->validate($comment);
- # äºéæç¨¿ãé²ã
+ #
my @same = $this->getall("SELECT id FROM $this->{comment_tb} WHERE user = $user AND comment = $comment");
if($#same >= 0) { return; }
@@ -372,7 +352,6 @@
##############################################
# getComments
-# æå®ããIDã®ã¨ã³ããªã«å¯¾ããã³ã¡ã³ããåå¾ãã¾ã
##############################################
sub getComments {
@@ -382,7 +361,6 @@
##############################################
# getCommentsNo
-# æå®ããIDã®ã¨ã³ããªã«å¯¾ããã³ã¡ã³ãæ°ãåå¾ãã¾ã
##############################################
sub getCommentsNo {
@@ -409,7 +387,6 @@
##############################################
# getRSS
-# æå®ããã¨ã³ããªã¼åã®RDFãåå¾ãã¾ã
##############################################
#sub getRSS {
@@ -453,7 +430,6 @@
##############################################
# getTrackbacks
-# æå®ããã¨ã³ããªã¼ã®ãã©ãã¯ããã¯ãåå¾ãã¾ã
##############################################
sub getTrackbacks {
@@ -486,7 +462,6 @@
##############################################
# getTrackbacksNo
-# æå®ããã¨ã³ããªã¼ã®ãã©ãã¯ããã¯ã®æ°ã®ã¿åå¾ãã¾ã
##############################################
sub getTrackbacksNo {
@@ -510,7 +485,6 @@
##############################################
# getURLDescription
-# ãã©ãã¯ããã¯URLãç¥ãããããã®RDFãåºåãã¾ã
##############################################
sub getURLDescription {
@@ -533,7 +507,7 @@
return $tmpl->output;
}
-# æ¥è¨ã«æ¯ãã¦ãã¼ã¯ãªIDãåå¾ãã
+# get unique ID
#sub getID {
# local (*F);
# my $count = 0;
@@ -550,7 +524,7 @@
# return $count;
#}
-# ãã©ãã¯ããã¯PINGãèªåçã«é£ã°ã
+# put trackback ping automaticaly
sub validate_entry {
my ($this, $id, $title, $contents) = @_;
my @urls = $contents =~ /(s?https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/g;
@@ -562,7 +536,7 @@
title => $title,
excerpt => $contents,
url => "$this->{afap}->{af}->{site__web_root}/apps/album/show_album.cgi?id=$id",
- blog_name => "$this->{afap}->{af}->{user__nickname}ã®Affelioã¢ã«ãã ",
+ blog_name => "$this->{afap}->{af}->{user__nickname}",
);
my $req = POST($url, [%form]);
my $ua = new LWP::UserAgent;
@@ -574,7 +548,7 @@
return $this->validate($contents);
}
-# ã¿ã°ãã«ã³ããæ¹è¡ã®é¤å»
+# validate
sub validate {
my ($this, $str) = @_;
@@ -589,7 +563,7 @@
return $str;
}
-# ã¯ã¨ãªã«åè´ãããã¹ã¦ã®ã«ã©ã ãåå¾
+# get all columns
sub getall {
my ($this, $query) = @_;
@@ -605,7 +579,7 @@
return @ret;
}
-# æå®ããæã®ã«ã¬ã³ãã¼ãã¨ã£ã¦ãã
+# get calender
sub weekly_days {
my ($this, $year, $mon) = @_;
my @weeks;
@@ -631,8 +605,8 @@
return @weeks;
}
-# å¼µãããURLã«å¯¾ãã¦ãã©ãã¯ããã¯PINGURLãåå¾ãã¾ã
-# åèï¼ http://lowlife.jp/yasusii/stories/8.html
+# get trackback ping.
+# refer to http://lowlife.jp/yasusii/stories/8.html
sub discover_tb {
my ($this, $url) = @_;
@@ -658,6 +632,7 @@
}
}
+# get primary key for DBs
sub get_query_primarykey {
my ($this) = @_;
my $DBConfig = Config::Tiny->new();
Index: affelio/apps/album/add_album.cgi
diff -u affelio/apps/album/add_album.cgi:1.3 affelio/apps/album/add_album.cgi:1.4
--- affelio/apps/album/add_album.cgi:1.3 Fri Jul 1 11:15:25 2005
+++ affelio/apps/album/add_album.cgi Wed Jul 6 22:33:17 2005
@@ -19,7 +19,7 @@
our $mymode="owner";
require './common/header.pl';
unless ($afap->get_visitor_info("type") eq "self"){
- &errorExit("ããªãã¯ãã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããæ¨©éãããã¾ãã")
+ &errorExit('<AF_M text="Access denied">');
}
my $tmpl = HTML::Template->new(filename => "./templates/add_album.tmpl");
@@ -32,7 +32,7 @@
$tmpl->param(TITLE => $title);
$tmpl->param(CONTENTS => $contents);
-# æç¨¿
+# Add new album
if($afap->{cgi}->param("submit")) {
$tmpl->param(SUBMIT => "1");
$album->addAlbum($title, $contents, $user, $afid);
@@ -40,15 +40,16 @@
$tmpl->param(ID => $ret->{id});
}
-# 確èª
+# Confirm
elsif($afap->{cgi}->param("confirm")) {
$tmpl->param(CONFIRM => "1");
}
-# ç·¨éç»é¢
+# Edit mode
else {
$tmpl->param(EDIT => "1");
}
-print $tmpl->output;
+
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/delete_comment.cgi
diff -u affelio/apps/album/delete_comment.cgi:1.5 affelio/apps/album/delete_comment.cgi:1.6
--- affelio/apps/album/delete_comment.cgi:1.5 Fri Jul 1 11:15:25 2005
+++ affelio/apps/album/delete_comment.cgi Wed Jul 6 22:33:17 2005
@@ -18,23 +18,20 @@
require './common/header.pl';
unless ($afap->get_visitor_info("type") eq "self"){
- &errorExit("ããªãã¯ãã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããæ¨©éãããã¾ãã")
- }
+ &errorExit('<AF_M text="Access denied">');
+}
my $tmpl = HTML::Template->new(filename => "./templates/delete_comment.tmpl");
my $id = $afap->{cgi}->param("id");
my @pkey = $afap->{cgi}->param("delete_comment");
-#$tmpl->param(ID => $id);
-
-
-# åé¤å®äº
+#Done
if($afap->{cgi}->param("delete")) {
$album->removeComment($id, @ pkey);
- $tmpl->param(DONE => "1", DONE_LABEL => "åé¤ãã¾ãã");
+ $tmpl->param(DONE => "1");
}
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/delete_image.cgi
diff -u affelio/apps/album/delete_image.cgi:1.5 affelio/apps/album/delete_image.cgi:1.6
--- affelio/apps/album/delete_image.cgi:1.5 Fri Jul 1 11:15:25 2005
+++ affelio/apps/album/delete_image.cgi Wed Jul 6 22:33:17 2005
@@ -18,7 +18,7 @@
require './common/header.pl';
unless ($afap->get_visitor_info("type") eq "self"){
- &errorExit("ããªãã¯ãã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããæ¨©éãããã¾ãã")
+ &errorExit('<AF_M text="Access denied">');
}
my $tmpl = HTML::Template->new(filename => "./templates/delete_image.tmpl");
@@ -29,12 +29,12 @@
#$tmpl->param(ID => $id);
-# åé¤å®äº
+# Done
if($afap->{cgi}->param("delete")) {
$album->removeImage($id, @ pkey);
- $tmpl->param(DONE => "1", DONE_LABEL => "åé¤ãã¾ãã");
+ $tmpl->param(DONE => "1");
}
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/edit_album.cgi
diff -u affelio/apps/album/edit_album.cgi:1.5 affelio/apps/album/edit_album.cgi:1.6
--- affelio/apps/album/edit_album.cgi:1.5 Fri Jul 1 11:15:25 2005
+++ affelio/apps/album/edit_album.cgi Wed Jul 6 22:33:17 2005
@@ -18,7 +18,7 @@
require './common/header.pl';
unless ($afap->get_visitor_info("type") eq "self"){
- &errorExit("ããªãã¯ãã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããæ¨©éãããã¾ãã")
+ &errorExit('<AF_M text="Access denied">');
}
@@ -28,24 +28,24 @@
$tmpl->param(ID => $id);
-# ç·¨éå®äº
+# done edit
if($afap->{cgi}->param("edit")) {
$album->updateEntry($id, $afap->{cgi}->param("title"), $afap->{cgi}->param("contents"));
- $tmpl->param(DONE => "1", DONE_LABEL => "å
容ã夿´ãã¾ãã");
+ $tmpl->param(DONE => "1", DONE_LABEL => '<AF_M text="Information was updated.">');
}
-# åé¤å®äº
+# done delete
elsif($afap->{cgi}->param("delete")) {
$album->removeAlbum($id);
- $tmpl->param(DONE => "1", DONE_LABEL => "åé¤ãã¾ãã");
+ $tmpl->param(DONE => "1", DONE_LABEL => '<AF_M text="The album was deleted">');
}
-# 確èª
+# confirm
elsif($afap->{cgi}->param("delete_confirm")) {
$tmpl->param(DELETE_CONFIRM => "1");
}
-# ã³ã¡ã³ãç·¨éç»é¢
+# comment edit
elsif ($afap->{cgi}->param("comment_edit")){
$tmpl->param(EDIT => "1");
my $entry = $album->getEntry($id);
@@ -57,11 +57,11 @@
);
}
-# ç»åç·¨éç»é¢
+# image edit
elsif ($afap->{cgi}->param("image_arrange")){
$tmpl->param(ARRANGE => "1");
-# ãµã ãã¤ã«ã®è¡¨ç¤º
+# show thumbnails
my $col_num=4;
my @image_files;
my @image_row;
@@ -89,7 +89,7 @@
$tmpl->param(THUMBNAIL => \@image_row);
}
-# ã³ã¡ã³ã
+# comment
if($album->getCommentsNo($id) > 0) {
$tmpl->param(HAS_COMMENTS => 1);
my @comments_param;
@@ -110,6 +110,7 @@
}
-print $tmpl->output;
+
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/edit_comment.cgi
diff -u affelio/apps/album/edit_comment.cgi:1.5 affelio/apps/album/edit_comment.cgi:1.6
--- affelio/apps/album/edit_comment.cgi:1.5 Fri Jul 1 11:15:25 2005
+++ affelio/apps/album/edit_comment.cgi Wed Jul 6 22:33:17 2005
@@ -20,14 +20,13 @@
my $id = $afap->{cgi}->param("id");
my $pkey = $afap->{cgi}->param("pkey");
-# æ¬äººï¼ç·¨éå¯ï¼
-# ãµã¤ããªã¼ãã¼ï¼ç·¨éå¯ï¼
+# owner can edit it
my $image_data = $album->getImage($id,$pkey);
my $afid = $afap->get_visitor_info("afid");
if($afap->check_access("add_image")){
unless($image_data->{afid} eq $afid || $afap->get_visitor_info("type") eq "self") {
- &errorExit("ããªãã¯ãã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããæ¨©éãããã¾ãã");
+ &errorExit('<AF_M text="Access denied">');
}
}
@@ -37,17 +36,18 @@
$tmpl->param(PKEY => $pkey);
-# ç·¨éå®äº
+# done edit
if($afap->{cgi}->param("edit")) {
#my $afid = $afap->get_visitor_info("afid");
$album->updateImage($id, $afap->{cgi}->param("title"),
$afap->{cgi}->param("comment"),
$image_data->{image});
-$tmpl->param(DONE => "1", DONE_LABEL => "å
容ã夿´ãã¾ãã");
+#$tmpl->param(DONE => "1", DONE_LABEL => "<AF_M text="Your comment was updated.">");
+$tmpl->param(DONE => "1");
}
-# ã³ã¡ã³ãç·¨éç»é¢
+# edit comment
elsif ($afap->{cgi}->param("comment_edit")){
$tmpl->param(EDIT => "1");
my $entry = $album->getImage($id,$pkey);
@@ -59,6 +59,6 @@
);
}
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/large_image.cgi
diff -u affelio/apps/album/large_image.cgi:1.6 affelio/apps/album/large_image.cgi:1.7
--- affelio/apps/album/large_image.cgi:1.6 Sun Jul 3 22:00:10 2005
+++ affelio/apps/album/large_image.cgi Wed Jul 6 22:33:17 2005
@@ -24,18 +24,18 @@
my $image_data = $album->getImage($id,$pkey);
my $tmpl = HTML::Template->new(filename => "./templates/large_image.tmpl");
-# æ¬äººï¼ç·¨éå¯ï¼
+#Content Owner can edit it
my $afid = $afap->get_visitor_info("afid");
if($afap->check_access("add_image") && ($image_data->{afid} eq $afid)) {
$tmpl->param(EDIT_COMMENT => 1);
}
-# ãµã¤ããªã¼ãã¼ï¼ç·¨éå¯ï¼
+#Site Owner can edit it
if ($afap->get_visitor_info("type") eq "self"){
$tmpl->param(EDIT_COMMENT => 1);
}
-# ã¢ã«ãã æ
å ±
+# Album info
$tmpl->param(
TITLE => $entry->{title},
ID => $id,
@@ -65,7 +65,7 @@
-# ç»å表示
+#show image
my @image_files;
my @image_row;
my @image_filelist=$album->getAllImage($id);
@@ -89,6 +89,6 @@
$i++;
}
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/list_album.cgi
diff -u affelio/apps/album/list_album.cgi:1.7 affelio/apps/album/list_album.cgi:1.8
--- affelio/apps/album/list_album.cgi:1.7 Wed Jul 6 02:12:08 2005
+++ affelio/apps/album/list_album.cgi Wed Jul 6 22:33:17 2005
@@ -21,7 +21,7 @@
my $edit = 0;
my $col_num=4;
-# æ¬äººï¼ã¢ã«ãã 追å å¯ï¼
+# Owner can add album
if ($afap->get_visitor_info("type") eq "self"){
$edit = 1;
}
@@ -37,7 +37,7 @@
if ($afap->{cgi}->param("mode") eq "thumbnail"){
$tmpl->param(THUMB => 1);
-# ãµã ãã¤ã«ã®è¡¨ç¤º
+#show thumbnails
my @image_filelist;
my @image_files;
my @image_row;
@@ -98,7 +98,7 @@
$tmpl->param(ENTRIES => \@entries_param);
}
-#print $tmpl->output;
+
print $album->translate_templateL10N( $tmpl->output );
require("./common/footer.pl");
Index: affelio/apps/album/owner_mode.cgi
diff -u affelio/apps/album/owner_mode.cgi:1.5 affelio/apps/album/owner_mode.cgi:1.6
--- affelio/apps/album/owner_mode.cgi:1.5 Fri Jul 1 11:15:25 2005
+++ affelio/apps/album/owner_mode.cgi Wed Jul 6 22:33:17 2005
@@ -19,7 +19,7 @@
our $mymode="owner";
require './common/header.pl';
unless ($afap->get_visitor_info("type") eq "self"){
- &errorExit("ããªãã¯ãã®ãã¼ã¸ã«ã¢ã¯ã»ã¹ããæ¨©éãããã¾ãã")
+ &errorExit('<AF_M text="Access denied">');
}
my $user = $afap->{cgi}->param("user");
@@ -61,6 +61,6 @@
$tmpl->param(install_title => $afap->get_app_info("install_title"));
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require("./common/footer.pl");
Index: affelio/apps/album/show_album.cgi
diff -u affelio/apps/album/show_album.cgi:1.8 affelio/apps/album/show_album.cgi:1.9
--- affelio/apps/album/show_album.cgi:1.8 Sun Jul 3 22:00:10 2005
+++ affelio/apps/album/show_album.cgi Wed Jul 6 22:33:17 2005
@@ -23,7 +23,7 @@
my $edit = 0;
my $save_file=0;
-# æ¬äººï¼ç·¨éå¯ï¼
+# Owner can edit it
if($afap->check_access("add_image")) {
$edit = 1;
}
@@ -39,7 +39,7 @@
$up_mon+=1;
$up_year+=1900;
-# ã¢ã«ãã æ
å ±
+# Album info
$tmpl->param(
YEAR => $year,
MONTH => $mon,
@@ -53,24 +53,22 @@
EDITABLE=> $edit,
);
-#ç»åã®ç»é²å¦ç
+# upload image
if ($afap->{cgi}->param("image_upload")){
- my $filehandle=$cgi->param("uploadingfile");#ãã¡ã¤ã«å(ãã³ãã«)ãåå¾
+ my $filehandle=$cgi->param("uploadingfile"); #Get file handle
if ($filehandle){
- fileparse_set_fstype("MSDOS"); #IE対çããã¾ãåããªãããï¼ï¼
+ fileparse_set_fstype("MSDOS"); #For IE user
my $basename = basename($filehandle,"");
- if ($basename =~ /^[a-zA-Z0-9\.\-\_]{1,32}$/ ){#ãã¡ã¤ã«åãã§ãã¯
+ if ($basename =~ /^[a-zA-Z0-9\.\-\_]{1,32}$/ ){ #Check Filename
my $fname=$afap->get_userdata_dir().'/'.$id.'/'.$basename;
-#ä¿åãããã¡ã¤ã«åãæå®
my $thumb_fname=$afap->get_userdata_dir().'/'.$id.'/thumbnail/'.$basename;
-#ä¿åãããã¡ã¤ã«åãæå®
my $chkFile = $album->checkImagefile($id,$basename);
# if(-e $fname){
- if ($chkFile->{image} eq $basename){#ååãã¡ã¤ã«ãåå¨
+ if ($chkFile->{image} eq $basename){#
unless ($afap->{cgi}->param("rewrite")){
$tmpl->param(EXIST_SAMEFILE => 1);
$tmpl->param(UPLOAD_IMAGE => $basename);
- }else{#䏿¸ã ï¼æªå®è£
ï¼
+ }else{#override(not yet)
$save_file=2;
}
}else{
@@ -78,7 +76,7 @@
}
if ($save_file){
- #ãã¡ã¤ã«ã®ä¿å
+ # Save file
open (OUT,">$fname") or die "Can't make serverside file!\n";
while ($bytesread = read($filehandle,$buffer,1024)){
print OUT $buffer;
@@ -119,7 +117,7 @@
}
}
-# ãµã ãã¤ã«ã®è¡¨ç¤º
+#Show thumbnail
my @image_files;
my @image_row;
@image_filelist=$album->getAllImage($id);
@@ -147,7 +145,7 @@
$tmpl->param(THUMBNAIL => \@image_row);
}
-# ã³ã¡ã³ã
+# Comment
if($album->getCommentsNo($id) > 0) {
$tmpl->param(HAS_COMMENTS => 1);
my $user_uri;
@@ -176,10 +174,10 @@
}
-# ãã©ãã¯ããã¯URLã®éç¥
+#TrackbackURL(NotYet)
print $album->getURLDescription($id);
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';
Index: affelio/apps/album/show_image.cgi
diff -u affelio/apps/album/show_image.cgi:1.9 affelio/apps/album/show_image.cgi:1.10
--- affelio/apps/album/show_image.cgi:1.9 Fri Jul 1 11:15:26 2005
+++ affelio/apps/album/show_image.cgi Wed Jul 6 22:33:17 2005
@@ -24,11 +24,11 @@
use AffelioApp;
our $cgi = new CGI();
-#AffelioAppãåæå
+
our $afap = new AffelioApp(ConfigDir => Cwd::getcwd(),
cgi => $cgi);
-# èªã¿è¾¼ã¿ã¢ã¯ã»ã¹æ¨©éããã§ãã¯
+# Check access
if ($afap->check_access("DF_access")) {
my $image = $afap->{cgi}->param('image');
my $id = $afap->{cgi}->param('id');
@@ -46,16 +46,16 @@
}
my $imgtype = 'jpeg';
-#// ç»åãªã¼ãã³
+# open image file
open(IMG, "$filepath") or die;
-#// ã¤ã¡ã¼ã¸è¡¨ç¤º
+# show image
binmode IMG;
binmode STDOUT;
print "Content-type: image/$imgtype\n\n";
print while (<IMG>);
-#// ç»åã¯ãã¼ãº
+# close image
close(IMG);
}
exit(0);
Index: affelio/apps/album/write_comment.cgi
diff -u affelio/apps/album/write_comment.cgi:1.7 affelio/apps/album/write_comment.cgi:1.8
--- affelio/apps/album/write_comment.cgi:1.7 Sun Jul 3 22:00:10 2005
+++ affelio/apps/album/write_comment.cgi Wed Jul 6 22:33:17 2005
@@ -17,8 +17,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
require './common/header.pl';
-
-&errorExit("ããªãã¯ãã®ãã¼ã¸ã«æ¸ãè¾¼ã¿æ¨©éãããã¾ãã") unless $afap->check_access("write_comment");
+&errorExit('<AF_M text="Access denied">') unless $afap->check_access("write_comment");
my $comment = $afap->{cgi}->param('comment');
my $tmpl = HTML::Template->new(filename => "./templates/write_comment.tmpl");
@@ -29,7 +28,7 @@
if(!$user){
$user = "";
- $user_uri = 'ãªãªããã';
+ $user_uri = 'Guest';
$afid="";
}
else{
@@ -37,18 +36,18 @@
}
-# ã³ã¡ã³ã確èªç»é¢
+# confirm comment
if($afap->{cgi}->param('comment_confirm')) {
$tmpl->param(CONFIRM => "1", COMMENT => $comment, ID => $id, USER_NAME => $user_uri);
}
-# ã³ã¡ã³ããã³ããã
+# submit comment
elsif($afap->{cgi}->param('comment_commit')) {
$album->addComment($id, $user, $afid, $comment);
$album->updateTimestamp($id);
$tmpl->param(COMMIT => "1", ID => $id);
}
-print $tmpl->output;
+print $album->translate_templateL10N( $tmpl->output );
require './common/footer.pl';