* Safe for calls on local wikis are:
* - Option getters:
* - getGroup()
- * - getPosition()
* - getPages()
* - Basic methods that strictly involve the foreign database
* - getDB()
* - getTitleInfo()
*/
class ResourceLoaderWikiModule extends ResourceLoaderModule {
- /** @var string Position on the page to load this module at */
- protected $position = 'bottom';
// Origin defaults to users with sitewide authority
protected $origin = self::ORIGIN_USER_SITEWIDE;
foreach ( $options as $member => $option ) {
switch ( $member ) {
- case 'position':
case 'styles':
case 'scripts':
case 'group':
return null;
}
- $revision = Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
+ $revision = Revision::newKnownCurrent( wfGetDB( DB_REPLICA ), $title->getArticleID(),
+ $title->getLatestRevID() );
if ( !$revision ) {
return null;
}
-
+ $revision->setTitle( $title );
$content = $revision->getContent( Revision::RAW );
if ( !$content ) {
}
}
- /**
- * @return string
- */
- public function getPosition() {
- return $this->position;
- }
-
/**
* @since 1.28
* @return string