Project

General

Profile

Bug #1343 » 1343.patch

comprofiler.php - krileon, 09 February 2010 15:57

View differences:

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 = '';
(1-1/2)