X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_network.php;h=869973ace4f07af1b8c2750103849a36f6f85f5d;hb=288ad37c3c93bcc3f5f3409be095dba57deab7f4;hp=0dfe0a73ff568297ec7b8e42b20c2917148d30c0;hpb=c9248b66db226748ef2baec58ea651e852487dfe;p=friendica.git diff --git a/mod/update_network.php b/mod/update_network.php index 0dfe0a73ff..869973ace4 100644 --- a/mod/update_network.php +++ b/mod/update_network.php @@ -2,37 +2,41 @@ // See update_profile.php for documentation -require_once('mod/network.php'); -require_once('include/group.php'); +require_once("mod/network.php"); +require_once("include/group.php"); -function update_network_content(&$a) { +function update_network_content(App $a) { - $profile_uid = intval($_GET['p']); + $profile_uid = intval($_GET["p"]); header("Content-type: text/html"); echo "\r\n"; - echo (($_GET['msie'] == 1) ? '
' : '
'); + echo "
"; + if (!get_pconfig($profile_uid, "system", "no_auto_update") OR ($_GET["force"] == 1)) { + $text = network_content($a, $profile_uid); + } else { + $text = ""; + } - $text = network_content($a,$profile_uid); $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); - echo (($_GET['msie'] == 1) ? '
' : ''); + 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(); - }