1. 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

Discussion in 'Resolved Bug Reports' started by Rigel Kentaurus, Sep 7, 2013.

  1. Rigel Kentaurus

    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: Sep 7, 2013
  2. Mike

    Mike XenForo Developer Staff Member

    Yeah, looks like it just needs to be wrapped in the if.

Share This Page