https://www.mediawiki.org/wiki/Special:Code/MediaWiki/111904
Revision: 111904
Author: jeroendedauw
Date: 2012-02-20 01:21:09 +0000 (Mon, 20 Feb 2012)
Log Message:
-----------
fixed some issues with pager filters
Modified Paths:
--------------
trunk/extensions/EducationProgram/includes/EPPager.php
Modified: trunk/extensions/EducationProgram/includes/EPPager.php
===================================================================
--- trunk/extensions/EducationProgram/includes/EPPager.php 2012-02-20
01:01:53 UTC (rev 111903)
+++ trunk/extensions/EducationProgram/includes/EPPager.php 2012-02-20
01:21:09 UTC (rev 111904)
@@ -375,9 +375,7 @@
foreach ( $filterOptions as $optionName => &$optionData ) {
if ( $req->getCheck( $this->filterPrefix . $optionName
) ) {
$optionData['value'] = $req->getVal(
$this->filterPrefix . $optionName );
- $req->setSessionData( $this->getNameForSession(
$optionName ), $optionData['value'] );
- $changed = true;
-
+
if ( $cast && array_key_exists( 'datatype',
$optionData ) ) {
switch ( $optionData['datatype'] ) {
case 'int':
@@ -388,6 +386,12 @@
break;
}
}
+
+ if ( array_key_exists( $optionName, $_POST ) &&
$optionData['value'] !== '' ) {
+ $req->setSessionData(
$this->getNameForSession( $optionName ), $optionData['value'] );
+ }
+
+ $changed = true;
}
elseif ( !is_null( $req->getSessionData(
$this->getNameForSession( $optionName ) ) ) ) {
$optionData['value'] = $req->getSessionData(
$this->getNameForSession( $optionName ) );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs