- $from = ( $params['from'] === null ? null : $this->titlePartToKey( $params['from'], NS_FILE ) );
- $to = ( $params['to'] === null ? null : $this->titlePartToKey( $params['to'], NS_FILE ) );
- $this->addWhereRange( 'img_name', ( $ascendingOrder ? 'newer' : 'older' ), $from, $to );
+ $from = $params['from'] === null ? null : $this->titlePartToKey( $params['from'], NS_FILE );
+ $to = $params['to'] === null ? null : $this->titlePartToKey( $params['to'], NS_FILE );
+ $this->addWhereRange( 'img_name', $ascendingOrder ? 'newer' : 'older', $from, $to );