Enforce coding standards in Config.php and PConfig.php
This commit is contained in:
parent
b50769b6d0
commit
c168d7d4ca
2 changed files with 9 additions and 7 deletions
|
@ -129,8 +129,8 @@ class Config {
|
||||||
$a->config[$family][$key] = $value;
|
$a->config[$family][$key] = $value;
|
||||||
|
|
||||||
// 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;
|
||||||
|
|
||||||
$ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' )
|
$ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' )
|
||||||
ON DUPLICATE KEY UPDATE `v` = '%s'",
|
ON DUPLICATE KEY UPDATE `v` = '%s'",
|
||||||
|
@ -139,8 +139,9 @@ ON DUPLICATE KEY UPDATE `v` = '%s'",
|
||||||
dbesc($dbvalue),
|
dbesc($dbvalue),
|
||||||
dbesc($dbvalue)
|
dbesc($dbvalue)
|
||||||
);
|
);
|
||||||
if($ret)
|
if ($ret) {
|
||||||
return $value;
|
return $value;
|
||||||
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,8 +136,9 @@ ON DUPLICATE KEY UPDATE `v` = '%s'",
|
||||||
dbesc($dbvalue),
|
dbesc($dbvalue),
|
||||||
dbesc($dbvalue)
|
dbesc($dbvalue)
|
||||||
);
|
);
|
||||||
if($ret)
|
if ($ret) {
|
||||||
return $value;
|
return $value;
|
||||||
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue