Here is the fix, just change the appropriate section in api_plugin_db_table_create function. Replace this:
Code: Select all
foreach ($data['keys'] as $key) {
if (isset($key['name'])) {
$sql .= ",\n KEY `" . $key['name'] . '` (`' . $key['columns'] . '`)';
}
}
Code: Select all
foreach ($data['keys'] as $key) {
while (list($ky, $value) = each($key)) {
//echo "Key: $ky; Value: $value<br />\n";
$sql .= ",\n KEY `" . $ky . '` (`' . $value . '`)';
}
}
Code: Select all
function <plugin_name>_setup_table () {
<snip>
$data['keys'][] = array('some_col' => 'some_col', 'another_col' => 'another_col');
<snip>
N