Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.1 KiB

  1. <?php
  2. /**
  3. * @file mod/update_display.php
  4. * See update_profile.php for documentation
  5. */
  6. use Friendica\App;
  7. use Friendica\Core\L10n;
  8. use Friendica\DI;
  9. require_once "mod/display.php";
  10. function update_display_content(App $a)
  11. {
  12. $profile_uid = intval($_GET["p"]);
  13. header("Content-type: text/html");
  14. echo "<!DOCTYPE html><html><body>\r\n";
  15. echo "<section>";
  16. $text = display_content($a, true, $profile_uid);
  17. if (DI::pConfig()->get(local_user(), "system", "bandwidth_saver")) {
  18. $replace = "<br />" . L10n::t("[Embedded content - reload page to view]") . "<br />";
  19. $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
  20. $text = preg_replace($pattern, $replace, $text);
  21. $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
  22. $text = preg_replace($pattern, $replace, $text);
  23. $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
  24. $text = preg_replace($pattern, $replace, $text);
  25. $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
  26. $text = preg_replace($pattern, $replace, $text);
  27. }
  28. echo str_replace("\t", " ", $text);
  29. echo "</section>";
  30. echo "</body></html>\r\n";
  31. exit();
  32. }