Merge pull request #2598 from rabuzarus/1206-config-fix
fix config & pconfig
This commit is contained in:
commit
e51d559d6c
|
@ -172,7 +172,7 @@ class Config {
|
||||||
// manage array value
|
// manage array value
|
||||||
$dbvalue = (is_array($value)?serialize($value):$value);
|
$dbvalue = (is_array($value)?serialize($value):$value);
|
||||||
$dbvalue = (is_bool($dbvalue) ? intval($dbvalue) : $dbvalue);
|
$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;
|
$a->config[$family][$key] = $value;
|
||||||
$ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ",
|
$ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ",
|
||||||
dbesc($family),
|
dbesc($family),
|
||||||
|
|
|
@ -161,7 +161,7 @@ class PConfig {
|
||||||
// manage array value
|
// manage array value
|
||||||
$dbvalue = (is_array($value)?serialize($value):$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;
|
$a->config[$uid][$family][$key] = $value;
|
||||||
$ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
|
$ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
|
||||||
intval($uid),
|
intval($uid),
|
||||||
|
|
|
@ -289,7 +289,7 @@ function admin_page_federation(&$a) {
|
||||||
|
|
||||||
// what versions for that platform do we know at all?
|
// what versions for that platform do we know at all?
|
||||||
// again only the active nodes
|
// 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` != ""
|
WHERE `last_contact` > `last_failure` AND `platform` LIKE "%s" AND `version` != ""
|
||||||
GROUP BY `version`
|
GROUP BY `version`
|
||||||
ORDER BY `version`;', $p);
|
ORDER BY `version`;', $p);
|
||||||
|
|
Loading…
Reference in a new issue