|
@@ 957-961 (lines=5) @@
|
| 954 |
|
* @return string Content model id |
| 955 |
|
*/ |
| 956 |
|
public function getContentModel( $flags = 0 ) { |
| 957 |
|
if ( !$this->mContentModel && $this->getArticleID( $flags ) ) { |
| 958 |
|
$linkCache = LinkCache::singleton(); |
| 959 |
|
$linkCache->addLinkObj( $this ); # in case we already had an article ID |
| 960 |
|
$this->mContentModel = $linkCache->getGoodLinkFieldObj( $this, 'model' ); |
| 961 |
|
} |
| 962 |
|
|
| 963 |
|
if ( !$this->mContentModel ) { |
| 964 |
|
$this->mContentModel = ContentHandler::getDefaultModelFor( $this ); |
|
@@ 4603-4607 (lines=5) @@
|
| 4600 |
|
|
| 4601 |
|
// check, if the page language could be saved in the database, and if so and |
| 4602 |
|
// the value is not requested already, lookup the page language using LinkCache |
| 4603 |
|
if ( $wgPageLanguageUseDB && $this->mDbPageLanguage === false ) { |
| 4604 |
|
$linkCache = LinkCache::singleton(); |
| 4605 |
|
$linkCache->addLinkObj( $this ); |
| 4606 |
|
$this->mDbPageLanguage = $linkCache->getGoodLinkFieldObj( $this, 'lang' ); |
| 4607 |
|
} |
| 4608 |
|
|
| 4609 |
|
return $this->mDbPageLanguage; |
| 4610 |
|
} |