Project

General

Profile

Bug #2348 ยป 2348.patch

krileon, 27 April 2011 21:55

View differences:

components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
$maxValIn = (int) cbGetParam( $postdata, $maxNam, 0 );
if ( ( $maxValIn && ( $maxValIn <= $yMaxMax ) ) && ( $minValIn && ( $minValIn > $yMinMin ) ) ) {
$yMin = $y - $maxValIn -1; // yes, crossed: the more years back, the smaller the date... add 1 year for searches from 24 to 24 (INCLUDED)
$minVal = sprintf( '%04d-%02d-%02d', $yMin, $c, $d );
$yMax = $y - $minValIn;
$maxVal = sprintf( '%04d-%02d-%02d', $yMax, $c, $d );
} else {
$minVal = null;
$maxVal = null;
}
if ( ( $minValIn && ( $minValIn >= $yMinMin ) ) && ( $maxValIn && ( $maxValIn < $yMaxMax ) ) ) {
$yMax = $y - $minValIn;
$maxVal = sprintf( '%04d-%02d-%02d', $yMax, $c, $d );
$yMin = $y - $maxValIn -1; // yes, crossed: the more years back, the smaller the date... add 1 year for searches from 24 to 24 (INCLUDED)
$minVal = sprintf( '%04d-%02d-%02d', $yMin, $c, $d );
} else {
$maxVal = null;
$minVal = null;
}
} else {
$minVal = $this->_displayDateToSql( stripslashes( cbGetParam( $postdata, $minNam ) ) );
    (1-1/1)