]> git.mxchange.org Git - friendica.git/blobdiff - mod/update_community.php
Add parameter for "toArray()" method
[friendica.git] / mod / update_community.php
index d5f2b4cb21d18f87c723788be13069fc3eb7879d..c861b750ecdc97b124f7322c465867a244bf0405 100644 (file)
@@ -3,8 +3,7 @@
 // See update_profile.php for documentation
 
 use Friendica\App;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
+use Friendica\DI;
 
 require_once 'mod/community.php';
 
@@ -19,12 +18,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 +33,5 @@ function update_community_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }