Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'Order by name desc' not applied
#1
Hey,

Issue: I am trying to change the default behavior of the file sorting that takes place when you click on the "name" header of the folder content table. It sorts in ascending order by default.
I followed the code trail and traced the sorting back to :
Code:
Core/inc.ClassFolder.php

I changed the getDocuments() function from:
PHP Code:
if (!isset($this->_documents)) {
            if (
$orderby=="n"$queryStr "SELECT * FROM tblDocuments WHERE folder = " $this->_id " ORDER BY name"
to:
PHP Code:
if (!isset($this->_documents)) {
            if (
$orderby=="n"$queryStr "SELECT * FROM tblDocuments WHERE folder = " $this->_id " ORDER BY name desc"

Still, when I try to sort in descending order by clicking on "Name", there is no change (still sorts in ascending order).

I even renamed the inc.ClassFolder.php and I didn't get any errors.
Is the Core folder relevant at all? I need to customize bits of letoDMS.

LetoDMS Version : 3.0RC2
PHP version : 5.3.5
MYSQL Version : 5.1
Server : Ubuntu 10.10 server (64-bit)

Thanks.
Reply
#2
Hey again,
(03-21-2011, 05:21 PM)max Wrote: Still, when I try to sort in descending order by clicking on "Name", there is no change (still sorts in ascending order).

I even renamed the inc.ClassFolder.php and I didn't get any errors.
Is the Core folder relevant at all? I need to customize bits of letoDMS.

I solved the problem, the problem was that, my $_AdoDB path in the conf.settings.php was pointing to the old letoDMS installation directory. I corrected it and it worked as expected.
When I removed the "Core" directory I got errors but when I was changing only the "inc.ClassFolder.php" no errors; it was using the "inc.ClassFolder.php" of the old installation even when the $_coreDir was set correctly.

Can anyone explain how this works?

Regards,
Max
Reply


Forum Jump:


Users browsing this thread: