X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsettings.php;h=9970d32595a9815a3792b394891790e6ff3d4143;hb=d0dfcc71a82ac423db68a12fd2eaf6d13cb18e1f;hp=1fbd24325d14d23bed3b66e5483e7709d7520532;hpb=d2280d4120ca09ff5f3013e961a1f43bb5244cc6;p=friendica.git
diff --git a/mod/settings.php b/mod/settings.php
index 1fbd24325d..9970d32595 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -1,5 +1,8 @@
local_user()));
}
if(strlen($mail_pass)) {
$pass = '';
openssl_public_encrypt($mail_pass,$pass,$a->user['pubkey']);
- q("UPDATE `mailacct` SET `pass` = '%s' WHERE `uid` = %d",
- dbesc(bin2hex($pass)),
- intval(local_user())
- );
+ dba::update('mailacct', array('pass' => bin2hex($pass)), array('uid' => local_user()));
}
$r = q("UPDATE `mailacct` SET `server` = '%s', `port` = %d, `ssltype` = '%s', `user` = '%s',
`action` = %d, `movetofolder` = '%s',
@@ -460,13 +458,13 @@ function settings_post(App &$a) {
$notify += intval($_POST['notify8']);
// Adjust the page flag if the account type doesn't fit to the page flag.
- if (($account_type == ACCOUNT_TYPE_PERSON) AND !in_array($page_flags, array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE)))
+ if (($account_type == ACCOUNT_TYPE_PERSON) && !in_array($page_flags, array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE)))
$page_flags = PAGE_NORMAL;
- elseif (($account_type == ACCOUNT_TYPE_ORGANISATION) AND !in_array($page_flags, array(PAGE_SOAPBOX)))
+ elseif (($account_type == ACCOUNT_TYPE_ORGANISATION) && !in_array($page_flags, array(PAGE_SOAPBOX)))
$page_flags = PAGE_SOAPBOX;
- elseif (($account_type == ACCOUNT_TYPE_NEWS) AND !in_array($page_flags, array(PAGE_SOAPBOX)))
+ elseif (($account_type == ACCOUNT_TYPE_NEWS) && !in_array($page_flags, array(PAGE_SOAPBOX)))
$page_flags = PAGE_SOAPBOX;
- elseif (($account_type == ACCOUNT_TYPE_COMMUNITY) AND !in_array($page_flags, array(PAGE_COMMUNITY, PAGE_PRVGROUP)))
+ elseif (($account_type == ACCOUNT_TYPE_COMMUNITY) && !in_array($page_flags, array(PAGE_COMMUNITY, PAGE_PRVGROUP)))
$page_flags = PAGE_COMMUNITY;
$email_changed = false;
@@ -635,8 +633,7 @@ function settings_post(App &$a) {
}
}
- require_once('include/profile_update.php');
- profile_change();
+ proc_run(PRIORITY_LOW, 'include/profile_update.php', local_user());
// Update the global contact for the user
update_gcontact_for_user(local_user());
@@ -654,7 +651,7 @@ function settings_post(App &$a) {
}
-function settings_content(App &$a) {
+function settings_content(App $a) {
$o = '';
nav_set_selected('settings');
@@ -721,7 +718,7 @@ function settings_content(App &$a) {
$r = q("DELETE FROM clients WHERE client_id='%s' AND uid=%d",
dbesc($a->argv[3]),
local_user());
- goaway(App::get_baseurl(true)."/settings/oauth/");
+ goaway(System::baseUrl(true)."/settings/oauth/");
return;
}
@@ -737,7 +734,7 @@ function settings_content(App &$a) {
$tpl = get_markup_template("settings_oauth.tpl");
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_oauth"),
- '$baseurl' => App::get_baseurl(true),
+ '$baseurl' => System::baseUrl(true),
'$title' => t('Connected Apps'),
'$add' => t('Add application'),
'$edit' => t('Edit'),
@@ -779,7 +776,7 @@ function settings_content(App &$a) {
$arr[$fname] = array();
$arr[$fname][0] = $fdata[0];
foreach (array_slice($fdata,1) as $f) {
- $arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(feature_enabled(local_user(),$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On')));
+ $arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(feature_enabled(local_user(),$f[0]))) ? "1" : ''),$f[2],array(t('Off'), t('On')));
}
}
@@ -827,7 +824,7 @@ function settings_content(App &$a) {
/// @TODO Found to much different usage to test empty/non-empty strings (e.g. empty(), trim() == '' ) which is wanted?
if ($legacy_contact != "") {
- $a->page['htmlhead'] = '';
+ $a->page['htmlhead'] = '';
}
$settings_connectors .= '
';
@@ -836,7 +833,7 @@ function settings_content(App &$a) {
$settings_connectors .= ''.t('If you enter your old GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.').'';
$settings_connectors .= '