Project

General

Profile

Bug #1278 » 1278.patch

krileon, 04 February 2010 18:10

View differences:

components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
list( $y, $c, $d ) = sscanf( date( 'Y-m-d' ), '%d-%d-%d' );
$minValIn = (int) cbGetParam( $postdata, $minNam, 0 );
$maxValIn = (int) cbGetParam( $postdata, $maxNam, 0 );
if ( $minValIn && ( $minValIn > $yMinMin ) ) {
if ( $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 );
} else {
$minVal = null;
}
if ( $maxValIn && ( $maxValIn < $yMaxMax ) ) {
if ( $maxValIn && ( $maxValIn <= $yMaxMax ) ) {
$yMax = $y - $minValIn;
$maxVal = sprintf( '%04d-%02d-%02d', $yMax, $c, $d );
} else {
(1-1/2)