From 75e487e9d106f5e0a60b5b66552c332c79637442 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Fri, 14 Jul 2006 11:30:28 +0200
Subject: [PATCH] fix for old revision button and action disabling

darcs-hash:20060714093028-7ad00-6d5a07d8bb7a21e315ee52da237085321be1a7a9.gz
---
 inc/template.php | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/inc/template.php b/inc/template.php
index ed887d216..faf38a642 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -298,7 +298,10 @@ function tpl_button($type){
   global $conf;
   global $auth;
 
-  if(!actionOK($type)) return;
+  // check disabled actions and fix the badly named ones
+  $ctype = $type;
+  if($type == 'history') $ctype='revisions';
+  if(!actionOK($ctype)) return;
 
   switch($type){
     case 'edit':
@@ -408,7 +411,10 @@ function tpl_actionlink($type,$pre='',$suf=''){
   global $lang;
   global $auth;
 
-  if(!actionOK($type)) return;
+  // check disabled actions and fix the badly named ones
+  $ctype = $type;
+  if($type == 'history') $ctype='revisions';
+  if(!actionOK($ctype)) return;
 
   switch($type){
     case 'edit':
-- 
GitLab