aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connedit.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/connedit.php')
-rw-r--r--mod/connedit.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/mod/connedit.php b/mod/connedit.php
index 49aae6684..5c36c3184 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -55,6 +55,15 @@ function connedit_post(&$a) {
if(! $contact_id)
return;
+ // TODO if configured for hassle-free permissions, we'll post the form with ajax as soon as the
+ // connection enable is toggled to a special autopost url and set permissions immediately, leaving
+ // the other form elements alone pending a manual submit of the form. The downside is that there
+ // will be a window of opportunity when the permissions have been set but before you've had a chance
+ // to review and possibly restrict them. The upside is we won't have to warn you that your connection
+ // can't do anything until you save the bloody form.
+
+ $autopost = (((argc() > 2) && (argv(2) === 'auto')) ? true : false);
+
$orig_record = q("SELECT * FROM abook WHERE abook_id = %d AND abook_channel = %d LIMIT 1",
intval($contact_id),
intval(local_user())
@@ -287,7 +296,7 @@ function connedit_content(&$a) {
$o .= "\$('#me_id_perms_" . $p . "').attr('checked','checked'); \n";
}
}
- $o .= "abook_perms_msg(); }\n</script>\n";
+ $o .= " }\n</script>\n";
}
if(argc() == 3) {