sforkowany z mirror/friendica
We don't need an order.
rodzic
64718b53d1
commit
a5e7f7bf70
|
@ -46,7 +46,7 @@ class Config {
|
||||||
|
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$r = dba::select('config', array('v', 'k'), array('cat' => $family), array("order" => array("cat", "k")));
|
$r = dba::select('config', array('v', 'k'), array('cat' => $family));
|
||||||
while ($rr = dba::fetch($r)) {
|
while ($rr = dba::fetch($r)) {
|
||||||
$k = $rr['k'];
|
$k = $rr['k'];
|
||||||
if ($family === 'config') {
|
if ($family === 'config') {
|
||||||
|
@ -97,8 +97,7 @@ class Config {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key),
|
$ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key), array('limit' => 1));
|
||||||
array("order" => array("cat", "k"), 'limit' => 1));
|
|
||||||
if (dbm::is_result($ret)) {
|
if (dbm::is_result($ret)) {
|
||||||
// manage array value
|
// manage array value
|
||||||
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
|
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
|
||||||
|
|
|
@ -36,8 +36,7 @@ class PConfig {
|
||||||
public static function load($uid, $family) {
|
public static function load($uid, $family) {
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
$r = dba::select('pconfig', array('v', 'k'), array('cat' => $family, 'uid' => $uid),
|
$r = dba::select('pconfig', array('v', 'k'), array('cat' => $family, 'uid' => $uid));
|
||||||
array("order" => array('uid', 'cat', 'k')));
|
|
||||||
if (dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
while ($rr = dba::fetch($r)) {
|
while ($rr = dba::fetch($r)) {
|
||||||
$k = $rr['k'];
|
$k = $rr['k'];
|
||||||
|
@ -89,8 +88,7 @@ class PConfig {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = dba::select('pconfig', array('v'), array('uid' => $uid, 'cat' => $family, 'k' => $key),
|
$ret = dba::select('pconfig', array('v'), array('uid' => $uid, 'cat' => $family, 'k' => $key), array('limit' => 1));
|
||||||
array("order" => array('uid', 'cat', 'k'), 'limit' => 1));
|
|
||||||
if (dbm::is_result($ret)) {
|
if (dbm::is_result($ret)) {
|
||||||
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
|
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
|
||||||
$a->config[$uid][$family][$key] = $val;
|
$a->config[$uid][$family][$key] = $val;
|
||||||
|
|
Ładowanie…
Reference in New Issue