public function has_site_relations($site_id, $type = '')
{
$args = [$site_id];
$query = "SELECT ml_id FROM {$this->table} WHERE ml_blogid = %d AND ml_source_blogid != ml_blogid";
if ($type) {
$query .= ' AND ml_type = %s';
$args[] = $type;
}
return (bool) $this->db->query($this->db->prepare("{$query} LIMIT 1", $args));
}