Update of /cvsroot/meshdb/www/db2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8558a/www/db2
Modified Files:
google.php
Log Message:
fixed content-disposition for wider browser support, based on feedback
Index: google.php
===================================================================
RCS file: /cvsroot/meshdb/www/db2/google.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- google.php 1 May 2006 15:02:24 -0000 1.9
+++ google.php 7 May 2006 04:06:06 -0000 1.10
@@ -7,6 +7,7 @@
/* return xml header */
header("application/vnd.google-earth.kml+xml");
+ header("Content-disposition: attachment; filename=brismesh.kml");
/* return error message*/
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
@@ -109,12 +110,10 @@
/* send headers if not buffering for zip */
if ($zip == 0) {
if ($save == 1) {
- //header("Content-Type: application/vnd.google-earth.kml+xml");
- /* above is broken, wont force download in mozilla (works in ie), below works for both */
- header("Content-Type: text/plain");
- header("Content-disposition: attachment; filename=brismesh.kml"); /* save as filename */
+ header("Content-Type: text/plain");
} else {
header("Content-Type: application/vnd.google-earth.kml+xml");
+ header("Content-disposition: attachment; filename=brismesh.kml");
}
}
@@ -381,12 +380,10 @@
/* content type */
if ($save == 1) {
- //header('Content-Type: application/vnd.google-earth.kmz');
- /* above is broken, wont force download in mozilla (works in ie), below works for both */
- header("Content-Type: application/octet-stream");
- header("Content-disposition: attachment; filename=brismesh.kmz"); /* save as filename */
+ header('Content-Type: application/octet-stream');
} else {
header('Content-Type: application/vnd.google-earth.kmz');
+ header("Content-disposition: attachment; filename=brismesh.kml"); /* save as filename */
}
/* send zip */
|