You are here

function calendar_install in Calendar 5.2

Same name and namespace in other branches
  1. 5 calendar.install \calendar_install()
  2. 6.2 calendar.install \calendar_install()
  3. 7 calendar.install \calendar_install()
  4. 7.2 calendar.install \calendar_install()

File

./calendar.install, line 44
Install File

Code

function calendar_install() {
  module_enable(array(
    'date_api',
  ));
  if (version_compare(PHP_VERSION, '5.2', '<') && !module_exists('date_php4')) {
    module_enable(array(
      'date_php4',
    ));
  }
  module_enable(array(
    'date_timezone',
  ));
  $ret = array();

  // Make sure this module loads after date_api.
  db_query("UPDATE {system} SET weight = 1 WHERE name = 'calendar'");
  return $ret;
}