You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2005/08/29 16:16:52 UTC

svn commit: r264146 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java continuum-web/src/main/resources/templates/screens/View.vm

Author: evenisse
Date: Mon Aug 29 07:16:45 2005
New Revision: 264146

URL: http://svn.apache.org/viewcvs?rev=264146&view=rev
Log:
[CONTINUUM-252] Fix exception when we delete a notifier define in pom.

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=264146&r1=264145&r2=264146&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Mon Aug 29 07:16:45 2005
@@ -599,11 +599,15 @@
     public void removeNotifier( int projectId, int notifierId )
         throws ContinuumException
     {
+        Project project = getProjectWithAllDetails( projectId );
+
         ProjectNotifier n = getNotifier( projectId, notifierId );
 
         if ( n != null )
         {
-            removeNotifier( n );
+            project.removeNotifier( n );
+
+            updateProject( project );
         }
     }
 
@@ -690,8 +694,6 @@
             project.removeBuildDefinition( buildDefinition );
 
             updateProject( project );
-
-    //        removeBuildDefinition( buildDefinition );
         }
     }
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm?rev=264146&r1=264145&r2=264146&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm Mon Aug 29 07:16:45 2005
@@ -131,27 +131,23 @@
           </td>
           <td>Success, Failures</td>
           <td>Project</td>
-          #if ( $notifier.type == "irc" )
-            <td>
+          <td>
+            #if ( $notifier.type == "irc" )
               #set ( $editNotifierLink = $link.setPage('EditIrcNotifier.vm').addPathInfo('view','EditIrcNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) )
-              <a href="$editNotifierLink">Edit</a> <!-- | <a href="$deleteNotifierLink">Delete</a> -->
-            </td>
-          #elseif ( $notifier.type == "mail" )
-            <td>
+              <a href="$editNotifierLink">Edit</a>
+            #elseif ( $notifier.type == "mail" )
               #set ( $editNotifierLink = $link.setPage('EditMailNotifier.vm').addPathInfo('view','EditMailNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) )
-              <a href="$editNotifierLink">Edit</a> <!-- | <a href="$deleteNotifierLink">Delete</a> -->
-            </td>
-          #elseif ( $notifier.type == "msn" )
-            <td>
+              <a href="$editNotifierLink">Edit</a>
+            #elseif ( $notifier.type == "msn" )
               #set ( $editNotifierLink = $link.setPage('EditMsnNotifier.vm').addPathInfo('view','EditMsnNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) )
-              <a href="$editNotifierLink">Edit</a> <!-- | <a href="$deleteNotifierLink">Delete</a> -->
-            </td>
-          #elseif ( $notifier.type == "jabber" )
-            <td>
+              <a href="$editNotifierLink">Edit</a>
+            #elseif ( $notifier.type == "jabber" )
               #set ( $editNotifierLink = $link.setPage('EditJabberNotifier.vm').addPathInfo('view','EditJabberNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) )
-              <a href="$editNotifierLink">Edit</a> <!-- | <a href="$deleteNotifierLink">Delete</a> -->
-            </td>
-          #end
+              <a href="$editNotifierLink">Edit</a>
+            #end
+            #set ( $deleteNotifierLink = $link.setPage('Summary.vm').addPathInfo('notifierId', $notifier.id).addPathInfo('action','cam').addPathInfo('cid','deleteNotifier').addPathInfo('id', $project.id) )
+            | <a href="$deleteNotifierLink">Delete</a>
+          </td>
         </tr>
       #end
     </table>