]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
bug #127, add Diaspora notes to Connect (dfrn_request) page, get rid of security...
[friendica.git] / mod / settings.php
index 44de482c156ad757da622424430616a53ea77690..1b4098de8f6c1c6b929bfd00785df79d1a63b4b7 100644 (file)
@@ -115,6 +115,8 @@ function settings_post(&$a) {
 
 
        $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+       if(get_config('system','dfrn_only'))
+               $mail_disabled = 1;
 
        if(! $mail_disabled) {
                $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
@@ -257,7 +259,7 @@ function settings_post(&$a) {
        $r = q("UPDATE `profile` 
                SET `publish` = %d, 
                `net-publish` = %d,
-               `hide-friends` = %d,
+               `hide-friends` = %d
                WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
                intval($publish),
                intval($net_publish),
@@ -355,6 +357,8 @@ function settings_content(&$a) {
 
 
        $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+       if(get_config('system','dfrn_only'))
+               $mail_disabled = 1;
 
        if(! $mail_disabled) {
                $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
@@ -375,19 +379,19 @@ function settings_content(&$a) {
 
        $pageset_tpl = get_markup_template('pagetypes.tpl');
        $pagetype = replace_macros($pageset_tpl,array(
-               $page_normal    => array('page-flags', t('Normal Account'), PAGE_NORMAL, 
+               '$page_normal'  => array('page-flags', t('Normal Account'), PAGE_NORMAL, 
                                                                        t('This account is a normal personal profile'), 
                                                                        ($a->user['page-flags'] == PAGE_NORMAL)),
                                                                
-               $page_soapbox   => array('page-flags', t('Soapbox Account'), PAGE_SOAPBOX, 
+               '$page_soapbox'         => array('page-flags', t('Soapbox Account'), PAGE_SOAPBOX, 
                                                                        t('Automatically approve all connection/friend requests as read-only fans'), 
-                                                                       ($a->user['page-flags'] == PAGE_NORMAL)),
+                                                                       ($a->user['page-flags'] == PAGE_SOAPBOX)),
                                                                        
-               $page_community => array('page-flags', t('Community/Celebrity Account'), PAGE_COMMUNITY, 
+               '$page_community'       => array('page-flags', t('Community/Celebrity Account'), PAGE_COMMUNITY, 
                                                                        t('Automatically approve all connection/friend requests as read-write fans'), 
                                                                        ($a->user['page-flags'] == PAGE_COMMUNITY)),
                                                                        
-               $page_freelove  => array('page-flags', t('Automatic Friend Account'), PAGE_FREELOVE, 
+               '$page_freelove'        => array('page-flags', t('Automatic Friend Account'), PAGE_FREELOVE, 
                                                                        t('Automatically approve all connection/friend requests as friends'), 
                                                                        ($a->user['page-flags'] == PAGE_FREELOVE)),
        ));
@@ -431,11 +435,6 @@ function settings_content(&$a) {
        ));
 
 
-
-
-
-
-
        $invisible = (((! $profile['publish']) && (! $profile['net-publish']))
                ? true : false);
 
@@ -491,6 +490,7 @@ function settings_content(&$a) {
                '$h_pass'       => t('Password Settings'),
                '$password1'=> array('npassword', t('New Password:'), '', ''),
                '$password2'=> array('confirm', t('Confirm:'), '', t('Leave password fields blank unless changing')),
+               '$oid_enable' => (! get_config('system','no_openid')),
                '$openid'       => $openid_field,
                
                '$h_basic'      => t('Basic Settings'),
@@ -523,11 +523,11 @@ function settings_content(&$a) {
                
                '$h_not'        => t('Notification Settings'),
                '$lbl_not'      => t('Send a notification email when:'),
-               '$notify1'      => array('notify1', t('You receive an introduction'), ($notify & NOTIFY_INTRO), ''),
-               '$notify2'      => array('notify1', t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), ''),
-               '$notify3'      => array('notify1', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), ''),
-               '$notify4'      => array('notify1', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), ''),
-               '$notify5'      => array('notify1', t('You receive a private message'), ($notify & NOTIFY_MAIL), ''),
+               '$notify1'      => array('notify1', t('You receive an introduction'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, ''),
+               '$notify2'      => array('notify2', t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''),
+               '$notify3'      => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''),
+               '$notify4'      => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''),
+               '$notify5'      => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''),
                
                
                
@@ -537,8 +537,8 @@ function settings_content(&$a) {
                '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
                '$mail_server'  => array('mail_server',  t('IMAP server name:'), $mail_server, ''),
                '$mail_port'    => array('mail_port',    t('IMAP port:'), $mail_port, ''),
-               '$mail_ssl'             => array('mail_ssl',     t('Security:'), $mail_ssl, '', array( ''=>t('None'), 'TSL'=>'TSL', 'SSL'=>'SSL')),
-               '$mail_user'    => array('mail_server',  t('Email login name:'), $mail_server, ''),
+               '$mail_ssl'             => array('mail_ssl',     t('Security:'), strtoupper($mail_ssl), '', array( ''=>t('None'), 'TSL'=>'TSL', 'SSL'=>'SSL')),
+               '$mail_user'    => array('mail_user',    t('Email login name:'), $mail_user, ''),
                '$mail_pass'    => array('mail_pass',    t('Email password:'), '', ''),
                '$mail_replyto' => array('mail_replyto', t('Reply-to address:'), '', 'Optional'),
                '$mail_pubmail' => array('mail_pubmail', t('Send public posts to all email contacts:'), $mail_pubmail, ''),