From 403418f707f0d9bdb6e3c2bcb1bde2f37b07b554 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Tue, 14 Jun 2011 22:07:46 +0000 Subject: [PATCH] [gh-139] Merging from testing into staging git-svn-id: file:///tmp/wdn_thm_drupal/branches/drupal-7.x/staging@738 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/modules/unl/unl_site_creation.php | 24 ++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/sites/all/modules/unl/unl_site_creation.php b/sites/all/modules/unl/unl_site_creation.php index 214d8484..28a089be 100644 --- a/sites/all/modules/unl/unl_site_creation.php +++ b/sites/all/modules/unl/unl_site_creation.php @@ -88,10 +88,6 @@ function unl_site_create_submit($form, &$form_state) { function unl_site_list($form, &$form_state) { - $form['root'] = array( - '#type' => 'fieldset', - '#title' => 'Existing Sites', - ); $headers = array( 'site_path' => array( @@ -112,12 +108,7 @@ function unl_site_list($form, &$form_state) { ), 'remove' => 'Remove (can not undo!)' ); - - $form['root']['site_list'] = array( - '#theme' => 'unl_table', - '#header' => $headers, - ); - + $sites = db_select('unl_sites', 's') ->fields('s', array('site_id', 'db_prefix', 'installed', 'site_path', 'uri')) ->extend('TableSort') @@ -125,6 +116,19 @@ function unl_site_list($form, &$form_state) { ->execute() ->fetchAll(); + $total_no_of_sites = count($sites); + + $form['root'] = array( + '#type' => 'fieldset', + '#title' => 'Existing Sites ' . '(total: ' . $total_no_of_sites . ')', + ); + + $form['root']['site_list'] = array( + '#theme' => 'unl_table', + '#header' => $headers, + ); + + foreach ($sites as $site) { unset($checkbox); $form['root']['site_list']['rows'][$site->site_id] = array( -- GitLab