You are here

function apps_market_page in Apps 7

Callback for the market page

If there is only one server, go directly to it. Otherwise, list 'em.

1 string reference to 'apps_market_page'
apps_menu in ./apps.module
Implements hook_menu().

File

./apps.pages.inc, line 57
The page callbacks for the Apps module.

Code

function apps_market_page() {
  apps_include('manifest');
  $servers = apps_servers();

  // If there is only one, go directly to it
  if (isset($servers) && count($servers) === 1) {
    return drupal_goto('admin/apps/' . key($servers));
  }
  foreach ($servers as &$server) {
    $server['#theme'] = 'apps_server_item';
  }
  return theme('apps_market_page', array(
    'servers' => $servers,
  ));
}