From: Jonny Tischbein Date: Tue, 6 Nov 2018 21:22:42 +0000 (+0100) Subject: move live update: update_contacts to update_contact X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=93d50af700e94d3f099559f86c31b406520fc309;p=friendica.git move live update: update_contacts to update_contact --- diff --git a/mod/update_contact.php b/mod/update_contact.php new file mode 100644 index 0000000000..361234fea7 --- /dev/null +++ b/mod/update_contact.php @@ -0,0 +1,38 @@ +\r\n"; + echo "
"; + + if ($_GET["force"] == 1) { + $text = Contact::content($a, true); + } else { + $text = ''; + } + + if (PConfig::get(local_user(), "system", "bandwidth_saver")) { + $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(); +} diff --git a/mod/update_contacts.php b/mod/update_contacts.php deleted file mode 100644 index 1144ed1427..0000000000 --- a/mod/update_contacts.php +++ /dev/null @@ -1,38 +0,0 @@ -\r\n"; - echo "
"; - - if ($_GET["force"] == 1) { - $text = Contact::content($a, true); - } else { - $text = ''; - } - - if (PConfig::get(local_user(), "system", "bandwidth_saver")) { - $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(); -} diff --git a/view/js/main.js b/view/js/main.js index 384b355230..95e7b1542e 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -390,7 +390,7 @@ function NavUpdate() { $('nav').trigger('nav-update', data.result); // start live update - ['network', 'profile', 'community', 'notes', 'display', 'contacts'].forEach(function (src) { + ['network', 'profile', 'community', 'notes', 'display', 'contact'].forEach(function (src) { if ($('#live-' + src).length) { liveUpdate(src); }