From 64753f474c23257756118f326fe396b93fb5389b Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 12 Jun 2016 18:55:20 +0200 Subject: [PATCH 1/2] fix config & pconfig --- include/Core/Config.php | 2 +- include/Core/PConfig.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/Core/Config.php b/include/Core/Config.php index b5d80c82e0..ff35418849 100644 --- a/include/Core/Config.php +++ b/include/Core/Config.php @@ -172,7 +172,7 @@ class Config { // manage array value $dbvalue = (is_array($value)?serialize($value):$value); $dbvalue = (is_bool($dbvalue) ? intval($dbvalue) : $dbvalue); - if(self::get($family,$key,true) === false) { + if(self::get($family,$key,null,true) === false) { $a->config[$family][$key] = $value; $ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ", dbesc($family), diff --git a/include/Core/PConfig.php b/include/Core/PConfig.php index 09c3c2a0b2..c47559d0eb 100644 --- a/include/Core/PConfig.php +++ b/include/Core/PConfig.php @@ -161,7 +161,7 @@ class PConfig { // manage array value $dbvalue = (is_array($value)?serialize($value):$value); - if(self::get($uid,$family,$key,true) === false) { + if(self::get($uid,$family,$key,null, true) === false) { $a->config[$uid][$family][$key] = $value; $ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ", intval($uid), From b2ba25bd272c46a9b4c3c159e5d6a00c8a9301f7 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 12 Jun 2016 19:15:12 +0200 Subject: [PATCH 2/2] fix federation statistics --- mod/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/admin.php b/mod/admin.php index 36b2ca730f..547c37fb6c 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -289,7 +289,7 @@ function admin_page_federation(&$a) { // what versions for that platform do we know at all? // again only the active nodes - $v = q('SELECT COUNT(*) AS `total, version` FROM `gserver` + $v = q('SELECT COUNT(*) AS `total`, `version` FROM `gserver` WHERE `last_contact` > `last_failure` AND `platform` LIKE "%s" AND `version` != "" GROUP BY `version` ORDER BY `version`;', $p);