You are here

function shoutbox_domain_db_rewrite_sql in Shoutbox 6.2

Implementation of hook_db_rewrite_sql()

File

shoutbox_domain/shoutbox_domain.module, line 33

Code

function shoutbox_domain_db_rewrite_sql($query, $table, $primary, $contexts) {
  global $_domain;
  if ($table == 'shoutbox' && isset($_domain['domain_id'])) {
    $domain_id = (int) $_domain['domain_id'];
    return array(
      'join' => "INNER JOIN {shoutbox_domain} shoutbox_domain ON shoutbox.shout_id = shoutbox_domain.shout_id \r\n",
      'where' => "shoutbox_domain.domain_id = " . (int) $domain_id,
    );
  }
}