aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/config.php36
-rw-r--r--mod/settings.php4
2 files changed, 13 insertions, 27 deletions
diff --git a/include/config.php b/include/config.php
index 1f7a4dbd7..38840f5e4 100644
--- a/include/config.php
+++ b/include/config.php
@@ -130,20 +130,12 @@ 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();
- 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)
- );
- }
+ // family is no longer used - load entire user config
+
+ $r = q("SELECT * FROM `pconfig` WHERE `uid` = %d",
+ intval($uid)
+ );
if($r) {
foreach($r as $rr) {
@@ -266,20 +258,12 @@ 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();
- 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)
- );
- }
+ // family is no longer used. Entire config is loaded
+
+ $r = q("SELECT * FROM `xconfig` WHERE `xchan` = '%s'",
+ dbesc($xchan)
+ );
if($r) {
foreach($r as $rr) {
diff --git a/mod/settings.php b/mod/settings.php
index 943a3cc13..0cca41810 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -336,6 +336,7 @@ function settings_post(&$a) {
$expire_network_only = ((x($_POST,'expire_network_only'))? intval($_POST['expire_network_only']) : 0);
$allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0);
+
$publish = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 1)) ? 1: 0);
$page_flags = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0);
$blockwall = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted!
@@ -460,6 +461,7 @@ function settings_post(&$a) {
set_pconfig(local_user(),'system','post_profilechange', $post_profilechange);
set_pconfig(local_user(),'system','blocktags',$blocktags);
+
/*
if($page_flags == PAGE_PRVGROUP) {
$hidewall = 1;
@@ -1017,7 +1019,7 @@ function settings_content(&$a) {
'$email' => array('email', t('Email Address:'), $email, ''),
'$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''),
'$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''),
- '$allowloc' => array('allow_location', t('Use Browser Location:'), intval(get_pconfig(local_user(),'system','use_browser_location')), ''),
+ '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''),
'$h_prv' => t('Security and Privacy Settings'),