diff options
Diffstat (limited to 'inc/template.php')
-rw-r--r-- | inc/template.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/template.php b/inc/template.php index ea35f4526..e1b253f96 100644 --- a/inc/template.php +++ b/inc/template.php @@ -528,6 +528,11 @@ function tpl_button($type,$return=false){ $out .= html_btn('admin',$ID,'',array('do' => 'admin')); } break; + case 'revert': + if($INFO['ismanager'] && $REV && $INFO['writable'] && actionOK('revert')){ + $out .= html_btn('revert',$ID,'',array('do' => 'revert', 'rev' => $REV, 'sectok' => getSecurityToken())); + } + break; case 'subscribe': case 'subscription': if($conf['useacl'] && $auth && $ACT == 'show' && $conf['subscribers'] == 1){ @@ -692,6 +697,13 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ 'class="action admin" rel="nofollow"',1); } break; + case 'revert': + if($INFO['ismanager'] && $REV && $INFO['writable'] && actionOK('revert')){ + $out .= tpl_link(wl($ID,array('do' => 'revert', 'rev' => $REV, 'sectok' => getSecurityToken())), + $pre.(($inner)?$inner:$lang['btn_revert']).$suf, + 'class="action revert" rel="nofollow"',1); + } + break; case 'subscribe': case 'subscription': if($conf['useacl'] && $auth && $ACT == 'show' && $conf['subscribers'] == 1){ @@ -1279,6 +1291,9 @@ function tpl_actiondropdown($empty='',$button='>'){ } echo '<option value="revisions">'.$lang['btn_revs'].'</option>'; + if($INFO['ismanager'] && $REV && $INFO['writable'] && actionOK('revert')){ + echo '<option value="revert">'.$lang['btn_revert'].'</option>'; + } echo '<option value="backlink">'.$lang['btn_backlink'].'</option>'; echo '</optgroup>'; |