X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsettings.php;h=a83986267cd272a41a9c4ec47f907a99ab930f1c;hb=836058c47745f502890a209dfd6efcb3596ace84;hp=b01c4fabde7b2f3cc7714f21ce33ff2fbf26040c;hpb=86b41eec77de47c50a9d88afca604ccaea945159;p=friendica.git diff --git a/mod/settings.php b/mod/settings.php index b01c4fabde..a83986267c 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -16,6 +16,11 @@ function get_theme_config_file($theme){ function settings_init(&$a) { + if(! local_user()) { + notice( t('Permission denied.') . EOL ); + return; + } + // APC deactivated, since there are problems with PHP 5.5 //if (function_exists("apc_delete")) { // $toDelete = new APCIterator('user', APC_ITER_VALUE); @@ -172,7 +177,9 @@ function settings_post(&$a) { check_form_security_token_redirectOnErr('/settings/connectors', 'settings_connectors'); - if(x($_POST, 'imap-submit')) { + if(x($_POST, 'general-submit')) { + set_pconfig(local_user(), 'system', 'no_intelligent_shortening', $_POST['no_intelligent_shortening']); + } elseif(x($_POST, 'imap-submit')) { $mail_server = ((x($_POST,'mail_server')) ? $_POST['mail_server'] : ''); $mail_port = ((x($_POST,'mail_port')) ? $_POST['mail_port'] : ''); @@ -469,7 +476,7 @@ function settings_post(&$a) { $str_contact_deny = perms2str($_POST['contact_deny']); $openidserver = $a->user['openidserver']; - $openid = normalise_openid($openid); + //$openid = normalise_openid($openid); // If openid has changed or if there's an openid but no openidserver, try and discover it. @@ -593,7 +600,7 @@ function settings_content(&$a) { nav_set_selected('settings'); if(! local_user()) { - notice( t('Permission denied.') . EOL ); + #notice( t('Permission denied.') . EOL ); return; } @@ -728,7 +735,25 @@ function settings_content(&$a) { if(($a->argc > 1) && ($a->argv[1] === 'connectors')) { - $settings_connectors = ""; + $settings_connectors = ''; + $settings_connectors .= '

'. t('General Social Media Settings').'

'; + $settings_connectors .= '
'; + $settings_connectors .= '
'; call_hooks('connector_settings', $settings_connectors); @@ -997,7 +1022,7 @@ function settings_content(&$a) { $openid_field = false; } else { - $openid_field = array('openid_url', t('OpenID:'),$openid, t("\x28Optional\x29 Allow this OpenID to login to this account.")); + $openid_field = array('openid_url', t('OpenID:'),$openid, t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "", "url"); } @@ -1072,8 +1097,6 @@ function settings_content(&$a) { $stpl = get_markup_template('settings.tpl'); - $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); - $expire_arr = array( 'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')), 'advanced' => t('Advanced expiration settings'), @@ -1138,7 +1161,7 @@ function settings_content(&$a) { '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), '$visibility' => $profile['net-publish'], - '$aclselect' => populate_acl($a->user,$celeb), + '$aclselect' => populate_acl($a->user), '$suggestme' => $suggestme, '$blockwall'=> $blockwall, // array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''), '$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''), @@ -1182,6 +1205,8 @@ function settings_content(&$a) { '$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''), '$notify8' => array('notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''), + '$desktop_notifications' => array('desktop_notifications', t('Activate desktop notifications') , false, t('Show desktop popup on new notifications')), + '$email_textonly' => array('email_textonly', t('Text-only notification emails'), get_pconfig(local_user(),'system','email_textonly'), t('Send text only notification emails, without the html part')),