3 * @file mod/update_network
4 * See update_profile.php for documentation
8 use Friendica\Core\L10n;
9 use Friendica\Core\PConfig;
11 require_once "mod/network.php";
13 function update_network_content(App $a)
15 $profile_uid = intval($_GET['p']);
16 $parent = intval($_GET['item']);
18 header("Content-type: text/html");
19 echo "<!DOCTYPE html><html><body>\r\n";
22 if (!PConfig::get($profile_uid, "system", "no_auto_update") || ($_GET["force"] == 1)) {
23 $text = network_content($a, $profile_uid, $parent);
28 if (PConfig::get(local_user(), "system", "bandwidth_saver")) {
29 $replace = "<br />" . L10n::t("[Embedded content - reload page to view]") . "<br />";
30 $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
31 $text = preg_replace($pattern, $replace, $text);
32 $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
33 $text = preg_replace($pattern, $replace, $text);
34 $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
35 $text = preg_replace($pattern, $replace, $text);
36 $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
37 $text = preg_replace($pattern, $replace, $text);
40 echo str_replace("\t", " ", $text);
42 echo "</body></html>\r\n";