- 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')));
- if (dbm::is_result($r)) {
- while ($rr = dba::fetch($r)) {
- $k = $rr['k'];
- $a->config[$uid][$family][$k] = $rr['v'];
- self::$in_db[$uid][$family][$k] = true;
- }
- } else if ($family != 'config') {
- // Negative caching
- $a->config[$uid][$family] = "!<unset>!";
+ public static function load($uid, $family)
+ {
+ // Database isn't ready or populated yet
+ if (!(self::getApp()->mode & App::MODE_DBCONFIGAVAILABLE)) {
+ return;