From 810dc52bee762bb9211041b4cb9e70386c783068 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 2 Sep 2011 15:43:26 +0100 Subject: Versioning of CSS files, remove generated CSS files from repo. --- perllib/FixMyStreet/App/View/Web.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet') diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index 5579d0d53..2d0fb87d0 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -19,7 +19,7 @@ __PACKAGE__->config( render_die => 1, expose_methods => [ 'loc', 'nget', 'tprintf', 'display_crosssell_advert', 'prettify_epoch', - 'add_links', + 'add_links', 'css', ], FILTERS => { escape_js => \&escape_js, @@ -165,5 +165,15 @@ sub html_filter { return $text; } +my %css_hash; +sub css { + my ( $self, $c, $file ) = @_; + unless ($css_hash{$file}) { + my $path = FixMyStreet->path_to('web', $file); + $css_hash{$file} = ( stat( $path ) )[9]; + } + return "$file?$css_hash{$file}"; +} + 1; -- cgit v1.2.3 From 6050d32f4333c885278622c1c56a977a8abd6d88 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 2 Sep 2011 17:24:11 +0100 Subject: Disable address in RSS temporarily. --- perllib/FixMyStreet/App/Controller/Rss.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet') diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 3a7ffa19a..767d38c21 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -265,8 +265,8 @@ sub add_row : Private { } if ( $row->{used_map} ) { - my $address = $c->cobrand->find_closest_address_for_rss( $row->{latitude}, $row->{longitude} ); - $item{description} .= ent("\n
$address"); + #my $address = $c->cobrand->find_closest_address_for_rss( $row->{latitude}, $row->{longitude} ); + #$item{description} .= ent("\n
$address"); } my $recipient_name = $c->cobrand->contact_name; -- cgit v1.2.3 From b3cda28415c7f0126befd2469e3f1b2331acf166 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 2 Sep 2011 19:16:10 +0100 Subject: Version the JS files. --- perllib/FixMyStreet/App/View/Web.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'perllib/FixMyStreet') diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index 2d0fb87d0..43d46ae25 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -19,7 +19,7 @@ __PACKAGE__->config( render_die => 1, expose_methods => [ 'loc', 'nget', 'tprintf', 'display_crosssell_advert', 'prettify_epoch', - 'add_links', 'css', + 'add_links', 'version', ], FILTERS => { escape_js => \&escape_js, @@ -165,14 +165,14 @@ sub html_filter { return $text; } -my %css_hash; -sub css { +my %version_hash; +sub version { my ( $self, $c, $file ) = @_; - unless ($css_hash{$file}) { + unless ($version_hash{$file}) { my $path = FixMyStreet->path_to('web', $file); - $css_hash{$file} = ( stat( $path ) )[9]; + $version_hash{$file} = ( stat( $path ) )[9]; } - return "$file?$css_hash{$file}"; + return "$file?$version_hash{$file}"; } 1; -- cgit v1.2.3