You are here

function asaf_get_prefix in Asaf (ajax submit for any form) 7

Same name and namespace in other branches
  1. 8 asaf.module \asaf_get_prefix()
1 call to asaf_get_prefix()
asaf_init_prefix in ./asaf.module

File

./asaf.module, line 549

Code

function asaf_get_prefix() {
  $prefixes =& drupal_static(__FUNCTION__, array());
  $i = 0;
  do {
    $prefix = 'asaf-' . time() . ($i ? '-' . $i : '');
    $i++;
  } while (isset($prefixes[$prefix]));
  $prefixes[$prefix] = $prefix;
  return $prefix;
}