Returns a unique, machine-readable shortcut set name.
function shortcut_set_get_unique_name() {
// Shortcut sets are numbered sequentially, so we keep trying until we find
// one that is available. For better performance, we start with a number
// equal to one more than the current number of shortcut sets, so that if
// no shortcut sets have been deleted from the database, this will
// automatically give us the correct one.
$number = db_query("SELECT COUNT(*) FROM {shortcut_set}")
->fetchField() + 1;
do {
$name = shortcut_set_name($number);
$number++;
} while ($shortcut_set = shortcut_set_load($name));
return $name;
}