Post\Category::storeTextByURIId($item['uri-id'], $item['uid'], '');
- if (!Post::exists(['`uri-id` = ? AND `uid` != 0 AND NOT `deleted`', $item['uri-id']])) {
+ if (!Post::exists(["`uri-id` = ? AND `uid` != 0 AND NOT `deleted`", $item['uri-id']])) {
self::markForDeletion(['uri-id' => $item['uri-id'], 'uid' => 0, 'deleted' => false], $priority);
}
}
} elseif ($item['network'] == Protocol::OSTATUS) {
// Check for an existing post with the same content. There seems to be a problem with OStatus.
- $condition = ['`body` = ? AND `network` = ? AND `created` = ? AND `contact-id` = ? AND `uid` = ?',
+ $condition = ["`body` = ? AND `network` = ? AND `created` = ? AND `contact-id` = ? AND `uid` = ?",
$item['body'], $item['network'], $item['created'], $item['contact-id'], $item['uid']];
if (Post::exists($condition)) {
Logger::notice('duplicated item with the same body found.', $item);
return $services;
}
- public static function getOrganization()
+ public static function getOrganization(\Friendica\Core\Config\Capability\IManageConfigValues $config)
{
$organization = [
'name' => null,
'account' => null
];
- if (!empty(DI::config()->get('config', 'admin_email'))) {
- $adminList = explode(',', str_replace(' ', '', DI::config()->get('config', 'admin_email')));
+ if (!empty($config->get('config', 'admin_email'))) {
+ $adminList = explode(',', str_replace(' ', '', $config->get('config', 'admin_email')));
$organization['contact'] = $adminList[0];
$administrator = User::getByEmail($adminList[0], ['username', 'nickname']);
if (!empty($administrator)) {