Bugfix: Timeout problems when saving profile settings

pull/3475/head
Michael 2017-05-19 06:01:13 +00:00
parent f1090dd359
commit 6e8e326705
5 changed files with 12 additions and 10 deletions

View File

@ -3744,8 +3744,7 @@ $called_api = null;
proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
require_once 'include/profile_update.php';
profile_change();
proc_run(PRIORITY_LOW, 'include/profile_update.php', api_user());
// output for client
if ($data) {

View File

@ -1,6 +1,12 @@
<?php
require_once('include/diaspora.php');
function profile_change() {
Diaspora::send_profile(local_user());
function profile_update_run(&$argv, &$argc) {
if ($argc != 2) {
return;
}
$uid = intval($argv[1]);
Diaspora::send_profile($uid);
}

View File

@ -131,8 +131,7 @@ function profile_photo_post(App $a) {
proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
require_once('include/profile_update.php');
profile_change();
proc_run(PRIORITY_LOW, 'include/profile_update.php', local_user());
} else {
notice( t('Unable to process image') . EOL);
}

View File

@ -504,8 +504,7 @@ function profiles_post(App $a) {
proc_run(PRIORITY_LOW, "include/directory.php", $url);
}
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());

View File

@ -637,8 +637,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());