<?php
use Friendica\App;
+use Friendica\Core\Config;
use Friendica\Core\System;
+use Friendica\Core\Worker;
+use Friendica\Database\DBM;
require_once("include/Photo.php");
intval($_REQUEST['profile']),
intval(local_user())
);
- if (dbm::is_result($r) && (! intval($r[0]['is-default'])))
+ if (DBM::is_result($r) && (! intval($r[0]['is-default'])))
$is_default_profile = 0;
}
dbesc(local_user()),
intval($scale));
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$base_image = $r[0];
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 = System::baseUrl() . '/profile/' . $a->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);
}
$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);
intval(local_user()),
dbesc($resource_id)
);
- if (!dbm::is_result($r)){
+ if (!DBM::is_result($r)){
notice( t('Permission denied.') . EOL );
return;
}
// 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');
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;
}