mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
user and pages search good URLs
This commit is contained in:
parent
dbc7ca31fc
commit
057f7a0b0a
e107_handlers/search
@ -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_pages.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@ -23,7 +19,7 @@ if (isset($_GET['time']) && is_numeric($_GET['time'])) {
|
||||
}
|
||||
|
||||
// basic
|
||||
$return_fields = 'page_id, page_title, page_text, page_datestamp';
|
||||
$return_fields = 'page_id, page_title, page_sef, page_text, page_datestamp';
|
||||
$search_fields = array('page_title', 'page_text');
|
||||
$weights = array('1.2', '0.6');
|
||||
$no_results = LAN_198;
|
||||
@ -38,7 +34,7 @@ $results = $ps['results'];
|
||||
|
||||
function search_pages($row) {
|
||||
global $con;
|
||||
$res['link'] = "page.php?".$row['page_id'];
|
||||
$res['link'] = e107::getUrl()->create('page/view', $row, array('allow' => 'page_sef,page_title,page_id'));//"page.php?".$row['page_id'];
|
||||
$res['pre_title'] = "";
|
||||
$res['title'] = $row['page_title'];
|
||||
$res['summary'] = $row['page_text'];
|
||||
|
@ -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_user.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@ -36,7 +32,7 @@ $results = $ps['results'];
|
||||
|
||||
function search_user($row) {
|
||||
global $con;
|
||||
$res['link'] = "user.php?id.".$row['user_id'];
|
||||
$res['link'] = e107::getUrl()->create('user/profile/view', array('id' => $row['user_id'], 'name' => $row['user_name']));//"user.php?id.".$row['user_id'];
|
||||
$res['pre_title'] = $row['user_id']." | ";
|
||||
$res['title'] = $row['user_name'];
|
||||
$res['summary'] = $row['user_signature'] ? LAN_SEARCH_72.": ".$row['user_signature'] : LAN_SEARCH_73;
|
||||
|
Loading…
x
Reference in New Issue
Block a user