From a5e7f7bf701cb0e2b06750d6a61857e6235888d1 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 9 Aug 2017 07:57:33 +0000 Subject: [PATCH] We don't need an order. --- src/Core/Config.php | 5 ++--- src/Core/PConfig.php | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Core/Config.php b/src/Core/Config.php index fbb79bc5b1..71189bd0eb 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -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']); diff --git a/src/Core/PConfig.php b/src/Core/PConfig.php index 4b43d969a2..ab3d548c07 100644 --- a/src/Core/PConfig.php +++ b/src/Core/PConfig.php @@ -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; -- 2.39.5