5175 shaares
488 private links
488 private links
i want that registered user can see DIFF button and everything, and non-registered can show only 'recent changes', so my wish is to have a DISABLEACTION function managed by a sort of ACL.
A simple way to solve this problew is it that follow.
in /incl/template.php, change:
case 'diff':
html_diff();
break;
with:
case 'diff':
if ($_SERVER['REMOTE_USER'])
{
$first = is_numeric($_REQUEST['first']) ? intval($_REQUEST['first']) : 0;
html_diff($first);
}
else
html_login();
break;
in this way, if you are a logged-in user, you can display the DIFFERENCE section, with code confront.
if you are not logged, it displays a form for login.