add missing namespaces/fix wrong class-names

pull/947/head
nupplaPhil 2020-01-19 16:29:54 +01:00
parent bce67496a7
commit 191e298504
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
3 changed files with 7 additions and 7 deletions

View File

@ -372,7 +372,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
} }
if (!DBA::update('advancedcontentfilter_rules', $fields, ['id' => $args['id']])) { if (!DBA::update('advancedcontentfilter_rules', $fields, ['id' => $args['id']])) {
throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage()); throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
} }
return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]); return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]);
@ -393,7 +393,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
} }
if (!DBA::delete('advancedcontentfilter_rules', ['id' => $args['id']])) { if (!DBA::delete('advancedcontentfilter_rules', ['id' => $args['id']])) {
throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage()); throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
} }
return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]); return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]);

View File

@ -48,7 +48,7 @@ function geocoordinates_resolve_item(&$item)
$coords[0] = round($coords[0], 5); $coords[0] = round($coords[0], 5);
$coords[1] = round($coords[1], 5); $coords[1] = round($coords[1], 5);
$result = Cache::get("geocoordinates:".$language.":".$coords[0]."-".$coords[1]); $result = DI::cache()->get("geocoordinates:".$language.":".$coords[0]."-".$coords[1]);
if (!is_null($result)) { if (!is_null($result)) {
$item["location"] = $result; $item["location"] = $result;
return; return;
@ -78,7 +78,7 @@ function geocoordinates_resolve_item(&$item)
Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG); Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG);
if ($item["location"] != "") if ($item["location"] != "")
Cache::set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]); DI::cache()->set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]);
} }
function geocoordinates_post_hook($a, &$item) function geocoordinates_post_hook($a, &$item)

View File

@ -11,7 +11,7 @@
use Friendica\App; use Friendica\App;
use Friendica\Content\Smilies; use Friendica\Content\Smilies;
use Friendica\Core\Cache; use Friendica\Core\Cache\Duration;
use Friendica\Core\Config; use Friendica\Core\Config;
use Friendica\Core\Hook; use Friendica\Core\Hook;
use Friendica\Core\Protocol; use Friendica\Core\Protocol;
@ -74,12 +74,12 @@ function mastodoncustomemojis_get_custom_emojis_for_author($author_link)
$cache_key = 'mastodoncustomemojis:' . $api_base_url; $cache_key = 'mastodoncustomemojis:' . $api_base_url;
$return = Cache::get($cache_key); $return = DI::cache()->get($cache_key);
if (empty($return) || Config::get('system', 'ignore_cache')) { if (empty($return) || Config::get('system', 'ignore_cache')) {
$return = mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url); $return = mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url);
Cache::set($cache_key, $return, empty($return['texts']) ? Cache::QUARTER_HOUR : Cache::HOUR); DI::cache()->set($cache_key, $return, empty($return['texts']) ? Duration::QUARTER_HOUR : Duration::HOUR);
} }
return $return; return $return;