X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fupdate_network.php;h=aafc0e22f41497fed7cc8ea06f1ef0b26b9516c3;hb=f10062dfdbacb48910482678d919ad37de57015f;hp=962701627a2979d68c30b77e540a197f1f45771d;hpb=71ab86d0c31a81e989d83e0eb68e656783214c03;p=friendica.git
diff --git a/mod/update_network.php b/mod/update_network.php
index 962701627a..aafc0e22f4 100644
--- a/mod/update_network.php
+++ b/mod/update_network.php
@@ -1,48 +1,44 @@
.
+ *
* See update_profile.php for documentation
*/
use Friendica\App;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
+use Friendica\Core\System;
+use Friendica\DI;
require_once "mod/network.php";
function update_network_content(App $a)
{
+ if (!isset($_GET['p']) || !isset($_GET['item'])) {
+ exit();
+ }
+
$profile_uid = intval($_GET['p']);
$parent = intval($_GET['item']);
- header("Content-type: text/html");
- echo "
\r\n";
- echo "";
-
- if (!PConfig::get($profile_uid, "system", "no_auto_update") || ($_GET["force"] == 1)) {
+ if (!DI::pConfig()->get($profile_uid, "system", "no_auto_update") || ($_GET["force"] == 1)) {
$text = network_content($a, $profile_uid, $parent);
} else {
$text = "";
}
-
- $pattern = "/]*) src=\"([^\"]*)\"/";
- $replace = "" . L10n::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();
+ System::htmlUpdateExit($text);
}