}
function getQueryInfo() {
- global $wgMiserMode;
$conds = $jconds = array();
$tables = array( 'image' );
}
}
- if ( !$wgMiserMode && $this->like !== null ) {
+ if ( !$this->getConfig()->get( 'MiserMode' ) && $this->like !== null ) {
$dbr = wfGetDB( DB_SLAVE );
$likeObj = Title::newFromURL( $this->like );
if ( $likeObj instanceof Title ) {
// Note that null for mode is taken to mean use default.
$mode = $this->getRequest()->getVal( 'gallerymode', null );
try {
- $this->gallery = ImageGalleryBase::factory( $mode );
+ $this->gallery = ImageGalleryBase::factory( $mode, $this->getContext() );
} catch ( MWException $e ) {
// User specified something invalid, fallback to default.
- $this->gallery = ImageGalleryBase::factory();
+ $this->gallery = ImageGalleryBase::factory( false, $this->getContext() );
}
- $this->gallery->setContext( $this->getContext() );
}
return '';
}
function getForm() {
- global $wgMiserMode;
-
$fields = array(
'like' => array(
'type' => 'text',
),
);
- if ( $wgMiserMode ) {
+ if ( $this->getConfig()->get( 'MiserMode' ) ) {
unset( $fields['like'] );
}