Merge "Category: Remove "todo" comment about moving code from CategoryPage"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 12 Apr 2019 23:44:51 +0000 (23:44 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 12 Apr 2019 23:44:51 +0000 (23:44 +0000)
1  2 
includes/Category.php

diff --combined includes/Category.php
@@@ -25,8 -25,6 +25,6 @@@
   * Category objects are immutable, strictly speaking. If you call methods that change the database,
   * like to refresh link counts, the objects will be appropriately reinitialized.
   * Member variables are lazy-initialized.
-  *
-  * @todo Move some stuff from CategoryPage.php to here, and use that.
   */
  class Category {
        /** Name of the category, normalized to DB-key form */
        /**
         * Generic accessor
         * @param string $key
 -       * @return bool
 +       * @return mixed
         */
        private function getX( $key ) {
 -              if ( !$this->initialize( self::LAZY_INIT_ROW ) ) {
 +              if ( $this->{$key} === null && !$this->initialize( self::LAZY_INIT_ROW ) ) {
                        return false;
                }
                return $this->{$key};