english/administrator/components/com_aicontactsafe/models/attachments.php
// function to sort the files array
function to sort the files array
function to sort the files array
function sortFiles($files, $field, $order_Dir) {
		if (strtolower(trim($order_Dir)) == 'desc') {
			usort($files, create_function('$a,$b', 'if ($a->' . $field . '== $b->' . $field .') return 0; return ($a->' . $field . '> $b->' . $field .') ? -1 : 1;'));
		} else {
			usort($files, create_function('$a,$b', 'if ($a->' . $field . '== $b->' . $field .') return 0; return ($a->' . $field . '< $b->' . $field .') ? -1 : 1;'));
		}
		return $files;
	}
function sortFiles ( $ files , $ field , $ order_Dir ) { if ( strtolower ( trim ( $ order_Dir ) ) == 'desc' ) { usort ( $ files , create_function ( '$a,$b' , 'if ($a->' . $ field . '== $b->' . $ field . ') return 0; return ($a->' . $ field . '> $b->' . $ field . ') ? -1 : 1;' ) ) ; } else { usort ( $ files , create_function ( '$a,$b' , 'if ($a->' . $ field . '== $b->' . $ field . ') return 0; return ($a->' . $ field . '< $b->' . $ field . ') ? -1 : 1;' ) ) ; } return $ files ; }
function to sort the files array
function to sort the files array