From 523bf91b365a5388904b49efae0966f3e8f9854d Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 7 Aug 2002 13:03:05 +0000 Subject: [PATCH] Insert any new fields required by auth plugins git-svn-id: file:///svn/phpbb/trunk@2840 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_board.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index 8b33955ef8..bb4061ba1f 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -544,13 +544,28 @@ switch ( $mode ) $method = 'admin_' . $method; if ( function_exists($method) ) { - $method($new); + if ( $config_fields = $method($new) ) + { + // + // Check if we need to create config fields for this plugin + // + foreach( $config_fields as $field ) + { + if ( !isset($board_config[$field]) ) + { + $sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) + VALUES ('$field', '')"; + $db->sql_query($sql); + } + } + } + + unset($config_fields); } } } break; - } ?>