[livejournal] r19796: LJSUP-9583: Provide a way to change ?v= ...
Committer: vad
LJSUP-9583: Provide a way to change ?v= param for all types of included resU trunk/cgi-bin/weblib.pl A trunk/htdocs/stc/0
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl 2011-08-19 11:20:39 UTC (rev 19795)
+++ trunk/cgi-bin/weblib.pl 2011-08-20 11:28:42 UTC (rev 19796)
@@ -1535,7 +1535,14 @@
if ($do_concat) {
my $csep = join(',', @$list);
- $csep .= "?v=" . $oldest{$type}{$cond}{$args};
+ my $mtime = $oldest{$type}{$cond}{$args};
+
+ ## stc/0 is the empty file.
+ ## touch-ing it changes ?v= param for all included res.
+ my $mtime_base = _file_modtime("stc/0", $now);
+ $mtime = $mtime_base if $mtime_base > $mtime;
+
+ $csep .= "?v=" . $mtime;
my $inc = $template;
$inc =~ s/__+/??$csep/;
$inc =~ s/##/$args/;
