patch06.diff
| currency.php (working copy) | ||
|---|---|---|
| 18 | 18 |
*/ |
| 19 | 19 |
public static function convert($from, $to, $amount = 1) |
| 20 | 20 |
{
|
| 21 |
if ($from == $to) |
|
| 22 |
return $amount; |
|
| 23 |
|
|
| 21 | 24 |
$googleQuery = $amount . ' ' . $from . ' in ' . $to; |
| 22 | 25 |
$googleQuery = urlEncode( $googleQuery ); |
| 23 | 26 |
$askGoogle = file_get_contents( 'http://www.google.com/search?q=' . $googleQuery ); |