You are here

function finder_element_save in Finder 6

Same name and namespace in other branches
  1. 7 finder.module \finder_element_save()

Save changes to a finder element or add a new finder element.

Parameters

&$finder_element: The finder element object.

4 calls to finder_element_save()
finder_admin_edit_submit in includes/finder.admin.inc
Submit function for admin finder add/edit page.
finder_admin_element_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
Implementation of hook_locale().

File

./finder.module, line 508
The finder module.

Code

function finder_element_save(&$finder_element) {
  finder_invoke_finderapi($finder_element, 'finder_element_presave');
  $update = array();
  $op = 'finder_element_insert';
  if (!empty($finder_element->finder_element_id)) {
    $update[] = 'finder_element_id';
    $op = 'finder_element_update';
  }
  drupal_write_record('finder_element', $finder_element, $update);
  finder_invoke_finderapi($finder_element, $op);
}