Merge "Export: Use BCP 47 language code for attribute xml:lang"
[lhc/web/wiklou.git] / includes / page / CategoryPage.php
index d493002..6d2be51 100644 (file)
@@ -43,18 +43,6 @@ class CategoryPage extends Article {
                return new WikiCategoryPage( $title );
        }
 
-       /**
-        * Constructor from a page id
-        * @param int $id Article ID to load
-        * @return CategoryPage|null
-        */
-       public static function newFromID( $id ) {
-               $t = Title::newFromID( $id );
-               # @todo FIXME: Doesn't inherit right
-               return $t == null ? null : new self( $t );
-               # return $t == null ? null : new static( $t ); // PHP 5.3
-       }
-
        function view() {
                $request = $this->getContext()->getRequest();
                $diff = $request->getVal( 'diff' );
@@ -80,6 +68,10 @@ class CategoryPage extends Article {
                if ( $title->inNamespace( NS_CATEGORY ) ) {
                        $this->closeShowCategory();
                }
+
+               # Use adaptive TTLs for CDN so delayed/failed purges are noticed less often
+               $outputPage = $this->getContext()->getOutput();
+               $outputPage->adaptCdnTTL( $this->mPage->getTouched(), IExpiringStore::TTL_MINUTE );
        }
 
        function openShowCategory() {