Changeset 750 for trunk/app/controllers

Show
Ignore:
Timestamp:
09/02/08 21:40:55 (3 months ago)
Author:
aarkerio
Message:

backups scripts

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/entries_controller.php

    r738 r750  
    106106  $this->layout = 'portal'; 
    107107       
    108   $this->pageTitle = 'Search Results :: Karamelo E-learning on Web 2.0'; 
     108  $this->pageTitle = __('Search Results',true). ' :: Karamelo E-learning on Web 2.0'; 
    109109       
    110110  $this->Portal->statics(); // Charge Portal components aka Sidebars 
     
    112112  $this->Sanitize = new Sanitize; 
    113113       
    114   $this->Sanitize->paranoid($this->data["Entry"]["terms"]);  
    115        
    116   $this->set('data', $this->Search->getRows($this->data["Entry"]["terms"])); 
     114  $this->Sanitize->paranoid($this->data['Entry']['terms']);  
     115  $q  = 'SELECT id, title FROM entries WHERE '; 
     116  $q .= '  to_tsvector(title || body) @@ to_tsquery(\''.$this->data['Entry']['terms'].'\') '; 
     117  $q .= '  ORDER BY created DESC LIMIT 10'; 
     118      
     119  $this->set('data', $this->Search->getRows($this->data['Entry']['terms'])); 
    117120 } 
    118121