X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile_photo.php;h=e80b9ee84e02a15024be814d3e070a8ad243222c;hb=a5e91175243a41c77a56e73efc3672f20a7e6d23;hp=b4723b215ff1e5bd8aeba1edfee74167c7b5c2a6;hpb=94f6f12ba3a5c1d506255803e709cb640147ebf4;p=friendica.git diff --git a/mod/profile_photo.php b/mod/profile_photo.php index b4723b215f..e80b9ee84e 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -1,7 +1,10 @@ user['nickname']; - if ($url && strlen(get_config('system','directory'))) { - proc_run(PRIORITY_LOW, "include/directory.php", $url); + if ($url && strlen(Config::get('system','directory'))) { + Worker::add(PRIORITY_LOW, "Directory", $url); } - proc_run(PRIORITY_LOW, 'include/profile_update.php', local_user()); + Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user()); } else { notice( t('Unable to process image') . EOL); } @@ -150,7 +153,7 @@ function profile_photo_post(App $a) { $filetype = guess_image_type($filename); } - $maximagesize = get_config('system','maximagesize'); + $maximagesize = Config::get('system','maximagesize'); if (($maximagesize) && ($filesize > $maximagesize)) { notice( sprintf(t('Image exceeds size limit of %s'), formatBytes($maximagesize)) . EOL); @@ -200,7 +203,7 @@ function profile_photo_content(App $a) { intval(local_user()), dbesc($resource_id) ); - if (!dbm::is_result($r)){ + if (!DBM::is_result($r)){ notice( t('Permission denied.') . EOL ); return; } @@ -228,8 +231,8 @@ function profile_photo_content(App $a) { // Update global directory in background $url = $_SESSION['my_url']; - if ($url && strlen(get_config('system','directory'))) { - proc_run(PRIORITY_LOW, "include/directory.php", $url); + if ($url && strlen(Config::get('system','directory'))) { + Worker::add(PRIORITY_LOW, "Directory", $url); } goaway(System::baseUrl() . '/profiles'); @@ -285,7 +288,7 @@ function profile_photo_content(App $a) { if(! function_exists('profile_photo_crop_ui_head')) { function profile_photo_crop_ui_head(App $a, $ph) { - $max_length = get_config('system','max_image_length'); + $max_length = Config::get('system','max_image_length'); if (! $max_length) { $max_length = MAX_IMAGE_LENGTH; }