Permalink
Browse files

MINOR Fixed regression from r113282 for changed SecurityToken API in …

…CMSMain->publishall() (fixes #6159) (from r113360)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@113361 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent d91759d commit dca8b98e7284f34d6178d0da46d76440e0c4e33f @chillu chillu committed with sminnee Nov 2, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/CMSMain.php
View
@@ -1052,14 +1052,18 @@ function publishall($request) {
} else {
$token = SecurityToken::inst();
+ $fields = new FieldSet();
+ $token->updateFieldSet($fields);
+ $tokenField = $fields->First();
+ $tokenHtml = ($tokenField) ? $tokenField->FieldHolder() : '';
$response .= '<h1>' . _t('CMSMain.PUBALLFUN','"Publish All" functionality') . '</h1>
<p>' . _t('CMSMain.PUBALLFUN2', 'Pressing this button will do the equivalent of going to every page and pressing "publish". It\'s
intended to be used after there have been massive edits of the content, such as when the site was
first built.') . '</p>
<form method="post" action="publishall">
<input type="submit" name="confirm" value="'
. _t('CMSMain.PUBALLCONFIRM',"Please publish every page in the site, copying content stage to live",PR_LOW,'Confirmation button') .'" />'
- . $token->getFormField()->FieldHolder() .
+ . $tokenHtml .
'</form>';
}

0 comments on commit dca8b98

Please sign in to comment.