diff options
Diffstat (limited to 'modules/mod_package_search.php')
| -rw-r--r-- | modules/mod_package_search.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/mod_package_search.php b/modules/mod_package_search.php index 4fc3606..0a4d9e1 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.10 2006/12/31 13:01:16 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_search/modules/mod_package_search.php,v 1.11 2008/01/26 23:19:59 nickpalmer 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.10 2006/12/31 13:01:16 squareing Exp $ + * $Id: mod_package_search.php,v 1.11 2008/01/26 23:19:59 nickpalmer Exp $ * @author Luis Argerich (lrargerich@yahoo.com) * @package search * @subpackage modules @@ -30,7 +30,11 @@ if( empty( $contentTypes ) ) { $contentTypes = array( '' => tra( 'All Content' ) ); foreach( $gLibertySystem->mContentTypes as $cType ) { - $contentTypes[$cType['content_type_guid']] = $cType['content_description']; + if (SearchLib::has_permission($cType["content_type_guid"]) + and ( ! $gBitSystem->getConfig('search_restrict_types') || + $gBitSystem->getConfig('search_pkg_'.$cType["content_type_guid"]) ) ) { + $contentTypes[$cType['content_type_guid']] = $cType['content_description']; + } } } $gBitSmarty->assign( 'contentTypes', $contentTypes ); |
