summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-06-24 21:51:03 +0000
committerDries Buytaert <dries@buytaert.net>2008-06-24 21:51:03 +0000
commit9b82787b223185ca835aba9f34f300837fcebb85 (patch)
tree154437e664fc945ff5e74c7cdc74778ea8f40b7b /includes
parent22c0a0a4b0d9be19ee1444f86135998145a8d682 (diff)
downloadbrdo-9b82787b223185ca835aba9f34f300837fcebb85.tar.gz
brdo-9b82787b223185ca835aba9f34f300837fcebb85.tar.bz2
- Patch #243773 by chx, catch, boombatower, yched, dmitrig01, et al: use the batch API for running the tests instead of an all-in-one approach. Great work.
Diffstat (limited to 'includes')
-rw-r--r--includes/batch.inc7
-rw-r--r--includes/form.inc2
2 files changed, 9 insertions, 0 deletions
diff --git a/includes/batch.inc b/includes/batch.inc
index 22692f0ad..c4f481a05 100644
--- a/includes/batch.inc
+++ b/includes/batch.inc
@@ -22,6 +22,13 @@ function _batch_page() {
// Register database update for end of processing.
register_shutdown_function('_batch_shutdown');
+ // Add batch-specific css.
+ foreach ($batch['sets'] as $batch_set) {
+ foreach ($batch_set['css'] as $css) {
+ drupal_add_css($css);
+ }
+ }
+
$op = isset($_REQUEST['op']) ? $_REQUEST['op'] : '';
$output = NULL;
switch ($op) {
diff --git a/includes/form.inc b/includes/form.inc
index b2472c68e..3df1a60f4 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -2387,6 +2387,7 @@ function form_clean_id($id = NULL, $flush = FALSE) {
* 'operations' and 'finished' functions, for instance if they don't
* reside in the original '.module' file. The path should be relative to
* the base_path(), and thus should be built using drupal_get_path().
+ * 'css' : an array of paths to CSS files to be used on the progress page.
*
* Operations are added as new batch sets. Batch sets are used to ensure
* clean code independence, ensuring that several batches submitted by
@@ -2419,6 +2420,7 @@ function batch_set($batch_definition) {
'init_message' => $t('Initializing.'),
'progress_message' => $t('Remaining @remaining of @total.'),
'error_message' => $t('An error has occurred.'),
+ 'css' => array(),
);
$batch_set = $init + $batch_definition + $defaults;