Permalink
Browse files

MINOR Fixed regression from r113282 for changed SecurityToken API in …

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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@113360 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent bc3df65 commit 6df2e7432398929f6a84cca9db1fe1e1bd4f27af @chillu chillu committed with sminnee Nov 2, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 code/CMSMain.php
View
@@ -1274,14 +1274,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 6df2e74

Please sign in to comment.