From 65a6ecbd758c331a851ae5ac12abed135abe0334 Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Sat, 31 Mar 2007 15:54:14 +0000 Subject: rename bitboards to boards --- admin/admin_bitboards_inc.php | 44 ------------------------------------------- admin/admin_boards_inc.php | 44 +++++++++++++++++++++++++++++++++++++++++++ admin/schema_inc.php | 34 ++++++++++++++++----------------- admin/upgrade_inc.php | 2 +- 4 files changed, 62 insertions(+), 62 deletions(-) delete mode 100644 admin/admin_bitboards_inc.php create mode 100644 admin/admin_boards_inc.php (limited to 'admin') diff --git a/admin/admin_bitboards_inc.php b/admin/admin_bitboards_inc.php deleted file mode 100644 index aae59d6..0000000 --- a/admin/admin_bitboards_inc.php +++ /dev/null @@ -1,44 +0,0 @@ -storeConfig("home_bitboard", $_REQUEST["homeBitBoards"]); -// $gBitSmarty->assign('home_bitboard', $_REQUEST["homeBitBoards"]); -//} - -require_once( BITBOARDS_PKG_PATH.'BitBoard.php' ); - -$formBitBoardsLists = array( - 'bitboards_thread_track' => array( - 'label' => 'Enable Topic Status Tracking', - 'note' => 'Allow users to see what topic have been changed since they last logged on.', - ), - 'bitboards_thread_notification' => array( - 'label' => 'Enable Topic Reply Notification', - 'note' => 'Allow users to be sent emails when topics they are interested in receive replies.', - ), - 'bitboards_posts_anon_moderation' => array( - 'label' => 'Enable Forced Anon Post Moderation', - 'note' => 'Require that ALL Anonymous posts must be validated before they are shown.', - ), -); -$gBitSmarty->assign( 'formBitBoardsLists',$formBitBoardsLists ); - -$processForm = set_tab(); - -if( $processForm ) { - $bitboardToggles = array_merge( $formBitBoardsLists ); - foreach( $bitboardToggles as $item => $data ) { - simple_set_toggle( $item, BITBOARDS_PKG_NAME ); - } - -} - -$board = new BitBoard(); -$bitboards = $board->getBoardSelectList( $_REQUEST ); -$gBitSmarty->assign_by_ref(BITBOARDS_PKG_NAME, $bitboards['data']); -?> diff --git a/admin/admin_boards_inc.php b/admin/admin_boards_inc.php new file mode 100644 index 0000000..9fc2299 --- /dev/null +++ b/admin/admin_boards_inc.php @@ -0,0 +1,44 @@ +storeConfig("home_bitboard", $_REQUEST["homeBitBoards"]); +// $gBitSmarty->assign('home_bitboard', $_REQUEST["homeBitBoards"]); +//} + +require_once( BOARDS_PKG_PATH.'BitBoard.php' ); + +$formBitBoardsLists = array( + 'boards_thread_track' => array( + 'label' => 'Enable Topic Status Tracking', + 'note' => 'Allow users to see what topic have been changed since they last logged on.', + ), + 'boards_thread_notification' => array( + 'label' => 'Enable Topic Reply Notification', + 'note' => 'Allow users to be sent emails when topics they are interested in receive replies.', + ), + 'boards_posts_anon_moderation' => array( + 'label' => 'Enable Forced Anon Post Moderation', + 'note' => 'Require that ALL Anonymous posts must be validated before they are shown.', + ), +); +$gBitSmarty->assign( 'formBitBoardsLists',$formBitBoardsLists ); + +$processForm = set_tab(); + +if( $processForm ) { + $bitboardToggles = array_merge( $formBitBoardsLists ); + foreach( $bitboardToggles as $item => $data ) { + simple_set_toggle( $item, BOARDS_PKG_NAME ); + } + +} + +$board = new BitBoard(); +$boards = $board->getBoardSelectList( $_REQUEST ); +$gBitSmarty->assign_by_ref(BOARDS_PKG_NAME, $boards['data']); +?> diff --git a/admin/schema_inc.php b/admin/schema_inc.php index d036ea2..da16cd2 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -20,13 +20,13 @@ $tables = array( board_id I4 PRIMARY, content_id I4 NOTNULL, migrate_board_id INT - CONSTRAINT ', CONSTRAINT `bitboards_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`)' + CONSTRAINT ', CONSTRAINT `boards_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`)' ", 'boards_map' => " board_content_id I4 NOTNULL, topic_content_id I4 PRIMARY - CONSTRAINT ', CONSTRAINT `bitboards_topics_boards_ref` FOREIGN KEY (`board_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`) - , CONSTRAINT `bitboards_topics_related_ref` FOREIGN KEY (`topic_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`)' + CONSTRAINT ', CONSTRAINT `boards_topics_boards_ref` FOREIGN KEY (`board_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`) + , CONSTRAINT `boards_topics_related_ref` FOREIGN KEY (`topic_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` (`content_id`)' ", 'boards_tracking' => " user_id I4 NOTNULL, @@ -40,10 +40,10 @@ $tables = array( global $gBitInstaller; foreach( array_keys( $tables ) AS $tableName ) { - $gBitInstaller->registerSchemaTable( BITBOARDS_PKG_NAME, $tableName, $tables[$tableName] ); + $gBitInstaller->registerSchemaTable( BOARDS_PKG_NAME, $tableName, $tables[$tableName] ); } -$gBitInstaller->registerPackageInfo( BITBOARDS_PKG_NAME, array( +$gBitInstaller->registerPackageInfo( BOARDS_PKG_NAME, array( 'description' => "Highly integrated message boards package.", 'license' => 'LGPL', ) ); @@ -52,30 +52,30 @@ $gBitInstaller->registerPackageInfo( BITBOARDS_PKG_NAME, array( $indices = array( 'boards_id_idx' => array('table' => 'boards', 'cols' => 'board_id', 'opts' => NULL ), ); -$gBitInstaller->registerSchemaIndexes( BITBOARDS_PKG_NAME, $indices ); +$gBitInstaller->registerSchemaIndexes( BOARDS_PKG_NAME, $indices ); // ### Sequences $sequences = array ( 'boards_board_id_seq' => array( 'start' => 1 ), ); -$gBitInstaller->registerSchemaSequences( BITBOARDS_PKG_NAME, $sequences ); +$gBitInstaller->registerSchemaSequences( BOARDS_PKG_NAME, $sequences ); // ### Default UserPermissions -$gBitInstaller->registerUserPermissions( BITBOARDS_PKG_NAME, array( - array( 'p_bitboards_admin' , 'Can admin message boards' , 'admin' , BITBOARDS_PKG_NAME ), - array( 'p_bitboards_create', 'Can create a message board', 'editors', BITBOARDS_PKG_NAME ), - array( 'p_bitboards_edit' , 'Can edit any message board', 'editors', BITBOARDS_PKG_NAME ), - array( 'p_bitboards_read' , 'Can read message boards' , 'basic' , BITBOARDS_PKG_NAME ), - array( 'p_bitboards_remove', 'Can delete message boards' , 'editors', BITBOARDS_PKG_NAME ), +$gBitInstaller->registerUserPermissions( BOARDS_PKG_NAME, array( + array( 'p_boards_admin' , 'Can admin message boards' , 'admin' , BOARDS_PKG_NAME ), + array( 'p_boards_create', 'Can create a message board', 'editors', BOARDS_PKG_NAME ), + array( 'p_boards_edit' , 'Can edit any message board', 'editors', BOARDS_PKG_NAME ), + array( 'p_boards_read' , 'Can read message boards' , 'basic' , BOARDS_PKG_NAME ), + array( 'p_boards_remove', 'Can delete message boards' , 'editors', BOARDS_PKG_NAME ), ) ); // ### Default Preferences -$gBitInstaller->registerPreferences( BITBOARDS_PKG_NAME, array( - array( BITBOARDS_PKG_NAME, 'bitboards_thread_track', 'y' ), +$gBitInstaller->registerPreferences( BOARDS_PKG_NAME, array( + array( BOARDS_PKG_NAME, 'boards_thread_track', 'y' ), )); if(defined('RSS_PKG_NAME')) { - $gBitInstaller->registerPreferences( BITBOARDS_PKG_NAME, array( - array( RSS_PKG_NAME, BITBOARDS_PKG_NAME.'_rss', 'y'), + $gBitInstaller->registerPreferences( BOARDS_PKG_NAME, array( + array( RSS_PKG_NAME, BOARDS_PKG_NAME.'_rss', 'y'), )); } ?> diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php index def297d..a9aeb4b 100644 --- a/admin/upgrade_inc.php +++ b/admin/upgrade_inc.php @@ -15,7 +15,7 @@ INSERT INTO boards_map (board_content_id, topic_content_id) (SELECT content_id, */ require_once( '../../bit_setup_inc.php' ); -require_once( BITBOARDS_PKG_PATH.'admin/phpbb_upgrade.php' ); +require_once( BOARDS_PKG_PATH.'admin/phpbb_upgrade.php' ); migrate_phpbb(); -- cgit v1.3