? drupal-execute.patch
Index: drupalorg_testing.profile
===================================================================
RCS file: /cvs/drupal-contrib/contributions/profiles/drupalorg_testing/drupalorg_testing.profile,v
retrieving revision 1.52
diff -u -p -r1.52 drupalorg_testing.profile
--- drupalorg_testing.profile	17 Mar 2009 23:09:35 -0000	1.52
+++ drupalorg_testing.profile	18 Mar 2009 16:09:57 -0000
@@ -196,7 +196,8 @@ function _drupalorg_testing_configure_cv
       'method' => 1,  // external
       'op' => t('Save repository'),
     );
-    drupal_execute('cvs_repository_form', $repo);
+    $form_state = array();
+    drupal_execute('cvs_repository_form', $form_state, $repo);
   }
 
   // Set the branch/tag release messages to match drupal.org.
@@ -507,7 +508,7 @@ function _drupalorg_testing_create_users
  */
 function _drupalorg_testing_create_project_terms() {
   // Add top-level project terms.
-  $vid = _project_get_vid();
+  $vocabulary = taxonomy_vocabulary_load(_project_get_vid());
   $terms = array(
     t('Drupal project') => t('Get started by downloading the official Drupal core files. These official releases come bundled with a variety of modules and themes to give you a good starting point to help build your site. Drupal core includes basic community features like blogging, forums, and contact forms, and can be easily extended by downloading other contributed modules and themes.'),
     t('Installation profiles') => t('Installation profiles are a feature in Drupal core that was added in the 5.x series. The new Drupal installer allows you to specify an installation profile which defines which modules should be enabled, and can customize the new installation after they have been installed. This will allow customized "distributions" that enable and configure a set of modules that work together for a specific kind of site (Drupal for bloggers, Drupal for musicians, Drupal for developers, and so on).'),
@@ -516,8 +517,9 @@ function _drupalorg_testing_create_proje
     t('Themes') => t('Themes allow you to change the look and feel of your Drupal site. These contributed themes are not part of any official release and may not work correctly. Only use matching versions of themes with Drupal. Themes released for Drupal 4.7.x will not work for Drupal 5.x.'),
     t('Translations') => t('Drupal uses English by default, but may be translated to many other languages. To install these translations, unzip them and import the .po file through Drupal\'s administration interface for localization. You will need to turn on the locale module if it\'s not already enabled. You can check the completeness of translations on the translations <a href="/translation-status">status page</a>.'),
   );
+  $form_state = array();
   foreach ($terms as $name => $description) {
-    drupal_execute('taxonomy_form_term', array('name' => $name, 'description' => $description), $vid);
+    drupal_execute('taxonomy_form_term', $form_state, $vocabulary, array('name' => $name, 'description' => $description));
   }
 
   // Add module categories.
@@ -551,12 +553,13 @@ function _drupalorg_testing_create_proje
     t('Utility'),
     t('Views'),
   );
+  $form_state = array();
   foreach ($terms as $name) {
-    drupal_execute('taxonomy_form_term', array('name' => $name, 'parent' => $parent), $vid);
+    drupal_execute('taxonomy_form_term', $form_state, $vocabulary, array('name' => $name, 'description' => $parent));
   }
 
   // Add release versions.
-  $vid = _project_release_get_api_vid();
+  $vocabulary = taxonomy_vocabulary_load(_project_release_get_api_vid());
   $terms = array(
     '4.0.x', '4.1.x', '4.2.x', '4.3.x',
     '4.4.x', '4.5.x', '4.6.x', '4.7.x', '5.x', '6.x', '7.x',
@@ -564,8 +567,9 @@ function _drupalorg_testing_create_proje
   $weight = 10;
   // For releases to be properly ordered in the download tables, the oldest taxonomy
   // terms must have the heaviest weights.
+  $form_state = array();
   foreach ($terms as $name) {
-    drupal_execute('taxonomy_form_term', array('name' => $name, 'weight' => $weight), $vid);
+    drupal_execute('taxonomy_form_term', $form_state, $vocabulary, array('name' => $name, 'weight' => $weight));
     $weight--;
   }
 
@@ -575,15 +579,17 @@ function _drupalorg_testing_create_proje
     'nodes' => array('project_release' => 'project_release'),
     'multiple' => TRUE,
   );
-  drupal_execute('taxonomy_form_vocabulary', $vocab);
-  $vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE name = '%s'", t('Release type')));
+  $form_state = array();
+  drupal_execute('taxonomy_form_vocabulary', $form_state, $vocab);
+  $vocabulary = taxonomy_vocabulary_load(db_result(db_query("SELECT vid FROM {vocabulary} WHERE name = '%s'", t('Release type'))));
   $terms = array(
     t('Security update'),
     t('Bug fixes'),
     t('New features'),
   );
+  $form_state = array();
   foreach ($terms as $name) {
-    drupal_execute('taxonomy_form_term', array('name' => $name), $vid);
+    drupal_execute('taxonomy_form_term', $form_state, $vocabulary, array('name' => $name));
   }
 }
 
@@ -652,7 +658,8 @@ function _drupalorg_testing_configure_pr
   $account = user_load(array('uid' => 1));
   if (!empty($account)) {
     $issue_settings['project_issue_auto_close_user'] = '';
-    drupal_execute('project_issue_settings_form', $issue_settings);
+    $form_state = array();
+    drupal_execute('project_issue_settings_form', $form_state, $issue_settings);
     drupal_set_message(t('If you wish for project issues to be automatically closed after 2 weeks, please !auto_close_link to be %anon.', array('!auto_close_link' => l(t('set the Auto-close user'), 'admin/project/project-issue-settings'), '%anon' => variable_get('anonymous', t('Anonymous')))), 'error');
   }
 
@@ -664,7 +671,8 @@ function _drupalorg_testing_configure_pr
     'author_has' => 0,
     'default_query' => 1,
   );
-  drupal_execute('project_issue_admin_states_form', $issue_status_new);
+  $form_state = array();
+  drupal_execute('project_issue_admin_states_form', $form_state, $issue_status_new);
 
   $issue_status_new = array();
   $issue_status_new['status_add'] = array(
@@ -673,7 +681,8 @@ function _drupalorg_testing_configure_pr
     'author_has' => 0,
     'default_query' => 0,
   );
-  drupal_execute('project_issue_admin_states_form', $issue_status_new);
+  $form_state = array();
+  drupal_execute('project_issue_admin_states_form', $form_state, $issue_status_new);
 
   // Now, update the default status values for d.o customizations.
   $issue_status_updates = array();
@@ -704,7 +713,8 @@ function _drupalorg_testing_configure_pr
     'author_has' => 0,
     'default_query' => 1,
   );
-  drupal_execute('project_issue_admin_states_form', $issue_status_updates);
+  $form_state = array();
+  drupal_execute('project_issue_admin_states_form', $form_state, $issue_status_updates);
 }
 
 /**
@@ -777,7 +787,8 @@ function _drupalorg_testing_create_conte
   foreach ($values as $category => $project) {
     $project['project_type'] = _drupalorg_testing_get_tid_by_term($category);
     $project['mail'] = variable_get('site_mail', D_O_SITE_MAIL);
-    drupal_execute('project_project_node_form', $project, array('type' => 'project_project'));
+    $form_state = array();
+    drupal_execute('project_project_node_form', $form_state, $project, array('type' => 'project_project'));
 
     // CHEESY HACK: Because Drupal is not fully bootstrapped at install time,
     // we have to do raw DB manipulation to add the terms. Sigh...
@@ -859,7 +870,8 @@ The first case is especially useful for 
     }
     $project["tid_$modules_tid"] = drupal_map_assoc($categories);
     $project['mail'] = variable_get('site_mail', D_O_SITE_MAIL);
-    drupal_execute('project_project_node_form', $project, array('type' => 'project_project'));
+    $form_state = array();
+    drupal_execute('project_project_node_form', $form_state, $project, array('type' => 'project_project'));
 
     // CHEESY HACK: Because Drupal is not fully bootstrapped at install time,
     // we have to do raw DB manipulation to add the terms. Sigh...
@@ -899,7 +911,8 @@ The first case is especially useful for 
   foreach ($values as $project) {
     $project['project_type'] = $drupal_tid;
     $project['mail'] = variable_get('site_mail', D_O_SITE_MAIL);
-    drupal_execute('project_project_node_form', $project, array('type' => 'project_project'));
+    $form_state = array();
+    drupal_execute('project_project_node_form', $form_state, $project, array('type' => 'project_project'));
 
     // LAME HACK: Because of evil interactions between how project.module is
     // creating the taxonomy vocabularies for itself and how
@@ -969,7 +982,8 @@ function _drupalorg_testing_create_conte
       }
       $release['type'] = 'project_release';
 
-      drupal_execute('project_release_node_form', $release, $release);
+      $form_state = array();
+      drupal_execute('project_release_node_form', $form_state, $release, $release);
 
       // LAME HACK: Because of evil interactions between how project.module is
       // creating the taxonomy vocabularies for itself and how
@@ -1135,7 +1149,8 @@ function _drupalorg_testing_get_tid_by_t
  *   set up or is not writable by the web server.
  */
 function _drupalorg_testing_configure_files() {
-  drupal_execute('system_file_system_settings', array());
+  $form_state = array();
+  drupal_execute('system_file_system_settings', $form_state);
   $profile_name = 'Drupal.org testing';
   $directory = file_directory_path();
   if (!file_check_directory($directory, TRUE)) {
