X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofile_photo.php;h=e80b9ee84e02a15024be814d3e070a8ad243222c;hb=f22fe7118d52251dbd0898279ef078b797885ec4;hp=c9fc5232df57862c50bbac0fa4035481289c6532;hpb=2b161108fe6552ef2effb7b300553f0242b2e49e;p=friendica.git
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index c9fc5232df..e80b9ee84e 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -1,6 +1,10 @@
getExt()),
- dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
- dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
+ dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
+ dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
+ dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-6.' . $im->getExt()),
intval(local_user())
);
} else {
$r = q("update profile set photo = '%s', thumb = '%s' where id = %d and uid = %d",
- dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
- dbesc(App::get_baseurl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
+ dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-4.' . $im->getExt()),
+ dbesc(System::baseUrl() . '/photo/' . $base_image['resource-id'] . '-5.' . $im->getExt()),
intval($_REQUEST['profile']),
intval(local_user())
);
@@ -126,18 +130,18 @@ function profile_photo_post(App $a) {
info( t('Shift-reload the page or clear browser cache if the new photo does not display immediately.') . EOL);
// Update global directory in background
- $url = App::get_baseurl() . '/profile/' . $a->user['nickname'];
- if ($url && strlen(get_config('system','directory'))) {
- proc_run(PRIORITY_LOW, "include/directory.php", $url);
+ $url = System::baseUrl() . '/profile/' . $a->user['nickname'];
+ 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);
}
}
- goaway(App::get_baseurl() . '/profiles');
+ goaway(System::baseUrl() . '/profiles');
return; // NOTREACHED
}
@@ -149,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);
@@ -199,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;
}
@@ -227,11 +231,11 @@ 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(App::get_baseurl() . '/profiles');
+ goaway(System::baseUrl() . '/profiles');
return; // NOTREACHED
}
$ph = new Photo($r[0]['data'], $r[0]['type']);
@@ -256,7 +260,7 @@ function profile_photo_content(App $a) {
'$submit' => t('Upload'),
'$profiles' => $profiles,
'$form_security_token' => get_form_security_token("profile_photo"),
- '$select' => sprintf('%s %s', t('or'), ($newuser) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '')
+ '$select' => sprintf('%s %s', t('or'), ($newuser) ? '' . t('skip this step') . '' : '' . t('select a photo from your photo albums') . '')
));
return $o;
@@ -269,7 +273,7 @@ function profile_photo_content(App $a) {
'$filename' => $filename,
'$profile' => intval($_REQUEST['profile']),
'$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
- '$image_url' => App::get_baseurl() . '/photo/' . $filename,
+ '$image_url' => System::baseUrl() . '/photo/' . $filename,
'$title' => t('Crop Image'),
'$desc' => t('Please adjust the image cropping for optimum viewing.'),
'$form_security_token' => get_form_security_token("profile_photo"),
@@ -284,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;
}