X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_network.php;h=3a5741f6ac0629bdd91b38800aab3470b471e9f5;hb=0b5f7da270bcaa679cb684dbbbbe40781f0b49c6;hp=65366d13776b9554c9f05f0491c6b88cd4cd325e;hpb=829a92a10e219e1e3d8638945e5cf48af62f4483;p=friendica.git
diff --git a/mod/update_network.php b/mod/update_network.php
index 65366d1377..3a5741f6ac 100644
--- a/mod/update_network.php
+++ b/mod/update_network.php
@@ -2,43 +2,43 @@
// See update_profile.php for documentation
-require_once('mod/network.php');
-require_once('include/group.php');
+use Friendica\App;
+use Friendica\Core\PConfig;
-function update_network_content(&$a) {
+require_once "mod/network.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 (($_GET['msie'] == 1) ? '' : '
');
-
- $no_auto_update = get_pconfig($profile_uid, "system", "no_auto_update");
- if ($no_auto_update <= 0) {
- $text = network_content($a,$profile_uid);
- if ($no_auto_update < 0)
- set_pconfig($profile_uid, "system", "no_auto_update", 1);
- } else
+ echo "";
+
+ if (!PConfig::get($profile_uid, "system", "no_auto_update") || ($_GET["force"] == 1)) {
+ $text = network_content($a, $profile_uid);
+ } else {
$text = "";
+ }
$pattern = "/
]*) src=\"([^\"]*)\"/";
$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 (($_GET['msie'] == 1) ? ' ' : '');
+ if (PConfig::get(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();
-
}