X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_network.php;h=42172486d83634c2b6e1af4227531fc4dcd1be94;hb=af41e5ed830e2264de3018d2a34b87ecfeb69554;hp=b2e7abc90cccabd23e64c724a7ecd6f70d17a22c;hpb=0c67c89715df801e0c887be50c9739db3bae7ca3;p=friendica.git diff --git a/mod/update_network.php b/mod/update_network.php index b2e7abc90c..42172486d8 100644 --- a/mod/update_network.php +++ b/mod/update_network.php @@ -2,41 +2,43 @@ // See update_profile.php for documentation -require_once('mod/network.php'); -require_once('include/group.php'); +use Friendica\App; -if(! function_exists('update_network_content')) { -function update_network_content(&$a) { +require_once("mod/network.php"); +require_once("include/group.php"); - $profile_uid = intval($_GET['p']); +function update_network_content(App $a) { + + $profile_uid = intval($_GET["p"]); header("Content-type: text/html"); echo "\r\n"; echo "
"; - if (!get_pconfig($profile_uid, "system", "no_auto_update") OR ($_GET['force'] == 1)) - $text = network_content($a,$profile_uid); - else + if (!get_pconfig($profile_uid, "system", "no_auto_update") OR ($_GET["force"] == 1)) { + $text = network_content($a, $profile_uid); + } else { $text = ""; + } $pattern = "/]*) src=\"([^\"]*)\"/"; $replace = "'; - $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; - $text = preg_replace($pattern, $replace, $text); - $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; - $text = preg_replace($pattern, $replace, $text); - $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i"; - $text = preg_replace($pattern, $replace, $text); - $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; - $text = preg_replace($pattern, $replace, $text); - - - echo str_replace("\t",' ',$text); + if (get_pconfig(local_user(), "system", "bandwith_saver")) { + $replace = "
".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"; + $text = preg_replace($pattern, $replace, $text); + $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i"; + $text = preg_replace($pattern, $replace, $text); + $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; + $text = preg_replace($pattern, $replace, $text); + } + + echo str_replace("\t", " ", $text); echo "
"; echo "\r\n"; killme(); } -}