[freeside-commits] freeside/httemplate/edit/process svc_cert.cgi, 1.1.2.3, 1.1.2.4

Ivan,,, ivan at wavetail.420.am
Sun Nov 7 15:47:07 PST 2010


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv1249/httemplate/edit/process

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	svc_cert.cgi 
Log Message:
certificates ala communigate, RT#7515

Index: svc_cert.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/svc_cert.cgi,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -w -d -r1.1.2.3 -r1.1.2.4
--- svc_cert.cgi	7 Nov 2010 05:29:39 -0000	1.1.2.3
+++ svc_cert.cgi	7 Nov 2010 23:47:04 -0000	1.1.2.4
@@ -9,7 +9,7 @@
 %  } else {
 <% include('/elements/header-popup.html', $title ) %>
     <SCRIPT TYPE="text/javascript">
-      window.top.location = '<% popurl(3). "edit/svc_cert.cgi?$svcnum" %>';
+      window.top.location = '<% popurl(3). "$popup/svc_cert.cgi?$svcnum" %>';
     </SCRIPT>
     </BODY></HTML>
 %  }
@@ -40,10 +40,10 @@
   $new->$_( $old->$_ ) for grep $old->$_, qw( privatekey csr certificate cacert );
 }
 
-my $popup = 0;
+my $popup = '';
 my $title = '';
 if ( $cgi->param('privatekey') eq '_generate' ) { #generate
-  $popup = 1;
+  $popup = 'edit';
   $title = 'Key generated';
 
   $cgi->param('keysize') =~ /^(\d+)$/ or die 'illegal keysize';
@@ -51,12 +51,22 @@
   $new->generate_privatekey($keysize);
 
 } elsif ( $cgi->param('privatekey') =~ /\S/ ) { #import
-  $popup = 1;
+  $popup = 'edit';
   $title = 'Key imported';
 
   $new->privatekey( $cgi->param('privatekey') );
 
-} #elsif ( $cgi->param('privatekey') eq '_clear' ) { #clear
+#} #elsif ( $cgi->param('privatekey') eq '_clear' ) { #clear
+
+} elsif ( $cgi->param('certificate') ) {
+
+  $popup = 'view';
+  $title = 'Certificate imported';
+
+  $new->certificate( $cgi->param('certificate') );
+  $new->$_( $old->$_ ) for grep $old->$_, qw( recnum common_name organization organization_unit city state country cert_contact );
+
+}
 
 my $error = '';
 if ($cgi->param('svcnum')) {



More information about the freeside-commits mailing list