]> git.mxchange.org Git - friendica.git/blobdiff - mod/update_community.php
Catch HTTPExceptions in App::runFrontend()
[friendica.git] / mod / update_community.php
index 037c724891cdb8eb637667faabac28d7d727a7a1..088da0143c5954f849a4bbf62007956d53e59a16 100644 (file)
@@ -3,9 +3,10 @@
 // See update_profile.php for documentation
 
 use Friendica\App;
+use Friendica\Core\L10n;
 use Friendica\Core\PConfig;
 
-require_once("mod/community.php");
+require_once 'mod/community.php';
 
 function update_community_content(App $a) {
        header("Content-type: text/html");
@@ -18,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 />".t("[Embedded content - reload page to view]")."<br />";
+       if (PConfig::get(local_user(), "system", "bandwidth_saver")) {
+               $replace = "<br />".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";