You are here

function themekey_ui_update_7300 in ThemeKey 7.3

Collapse properties themekey_ui:node_author_triggers_theme and themekey_ui:blog_author_triggers_theme into themekey_ui:author_triggers_theme

File

./themekey_ui.install, line 141
Database schema of

Code

function themekey_ui_update_7300() {
  db_update('themekey_properties')
    ->fields(array(
    'property' => 'themekey_ui:author_triggers_theme',
  ))
    ->condition('property', 'themekey_ui:node_author_triggers_theme')
    ->execute();
  $id = db_query("SELECT id FROM {themekey_properties} WHERE property = 'themekey_ui:blog_author_triggers_theme'")
    ->fetchField();
  if ($id) {
    db_update('themekey_properties')
      ->fields(array(
      'parent' => 0,
    ))
      ->condition('parent', $id)
      ->execute();
    db_delete('themekey_properties')
      ->condition('property', 'themekey_ui:blog_author_triggers_theme')
      ->execute();
  }
  return t('Renamed themekey_ui:node_author_triggers_theme to themekey_ui:author_triggers_theme, removed themekey_ui:blog_author_triggers_theme');
}