[Vtigercrm-developers] Make all fields sortby
Brian Laughlin
brian at pr2k.com
Tue Dec 18 12:27:32 PST 2007
simple fix to make every column sort able in every listview.
/include/utils/ListViewUtils.php --> Makes every column sortable in
every list view
Line 40 - added
// cw make all fields sortable on every list view
include_once('cw_utility.php');
$focus->sortby_fields = cwSortFields();
Function contained in cw_utility.php could be added inline - in which
case just change the include to
require_once('include/database/PearDatabase.php');
function cwSortFields() {
$sortby_fields = Array();
$query_fields = 'SELECT DISTINCT columnname FROM vtiger_field ORDER BY
columnname';
$result_fields = mysql_query($query_fields);
$fieldcnt = 0;
while($row_fields = mysql_fetch_array($result_fields)) {
$sortby_fields[$fieldcnt] = $row_fields["columnname"];
$fieldcnt = $fieldcnt + 1;
}
return $sortby_fields;
} // function end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20071218/2dcf263a/attachment-0003.html
More information about the vtigercrm-developers
mailing list