/**
* Result object for the query. Warning: seek before use.
+ *
+ * @var ResultWrapper
*/
public $mResult;
* @return Associative array
*/
function getDefaultQuery() {
+ global $wgRequest;
+
if ( !isset( $this->mDefaultQuery ) ) {
- $this->mDefaultQuery = $_GET;
+ $this->mDefaultQuery = $wgRequest->getQueryValues();
unset( $this->mDefaultQuery['title'] );
unset( $this->mDefaultQuery['dir'] );
unset( $this->mDefaultQuery['offset'] );
* A navigation bar with images
*/
function getNavigationBar() {
- global $wgStylePath, $wgContLang;
+ global $wgStylePath, $wgContLang, $wgLang, $wgBetterDirectionality;
if ( !$this->isNavigationBarShown() ) {
return '';
'next' => 'arrow_disabled_right_25.png',
'last' => 'arrow_disabled_last_25.png',
);
- if( $wgContLang->isRTL() ) {
+ $isRTL = ( $wgBetterDirectionality ? $wgLang->isRTL() : $wgContLang->isRTL() );
+ if( $isRTL ) {
$keys = array_keys( $labels );
$images = array_combine( $keys, array_reverse( $images ) );
$disabledImages = array_combine( $keys, array_reverse( $disabledImages ) );
/**
* Get <input type="hidden"> elements for use in a method="get" form.
- * Resubmits all defined elements of the $_GET array, except for a
+ * Resubmits all defined elements of the query string, except for a
* blacklist, passed in the $blacklist parameter.
*
* @return String: HTML fragment
*/
function getHiddenFields( $blacklist = array() ) {
+ global $wgRequest;
+
$blacklist = (array)$blacklist;
- $query = $_GET;
+ $query = $wgRequest->getQueryValues();
foreach ( $blacklist as $name ) {
unset( $query[$name] );
}