Changeset 855
- Timestamp:
- 12/07/06 10:29:26 (2 years ago)
- Files:
-
- branches/wheeljack/default_templates/atom_index.tmpl (modified) (1 diff)
- branches/wheeljack/lib/MT/DefaultTemplates.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/default_templates/atom_index.tmpl
r741 r855 4 4 <link rel="alternate" type="text/html" href="<$MTBlogURL encode_xml="1"$>" /> 5 5 <link rel="self" type="application/atom+xml" href="<$MTBlogURL$>atom.xml" /> 6 <id>tag:<$MTBlogHost exclude_port="1" encode_xml="1"$>,<$MTDate format="%Y "$>:<$MTBlogRelativeURL encode_xml="1"$>/<$MTBlogID$></id>6 <id>tag:<$MTBlogHost exclude_port="1" encode_xml="1"$>,<$MTDate format="%Y-%m-%d"$>:<$MTBlogRelativeURL encode_xml="1"$>/<$MTBlogID$></id> 7 7 <updated><MTEntries lastn="1"><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></MTEntries></updated> 8 8 <MTIfNonEmpty tag="MTBlogDescription"><subtitle><$MTBlogDescription remove_html="1" encode_xml="1"$></subtitle></MTIfNonEmpty> branches/wheeljack/lib/MT/DefaultTemplates.pm
r717 r855 114 114 ]; 115 115 116 use MT::Util qw(format_ts); 117 116 118 sub templates { 117 119 if (!$loaded) { … … 126 128 if ((-e $file) && (-r $file)) { 127 129 open FIN, "<$file"; my $data = <FIN>; close FIN; 130 if ('Atom Index' eq $tmpl->{name}) { 131 if ($data =~ m!<\$MTDate format="([\S]+)"\$>!) { 132 my @ts = gmtime(time); 133 my $ts = sprintf '%04d%02d%02d%02d%02d%02d', 134 $ts[5]+1900, $ts[4]+1, @ts[3,2,1,0]; 135 my $date = format_ts($1, $ts); 136 $data =~ s!<\$MTDate format="([\S]+)"\$>!$date!; 137 } 138 } 128 139 $tmpl->{text} = $data; 129 140 } else {
