Merge pull request #607 from tuscanhobbit/dev

Numbers shouldn't be strings
This commit is contained in:
RedMatrix 2014-09-29 20:43:44 +10:00
commit f7595cc11a

View File

@ -54,7 +54,7 @@ function siteinfo_init(&$a) {
$r = q("select count(channel_id) as channels_total from channel left join account on account_id = channel_account_id $r = q("select count(channel_id) as channels_total from channel left join account on account_id = channel_account_id
where account_flags = 0 "); where account_flags = 0 ");
if($r) if($r)
$channels_total = $r[0]['channels_total']; $channels_total = intval($r[0]['channels_total']);
$r = q("select channel_id from channel left join account on account_id = channel_account_id $r = q("select channel_id from channel left join account on account_id = channel_account_id
where account_flags = 0 and account_lastlog > UTC_TIMESTAMP - INTERVAL 6 MONTH"); where account_flags = 0 and account_lastlog > UTC_TIMESTAMP - INTERVAL 6 MONTH");
@ -92,7 +92,7 @@ function siteinfo_init(&$a) {
intval(ITEM_WALL) intval(ITEM_WALL)
); );
if (is_array($posts)) if (is_array($posts))
$local_posts = $posts[0]["local_posts"]; $local_posts = intval($posts[0]["local_posts"]);
$data = Array( $data = Array(
'version' => RED_VERSION, 'version' => RED_VERSION,