Some more refactoring in Form classes.
[timetracker.git] / reports.php
index 4947e4d..cc6edcc 100644 (file)
@@ -43,7 +43,7 @@ if (!ttAccessCheck(right_view_reports)) {
 }
 
 // Use custom fields plugin if it is enabled.
-if (in_array('cf', explode(',', $user->plugins))) {
+if ($user->isPluginEnabled('cf')) {
   require_once('plugins/CustomFields.class.php');
   $custom_fields = new CustomFields($user->team_id);
   $smarty->assign('custom_fields', $custom_fields);
@@ -242,7 +242,7 @@ $form->setValueByElement('fav_report_changed','');
 
 // Disable the Delete button when no favorite report is selected.
 if (!$bean->getAttribute('favorite_report') || ($bean->getAttribute('favorite_report') == -1))
-  $form->getElement('btn_delete')->setEnable(false);
+  $form->getElement('btn_delete')->setEnabled(false);
 
 if ($request->isPost()) {
   if((!$bean->getAttribute('btn_generate') && ($request->getParameter('fav_report_changed')))) {