You are here

function i18nblocks_db_rewrite_sql in Internationalization 6

Implementation of hook_db_rewrite_sql().

File

i18nblocks/i18nblocks.module, line 49
Internationalization (i18n) submodule: Multilingual meta-blocks

Code

function i18nblocks_db_rewrite_sql($query, $primary_table, $primary_key) {
  if ($primary_table == 'b' && $primary_key == 'bid') {
    $return['join'] = 'LEFT JOIN {i18n_blocks} i18n ON (b.module = i18n.module AND b.delta = i18n.delta)';
    $return['where'] = i18n_db_rewrite_where('i18n', 'block', 'simple');
    return $return;
  }
}