--- active_translation.module	Fri Jan 16 05:21:36 1970
+++ active_translation.module	Fri Jan 16 05:21:36 1970
@@ -318,9 +318,13 @@
  *
  * Rewrite node queries so language selection options are enforced.
  */
-function active_translation_db_rewrite_sql($query, $primary_table, $primary_key) {
+function active_translation_db_rewrite_sql($query, $primary_table, $primary_key, $args = array()) {
   global $language;
 
+  if (!active_translation_mode()) {
+    return;
+  }
+
   switch ($primary_table) {
     case 'n':
     case 'node':
@@ -345,4 +349,28 @@
       $result['join'] = "INNER JOIN {active_translation} ON $primary_table.nid = {active_translation}.$field";
       return $result;
   }
+}
+
+/**
+ * Set or Check if active translation is active.
+ *
+ * @param $mode_alter boolean
+ * @return boolean
+ */
+function active_translation_mode($mode_alter = NULL) {
+  static $mode = TRUE;
+  if (!is_null($mode_alter) && is_bool($mode_alter)) {
+    $mode = $mode_alter;
+  }
+  return $mode;
+}
+
+/**
+ * Implementation of hook_views_api
+ */
+function active_translation_views_api() {
+  return array(
+    'api' => '2.0',
+    'path' => drupal_get_path('module', 'active_translation') .'/views',
+  );
 }
