Title: Don't create mSubpages member variable
[lhc/web/wiklou.git] / includes / Title.php
index 2ebeb0d..0728065 100644 (file)
@@ -3172,7 +3172,7 @@ class Title implements LinkTarget {
                if ( $limit > -1 ) {
                        $options['LIMIT'] = $limit;
                }
-               $this->mSubpages = TitleArray::newFromResult(
+               return TitleArray::newFromResult(
                        $dbr->select( 'page',
                                [ 'page_id', 'page_namespace', 'page_title', 'page_is_redirect' ],
                                $conds,
@@ -3180,7 +3180,6 @@ class Title implements LinkTarget {
                                $options
                        )
                );
-               return $this->mSubpages;
        }
 
        /**
@@ -3735,8 +3734,8 @@ class Title implements LinkTarget {
         * @return array|bool True on success, getUserPermissionsErrors()-like array on failure
         */
        public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true,
-               array $changeTags = [] ) {
-
+               array $changeTags = []
+       ) {
                global $wgUser;
                $err = $this->isValidMoveOperation( $nt, $auth, $reason );
                if ( is_array( $err ) ) {
@@ -3773,8 +3772,8 @@ class Title implements LinkTarget {
         *     no pages were moved
         */
        public function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true,
-               array $changeTags = [] ) {
-
+               array $changeTags = []
+       ) {
                global $wgMaximumMovedPages;
                // Check permissions
                if ( !$this->userCan( 'move-subpages' ) ) {