]> git.mxchange.org Git - friendica.git/blobdiff - include/remove_contact.php
Merge pull request #3365 from Hypolite/issue/remove-wrong-profile-link-for-contacts
[friendica.git] / include / remove_contact.php
index dcf917322bd603699d15c5f459a5fed47ad2ecd3..68bf2adfeaa103c22f3849dd30dc3e997a4741d0 100644 (file)
@@ -3,24 +3,10 @@
  * @file include/remove_contact.php
  * @brief Removes orphaned data from deleted contacts
  */
-require_once("boot.php");
 
-function remove_contact_run($argv, $argc) {
-       global $a, $db;
-
-       if (is_null($a))
-               $a = new App;
-
-       if (is_null($db)) {
-               @include(".htconfig.php");
-               require_once("include/dba.php");
-               $db = new dba($db_host, $db_user, $db_pass, $db_data);
-               unset($db_host, $db_user, $db_pass, $db_data);
-       }
-
-       load_config('config');
-       load_config('system');
+use \Friendica\Core\Config;
 
+function remove_contact_run($argv, $argc) {
        if ($argc != 2) {
                return;
        }
@@ -43,9 +29,4 @@ function remove_contact_run($argv, $argc) {
 
        q("DELETE FROM `queue` WHERE `cid` = %d", intval($id));
 }
-
-if (array_search(__file__, get_included_files()) === 0) {
-       remove_contact_run($_SERVER["argv"], $_SERVER["argc"]);
-       killme();
-}
 ?>