X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fupdate_network.php;h=a6c8173794546301ed8af159d42cd9bd37e9a868;hb=a5e91175243a41c77a56e73efc3672f20a7e6d23;hp=36de0722a9dcace04bb1e527a3ab977792da348b;hpb=4cff911939b263993eb41682ca558c975e2db01f;p=friendica.git
diff --git a/mod/update_network.php b/mod/update_network.php
index 36de0722a9..a6c8173794 100644
--- a/mod/update_network.php
+++ b/mod/update_network.php
@@ -2,37 +2,44 @@
// 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");
+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 (($_GET['msie'] == 1) ? '' : '
');
-
-
- $text = network_content($a,$profile_uid);
- $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) ? ' ' : '');
+ 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 "";
echo "\r\n";
killme();
-
-}
\ No newline at end of file
+}