This is a horrible commit, but it cleans up hundreds of warnings that get thrown...
authorRobert Treat <rob@xzilla.net>
Sun, 2 Mar 2014 05:48:05 +0000 (00:48 -0500)
committerRobert Treat <robert@omniti.com>
Mon, 30 Oct 2017 22:31:50 +0000 (18:31 -0400)
classes/Misc.php

index b0b5a74cbb1a37fe799fb6579f051b2b814b8dc0..8e741ae51e5f86013e7c3f83d5f6719826a8a9d5 100644 (file)
 
                                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) {
                                                        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
 
                                        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();
 
                                                                        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";