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
This commit is contained in:
Ingo Schommer 2010-11-02 19:22:50 +00:00 committed by Sam Minnee
parent bc3df654bd
commit 6df2e74323

View File

@ -1274,6 +1274,10 @@ JS;
} else { } else {
$token = SecurityToken::inst(); $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> $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 <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 intended to be used after there have been massive edits of the content, such as when the site was
@ -1281,7 +1285,7 @@ JS;
<form method="post" action="publishall"> <form method="post" action="publishall">
<input type="submit" name="confirm" value="' <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') .'" />' . _t('CMSMain.PUBALLCONFIRM',"Please publish every page in the site, copying content stage to live",PR_LOW,'Confirmation button') .'" />'
. $token->getFormField()->FieldHolder() . . $tokenHtml .
'</form>'; '</form>';
} }