Don't cache category pages if 'from' or 'until' is being used.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 9 Oct 2007 19:15:35 +0000 (19:15 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 9 Oct 2007 19:15:35 +0000 (19:15 +0000)
RELEASE-NOTES
includes/CategoryPage.php

index f5fd42c..5a51f4e 100644 (file)
@@ -91,6 +91,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   some browsers.
 * (bug 11574) Add an interface message loginstart, which, similarly to loginend,
   appears just before the login form. Patch by MinuteElectron.
+* Do not cache category pages if using 'from' or 'until'
+
 
 === API changes in 1.12 ===
 
index 76a388a..656d316 100644 (file)
@@ -37,6 +37,19 @@ class CategoryPage extends Article {
                }
        }
 
+       /**
+        * This page should not be cached if 'from' or 'until' has been used
+        * @return bool
+        */
+       function isFileCacheable() {
+               global $wgRequest;
+
+               return ( ! Article::isFileCacheable()
+                               || $wgRequest->getVal( 'from' )
+                               || $wgRequest->getVal( 'until' )
+               ) ? false : true;
+       }
+
        function openShowCategory() {
                # For overloading
        }
@@ -410,7 +423,7 @@ class CategoryViewer {
         * @private
         */
        function pagingLinks( $title, $first, $last, $limit, $query = array() ) {
-               global $wgUser, $wgLang;
+               global $wgLang;
                $sk = $this->getSkin();
                $limitText = $wgLang->formatNum( $limit );