aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-23 14:40:32 -0800
committerFriendika <info@friendika.com>2010-12-23 14:40:32 -0800
commitc55cb45855ede35e593f6a1ed5e5878144cf0ad0 (patch)
tree6779dd94c7bd466330839f61658a9d31170db296 /mod/settings.php
parent68868fd74bbc6a6f2268b6c5467ccf9e025af011 (diff)
downloadvolse-hubzilla-c55cb45855ede35e593f6a1ed5e5878144cf0ad0.tar.gz
volse-hubzilla-c55cb45855ede35e593f6a1ed5e5878144cf0ad0.tar.bz2
volse-hubzilla-c55cb45855ede35e593f6a1ed5e5878144cf0ad0.zip
revised openid patch, added fix for Windows servers, make "is now friends with" commentable, fix settings form hook to be inside form
Diffstat (limited to 'mod/settings.php')
-rw-r--r--mod/settings.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/mod/settings.php b/mod/settings.php
index af826c53b..6eaa17ad0 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -109,12 +109,17 @@ function settings_post(&$a) {
$str_group_deny = perms2str($_POST['group_deny']);
$str_contact_deny = perms2str($_POST['contact_deny']);
- $openidserver="";
- if ($openid != $a->user['openid'] && isset($a->user['openidserver'])){
- $openidserver = ", `openidserver` = ''";
+ $openidserver = $a->user['openidserver'];
+
+ if($openid != $a->user['openid']) {
+ 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);
}
- $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." WHERE `uid` = %d LIMIT 1",
+ $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",
dbesc($username),
dbesc($email),
dbesc($openid),
@@ -129,6 +134,7 @@ function settings_post(&$a) {
intval($allow_location),
dbesc($theme),
intval($maxreq),
+ dbesc($openidserver),
intval(local_user())
);
if($r)
@@ -306,7 +312,9 @@ function settings_content(&$a) {
'$pagetype' => $pagetype
));
- call_hooks('settings_page',$o);
+ call_hooks('settings_form',$o);
+
+ $o .= '</form>' . "\r\n";
return $o;