<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=142021718-18122007><FONT face=Arial><SPAN
class=203082720-18122007><FONT color=#0000ff size=2> </FONT></SPAN>simple
fix to make every column sort able in every listview.</FONT></SPAN>
</DIV>
<DIV>
<P
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1">
<SPAN
class=142021718-18122007><FONT face=Arial></FONT></SPAN>
</P>
<P
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1">/include/utils/ListViewUtils.php
--> Makes every column sortable in every list view
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1">Line
40 - added
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1">//
cw make all fields sortable on every list view
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1">include_once('cw_utility.php');
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1">$focus->sortby_fields
= cwSortFields();
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1"><FONT
face=Arial></FONT>
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1"><FONT
face=Arial></FONT>
</P>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1"><SPAN
class=142021718-18122007><FONT face=Arial>Function contained in
cw_utility.php could be added inline - in which case just change the include to
<FONT size=1>
</P>
<P>require_once('include/database/PearDatabase.php');
</P></FONT></FONT></SPAN>
<P
style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: 'Times New Roman'; mso-outline-level: 1"><SPAN
class=142021718-18122007><FONT face=Arial></FONT></SPAN>
</P><SPAN
class=142021718-18122007><FONT size=1>
<P>function cwSortFields() {
</P>
<P>$sortby_fields = Array();
</P>
<P>$query_fields = 'SELECT DISTINCT columnname FROM vtiger_field ORDER BY
columnname';
</P>
<P>$result_fields = mysql_query($query_fields);
</P>
<P>$fieldcnt = 0;
</P>
<P>while($row_fields = mysql_fetch_array($result_fields)) {
</P>
<P>$sortby_fields[$fieldcnt] = $row_fields["columnname"];
</P>
<P>$fieldcnt = $fieldcnt + 1;
</P>
<P>}
</P>
<P>return $sortby_fields;
</P>
<P>} // function end
</P>
<P>
</P>
<P>
</P></FONT></SPAN></DIV></BODY></HTML>