use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\Config;
+use Friendica\Core\Worker;
use Friendica\Network\Probe;
require_once 'include/Photo.php';
auto_redir($a, $a->argv[1]);
}
- if ((get_config('system', 'block_public')) && (! local_user()) && (! remote_user())) {
+ if ((Config::get('system', 'block_public')) && (! local_user()) && (! remote_user())) {
return;
}
// send the notification upstream/downstream as the case may be
if ($rr['visible']) {
- proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
+ Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id);
}
}
}
photo_albums($page_owner_uid, true);
if ($i[0]['visible']) {
- proc_run(PRIORITY_HIGH, "include/notifier.php", "drop", $drop_id);
+ Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id);
}
}
}
$item_id = item_store($arr);
if ($item_id) {
- proc_run(PRIORITY_HIGH, "include/notifier.php", "tag", $item_id);
+ Worker::add(PRIORITY_HIGH, "notifier", "tag", $item_id);
}
}
}
logger('photos: upload: received file: ' . $filename . ' as ' . $src . ' ('. $type . ') ' . $filesize . ' bytes', LOGGER_DEBUG);
- $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);
$imagedata = @file_get_contents($src);
-
- $limit = service_class_fetch($a->data['user']['uid'], 'photo_upload_limit');
-
- if ($limit) {
- $r = q("SELECT SUM(OCTET_LENGTH(`data`)) AS `total` FROM `photo` WHERE `uid` = %d AND `scale` = 0 AND `album` != 'Contact Photos'",
- intval($a->data['user']['uid'])
- );
- $size = $r[0]['total'];
-
- if (($size + strlen($imagedata)) > $limit) {
- notice( upgrade_message() . EOL );
- @unlink($src);
- $foo = 0;
- call_hooks('photo_post_end',$foo);
- killme();
- }
- }
-
$ph = new Photo($imagedata, $type);
if (! $ph->is_valid()) {
$exif = $ph->orient($src);
@unlink($src);
- $max_length = get_config('system', 'max_image_length');
+ $max_length = Config::get('system', 'max_image_length');
if (! $max_length) {
$max_length = MAX_IMAGE_LENGTH;
}
photo_albums($page_owner_uid, true);
if ($visible) {
- proc_run(PRIORITY_HIGH, "include/notifier.php", 'wall-new', $item_id);
+ Worker::add(PRIORITY_HIGH, "notifier", 'wall-new', $item_id);
}
call_hooks('photo_post_end',intval($item_id));
// photos/name/image/xxxxx/edit
- if ((get_config('system', 'block_public')) && (! local_user()) && (! remote_user())) {
+ if ((Config::get('system', 'block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
return;
}
));
$usage_message = '';
- $limit = service_class_fetch($a->data['user']['uid'], 'photo_upload_limit');
- if ($limit !== false) {
-
- $r = q("SELECT SUM(`datasize`) AS `total` FROM `photo` WHERE `uid` = %d AND `scale` = 0 AND `album` != 'Contact Photos'",
- intval($a->data['user']['uid'])
- );
- $usage_message = sprintf(t("You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."), $r[0]['total'] / 1024000, $limit / 1024000 );
- }
-
// Private/public post links for the non-JS ACL form
$private_post = 1;