start new connections out with even more sane defaults than before by pre-filling the connedit form page. This still lets them change things before any damage has been done or before any privacy has leaked, but should reduce the number of new connections that can't comment.

This commit is contained in:
friendica 2014-03-07 20:28:04 -08:00
parent 3b0b59dfad
commit ab0eab49e8
3 changed files with 10 additions and 1 deletions

View File

@ -177,7 +177,13 @@ function connedit_content(&$a) {
$sort_type = 0; $sort_type = 0;
$o = ''; $o = '';
// this triggers some javascript to set Full Sharing by default after
// completing a "follow" - which can be changed to something else before
// form submission, but this gives us something useable
if($_GET['follow'] == 1) {
$o .= '<script>var after_following = 1;</script>';
}
if(! local_user()) { if(! local_user()) {
notice( t('Permission denied.') . EOL); notice( t('Permission denied.') . EOL);
return login(); return login();

View File

@ -30,7 +30,7 @@ function follow_init(&$a) {
proc_run('php','include/onepoll.php',$result['abook']['abook_id']); proc_run('php','include/onepoll.php',$result['abook']['abook_id']);
goaway(z_root() . '/connedit/' . $result['abook']['abook_id']); goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1);
} }

View File

@ -1,5 +1,8 @@
$(document).ready(function() { $(document).ready(function() {
if(typeof(after_following) !== 'undefined' && after_following)
connectFullShare();
$('#id_pending').click(function() { $('#id_pending').click(function() {
connectFullShare(); connectFullShare();
}); });