You are here

function filefield_paths_install in File (Field) Paths 8

Same name and namespace in other branches
  1. 5 filefield_paths.install \filefield_paths_install()
  2. 6.2 filefield_paths.install \filefield_paths_install()
  3. 6 filefield_paths.install \filefield_paths_install()
  4. 7 filefield_paths.install \filefield_paths_install()

Implements hook_install().

File

./filefield_paths.install, line 14
Install, update and uninstall functions for the File (Field) Paths module.

Code

function filefield_paths_install() {

  // Populate the origname field with the current filenames.
  Database::getConnection()
    ->update('file_managed')
    ->expression('origname', 'filename')
    ->execute();
}