You are here

function panels_update_5208 in Panels 6.3

Same name and namespace in other branches
  1. 5.2 panels.install \panels_update_5208()

File

./panels.install, line 545

Code

function panels_update_5208() {
  if (!empty($GLOBALS['SKIP_PANELS_UPDATES'])) {
    return array();
  }
  $ret = array();
  $count = db_result(db_query("SELECT MAX(did) FROM {panels_display}"));
  $ret[] = update_sql("DELETE FROM {sequences} WHERE name = '{panels_display}_did'");
  $ret[] = update_sql("DELETE FROM {sequences} WHERE name = '{panels_display}_id'");
  if ($count) {
    $ret[] = update_sql("INSERT INTO {sequences} (name, id) VALUES ('{panels_display}_did',\n    {$count})");
  }
  return $ret;
}