X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_community.php;h=d5f2b4cb21d18f87c723788be13069fc3eb7879d;hb=5ebe10d7fc808dc2ed3502b532e6db020928aa1c;hp=f0e96af48c1a519167eeb27c5e8ea7dd683cc18e;hpb=2b161108fe6552ef2effb7b300553f0242b2e49e;p=friendica.git diff --git a/mod/update_community.php b/mod/update_community.php index f0e96af48c..d5f2b4cb21 100644 --- a/mod/update_community.php +++ b/mod/update_community.php @@ -3,22 +3,28 @@ // 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"); echo "\r\n"; echo "
"; - $text = community_content($a, true); + if ($_GET["force"] == 1) { + $text = community_content($a, true); + } else { + $text = ''; + } + $pattern = "/]*) src=\"([^\"]*)\"/"; $replace = ""; + if (PConfig::get(local_user(), "system", "bandwith_saver")) { + $replace = "
".L10n::t("[Embedded content - reload page to view]")."
"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $text = preg_replace($pattern, $replace, $text); $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; @@ -33,4 +39,4 @@ function update_community_content(App $a) { echo "
"; echo "\r\n"; killme(); -} \ No newline at end of file +}