Call method with the same name it's defined with
[lhc/web/wiklou.git] / includes / CategoryPage.php
index d7f78ec..ba71aa0 100644 (file)
@@ -21,9 +21,6 @@
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) )
-       die( 1 );
-
 /**
  * Special handling for category description pages, showing pages,
  * subcategories and file that belong to the category
@@ -43,7 +40,7 @@ class CategoryPage extends Article {
 
        /**
         * Constructor from a page id
-        * @param $id Int article ID to load
+        * @param int $id article ID to load
         * @return CategoryPage|null
         */
        public static function newFromID( $id ) {
@@ -59,7 +56,7 @@ class CategoryPage extends Article {
                $diffOnly = $request->getBool( 'diffonly',
                        $this->getContext()->getUser()->getOption( 'diffonly' ) );
 
-               if ( isset( $diff ) && $diffOnly ) {
+               if ( $diff !== null && $diffOnly ) {
                        parent::view();
                        return;
                }
@@ -109,7 +106,13 @@ class CategoryPage extends Article {
                unset( $reqArray["from"] );
                unset( $reqArray["to"] );
 
-               $viewer = new $this->mCategoryViewerClass( $this->getContext()->getTitle(), $this->getContext(), $from, $until, $reqArray );
+               $viewer = new $this->mCategoryViewerClass(
+                       $this->getContext()->getTitle(),
+                       $this->getContext(),
+                       $from,
+                       $until,
+                       $reqArray
+               );
                $this->getContext()->getOutput()->addHTML( $viewer->getHTML() );
        }
 }