You are here

function get_item_weight in Favorites 7.2

Get item weight.

Return value

int The new weight for the item.

File

./favorites.module, line 490
The favorites module allows users to bookmark any path within a site.

Code

function get_item_weight() {
  $weight = db_query('SELECT MAX(weight) FROM {favorites} LIMIT 1')
    ->fetchField();
  return ++$weight;
}