You are here

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

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

File

./asaf.module, line 556
Main module file.

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;
}