help && ($help = i18nstrings_ts("nodetype:type:$type->type:help", $langcode))) { $type->help = $help; node_type_save($type); } } // @ TODO Some more clean up for strings } /** * The old module with the same name had a different approach, so the update will be full install. */ function i18ncontent_update_6001() { $ret = array(); // Update location for existing strings for this textgroup that was wrong $ret[] = update_sql("UPDATE {locales_source} SET location = CONCAT('type:', location) WHERE textgroup = 'nodetype' AND location NOT LIKE 'type:%'"); // Delete all indexing data, it will be recreated $ret[] = update_sql("DELETE FROM {i18n_strings} WHERE lid IN (SELECT lid FROM {locales_source} WHERE textgroup = 'nodetype')"); return $ret; } /** * Locale refresh, this will run successfully only after the i18nstrings update has run */ function i18ncontent_update_6002() { $ret = array(); $version = (int)drupal_get_installed_schema_version('i18nstrings'); if ($version > 6002) { drupal_load('module', 'i18ncontent'); drupal_load('module', 'i18nstrings'); i18ncontent_locale_refresh(); } else { drupal_set_message('The i18ncontent update 6002 needs to run after i18nstrings update 6003. Re-run update.php.', 'warning'); $ret['#abort'] = TRUE; } return $ret; }