You are here

function finder_save in Finder 7

Same name and namespace in other branches
  1. 6 finder.module \finder_save()
  2. 7.2 finder.module \finder_save()

Save changes to a finder or add a new finder.

Parameters

&$finder: The finder object.

7 calls to finder_save()
finder_admin_add_form_submit in includes/finder.admin.inc
Submit function for admin finder add form.
finder_admin_edit_submit in includes/finder.admin.inc
Submit function for admin finder add/edit page.
finder_clone in ./finder.module
Write a finder into the database as a new finder.
finder_i18nstrings_locale in modules/finder_i18nstrings/finder_i18nstrings.module
Implements hook_locale().
finder_update_6100 in ./finder.install
Implements hook_update_N().

... See full list

File

./finder.module, line 451
The finder module.

Code

function finder_save(&$finder) {
  finder_invoke_finderapi($finder, 'finder_presave');
  $update = array();
  $op = 'finder_insert';
  if (!empty($finder->finder_id)) {
    $update[] = 'finder_id';
    $op = 'finder_update';
  }
  drupal_write_record('finder', $finder, $update);
  finder_invoke_finderapi($finder, $op);
}