]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: Timeout problems when saving profile settings
authorMichael <heluecht@pirati.ca>
Fri, 19 May 2017 06:01:13 +0000 (06:01 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 19 May 2017 06:01:13 +0000 (06:01 +0000)
include/api.php
include/profile_update.php
mod/profile_photo.php
mod/profiles.php
mod/settings.php

index 64afa8c14833f7a68814babbc3f1f1b84d5ab3da..caf316d76ada039c03ea651eb01d3ff648f0765f 100644 (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) {
index 7aa34d45d7ef5cfbf05dd5862930ae8ec5b21ab6..69484e8fe011d167c1a71868860e75a4e076c689 100644 (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);
 }
index b2bf6e3b157899a17d1c948d9be0c5b71f3a6e5e..c9fc5232df57862c50bbac0fa4035481289c6532 100644 (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);
                        }
index 7d2bceec1ac6b593447a7abd470036610fc9943e..60a1fe818a9c88182ff0f4fc150fd7bf3b315420 100644 (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());
index ff05724fed74b2048a9391bac3358be08b956688..3357de09e512ea4b90f90817af86dd33cddad963 100644 (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());