mirror of
https://github.com/friendica/friendica
synced 2024-12-27 05:20:16 +00:00
23 lines
462 B
PHP
23 lines
462 B
PHP
|
<?php
|
||
|
/**
|
||
|
* @file src/Worker/RemoveContact.php
|
||
|
* @brief Removes orphaned data from deleted contacts
|
||
|
*/
|
||
|
namespace Friendica\Worker;
|
||
|
|
||
|
use Friendica\Core\Config;
|
||
|
|
||
|
class RemoveContact {
|
||
|
public static function execute($id) {
|
||
|
|
||
|
// Only delete if the contact doesn't exist (anymore)
|
||
|
$r = dba::exists('contact', array('id' => $id));
|
||
|
if ($r) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
// Now we delete all the depending table entries
|
||
|
dba::delete('contact', array('id' => $id));
|
||
|
}
|
||
|
}
|