]> git.mxchange.org Git - friendica.git/commitdiff
move live update: update_contacts to update_contact
authorJonny Tischbein <jonny_tischbein@systemli.org>
Tue, 6 Nov 2018 21:22:42 +0000 (22:22 +0100)
committerJonny Tischbein <jonny_tischbein@systemli.org>
Tue, 6 Nov 2018 21:22:42 +0000 (22:22 +0100)
mod/update_contact.php [new file with mode: 0644]
mod/update_contacts.php [deleted file]
view/js/main.js

diff --git a/mod/update_contact.php b/mod/update_contact.php
new file mode 100644 (file)
index 0000000..361234f
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+// See update_profile.php for documentation
+
+use Friendica\App;
+use Friendica\Core\L10n;
+use Friendica\Core\PConfig;
+use Friendica\Module\Contact;
+
+function update_contact_content(App $a)
+{
+       header("Content-type: text/html");
+       echo "<!DOCTYPE html><html><body>\r\n";
+       echo "<section>";
+
+       if ($_GET["force"] == 1) {
+               $text = Contact::content($a, true);
+       } else {
+               $text = '';
+       }
+
+       if (PConfig::get(local_user(), "system", "bandwidth_saver")) {
+               $replace = "<br />".L10n::t("[Embedded content - reload page to view]")."<br />";
+               $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 "</section>";
+       echo "</body></html>\r\n";
+       killme();
+}
diff --git a/mod/update_contacts.php b/mod/update_contacts.php
deleted file mode 100644 (file)
index 1144ed1..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-
-// See update_profile.php for documentation
-
-use Friendica\App;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
-use Friendica\Module\Contact;
-
-function update_contacts_content(App $a)
-{
-       header("Content-type: text/html");
-       echo "<!DOCTYPE html><html><body>\r\n";
-       echo "<section>";
-
-       if ($_GET["force"] == 1) {
-               $text = Contact::content($a, true);
-       } else {
-               $text = '';
-       }
-
-       if (PConfig::get(local_user(), "system", "bandwidth_saver")) {
-               $replace = "<br />".L10n::t("[Embedded content - reload page to view]")."<br />";
-               $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 "</section>";
-       echo "</body></html>\r\n";
-       killme();
-}
index 384b35523083d31b163e6c965f927e9e433ad5d1..95e7b1542edf4b38b7c585dfdfe73f020b0b2b8b 100644 (file)
@@ -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);
                                        }