Skip to content

Commit

Permalink
MINOR rearranged FormResponse::add's to get the right message out to …
Browse files Browse the repository at this point in the history
…the browser
  • Loading branch information
rixth committed Nov 1, 2009
1 parent 06724ff commit ca5f921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions code/ThreeStep/batchactions/BatchApprovePages.php
Expand Up @@ -10,12 +10,12 @@ function getDoingText() {

function run(DataObjectSet $pages) {
$pageIDs = $pages->column('ID');
foreach($pageIDs as $pageID) FormResponse::add("$('Form_EditForm').reloadIfSetTo($pageID);");

$this->batchaction($pages, 'batchApprove',
_t('BatchApprovePages.APPROVED_PAGES', 'Approved %d pages, %d failures')
);

foreach($pageIDs as $pageID) FormResponse::add("$('Form_EditForm').reloadIfSetTo($pageID);");

return FormResponse::respond();
}
}
7 changes: 4 additions & 3 deletions code/ThreeStep/batchactions/BatchPublishPages.php
Expand Up @@ -10,12 +10,13 @@ function getDoingText() {

function run(DataObjectSet $pages) {
$pageIDs = $pages->column('ID');
$this->batchaction($pages, 'batchPublish',
_t('BatchPublishPages.PUBLISHED_PAGES', 'Published %d pages, %d failures')
);

foreach($pageIDs as $pageID) FormResponse::add("$('Form_EditForm').reloadIfSetTo($pageID);");

$this->batchaction($pages, 'batchPublish',
_t('BatchPublishPages.PUBLISHED_PAGES', 'Published %d pages, %d failures')
);

return FormResponse::respond();
}
}
Expand Down

0 comments on commit ca5f921

Please sign in to comment.