We don't need an order.

This commit is contained in:
Michael 2017-08-09 07:57:33 +00:00
parent 64718b53d1
commit a5e7f7bf70
2 changed files with 4 additions and 7 deletions

View file

@ -46,7 +46,7 @@ class Config {
$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)) {
$k = $rr['k'];
if ($family === 'config') {
@ -97,8 +97,7 @@ class Config {
}
}
$ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key),
array("order" => array("cat", "k"), 'limit' => 1));
$ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key), array('limit' => 1));
if (dbm::is_result($ret)) {
// manage array value
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);

View file

@ -36,8 +36,7 @@ class PConfig {
public static function load($uid, $family) {
$a = get_app();
$r = dba::select('pconfig', array('v', 'k'), array('cat' => $family, 'uid' => $uid),
array("order" => array('uid', 'cat', 'k')));
$r = dba::select('pconfig', array('v', 'k'), array('cat' => $family, 'uid' => $uid));
if (dbm::is_result($r)) {
while ($rr = dba::fetch($r)) {
$k = $rr['k'];
@ -89,8 +88,7 @@ class PConfig {
}
}
$ret = dba::select('pconfig', array('v'), array('uid' => $uid, 'cat' => $family, 'k' => $key),
array("order" => array('uid', 'cat', 'k'), 'limit' => 1));
$ret = dba::select('pconfig', array('v'), array('uid' => $uid, 'cat' => $family, 'k' => $key), array('limit' => 1));
if (dbm::is_result($ret)) {
$val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']);
$a->config[$uid][$family][$key] = $val;