- Minor fix in multigroup. Remove unused argument $form_id from invocation to worker functions in hook_form_alter().
- #545942 warning: array_filter() [function.array-filter]: The first argument should be an array in userreference_update_6002().
- #521002 Fix validation errors when using optgroups in allowed values for select elements.
+- #550252 by GuyPaddock - content_db_index_exists produces SQL errors when creating node reference fields for MySQL 4 (related to #231453).
Changes:
- #421116 Move content.js to js/content.admin.js for consistency with location of new js files.
*
* @todo: May we remove this funcion when implemented by Drupal core itself?
* @link http://drupal.org/node/360854
+ * @link http://dev.mysql.com/doc/refman/5.0/en/extended-show.html
*
* @param $table
* Name of the table.
function content_db_index_exists($table, $name) {
global $db_type;
if ($db_type == 'mysql' || $db_type == 'mysqli') {
+ if (version_compare(db_version(), '5.0.3') < 0) {
+ // Earlier versions of MySQL don't support a WHERE clause for SHOW.
+ $result = db_query('SHOW INDEX FROM {'. $table .'}');
+ while ($row = db_fetch_array($result)) {
+ if ($row['Key_name'] == $name) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+ }
return (bool)db_result(db_query("SHOW INDEX FROM {". $table ."} WHERE key_name = '$name'"));
}
elseif ($db_type == 'pgsql') {