From e83cef14d812e85c06dc19b51fe3bc6d5d61b5e5 Mon Sep 17 00:00:00 2001
From: Gina Haeussge <osd@foosel.net>
Date: Sat, 11 Oct 2008 14:15:39 +0200
Subject: Adjust behaviour of Recent Changes to mirror behaviour of Index

Like the index, recent changes are now displayed only for the current namespace.
For convenience, a link to the recent changes of the whole wiki is included in the listing.

darcs-hash:20081011121539-2b4f5-a98e96550bdc4f28b401139def051b5a6beb56a6.gz
---
 inc/html.php         | 4 ++++
 inc/lang/en/lang.php | 1 +
 inc/template.php     | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

(limited to 'inc')

diff --git a/inc/html.php b/inc/html.php
index e7525ae2d..9802f9ad9 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -540,6 +540,10 @@ function html_recent($first=0){
   }
 
   print p_locale_xhtml('recent');
+
+  if (getNS($ID) != '')
+    print '<div class="level1"><p>' . sprintf($lang['recent_global'], wl('', 'do=recent')) . '</p></div>';
+
   print '<ul>';
 
   foreach($recents as $recent){
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index fbbc7eb2e..543b51025 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -244,5 +244,6 @@ $lang['mu_authfail']  = 'session expired';
 $lang['mu_progress']  = '@PCT@% uploaded';
 $lang['mu_filetypes'] = 'Allowed Filetypes';
 
+$lang['recent_global'] = 'To view the recent changes of the whole wiki, please <a href="%s">click here</a>.';
 
 //Setup VIM: ex: et ts=2 enc=utf-8 :
diff --git a/inc/template.php b/inc/template.php
index 0b37734d8..f184b5cb3 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -487,7 +487,7 @@ function tpl_button($type){
       print html_btn('revs',$ID,'o',array('do' => 'revisions'));
       return true;
     case 'recent':
-      print html_btn('recent','','r',array('do' => 'recent'));
+      print html_btn('recent',$ID,'r',array('do' => 'recent'));
       return true;
     case 'index':
       print html_btn('index',$ID,'x',array('do' => 'index'));
-- 
cgit v1.2.3