]> git.mxchange.org Git - friendica.git/blob - mod/update_network.php
Update ForumManager.php - small correction
[friendica.git] / mod / update_network.php
1 <?php
2
3 // See update_profile.php for documentation
4
5 require_once('mod/network.php');
6 require_once('include/group.php');
7
8 if(! function_exists('update_network_content')) {
9 function update_network_content(&$a) {
10
11         $profile_uid = intval($_GET['p']);
12
13         header("Content-type: text/html");
14         echo "<!DOCTYPE html><html><body>\r\n";
15         echo "<section>";
16
17         if (!get_pconfig($profile_uid, "system", "no_auto_update") OR ($_GET['force'] == 1))
18                 $text = network_content($a,$profile_uid);
19         else
20                 $text = "";
21
22         $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
23         $replace = "<img\${1} dst=\"\${2}\"";
24         $text = preg_replace($pattern, $replace, $text);
25
26         $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
27         $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
28         $text = preg_replace($pattern, $replace, $text);
29         $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
30         $text = preg_replace($pattern, $replace, $text);
31         $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
32         $text = preg_replace($pattern, $replace, $text);
33         $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
34         $text = preg_replace($pattern, $replace, $text);
35
36
37         echo str_replace("\t",'       ',$text);
38         echo "</section>";
39         echo "</body></html>\r\n";
40         killme();
41 }
42 }