03-04-2010, 08:38 AM
Hi
I am editing the source code of opendocman to permit the posibility of saw the TreeView Sorted by category and file name, so I added some code that maybe was usefull for new versions:
On funtions.php line 141 y add:
elseif($sort_by == 'category')
{
$lquery = "SELECT d.id FROM {$GLOBALS['CONFIG']['db_prefix']}data as d INNER JOIN {$GLOBALS['CONFIG']['db_prefix']}category as c ON d.category = c.id ORDER BY c.name, d.realname, d.id $sort_order ";
}
now my TreeView is not sorted by file_id, it's sorted by category name and file name:
Spanish Example:
- Analisis
- Alta de X.
- Documento de Analisis
- Diseño
- Alta de X
- Documento de Diseño
Have a nice day.
I am editing the source code of opendocman to permit the posibility of saw the TreeView Sorted by category and file name, so I added some code that maybe was usefull for new versions:
On funtions.php line 141 y add:
elseif($sort_by == 'category')
{
$lquery = "SELECT d.id FROM {$GLOBALS['CONFIG']['db_prefix']}data as d INNER JOIN {$GLOBALS['CONFIG']['db_prefix']}category as c ON d.category = c.id ORDER BY c.name, d.realname, d.id $sort_order ";
}
now my TreeView is not sorted by file_id, it's sorted by category name and file name:
Spanish Example:
- Analisis
- Alta de X.
- Documento de Analisis
- Diseño
- Alta de X
- Documento de Diseño
Have a nice day.