projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4f80f0d
)
google earth links should now show a filename of customer_name.kmz, RT#15539
author
ivan
<ivan>
Thu, 22 Dec 2011 01:52:04 +0000
(
01:52
+0000)
committer
ivan
<ivan>
Thu, 22 Dec 2011 01:52:04 +0000
(
01:52
+0000)
httemplate/view/kml.cgi
patch
|
blob
|
history
diff --git
a/httemplate/view/kml.cgi
b/httemplate/view/kml.cgi
index
47435c7
..
7eaaa2a
100644
(file)
--- a/
httemplate/view/kml.cgi
+++ b/
httemplate/view/kml.cgi
@@
-1,13
+1,11
@@
<% $kml->archive %>\
<%init>
<% $kml->archive %>\
<%init>
-my ($latitude, $longitude, $name) = @_;
-#would be nice to pass in customer or prospect name too...
-
my $kml = Geo::GoogleEarth::Pluggable->new;
$kml->Point( map { $_=>scalar($cgi->param($_)) } qw( name lat lon ) );
#http_header('Content-Type' => 'application/vnd.google-earth.kml+xml' ); #kml
http_header('Content-Type' => 'application/vnd.google-earth.kmz' ); #kmz
my $kml = Geo::GoogleEarth::Pluggable->new;
$kml->Point( map { $_=>scalar($cgi->param($_)) } qw( name lat lon ) );
#http_header('Content-Type' => 'application/vnd.google-earth.kml+xml' ); #kml
http_header('Content-Type' => 'application/vnd.google-earth.kmz' ); #kmz
-
+( my $name = $cgi->param('name') ) =~ s/[^a-z0-9]/_/g; #perhaps too restrictive
+http_header('Content-Disposition' => "filename=$name.kmz" );
</%init>
</%init>