diff options
| author | Nick Palmer <nick@sluggardy.net> | 2008-10-18 23:11:07 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2008-10-18 23:11:07 +0000 |
| commit | 6b3126d694a6207a6e1dd8e489fef09556bc2256 (patch) | |
| tree | 5b732d15d2a5034e95ae5dd4a9702f017b946c6f /admin | |
| parent | 2427dd9a85f93b83fc66f12b8c53681275800ac9 (diff) | |
| download | pigeonholes-6b3126d694a6207a6e1dd8e489fef09556bc2256.tar.gz pigeonholes-6b3126d694a6207a6e1dd8e489fef09556bc2256.tar.bz2 pigeonholes-6b3126d694a6207a6e1dd8e489fef09556bc2256.zip | |
Allow admins to set which content they want to be pigeonholeable.pre_update_permission
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/admin_pigeonholes_inc.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/admin/admin_pigeonholes_inc.php b/admin/admin_pigeonholes_inc.php index aa169f3..ac0c9b5 100644 --- a/admin/admin_pigeonholes_inc.php +++ b/admin/admin_pigeonholes_inc.php @@ -1,5 +1,5 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_pigeonholes/admin/admin_pigeonholes_inc.php,v 1.21 2007/11/01 23:30:53 squareing Exp $ +// $Header: /cvsroot/bitweaver/_bit_pigeonholes/admin/admin_pigeonholes_inc.php,v 1.22 2008/10/18 23:11:07 nickpalmer Exp $ $pigeonholeDisplaySettings = array( 'pigeonholes_display_path' => array( @@ -90,6 +90,14 @@ $gBitSmarty->assign( 'memberLimit', $memberLimit ); // various image sizes $gBitSmarty->assign( 'imageSizes', get_image_size_options() ); +// Which kinds of content? +$exclude = array( 'tikisticky', 'pigeonholes' ); +foreach( $gLibertySystem->mContentTypes as $cType ) { + if( !in_array( $cType['content_type_guid'], $exclude ) ) { + $formPigeonholeable['guids']['pigeonhole_no_'.$cType['content_type_guid']] = $cType['content_description']; + } +} + if( !empty( $_REQUEST['pigeonhole_settings'] ) ) { $pigeonholeSettings = array_merge( $pigeonholeDisplaySettings, $pigeonholeListSettings, $pigeonholeEditSettings, $pigeonholeContentEditSettings ); foreach( array_keys( $pigeonholeSettings ) as $item ) { @@ -101,5 +109,20 @@ if( !empty( $_REQUEST['pigeonhole_settings'] ) ) { simple_set_int( 'pigeonholes_scrolling_list_number', PIGEONHOLES_PKG_NAME ); simple_set_value( 'pigeonholes_member_thumb', PIGEONHOLES_PKG_NAME ); simple_set_value( 'pigeonholes_list_style', PIGEONHOLES_PKG_NAME ); + + foreach( array_keys( $formPigeonholeable['guids'] ) as $holeable ) { + $gBitSystem->storeConfig( $holeable, ( ( !empty( $_REQUEST['pigeonholeable_content'] ) && in_array( $holeable, $_REQUEST['pigeonholeable_content'] ) ) ? NULL : 'y' ), PIGEONHOLES_PKG_NAME ); + } + } + +// check the correct packages in the package selection +foreach( $gLibertySystem->mContentTypes as $cType ) { + if( !$gBitSystem->isFeatureActive( 'pigeonhole_no_'.$cType['content_type_guid'] ) ) { + $formPigeonholeable['checked'][] = 'pigeonhole_no_'.$cType['content_type_guid']; + } +} +$gBitSmarty->assign( 'formPigeonholeable', $formPigeonholeable ); + + ?> |
