]> git.mxchange.org Git - friendica.git/blobdiff - mod/update_display.php
Merge pull request #8178 from nupplaphil/task/mod_noscrape
[friendica.git] / mod / update_display.php
index b0fbbbba637e1ca4d5eccedae12ab3c0c1afcbfe..b8f3d8f498e64503c4df7f7eba65f12e459f2253 100644 (file)
@@ -1,11 +1,12 @@
 <?php
-
-// See update_profile.php for documentation
+/**
+ * @file mod/update_display.php
+ * See update_profile.php for documentation
+ */
 
 use Friendica\App;
-use Friendica\Core\PConfig;
+use Friendica\DI;
 
-require_once("include/group.php");
 require_once "mod/display.php";
 
 function update_display_content(App $a)
@@ -16,13 +17,10 @@ function update_display_content(App $a)
        echo "<!DOCTYPE html><html><body>\r\n";
        echo "<section>";
 
-       $text = display_content($a, $profile_uid);
-       $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
-       $replace = "<img\${1} dst=\"\${2}\"";
-       $text = preg_replace($pattern, $replace, $text);
+       $text = display_content($a, true, $profile_uid);
 
-       if (PConfig::get(local_user(), "system", "bandwith_saver")) {
-               $replace = "<br />".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";
@@ -36,5 +34,5 @@ function update_display_content(App $a)
        echo str_replace("\t", "       ", $text);
        echo "</section>";
        echo "</body></html>\r\n";
-       killme();
+       exit();
 }