Fix bug while browsing a table, reported by Karl O. Pinc
authorJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Sun, 4 Nov 2012 13:11:36 +0000 (14:11 +0100)
committerJehan-Guillaume (ioguix) de Rorthais <ioguix@free.fr>
Sun, 4 Nov 2012 13:11:36 +0000 (14:11 +0100)
When a table has no uniq key, it was showing the Action head, but not
associated column in data body.

display.php

index 82c95aff21c579b6bbba187c658f8f0a3299fba3..a0504dd485e3ce8be636392008ee4784d5c50a5a 100644 (file)
 
                        // Display edit and delete actions if we have a key
                        $colspan = count($buttons);
-                       if ($colspan > 0)
+                       if ($colspan > 0 and count($key) > 0)
                                echo "<th colspan=\"{$colspan}\" class=\"data\">{$lang['stractions']}</th>\n";
 
                        /* we show OIDs only if we are in TABLE or SELECT type browsing */
                                                        $misc->printLink($action);
                                                        echo "</td>\n";
                                                }
-                                               
                                        }
                                }