Tadashi Okoshi
slash****@users*****
2005年 10月 27日 (木) 21:06:34 JST
Index: affelio/lib/Affelio/App/Admin/EditTemplates.pm
diff -u affelio/lib/Affelio/App/Admin/EditTemplates.pm:1.8 affelio/lib/Affelio/App/Admin/EditTemplates.pm:1.9
--- affelio/lib/Affelio/App/Admin/EditTemplates.pm:1.8 Fri Jul 1 11:00:07 2005
+++ affelio/lib/Affelio/App/Admin/EditTemplates.pm Thu Oct 27 21:06:34 2005
@@ -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: EditTemplates.pm,v 1.8 2005/07/01 02:00:07 slash5234 Exp $
+# $Id: EditTemplates.pm,v 1.9 2005/10/27 12:06:34 slash5234 Exp $
package Affelio::App::Admin::EditTemplates;
{
@@ -146,6 +146,8 @@
###################################################
#Replacement
###################################################
+ my $included_aftags="";
+
# (1)s/AF_VAR/TMPL_VAR/g
$output_contents =~ s/AF_VAR/TMPL_VAR/g;
@@ -168,7 +170,11 @@
close(TAGCONTENT);
my $rep = '<AF_BLOCK NAME="' . $tagname . '">';
- $output_contents =~ s/$rep/$tagcontent/g;
+ if($output_contents =~ /$rep/){
+ $output_contents =~ s/$rep/$tagcontent/g;
+ $included_aftags .= "block_$tagname,";
+ }
+
}#if
}#while
@@ -178,6 +184,10 @@
sysopen(OUT, "$af->{site__fs_root}/templates_dyn/$template_name.tmpl", O_WRONLY|O_CREAT|O_TRUNC, 0755);
print OUT $output_contents;
close(OUT);
+
+ sysopen(OUT, "$af->{site__fs_root}/templates_dyn/$template_name.inj", O_WRONLY|O_CREAT|O_TRUNC, 0755);
+ print OUT $included_aftags;
+ close(OUT);
}#if
}#while(for each file...)