aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-19 20:52:05 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-19 20:52:05 -0700
commita8e4ec7801b5ca8c986febed1f95124b412e92f9 (patch)
tree02dde668c26d5b932997139537c99de9ca7242ea /mod/settings.php
parent81835acc36f17939b9e202cec2ff8981ca03536b (diff)
downloadvolse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.tar.gz
volse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.tar.bz2
volse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.zip
use browser geolocation when desired
Diffstat (limited to 'mod/settings.php')
-rw-r--r--mod/settings.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/mod/settings.php b/mod/settings.php
index b453fa825..863da44d5 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -54,6 +54,7 @@ function settings_post(&$a) {
$timezone = notags(trim($_POST['timezone']));
$defloc = notags(trim($_POST['defloc']));
+ $allow_location = (($_POST['allow_location'] == 1) ? 1: 0);
$publish = (($_POST['profile_in_directory'] == 1) ? 1: 0);
$net_publish = (($_POST['profile_in_netdirectory'] == 1) ? 1: 0);
$old_visibility = ((intval($_POST['visibility']) == 1) ? 1 : 0);
@@ -104,7 +105,7 @@ function settings_post(&$a) {
$str_group_deny = perms2str($_POST['group_deny']);
$str_contact_deny = perms2str($_POST['contact_deny']);
- $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `theme` = '%s' WHERE `uid` = %d LIMIT 1",
+ $r = q("UPDATE `user` SET `username` = '%s', `email` = '%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' WHERE `uid` = %d LIMIT 1",
dbesc($username),
dbesc($email),
dbesc($timezone),
@@ -115,6 +116,7 @@ function settings_post(&$a) {
intval($notify),
intval($page_flags),
dbesc($defloc),
+ intval($allow_location),
dbesc($theme),
intval(local_user())
);
@@ -208,6 +210,8 @@ function settings_content(&$a) {
else
$profile_in_net_dir = '';
+ $loc_checked = (($a->user['allow_location'] == 1) ? " checked=\"checked\" " : "");
+
$invisible = (((! $profile['publish']) && (! $profile['net-publish']))
? true : false);
@@ -259,6 +263,7 @@ function settings_content(&$a) {
'$timezone' => $timezone,
'$zoneselect' => select_timezone($timezone),
'$defloc' => $defloc,
+ '$loc_checked' => $loc_checked,
'$profile_in_dir' => $profile_in_dir,
'$profile_in_net_dir' => $profile_in_net_dir,
'$permissions' => t('Default Post Permissions'),