[Spam 6.54] Re: [bbDev] [1545] trunk/bb-settings.php: Proposal to allow customisation of all db tables.

Michael D Adams mikea at turbonet.com
Thu May 22 10:26:10 GMT 2008


1:
>> 	$bb->custom_tables = array(
>> 		'usermeta' => array('user', 'wp_usermeta'),
>> 		'users' => array('user', 'wp_users'),
>> 	);

2:
> 	$bb->custom_tables = array(
> 		'users'    => array(
> 			'database' => 'user',
> 			'table'    => 'wp_users'
> 		),
> 		'usermeta' => array(
> 			'database' => 'user',
> 			'table'    => 'wp_usermeta'
> 		)
> 	);

1 Looks a lot cleaner than 2.  Reminiscent of a PHP-style callback:  
string for function; array for class/object, method.

Do we gain any needed flexibility by using an associative array (2)?   
If not, 1 makes more sense to me.

Also, I don't have a problem with keeping the current user DB and  
custom table constants in for 1.0.  Were you proposing to take them  
out?  *Very* few people will ever need that level of DB control for  
anything other than the user tables, whereas custom user DB settings  
are much more likely and should be kept nice and straightforward.

Mike


More information about the bbDev mailing list