diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-01-03 09:45:13 +0100 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-01-03 09:45:13 +0100 |
commit | 43283fd35fb9987a1554612220f11a0875697bd4 (patch) | |
tree | 2e9db966f98a1187c6be74998ebd2905fe0a8c39 /mod/settings.php | |
parent | dcaf4003eca3fe4f958760587eefea52b171fab3 (diff) | |
parent | d92659560b8edd0594b587103b43ad5bd5012639 (diff) | |
download | volse-hubzilla-43283fd35fb9987a1554612220f11a0875697bd4.tar.gz volse-hubzilla-43283fd35fb9987a1554612220f11a0875697bd4.tar.bz2 volse-hubzilla-43283fd35fb9987a1554612220f11a0875697bd4.zip |
Merge branch 'friendika-master'
Diffstat (limited to 'mod/settings.php')
-rw-r--r-- | mod/settings.php | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/mod/settings.php b/mod/settings.php index 273e8baa8..0f01807a2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -117,11 +117,16 @@ function settings_post(&$a) { // If openid has changed or if there's an openid but no openidserver, try and discover it. if($openid != $a->user['openid'] || (strlen($openid) && (! strlen($openidserver)))) { - logger('updating openidserver'); - require_once('library/openid.php'); - $open_id_obj = new LightOpenID; - $open_id_obj->identity = $openid; - $openidserver = $open_id_obj->discover($open_id_obj->identity); + $tmp_str = $openid; + if(strlen($tmp_str) && validate_url($tmp_str)) { + logger('updating openidserver'); + require_once('library/openid.php'); + $open_id_obj = new LightOpenID; + $open_id_obj->identity = $openid; + $openidserver = $open_id_obj->discover($open_id_obj->identity); + } + else + $openidserver = ''; } $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `openidserver` = '%s' WHERE `uid` = %d LIMIT 1", @@ -242,13 +247,16 @@ function settings_content(&$a) { } - - - $opt_tpl = load_view_file("view/profile-in-directory.tpl"); - $profile_in_dir = replace_macros($opt_tpl,array( - '$yes_selected' => (($profile['publish']) ? " checked=\"checked\" " : ""), - '$no_selected' => (($profile['publish'] == 0) ? " checked=\"checked\" " : "") - )); + if(get_config('system','publish_all')) { + $profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />'; + } + else { + $opt_tpl = load_view_file("view/profile-in-directory.tpl"); + $profile_in_dir = replace_macros($opt_tpl,array( + '$yes_selected' => (($profile['publish']) ? " checked=\"checked\" " : ""), + '$no_selected' => (($profile['publish'] == 0) ? " checked=\"checked\" " : "") + )); + } if(strlen(get_config('system','directory_submit_url'))) { $opt_tpl = load_view_file("view/profile-in-netdir.tpl"); |