Bug #1343 » 1343.patch
components/com_comprofiler/comprofiler.php | ||
---|---|---|
// build SQL Select query:
|
||
|
||
if( $row->sortfields != '' ) {
|
||
if ( preg_match( '!^(?:(RAND\(\))\s(ASC|DESC))$!', $row->sortfields, $matches ) ) {
|
||
$random = (int) cbGetParam( $_GET, 'rand', 0 );
|
||
|
||
if ( ! $random ) {
|
||
$random = rand( 0, 9999 );
|
||
}
|
||
|
||
$row->sortfields = 'RAND(' . $random . ') ' . $matches[2];
|
||
}
|
||
|
||
$orderby = "\n ORDER BY " . $row->sortfields;
|
||
}
|
||
$filterby = '';
|