Index: branches/5.1.x/core/units/email_messages/email_message_tp.php =================================================================== diff -u -N -r12127 -r12657 --- branches/5.1.x/core/units/email_messages/email_message_tp.php (.../email_message_tp.php) (revision 12127) +++ branches/5.1.x/core/units/email_messages/email_message_tp.php (.../email_message_tp.php) (revision 12657) @@ -1,6 +1,6 @@ Conn->GetCol($sql); } - } -?> \ No newline at end of file + /** + * Removes "Enabled" column, when not in debug mode + * + * @param Array $params + */ + function ModifyUnitConfig($params) + { + if (!$this->Application->isDebugMode()) { + $grids = $this->Application->getUnitOption($this->Prefix, 'Grids'); + + foreach ($grids as $grid_name => $grid_data) { + if (array_key_exists('Enabled', $grid_data['Fields'])) { + unset($grids[$grid_name]['Fields']['Enabled']); + } + } + + $this->Application->setUnitOption($this->Prefix, 'Grids', $grids); + } + } + } \ No newline at end of file