]> git.mxchange.org Git - friendica.git/blobdiff - mod/update_community.php
Move L10n::getPokeVerbs() calls to DI::l10n()->getPokeVerbs() calls
[friendica.git] / mod / update_community.php
index d5f2b4cb21d18f87c723788be13069fc3eb7879d..4f1cd263b8e769bf69ba62125f99891d24397d89 100644 (file)
@@ -4,7 +4,7 @@
 
 use Friendica\App;
 use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
+use Friendica\DI;
 
 require_once 'mod/community.php';
 
@@ -19,12 +19,8 @@ function update_community_content(App $a) {
                $text = '';
        }
 
-       $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
-       $replace = "<img\${1} dst=\"\${2}\"";
-       $text = preg_replace($pattern, $replace, $text);
-
-       if (PConfig::get(local_user(), "system", "bandwith_saver")) {
-               $replace = "<br />".L10n::t("[Embedded content - reload page to view]")."<br />";
+       if (DI::pConfig()->get(local_user(), "system", "bandwidth_saver")) {
+               $replace = "<br />".DI::l10n()->t("[Embedded content - reload page to view]")."<br />";
                $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
                $text = preg_replace($pattern, $replace, $text);
                $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
@@ -38,5 +34,5 @@ function update_community_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }