ispman/lib/ISPMan ProcessMan.pm,1.23,1.24

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv24269/lib/ISPMan

Modified Files:
	ProcessMan.pm 
Log Message:
added method releaseSession_web
added method deleteProcess
modified modifyProcess (param change)

Index: ProcessMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/ProcessMan.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ProcessMan.pm	30 May 2004 23:35:37 -0000	1.23
+++ ProcessMan.pm	28 May 2006 23:44:40 -0000	1.24
@@ -13,6 +13,7 @@
   getPid
   deleteProcesses
   deleteProcessByPID
+  deleteProcess_web
   addProcessToHost
   addProcessToGroup
   manageProcesses
@@ -20,6 +21,7 @@
   updateProcess
   getProcessesForHost
   releaseSession
+  releaseSession_web
   countProcessesInSession
   getProcessesBranchDN
   getSessionBranchDN
@@ -73,6 +75,19 @@
     }
 }
 
+sub deleteProcess_web {
+    my $self = shift;
+    my $r    = shift;
+    return unless $self->requiredAdminLevel(30);
+
+    my $dn =
+        "ispmanPid="
+      . $r->param("ispmanPid") . ","
+      . $self->getSessionBranchDN( $r->param("ispmanSession") );
+    $self->deleteProcesses( [$dn] );
+    $self->manageProcesses($r);
+}
+
 sub addProcess {
 
     #Generic process add function
@@ -179,11 +194,11 @@
 sub modifyProcess {
     my $self = shift;
     my $r    = shift;
-    my $dn   = $r->param("dn");
-    print "DN is $dn";
+    my $dn   =
+        "ispmanPid="
+      . $r->param("ispmanPid") . ","
+      . $self->getSessionBranchDN( $r->param("ispmanSession") );
 
-    #Wally, please complete this.
-    # thaks
     $self->updateEntryWithData(
         $dn,
         {
@@ -195,7 +210,6 @@
     );
 
     $self->manageProcesses($r);
-
 }
 
 sub getProcesses {
@@ -267,6 +281,15 @@
     }
 }
 
+sub releaseSession_web {
+    my $self    = shift;
+    my $r       = shift;
+    my $session = $r->param("session");
+    $self->releaseSession($session) if $session;
+
+    print "<script>self.location='" . $r->param("nextPage") . "'</script>";
+}
+
 sub countProcessesInSession {
     my $self    = shift;
     my $session = shift;



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.