locale_translation_update_file_history($file)
Updates the {locale_file} table.
object $file: Object representing the file just imported.
int FALSE on failure. Otherwise SAVED_NEW or SAVED_UPDATED.
function locale_translation_update_file_history($file) { $status = db_merge('locale_file') ->key(array( 'project' => $file->project, 'langcode' => $file->langcode, )) ->fields(array( 'version' => $file->version, 'timestamp' => $file->timestamp, 'last_checked' => $file->last_checked, )) ->execute(); // The file history has changed, flush the static cache now. // @todo Can we make this more fine grained? drupal_static_reset('locale_translation_get_file_history'); return $status; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.module/function/locale_translation_update_file_history/8.1.x