Index: trunk/phase3/includes/Title.php |
— | — | @@ -2775,15 +2775,6 @@ |
2776 | 2776 | } |
2777 | 2777 | |
2778 | 2778 | /** |
2779 | | - * Returns a bool to say whether the Article ID for this title has already been loaded |
2780 | | - * |
2781 | | - * @return bool |
2782 | | - */ |
2783 | | - public function isArticleIDLoaded() { |
2784 | | - return $this->mArticleID != -1; |
2785 | | - } |
2786 | | - |
2787 | | - /** |
2788 | 2779 | * Get the article ID for this Title from the link cache, |
2789 | 2780 | * adding it if necessary |
2790 | 2781 | * |
— | — | @@ -2801,8 +2792,10 @@ |
2802 | 2793 | $linkCache->clearLink( $this ); |
2803 | 2794 | $this->mArticleID = $linkCache->addLinkObj( $this ); |
2804 | 2795 | $linkCache->forUpdate( $oldUpdate ); |
2805 | | - } else if ( -1 == $this->mArticleID ) { |
2806 | | - $this->mArticleID = $linkCache->addLinkObj( $this ); |
| 2796 | + } else { |
| 2797 | + if ( -1 == $this->mArticleID ) { |
| 2798 | + $this->mArticleID = $linkCache->addLinkObj( $this ); |
| 2799 | + } |
2807 | 2800 | } |
2808 | 2801 | return $this->mArticleID; |
2809 | 2802 | } |
Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -304,11 +304,7 @@ |
305 | 305 | */ |
306 | 306 | public static function addTitleInfo( &$arr, $title, $prefix = '' ) { |
307 | 307 | $arr[$prefix . 'ns'] = intval( $title->getNamespace() ); |
308 | | - // TODO: This is a workaround for bug 28901, as the Article ID isn't always loaded |
309 | | - // Saves many DB queries, but does need cleaning up, so callers have always loaded the Article ID also |
310 | | - if ( $title->isArticleIDLoaded() ) { |
311 | | - $arr[$prefix . 'pageid'] = $title->getArticleID(); |
312 | | - } |
| 308 | + $arr[$prefix . 'pageid'] = $title->getArticleID(); |
313 | 309 | $arr[$prefix . 'title'] = $title->getPrefixedText(); |
314 | 310 | } |
315 | 311 | |