You are here

uc_reports.install in Ubercart 6.2

Same filename and directory in other branches
  1. 5 uc_reports/uc_reports.install
  2. 7.3 uc_reports/uc_reports.install

Install hooks for uc_reports.module.

File

uc_reports/uc_reports.install
View source
<?php

/**
 * @file
 * Install hooks for uc_reports.module.
 */

/**
 * Implements hook_uninstall().
 */
function uc_reports_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'uc_reports_%%'");
}

/**
 * Drop the nasty pgsql-specific functions added for no discernible reason
 * whatsoever!
 */
function uc_reports_update_6000() {
  $ret = array();
  if ($GLOBALS['db_type'] == 'pgsql') {
    $ret[] = update_sql("DROP FUNCTION from_unixtime(integer);");
    $ret[] = update_sql("DROP FUNCTION unix_timestamp();");
    $ret[] = update_sql("DROP FUNCTION unix_timestamp(timestamp with time zone);");
  }
  else {
    $ret[] = array(
      'success' => TRUE,
      'query' => 'Not using pgsql, skipping this update.',
    );
  }
  return $ret;
}

Functions

Namesort descending Description
uc_reports_uninstall Implements hook_uninstall().
uc_reports_update_6000 Drop the nasty pgsql-specific functions added for no discernible reason whatsoever!