summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bit_setup_inc.php2
-rw-r--r--modules/mod_global_search.php7
-rw-r--r--refresh_functions.php16
3 files changed, 13 insertions, 12 deletions
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index 8205410..3328f90 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -3,7 +3,7 @@ global $gBitSystem;
$gBitSystem->registerPackage( 'search', dirname( __FILE__).'/' );
if( $gBitSystem->isPackageActive( 'search' ) ) {
- $gBitSystem->registerAppMenu( 'search', 'Search', SEARCH_PKG_URL.'index.php', '', 'search');
+ $gBitSystem->registerAppMenu( SEARCH_PKG_DIR, 'Search', SEARCH_PKG_URL.'index.php', '', 'search');
// Stuff found in kernel that is wiki dependent - wolff_borg
// ********** SEARCH ************
diff --git a/modules/mod_global_search.php b/modules/mod_global_search.php
index 47c8ca3..cf6e931 100644
--- a/modules/mod_global_search.php
+++ b/modules/mod_global_search.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_search/modules/mod_global_search.php,v 1.2 2005/11/22 07:27:44 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_search/modules/mod_global_search.php,v 1.3 2005/12/18 22:31:56 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,12 +8,13 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: mod_global_search.php,v 1.2 2005/11/22 07:27:44 squareing Exp $
+ * $Id: mod_global_search.php,v 1.3 2005/12/18 22:31:56 squareing Exp $
* @author Luis Argerich (lrargerich@yahoo.com)
* @package search
* @subpackage modules
*/
-vd($gLibertySystem->mContentTypes);
+global $gLibertySystem;
+//vd($gLibertySystem->mContentTypes);
foreach( $gLibertySystem->mContentTypes as $cType ) {
$contentTypes[$cType['content_type_guid']] = $cType['content_description'];
}
diff --git a/refresh_functions.php b/refresh_functions.php
index 4a1b3a1..7a652b7 100644
--- a/refresh_functions.php
+++ b/refresh_functions.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_search/refresh_functions.php,v 1.6 2005/11/22 07:27:43 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_search/refresh_functions.php,v 1.7 2005/12/18 22:31:56 squareing Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: refresh_functions.php,v 1.6 2005/11/22 07:27:43 squareing Exp $
+ * $Id: refresh_functions.php,v 1.7 2005/12/18 22:31:56 squareing Exp $
* @author Luis Argerich (lrargerich@yahoo.com)
* @package search
* @subpackage functions
@@ -27,7 +27,7 @@ function random_refresh_index_comments() {
$query="select tcm.*,tc.`title`,tc.`data` from `".BIT_DB_PREFIX."tiki_comments` tcm INNER JOIN `".BIT_DB_PREFIX."tiki_content` tc ON(tcm.`content_id`=tc.`content_id` )";
$result=$gBitSystem->mDb->query($query,array(),1,rand(0,$cant-1));
$res=$result->fetchRow();
- $words=&search_index($res["title"]." ".$res["data"]);
+ $words=search_index($res["title"]." ".$res["data"]);
insert_index($words, BITCOMMENT_CONTENT_TYPE_GUID, $res["comment_id"]);
}
}
@@ -57,7 +57,7 @@ function refresh_index_wiki( $pContentId ) {
if( $indexPage->load() ) {
$pdata = $indexPage->parseData();
$pdata.=" ".$indexPage->parseData( $indexPage->mInfo["description"] );
- $words=&search_index( $pdata );
+ $words=search_index( $pdata );
insert_index( $words, BITPAGE_CONTENT_TYPE_GUID, $pContentId );
}
}
@@ -71,7 +71,7 @@ function refresh_index_content( $pContentId ) {
if( $indexPage->load() ) {
$pdata = $indexPage->parseData();
$pdata.=" ".$indexPage->parseData( $indexPage->mInfo["description"] );
- $words=&search_index( $pdata );
+ $words=search_index( $pdata );
insert_index( $words, BITPAGE_CONTENT_TYPE_GUID, $pContentId );
}
}
@@ -87,7 +87,7 @@ function random_refresh_index_blogs() {
$query="select tb.*, uu.`login` as `user`, uu.`real_name` from `".BIT_DB_PREFIX."tiki_blogs` tb, `".BIT_DB_PREFIX."users_users` uu WHERE uu.`user_id` = tb.`user_id`";
$result=$gBitSystem->mDb->query($query,array(),1,rand(0,$cant-1));
$res=$result->fetchRow();
- $words=&search_index($res["title"]." ".$res["user"]." ".$res["description"]);
+ $words=search_index($res["title"]." ".$res["user"]." ".$res["description"]);
insert_index($words, BITBLOG_CONTENT_TYPE_GUID, $res["blog_id"]);
}
}
@@ -105,7 +105,7 @@ function random_refresh_index_blog_posts() {
WHERE tbp.`content_id`=tc.`content_id` AND uu.`user_id` = tc.`user_id`";
$result=$gBitSystem->mDb->query($query,array(),1,rand(0,$cant-1));
$res=$result->fetchRow();
- $words=&search_index($res["title"]." ".$res["user"]." ".$res["data"]);
+ $words=search_index($res["title"]." ".$res["user"]." ".$res["data"]);
insert_index($words, BITBLOGPOST_CONTENT_TYPE_GUID, $res["content_id"]);
}
}
@@ -121,7 +121,7 @@ function random_refresh_index_articles() {
$query="select * from `".BIT_DB_PREFIX."tiki_articles`";
$result=$gBitSystem->mDb->query($query,array(),1,rand(0,$cant-1));
$res=$result->fetchRow();
- $words=&search_index($res["title"]." ".$res["author_name"]." ".$res["heading"]." ".$res["body"]." ".$res["author"]);
+ $words=search_index($res["title"]." ".$res["author_name"]." ".$res["heading"]." ".$res["body"]." ".$res["author"]);
insert_index($words,'article',$res["article_id"]);
}
}