Changeset 807

Show
Ignore:
Timestamp:
10/10/08 21:17:54 (8 weeks ago)
Author:
aarkerio
Message:

Little changes

Location:
trunk/app
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/components/search.php

    r806 r807  
    7070      $q .= "to_tsquery('karamelo_".$this->lang."','".$t."')) AS rank FROM news, to_tsquery('karamelo_".$this->lang."','".$t."') "; 
    7171      $q .= "query WHERE to_tsquery('karamelo_".$this->lang."','".$t."') @@ to_tsvector('karamelo_".$this->lang."', body) "; 
    72       $q .= "ORDER BY rank DESC LIMIT 20) AS foo";     
     72      $q .= "ORDER BY rank DESC LIMIT 20) AS news";     
    7373     break; 
    7474   case 'Entry': 
     
    7777      $q .= "to_tsquery('karamelo_".$this->lang."','".$t."')) AS rank FROM entries, to_tsquery('karamelo_".$this->lang."','".$t."') "; 
    7878      $q .= "query WHERE to_tsquery('karamelo_".$this->lang."','".$t."') @@ to_tsvector('karamelo_".$this->lang."', body) "; 
    79       $q .= "ORDER BY rank DESC LIMIT 20) AS foo"; 
     79      $q .= "ORDER BY rank DESC LIMIT 20 ) AS entries"; 
    8080     break;               
    8181   
  • trunk/app/controllers/entries_controller.php

    r806 r807  
    7676 } 
    7777  
    78  
    7978 public function rss($username) 
    8079 { 
     
    111110       
    112111  $this->Sanitize->paranoid($this->data['Entry']['terms']); 
    113    
     112  
    114113  $this->set('data', $this->Search->getRows($this->data['Entry']['terms'])); 
    115114 } 
  • trunk/app/views/layouts/portal.ctp

    r806 r807  
    2929<div id="toplinks"> 
    3030<?php 
     31 echo $html->link(__('Home', true), '/') . ' | '; 
     32 
    3133 if ( $session->check('Auth.User') ): 
    32    echo '<span style="font-size:7pt;color:#8bb126;padding-right:15px">'.__('logged_in', true).' <b>'; 
    33  
    34    echo $session->read('Auth.User.username') .'</b></span>'.$html->link(__('Logout', true), '/users/logout') . ' | ';  
     34   echo '<span style="font-size:7pt;color:#8bb126;padding-right:3px">'.__('logged_in', true).' <b> '; 
     35   echo $session->read('Auth.User.username') .'</b></span>| '.$html->link(__('Logout', true), '/users/logout') . ' | ';  
    3536 
    3637   if ( $session->read('Auth.User.group_id') < 3 ): // the logged user is teacher or admin? 
     
    4041   if (  $session->read('Auth.User.group_id') == 3 ): // the logged user is student 
    4142     echo $html->link(__('My profile', true), '/users/edit'). ' | '; 
    42  
    4343   endif; 
    4444 
     
    5252     echo $html->link(__('Login', true), '#', array("id"=>"logindiv", "onclick"=>"javascript:mod('logindiv', 1, '')")) .  ' | '; 
    5353 endif; 
    54   
    55  echo $html->link(__('Home', true), '/') . ' | '; 
     54   
    5655 echo $html->link(__('about_college', true), '/colleges/view') . ' | '; 
    5756 echo $html->link(__('Contact', true), '/messages/contact') . ' | '; 
     
    7271   echo $this->element('menu_b'); 
    7372    
     73   // search box 
     74   $list = array('<h2 class="bg3">'.__('Search', true).'</h2>'.$this->element('search')); 
     75   echo $html->nestedList($list); 
     76 
    7477   // if student logged in, show groups 
    7578   if ( $session->check('Auth.User') && $session->read('Auth.User.group_id') == 3 && $Element['Vclassrooms'] != false): 
     
    9497         
    9598   echo $this->element('subjects');  
    96  
    97    // search 
    98    $list = array('<h2 class="bg3">'.__('Search', true).'</h2>'.$this->element('search')); 
    99    echo $html->nestedList($list); 
    10099 
    101100  $tmp  = $html->para(null,$html->link($html->image('static/valid_xhtml10_80x15_22.png'), 'http://www.w3.org/TR/xhtml1/', null, null, false));