diff options
author | Christian Vogeley <christian.vogeley@hotmail.de> | 2013-08-03 00:14:59 +0200 |
---|---|---|
committer | Christian Vogeley <christian.vogeley@hotmail.de> | 2013-08-03 00:14:59 +0200 |
commit | 9294f72adb3c076932558b6f29a4c570e7962764 (patch) | |
tree | c0a7d4f5b56e922c2a572f4f0a414a405f92cd82 /include/config.php | |
parent | c0cd147a3a9a86b270ea32026089ced16fb2f50c (diff) | |
download | volse-hubzilla-9294f72adb3c076932558b6f29a4c570e7962764.tar.gz volse-hubzilla-9294f72adb3c076932558b6f29a4c570e7962764.tar.bz2 volse-hubzilla-9294f72adb3c076932558b6f29a4c570e7962764.zip |
Revert "merge"
This reverts commit c0cd147a3a9a86b270ea32026089ced16fb2f50c, reversing
changes made to d2d1e54bfe928fe4cdfdcfc7e9acf658cda76898.
Diffstat (limited to 'include/config.php')
-rw-r--r-- | include/config.php | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/include/config.php b/include/config.php index 38840f5e4..1f7a4dbd7 100644 --- a/include/config.php +++ b/include/config.php @@ -130,12 +130,20 @@ function load_pconfig($uid,$family = '') { if(! array_key_exists($uid,$a->config)) $a->config[$uid] = array(); + if(($family) && (! array_key_exists($family,$a->config[$uid]))) + $a->config[$uid][$family] = array(); - // family is no longer used - load entire user config - - $r = q("SELECT * FROM `pconfig` WHERE `uid` = %d", - intval($uid) - ); + if($family) { + $r = q("SELECT * FROM `pconfig` WHERE `cat` = '%s' AND `uid` = %d", + dbesc($family), + intval($uid) + ); + } + else { + $r = q("SELECT * FROM `pconfig` WHERE `uid` = %d", + intval($uid) + ); + } if($r) { foreach($r as $rr) { @@ -258,12 +266,20 @@ function load_xconfig($xchan,$family = '') { if(! array_key_exists($xchan,$a->config)) $a->config[$xchan] = array(); + if(($family) && (! array_key_exists($family,$a->config[$xchan]))) + $a->config[$xchan][$family] = array(); - // family is no longer used. Entire config is loaded - - $r = q("SELECT * FROM `xconfig` WHERE `xchan` = '%s'", - dbesc($xchan) - ); + if($family) { + $r = q("SELECT * FROM `xconfig` WHERE `cat` = '%s' AND `xchan` = '%s'", + dbesc($family), + dbesc($xchan) + ); + } + else { + $r = q("SELECT * FROM `xconfig` WHERE `xchan` = '%s'", + dbesc($xchan) + ); + } if($r) { foreach($r as $rr) { |