From 8522c473538804518ea469d57160171ba3643aae Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Tue, 7 Nov 2017 12:14:03 -0500 Subject: [PATCH 1/2] Remove Includes Removed references to include/config.php and include/probe.php and deleted the respective files. --- boot.php | 1 - include/NotificationsManager.php | 1 - include/config.php | 151 ------------------------------- include/delivery.php | 1 - include/diaspora.php | 1 - include/discover_poco.php | 1 - include/follow.php | 1 - include/gprobe.php | 1 - include/message.php | 2 - include/notifier.php | 1 - include/ostatus.php | 1 - include/socgraph.php | 1 - include/update_gcontact.php | 1 - include/user.php | 1 - mod/contacts.php | 1 - mod/dfrn_request.php | 1 - mod/probe.php | 31 ------- mod/repair_ostatus.php | 1 - mod/unfollow.php | 1 - 19 files changed, 200 deletions(-) delete mode 100644 include/config.php delete mode 100644 mod/probe.php diff --git a/boot.php b/boot.php index 4458e3d753..89a30ce1e3 100644 --- a/boot.php +++ b/boot.php @@ -26,7 +26,6 @@ use Friendica\Core\Config; use Friendica\Core\PConfig; use Friendica\Util\Lock; -require_once 'include/config.php'; require_once 'include/network.php'; require_once 'include/plugin.php'; require_once 'include/text.php'; diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php index d0b1d00679..5f9419e836 100644 --- a/include/NotificationsManager.php +++ b/include/NotificationsManager.php @@ -9,7 +9,6 @@ use Friendica\Core\Pconfig; use Friendica\Core\System; require_once 'include/html2plain.php'; -require_once 'include/probe.php'; require_once 'include/datetime.php'; require_once 'include/bbcode.php'; require_once 'include/Contact.php'; diff --git a/include/config.php b/include/config.php deleted file mode 100644 index 1c8b119bcc..0000000000 --- a/include/config.php +++ /dev/null @@ -1,151 +0,0 @@ - t("Public access denied."), - "description" => t("Only logged in users are permitted to perform a probing."))); - killme(); - } - - $o .= '

Probe Diagnostic

'; - - $o .= '
'; - $o .= 'Lookup address: '; - $o .= '
'; - - $o .= '

'; - - if (x($_GET, 'addr')) { - $addr = trim($_GET['addr']); - $res = Probe::uri($addr, "", 0, false); - $o .= '
';
-		$o .= str_replace("\n", '
', print_r($res, true)); - $o .= '
'; - } - - return $o; -} diff --git a/mod/repair_ostatus.php b/mod/repair_ostatus.php index ea83b08adf..3372d03261 100755 --- a/mod/repair_ostatus.php +++ b/mod/repair_ostatus.php @@ -3,7 +3,6 @@ use Friendica\App; use Friendica\Core\System; -require_once 'include/probe.php'; require_once 'include/follow.php'; function repair_ostatus_content(App $a) { diff --git a/mod/unfollow.php b/mod/unfollow.php index 8ee96a14c8..607c17d277 100644 --- a/mod/unfollow.php +++ b/mod/unfollow.php @@ -3,7 +3,6 @@ use Friendica\App; use Friendica\Core\System; -require_once 'include/probe.php'; require_once 'include/follow.php'; require_once 'include/Contact.php'; require_once 'include/contact_selectors.php'; From a782ab50f91de804f36bcc32e07cf15c7287ea41 Mon Sep 17 00:00:00 2001 From: Adam Magness Date: Tue, 7 Nov 2017 12:31:32 -0500 Subject: [PATCH 2/2] Correct deletion Bring back mod/probe.php and delete include/probe.php as intended. --- include/probe.php | 41 ----------------------------------------- mod/probe.php | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 41 deletions(-) delete mode 100644 include/probe.php create mode 100644 mod/probe.php diff --git a/include/probe.php b/include/probe.php deleted file mode 100644 index 8cf703be80..0000000000 --- a/include/probe.php +++ /dev/null @@ -1,41 +0,0 @@ - t("Public access denied."), + "description" => t("Only logged in users are permitted to perform a probing."))); + killme(); + } + + $o .= '

Probe Diagnostic

'; + + $o .= '
'; + $o .= 'Lookup address: '; + $o .= '
'; + + $o .= '

'; + + if (x($_GET, 'addr')) { + $addr = trim($_GET['addr']); + $res = Probe::uri($addr, "", 0, false); + $o .= '
';
+		$o .= str_replace("\n", '
', print_r($res, true)); + $o .= '
'; + } + + return $o; +}