From: jenkins-bot Date: Fri, 12 Apr 2019 23:44:51 +0000 (+0000) Subject: Merge "Category: Remove "todo" comment about moving code from CategoryPage" X-Git-Tag: 1.34.0-rc.0~2022 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=3a026473873ac3cc9d5c181f05961f474495d32c;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Category: Remove "todo" comment about moving code from CategoryPage" --- 3a026473873ac3cc9d5c181f05961f474495d32c diff --combined includes/Category.php index ca16536c88,9cd751e286..77f1212fcf --- a/includes/Category.php +++ b/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 */ @@@ -299,10 -297,10 +297,10 @@@ /** * 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};