From 53323b53765dbb933d2f31683b1dec977f2e6da0 Mon Sep 17 00:00:00 2001 From: Robert Treat Date: Sun, 2 Mar 2014 00:48:05 -0500 Subject: [PATCH] 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. --- classes/Misc.php | 14 ++++++++++---- 1 file 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 "\n"; echo "\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 ""; foreach ($columns as $column_id => $column) { @@ -1929,7 +1937,7 @@ if (sizeof($actions) > 0) echo "\n"; break; default: - echo "\n"; } else { - echo "\n"; -- 2.39.5
{$column['title']}"; + echo ""; 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 ""; + echo ""; $action['fields'] = $tabledata->fields; $this->printLink($action); echo "