summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2006-02-08 08:24:21 +0000
committerLester Caine <lester@lsces.co.uk>2006-02-08 08:24:21 +0000
commitafa0807ee31d9e7a9c3f615bf80a5c5b20176e2f (patch)
treeab8eead67d7f3abab45cd1286aaf92a321148600 /modules
parent437f22fb08e220ceaf872d6ae0f98404ff1b2567 (diff)
downloadsearch-afa0807ee31d9e7a9c3f615bf80a5c5b20176e2f.tar.gz
search-afa0807ee31d9e7a9c3f615bf80a5c5b20176e2f.tar.bz2
search-afa0807ee31d9e7a9c3f615bf80a5c5b20176e2f.zip
Merge from R1, de-tiki, R2 updates and checked against HEAD
Diffstat (limited to 'modules')
-rw-r--r--modules/mod_package_search.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/modules/mod_package_search.php b/modules/mod_package_search.php
index 5daaa57..44025d6 100644
--- a/modules/mod_package_search.php
+++ b/modules/mod_package_search.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_search/modules/mod_package_search.php,v 1.3 2005/08/01 18:41:24 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_search/modules/mod_package_search.php,v 1.4 2006/02/08 08:24:21 lsces 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: mod_package_search.php,v 1.3 2005/08/01 18:41:24 squareing Exp $
+ * $Id: mod_package_search.php,v 1.4 2006/02/08 08:24:21 lsces Exp $
* @author Luis Argerich (lrargerich@yahoo.com)
* @package search
* @subpackage modules
@@ -16,6 +16,8 @@
$tplName = strtolower( ACTIVE_PACKAGE ).'_mini_search.tpl';
$searchTemplatePath = BIT_ROOT_URL.constant( strtoupper( ACTIVE_PACKAGE ).'_PKG_PATH' ).'templates/'.$tplName;
+
+ global $gLibertySystem;
if( file_exists( $searchTemplatePath ) ) {
$searchTemplateRsrc = 'bitpackage:'.strtolower( ACTIVE_PACKAGE ).'/'.$tplName;
@@ -24,6 +26,24 @@
$searchTemplateRsrc = 'bitpackage:search/global_mini_search.tpl';
$searchTitle = '';
}
+ foreach( $gLibertySystem->mContentTypes as $contentType ) {
+ switch ($contentType["content_type_guid"]) {
+ case "bitarticle" : $perm = "bit_p_read_article"; break;
+ case "bitpage" : $perm = "bit_p_view"; break;
+ case "bitblogpost" : $perm = "bit_p_read_blog"; break;
+ case "bitcomment" : $perm = "bit_p_read_comments"; break;
+ case "fisheyegallery" : $perm = "bit_p_view_fisheye"; break;
+ default : $perm = ""; break;
+ }
+ $show = false;
+ if (!empty($perm) and $gBitUser->hasPermission($perm)) {
+ $contentTypes[] = $contentType["content_type_guid"];
+ $contentDescriptions[] = $contentType["content_description"];
+ }
+ }
+ $gBitSmarty->assign( 'contentTypes', $contentTypes );
+ $gBitSmarty->assign( 'contentDescriptions', $contentDescriptions );
+
$gBitSmarty->assign( 'searchTitle', $searchTitle );
$gBitSmarty->assign( 'miniSearchRsrc', $searchTemplateRsrc );
?>