]> git.mxchange.org Git - friendica-addons.git/commitdiff
add missing namespaces/fix wrong class-names
authornupplaPhil <admin@philipp.info>
Sun, 19 Jan 2020 15:29:54 +0000 (16:29 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 19 Jan 2020 15:31:48 +0000 (16:31 +0100)
advancedcontentfilter/advancedcontentfilter.php
geocoordinates/geocoordinates.php
mastodoncustomemojis/mastodoncustomemojis.php

index 586ff237fc83603e482123b3c9d5663879372abf..c92858135c4865794fa657c4ac3b10445acbcdef 100644 (file)
@@ -372,7 +372,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
        }
 
        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')]);
@@ -393,7 +393,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
        }
 
        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')]);
index b91cdab131aaa0c9f6350569ea3b3796306631f6..49d72c6953c2c2c74086fdc30c9cdde1baacf831 100644 (file)
@@ -48,7 +48,7 @@ function geocoordinates_resolve_item(&$item)
        $coords[0] = round($coords[0], 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)) {
                $item["location"] = $result;
                return;
@@ -78,7 +78,7 @@ function geocoordinates_resolve_item(&$item)
        Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG);
 
        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)
index e1c20963bcc75cd909680d91fbb803a82f9822de..6d8a6816e77b536343d59c8a59dbbc3afe16897c 100644 (file)
@@ -11,7 +11,7 @@
 
 use Friendica\App;
 use Friendica\Content\Smilies;
-use Friendica\Core\Cache;
+use Friendica\Core\Cache\Duration;
 use Friendica\Core\Config;
 use Friendica\Core\Hook;
 use Friendica\Core\Protocol;
@@ -74,12 +74,12 @@ function mastodoncustomemojis_get_custom_emojis_for_author($author_link)
 
        $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')) {
                $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;