View Single Post
  #1 (permalink)  
Old 07-19-2008, 10:10 PM
davemackey's Avatar
davemackey davemackey is offline
Pligg Donor
 
Join Date: Aug 2007
Location: Langhorne, PA
Posts: 286
Thanks: 33
Thanked 18 Times in 14 Posts
Order By Search/Tags?

I noticed that when one performs a search or clicks on a tag, the results are automatically sorted oldest to newest. I want this to be the reverse. So I opened up libs/search.php and found this code:
PHP Code:
if(isset($this->orderBy)){
            if(
strpos($this->orderBy"RDER BY") != 1){
                
$this->orderBy "ORDER BY " $this->orderBy;
            }
        } 
I then added an else clause like this:
PHP Code:
        if(isset($this->orderBy)){
            if(
strpos($this->orderBy"RDER BY") != 1){
                
$this->orderBy "ORDER BY " $this->orderBy;
            }
        }else{
            
// Add a default order by clause, newest to oldest.
                
$this->orderBy "ORDER BY link_published_date DESC";
        } 
But it still sorts oldest to newest. Any ideas why this clause isn't taking effect?
David.
Reply With Quote