You are here

function seochecklist_update_6301 in SEO Checklist 7.3

Same name and namespace in other branches
  1. 6.3 seochecklist.install \seochecklist_update_6301()

File

./seochecklist.install, line 183
Install, update and uninstall functions for the seochecklist module.

Code

function seochecklist_update_6301() {
  global $user;
  db_drop_table('seo_group');
  db_drop_field('seo_checklist', 'group_id');
  db_drop_field('seo_checklist', 'name');
  db_drop_field('seo_checklist', 'module');
  db_drop_field('seo_checklist', 'download');
  db_drop_field('seo_checklist', 'enable');
  db_drop_field('seo_checklist', 'configure');
  db_drop_field('seo_checklist', 'order_id');
  if (variable_get('seo_checklist_link', FALSE)) {
    db_query("INSERT INTO {seo_checklist} (id, completed, uid) VALUES (:id, :time, :uid)", array(
      ':id' => 66,
      ':time' => time(),
      ':uid' => $user->uid,
    ));
  }
  if (variable_get('seo_checklist_thanks', FALSE)) {
    db_query("INSERT INTO {seo_checklist} (id, completed, uid) VALUES (:id, :time, :uid)", array(
      ':id' => 67,
      ':time' => time(),
      ':uid' => $user->uid,
    ));
  }
  if (variable_get('seo_checklist_podcast', FALSE)) {
    db_query("INSERT INTO {seo_checklist} (id, completed, uid) VALUES (:id, :time, :uid)", array(
      ':id' => 68,
      ':time' => time(),
      ':uid' => $user->uid,
    ));
  }
  if (variable_get('seo_checklist_book_references', FALSE)) {
    db_query("INSERT INTO {seo_checklist} (id, completed, uid) VALUES (:id, :time, :uid)", array(
      ':id' => 69,
      ':time' => time(),
      ':uid' => $user->uid,
    ));
  }

  //variable_del('seo_checklist_link');
  variable_del('seo_checklist_thanks');
  variable_del('seo_checklist_podcast');
  variable_del('seo_checklist_book_references');
}