Changeset 669
- Timestamp:
- 11/21/2011 02:44:44 PM (6 months ago)
- File:
-
- 1 edited
-
trunk/WordPress/plugin/transposh/transposh.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/WordPress/plugin/transposh/transposh.php
r667 r669 1206 1206 $sl = 'auto'; 1207 1207 if (isset($_GET['sl'])) $sl = $_GET['sl']; 1208 $q = '&q=' .urlencode($_GET['q']);1209 $url = 'http://translate.google.com/translate_a/t?client=a' . $q . '&tl=' . $tl . '&sl=' . $sl;1210 //var_dump($url);1208 $q = @urlencode($_GET['q']); 1209 if (!$q) return; // avoid unneeded curling 1210 $url = 'http://translate.google.com/translate_a/t?client=a&q=' . $q . '&tl=' . $tl . '&sl=' . $sl; 1211 1211 $ch = curl_init(); 1212 1212 curl_setopt($ch, CURLOPT_URL, $url); … … 1313 1313 $jsonout->results[] = $jsonarr->results[$k]->sentences[0]->trans; 1314 1314 } else { 1315 $jsonout->results[] = $_GET['q' .$j];1315 $jsonout->results[] = $_GET['q'][$j]; 1316 1316 } 1317 1317 $k++;
Note: See TracChangeset
for help on using the changeset viewer.
