1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

news search good URLs

This commit is contained in:
secretr 2012-02-24 13:14:42 +00:00
parent 4631844846
commit dbc7ca31fc

View File

@ -2,16 +2,12 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2012 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_news.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
@ -33,7 +29,7 @@ if (isset($_GET['match']) && $_GET['match']) {
}
// basic
$return_fields = 'n.news_id, n.news_title, n.news_body, n.news_extended, n.news_allow_comments, n.news_datestamp, n.news_category, c.category_name';
$return_fields = 'n.news_id, n.news_title, n.news_sef, n.news_body, n.news_extended, n.news_allow_comments, n.news_datestamp, n.news_category, c.category_name';
$weights = array('1.2', '0.6', '0.6');
$no_results = LAN_198;
$time = time();
@ -48,7 +44,7 @@ $results = $ps['results'];
function search_news($row) {
global $con;
$res['link'] = $row['news_allow_comments'] ? "news.php?item.".$row['news_id'] : "comment.php?comment.news.".$row['news_id'];
$res['link'] = e107::getUrl()->create('news/view/item', $row);//$row['news_allow_comments'] ? "news.php?item.".$row['news_id'] : "comment.php?comment.news.".$row['news_id'];
$res['pre_title'] = $row['category_name']." | ";
$res['title'] = $row['news_title'];
$res['summary'] = $row['news_body'].' '.$row['news_extended'];