You are here

function lingotek_update_7207 in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.install \lingotek_update_7207()
  2. 7.2 lingotek.install \lingotek_update_7207()
  3. 7.3 lingotek.install \lingotek_update_7207()
  4. 7.4 lingotek.install \lingotek_update_7207()
  5. 7.6 lingotek.install \lingotek_update_7207()

Change the value for LINGOTEK_ENABLED to a string to avoid collision.

File

./lingotek.install, line 400

Code

function lingotek_update_7207(&$sandbox) {
  $updated = array();
  foreach (array_keys(node_type_get_names()) as $type) {
    $name = 'language_content_type_' . $type;
    if (variable_get($name) == 5) {
      $updated[] = $type;
      variable_set($name, LINGOTEK_ENABLED);
    }
  }
  if (count($updated)) {
    $t_args = array(
      '@updated' => implode(', ', $updated),
    );
    return t("Updated @count content type(s) to use 'lingotek' instead of '5' for the identifier: @updated", $t_args);
  }
  else {
    return t('No updates necessary.');
  }
}