function _system_sort_requirements

_system_sort_requirements($a, $b)

Helper function to sort requirements.

File

modules/system/system.module, line 2815
Configuration system that lets administrators modify the workings of the site.

Code

function _system_sort_requirements($a, $b) {
  if (!isset($a['weight'])) {
    if (!isset($b['weight'])) {
      return strcasecmp($a['title'], $b['title']);
    }
    return -$b['weight'];
  }
  return isset($b['weight']) ? $a['weight'] - $b['weight'] : $a['weight'];
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/_system_sort_requirements/7.x