Insert any new fields required by auth plugins

git-svn-id: file:///svn/phpbb/trunk@2840 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2002-08-07 13:03:05 +00:00
parent 2b0b8993e7
commit 523bf91b36

View file

@ -544,13 +544,28 @@ switch ( $mode )
$method = 'admin_' . $method; $method = 'admin_' . $method;
if ( function_exists($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; break;
} }
?> ?>