Empty commit

This commit is contained in:
Git 2014-02-23 08:00:58 +00:00
parent c0fee46e54
commit caf53ce00b
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<? <?
define('BTC_API_URL', 'http://api.bitcoincharts.com/v1/weighted_prices.json'); define('BTC_API_URL', 'https://api.bitcoinaverage.com/ticker/global/EUR/');
define('USD_API_URL', 'http://www.google.com/ig/calculator?hl=en&q=1USD=?EUR'); define('USD_API_URL', 'http://www.google.com/ig/calculator?hl=en&q=1USD=?EUR');
class Donations { class Donations {
@ -717,8 +717,8 @@ private static function set_stored_conversion_rate($Currency, $Rate) {
private static function get_new_conversion_rates() { private static function get_new_conversion_rates() {
if ($BTC = file_get_contents(BTC_API_URL)) { if ($BTC = file_get_contents(BTC_API_URL)) {
$BTC = json_decode($BTC, true); $BTC = json_decode($BTC, true);
if (isset($BTC['EUR']) && isset($BTC['EUR']['24h'])) { if (isset($BTC['24h_avg'])) {
if ($Rate = round($BTC['EUR']['24h'], 4)) { // We don't need good precision if ($Rate = round($BTC['24h_avg'], 4)) { // We don't need good precision
self::set_stored_conversion_rate('BTC', $Rate); self::set_stored_conversion_rate('BTC', $Rate);
} }
} }

View File

@ -11,6 +11,7 @@
//---------- Things to sort out before it can start printing/generating content //---------- Things to sort out before it can start printing/generating content
// Enable TOC // Enable TOC
Text::$TOC = true; Text::$TOC = true;
@ -37,6 +38,8 @@
$ThreadID = $_GET['threadid']; $ThreadID = $_GET['threadid'];
} }
if (isset($LoggedUser['PostsPerPage'])) { if (isset($LoggedUser['PostsPerPage'])) {
$PerPage = $LoggedUser['PostsPerPage']; $PerPage = $LoggedUser['PostsPerPage'];
} else { } else {