• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed edit_history_view template ignores canRevert permission

Rigel Kentaurus

Well-known member
You might have figured by now that I am working to integrate Edit History in my own add-on :)

Anyway, the controller
correctly sets as a view parameter
    'canRevert' => $handler->canRevertContent($content)
But this is ignored in the template, which displays the "Revert" button regardless
    <form action="{xen:link edit-history/revert, $history}" method="post" class="sectionFooter">
        <label><input type="checkbox" name="_xfConfirm" value="1" /> {xen:phrase confirm_revert}</label>
        <input type="submit" class="button" value="{xen:phrase revert_to_this_version}" />
        <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
A <xen:if is="{canRevert}"> looks needed :)
Last edited: