[datapress] r157 committed - Fixing google spreadsheets bug. Now works regardless of format of goo...

2 views
Skip to first unread message

codesite...@google.com

unread,
Mar 3, 2011, 7:31:04 PM3/3/11
to datapres...@googlegroups.com
Revision: 157
Author: marcua
Date: Thu Mar 3 16:30:21 2011
Log: Fixing google spreadsheets bug. Now works regardless of format of
google spreadsheets URL
http://code.google.com/p/datapress/source/detail?r=157

Modified:
/trunk/plugin/proxy/import-datafiles.php

=======================================
--- /trunk/plugin/proxy/import-datafiles.php Fri Feb 25 19:35:35 2011
+++ /trunk/plugin/proxy/import-datafiles.php Thu Mar 3 16:30:21 2011
@@ -58,8 +58,14 @@
$title=$titlematch[1];
$type="google-spreadsheet";

- // Fix the href
- $href .= "?alt=json-in-script";
+ // Fix the href
+ if (strpos($href, "?") === false) {
+ $href .= "?";
+ } else {
+ $href .= "&";
+ }
+ $href .= "alt=json-in-script";
+

$linkdata = array();
$linkdata["href"] = $href;

Reply all
Reply to author
Forward
0 new messages