diff --git a/ChangeLog b/ChangeLog index e8366b11c..e0faaad9b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -28,7 +28,7 @@ $Source$ (optional, default off) of the columns. I didn't like to have to scroll in horizontal directions, so with this mode you can see about 6 columns at once on a single screen. * tbl_properties.inc.php3: Fixed bug when certain fields are not - enabled, they threw an undefined offset. + enabled, they threw an undefined offset. [2nd try, now for real :)] 2003-02-26 Garvin Hicking * lang/german-*: better grammar. ;) diff --git a/tbl_properties.inc.php3 b/tbl_properties.inc.php3 index 0a148982f..641fff69c 100755 --- a/tbl_properties.inc.php3 +++ b/tbl_properties.inc.php3 @@ -80,14 +80,18 @@ for ($i = 0 ; $i < $num_fields; $i++) { } $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; + // Cell index: If certain fields get left out, the counter shouldn't chage. + $ci = 0; + if ($is_backup) { - $content_cells[$i][0] = "\n" . '' . "\n"; + $content_cells[$i][$ci] = "\n" . '' . "\n"; } else { - $content_cells[$i][0] = ''; + $content_cells[$i][$ci] = ''; } - $content_cells[$i][0] .= "\n" . ''; - $content_cells[$i][1] = ''; + $ci++; + $content_cells[$i][$ci] = ''; - + $content_cells[$i][$ci] .= ' '; + $ci++; + if ($is_backup) { - $content_cells[$i][2] = "\n" . ''; + $content_cells[$i][$ci] = "\n" . ''; } else { - $content_cells[$i][2] = ''; + $content_cells[$i][$ci] = ''; } - $content_cells[$i][2] .= "\n" . '' . "\n"; - - $content_cells[$i][3] = '' . "\n"; + $ci++; + + $content_cells[$i][$ci] = ''; - $content_cells[$i][4] = ''; + $ci++; + + $content_cells[$i][$ci] = ''; - + $content_cells[$i][$ci] .= "\n" . ''; + $ci++; + if (isset($row) && !isset($row['Default']) && !empty($row['Null'])) { $row['Default'] = 'NULL'; @@ -192,56 +201,62 @@ for ($i = 0 ; $i < $num_fields; $i++) { $content_cells[$i][5] = "\n"; } - $content_cells[$i][5] .= ''; - - $content_cells[$i][6] = ''; + $ci++; + + $content_cells[$i][$ci] = ''; + $content_cells[$i][$ci] .= "\n" . ''; + $ci++; // garvin: comments if ($cfgRelation['commwork']) { - $content_cells[$i][7] = ''; + $content_cells[$i][$ci] = ''; + $ci++; } // garvin: MIME-types if ($cfgRelation['mimework'] && $cfg['BrowseMIME'] && $cfgRelation['commwork']) { - $content_cells[$i][8] = '' . "\n"; + $content_cells[$i][$ci] .= ' ' . "\n"; + $content_cells[$i][$ci] .= ' ' . "\n"; if (is_array($available_mime['mimetype'])) { @reset($available_mime['mimetype']); while(list($mimekey, $mimetype) = each($available_mime['mimetype'])) { $checked = (isset($row) && isset($row['Field']) && isset($mime_map[$row['Field']]['mimetype']) && ($mime_map[$row['Field']]['mimetype'] == str_replace('/', '_', $mimetype)) ? 'selected ' : ''); - $content_cells[$i][8] .= ' '; + $content_cells[$i][$ci] .= ' '; } } - $content_cells[$i][8] .= ''; + $content_cells[$i][$ci] .= ''; + $ci++; - $content_cells[$i][9] = '' . "\n"; + $content_cells[$i][$ci] .= ' ' . "\n"; if (is_array($available_mime['transformation'])) { @reset($available_mime['transformation']); while(list($mimekey, $transform) = each($available_mime['transformation'])) { $checked = (isset($row) && isset($row['Field']) && isset($mime_map[$row['Field']]['transformation']) && ($mime_map[$row['Field']]['transformation'] == $available_mime['transformation_file'][$mimekey]) ? 'selected ' : ''); - $content_cells[$i][9] .= '' . "\n"; + $content_cells[$i][$ci] .= '' . "\n"; } } - $content_cells[$i][9] .= ''; + $content_cells[$i][$ci] .= ''; + $ci++; - $content_cells[$i][10] = ''; + $content_cells[$i][$ci] = ''; + $ci++; } // lem9: See my other comment about removing this 'if'. @@ -273,13 +288,20 @@ for ($i = 0 ; $i < $num_fields; $i++) { $checked_fulltext = ''; } - $content_cells[$i][11] = "\n" . ''; - $content_cells[$i][12] = "\n" . ''; - $content_cells[$i][13] = "\n" . ''; - $content_cells[$i][14] = "\n" . ''; - + $content_cells[$i][$ci] = "\n" . ''; + $ci++; + + $content_cells[$i][$ci] = "\n" . ''; + $ci++; + + $content_cells[$i][$ci] = "\n" . ''; + $ci++; + + $content_cells[$i][$ci] = "\n" . ''; + $ci++; + if (PMA_MYSQL_INT_VERSION >= 32323) { - $content_cells[$i][15] = ''; + $content_cells[$i][$ci] = ''; } // end if (PMA_MYSQL_INT_VERSION >= 32323) } // end if ($action ==...) } // end for