I am resending this message due to the list failure noted by Charles
Daminato in discuss-list.

gshapiro> cgi/manage.cgi
gshapiro> --------------
gshapiro> 1. $RENEWALS and $AUTO_RENEWAL_MESSAGE options should be brought
gshapiro> into OpenSRS.conf, akin to notice_days.  I didn't include this in
gshapiro> the patch below but would be willing to do it if you are willing
gshapiro> to make the change.

I decided to fix this after all.  Here is the patch:

Index: cgi-bin/secure/manage.cgi
===================================================================
RCS file: 
/usr/local/src/cvsroot/horsey.gshapiro.net/usr/local/www/test.retsiger.com/cgi-bin/secure/manage.cgi,v
retrieving revision 1.6
diff -u -r1.6 manage.cgi
--- cgi-bin/secure/manage.cgi   2001/02/05 07:48:38     1.6
+++ cgi-bin/secure/manage.cgi   2001/02/06 01:56:54
@@ -32,7 +32,7 @@
            $reg_username $reg_password $reg_domain $cookie $domain_count 
            $reg_permission $reg_f_owner $expiredate $last_access_time 
            $last_ip %contact_keys $waiting_request $reg_encoding_type
-            $COOKIE_KEY $reg_domain_race_obj $RENEWALS %enctypes $T_EXPIRED 
$T_EXPIRING $t_mode $notice_days $AUTO_RENEWAL_MESSAGE 
+            $COOKIE_KEY $reg_domain_race_obj $renewals %enctypes $T_EXPIRED 
+$T_EXPIRING $t_mode $notice_days $auto_renewal_message 
           );
 ( %in, %contact_types, %actions, $XML_Client, %cookies, $action, 
            $authentication, $cgi, $path_templates, $flag_header_sent,
@@ -57,13 +57,6 @@
 use RACE;
 use Data::Dumper;
 
-# OPTIONAL RENEWAL SETTINGS
-# set to 1 to enable
-$RENEWALS = 1;
-
-# OPTIONAL - TO SEE OR NOT TO SEE AUTO-RENEWAL HEADER 
-$AUTO_RENEWAL_MESSAGE = 0;
-
 # initialize global defines
 $cgi = $ENV{SCRIPT_NAME};
 $path_templates = "$PATH_TEMPLATES/manage";
@@ -90,6 +83,8 @@
 $T_EXPIRED  = 2; # there are expired domains
 $t_mode = undef; # can be 0, $T_EXPIRING, $T_EXPIRED or ($T_EXPIRING | $T_EXPIRED)
 $notice_days  = $MANAGE{ notice_days } ? $MANAGE{ notice_days } : 60;
+$renewals = $MANAGE{ renewals } ? $MANAGE{ renewals } : 0;
+$auto_renewal_message = $MANAGE{ auto_renewal_message } ? $MANAGE{ 
+auto_renewal_message } : 0;
 
 # list of contact types
 %contact_types = (
@@ -187,7 +182,7 @@
 
 # they asked for a valid action
 } elsif (exists $actions{$action}) {
-    if(($action eq "get_expire_domains") && ($RENEWALS == 0)) {
+    if(($action eq "get_expire_domains") && ($renewals == 0)) {
        main_menu("Invalid action: $action");
         exit;
     }    
@@ -1631,7 +1626,7 @@
 
     if ($type eq 'framed') {
        $HTML->{AUTORENDATA} = "";
-       if ($AUTO_RENEWAL_MESSAGE){
+       if ($auto_renewal_message){
            my $expiry_epoch = get_expiry_epoch_time($expiredate);
            my $new_epoch = $expiry_epoch - 30 * 86400;
            $HTML->{AUTORENDATA} = get_date_from_epoch($new_epoch, "stripped"); 
@@ -1639,7 +1634,7 @@
        }
        $HTML->{CONTENT} = get_content("$template",$HTML);
 
-        if($RENEWALS){ &get_warning_type; }
+        if($renewals){ &get_warning_type; }
    
         if ((defined $t_mode) and $t_mode) {
            $template_html = "base2.html";
@@ -2404,7 +2399,7 @@
 
 sub get_warning_type {
     # ret: $T_EXPIRED, $T_EXPIRING, or both, or 0 or undef
-    if (! $RENEWALS){return 0;}
+    if (! $renewals){return 0;}
 
     my @domains=();
     my $rc_1 = 0;
Index: etc/OpenSRS.conf
===================================================================
RCS file: 
/usr/local/src/cvsroot/horsey.gshapiro.net/usr/local/www/test.retsiger.com/etc/OpenSRS.conf,v
retrieving revision 1.5
diff -u -r1.5 OpenSRS.conf
--- etc/OpenSRS.conf    2001/02/03 03:45:24     1.5
+++ etc/OpenSRS.conf    2001/02/06 01:56:54
@@ -110,6 +110,8 @@
 %MANAGE = (
           debug => 0,
           notice_days => 60,   # show expire notice when <=60 days before expiry
+          auto_renewal_message => 0,   # see auto-renewal header
+          renewals => 0,               # enable renewal settings
           );
 
 use vars qw(%PRICES);

Reply via email to