You are here

function node_list_cmp in Recipe 6

1 string reference to 'node_list_cmp'
recipe_get_node_alpha_list in ./recipe_name_index.inc

File

./recipe_name_index.inc, line 116
recipe_name_index.inc - This is an include file containing most all of the recipe name index page functionality.

Code

function node_list_cmp($a, $b) {

  // Sort first by letter.
  if ($a->letter != $b->letter) {
    return $a->letter < $b->letter ? -1 : 1;
  }

  // Next by title
  if ($a->title != $b->title) {
    return $a->title < $b->title ? -1 : 1;
  }

  // They are the same.
  return 0;
}