summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Treat2014-03-02 05:48:05 +0000
committerRobert Treat2014-03-02 05:48:05 +0000
commit53323b53765dbb933d2f31683b1dec977f2e6da0 (patch)
treeb7ea33bdd2be924d2ffae22e45e780a180a72505
parent738651a4a9aca7b61b5ca7057ebb22b6657ff717 (diff)
This is a horrible commit, but it cleans up hundreds of warnings that get thrown when a class is not specified, and it fixes it so that the broken admin tests pass. I'm pretty sure that ultimately we will want a better fix than this, but I'm taking the progress when I can get it. AFAICT the affore mentioned problems were introduced in https://github.com/phppgadmin/phppgadmin/commit/4680728829d8f95e29514512c9e94bb5345aa58a. If that was something you wanted, it's quite possibly broken now.
-rw-r--r--classes/Misc.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/classes/Misc.php b/classes/Misc.php
index b0b5a74c..8e741ae5 100644
--- a/classes/Misc.php
+++ b/classes/Misc.php
@@ -1921,6 +1921,14 @@
echo "<table>\n";
echo "<tr>\n";
+
+ // Handle cases where no class has been passed
+ if (isset($column['class'])) {
+ $class = $column['class'] !== '' ? " class=\"{$column['class']}\"":'';
+ } else {
+ $class = '';
+ }
+
// Display column headings
if ($has_ma) echo "<th></th>";
foreach ($columns as $column_id => $column) {
@@ -1929,7 +1937,7 @@
if (sizeof($actions) > 0) echo "<th class=\"data\" colspan=\"", count($actions), "\">{$column['title']}</th>\n";
break;
default:
- echo "<th class=\"data {$column['class']}\">";
+ echo "<th class=\"data{$class}\">";
if (isset($column['help']))
$this->printHelp($column['title'], $column['help']);
else
@@ -1960,8 +1968,6 @@
foreach ($columns as $column_id => $column) {
- $class = $column['class'] !== '' ? " class=\"{$column['class']}\"":'';
-
// Apply default values for missing parameters
if (isset($column['url']) && !isset($column['vars'])) $column['vars'] = array();
@@ -1971,7 +1977,7 @@
if (isset($action['disable']) && $action['disable'] === true) {
echo "<td></td>\n";
} else {
- echo "<td class=\"opbutton{$id} {$column['class']}\">";
+ echo "<td class=\"opbutton{$id} {$class}\">";
$action['fields'] = $tabledata->fields;
$this->printLink($action);
echo "</td>\n";