From abdcc39f43938df72d22c688c8e8f7d92b47e018 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 12 Oct 2008 18:27:32 +0200 Subject: Changed html_recent() to use Doku_Form, FS#135 html_recent() uses Doku_Form now, this makes it possible that action-plugins can customize the recent changes view as suggested in FS#135. darcs-hash:20081012162732-074e0-ed776be1229177c5a8bd31540002afb2da9b3d31.gz --- inc/html.php | 112 ++++++++++++++++++++++++++++++++----------------------- inc/template.php | 4 ++ 2 files changed, 70 insertions(+), 46 deletions(-) diff --git a/inc/html.php b/inc/html.php index 73e47bf2b..b9c6138b2 100644 --- a/inc/html.php +++ b/inc/html.php @@ -546,68 +546,88 @@ function html_recent($first=0){ if (getNS($ID) != '') print '

' . sprintf($lang['recent_global'], getNS($ID), wl('', 'do=recent')) . '

'; - print ''; + $form->addElement(form_makeCloseTag('ul')); - print ''; + $form->addElement(form_makeCloseTag('div')); + html_form('recent', $form); } /** diff --git a/inc/template.php b/inc/template.php index 0b6e245ac..1385c7547 100644 --- a/inc/template.php +++ b/inc/template.php @@ -88,6 +88,10 @@ function tpl_content_core(){ html_diff(); break; case 'recent': + if (is_array($_REQUEST['first'])) { + $_REQUEST['first'] = array_keys($_REQUEST['first']); + $_REQUEST['first'] = $_REQUEST['first'][0]; + } $first = is_numeric($_REQUEST['first']) ? intval($_REQUEST['first']) : 0; html_recent($first); break; -- cgit v1.2.3