[Fusionforge-commits] r9737 - trunk/plugins/coclico/hudson/include

Mélanie Le Bail melanelebail at libremir.placard.fr.eu.org
Tue May 11 13:52:18 CEST 2010


Author: melanelebail
Date: 2010-05-11 13:52:18 +0200 (Tue, 11 May 2010)
New Revision: 9737

Modified:
   trunk/plugins/coclico/hudson/include/HudsonJobWidget.class.php
Log:
Fix some bugs during activation of hudson plugins


Modified: trunk/plugins/coclico/hudson/include/HudsonJobWidget.class.php
===================================================================
--- trunk/plugins/coclico/hudson/include/HudsonJobWidget.class.php	2010-05-10 18:48:06 UTC (rev 9736)
+++ trunk/plugins/coclico/hudson/include/HudsonJobWidget.class.php	2010-05-11 11:52:18 UTC (rev 9737)
@@ -56,25 +56,16 @@
     function getInstallPreferences() {
         $prefs  = '';
         $prefs .= '<strong>'._("Monitored job:").'</strong><br />';
-       /* 
         $jobs = $this->getAvailableJobs();
+	$selected_jobs_id = $this->getSelectedJobsId();
         
         foreach ($jobs as $job_id => $job) {
-            $prefs .= '<input type="radio" name="job_id" value="'.$job_id.'"> '.$job->getName().'<br />';
-        }
-        return $prefs;*/
-	$selected_jobs_id = $this->getSelectedJobsId();
-        $jobs = $this->getAvailableJobs();
-
-        $only_one_job = (count($jobs) == 1);
-            foreach ($jobs as $job_id => $job) {
-                $selected = ($only_one_job)?'checked="checked"':'';
-                $prefs .= '<input type="radio" name="' . $this->widget_id . '_job_id" value="'.$job_id.'" ' . $selected . '> ' . $job->getName() ;
+            $prefs .= '<input type="radio" name="job_id" value="'.$job_id.'"> '.$job->getName();
                 if (in_array($job_id, $selected_jobs_id)) {
                         $prefs .= ' <em>('._('Already used') .')</em>';
                 }
                 $prefs .= '<br />';
-            }
+        }
         return $prefs;
     }
     function hasPreferences() {




More information about the Fusionforge-commits mailing list