]> git.mxchange.org Git - friendica.git/blobdiff - mod/update_community.php
Merge pull request #7988 from friendica/MrPetovan-notice
[friendica.git] / mod / update_community.php
index 037c724891cdb8eb637667faabac28d7d727a7a1..e15520320ea85944353a5c1647f761bcefb2ac14 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";
@@ -37,5 +34,5 @@ function update_community_content(App $a) {
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }