[freeside-commits] freeside/FS/FS part_export.pm, 1.102.4.1, 1.102.4.2 svc_Common.pm, 1.51.2.3, 1.51.2.4 Conf.pm, 1.324.2.24, 1.324.2.25 svc_domain.pm, 1.56.2.1, 1.56.2.2 Schema.pm, 1.168.2.14, 1.168.2.15

Ivan,,, ivan at wavetail.420.am
Wed Feb 17 00:30:39 PST 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15887/FS/FS

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	part_export.pm svc_Common.pm Conf.pm svc_domain.pm Schema.pm 
Log Message:
communigate pro provisioning, RT#7083

Index: svc_Common.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_Common.pm,v
retrieving revision 1.51.2.3
retrieving revision 1.51.2.4
diff -u -d -r1.51.2.3 -r1.51.2.4
--- svc_Common.pm	26 Jan 2010 06:14:16 -0000	1.51.2.3
+++ svc_Common.pm	17 Feb 2010 08:30:36 -0000	1.51.2.4
@@ -854,6 +854,25 @@
   $return;
 }
 
+=item export_getsettings
+
+Runs export_getsettings callbacks and returns the two hashrefs.
+
+=cut
+
+sub export_getsettings {
+  my $self = shift;
+  my %settings = ();
+  my %defaults = ();
+  my $error = $self->export('getsettings', \%settings, \%defaults);
+  if ( $error ) {
+    #XXX bubble this up better
+    warn "error running export_getsetings: $error";
+    return ( {}, {} );
+  }
+  ( \%settings, \%defaults );
+}
+
 =item export HOOK [ EXPORT_ARGS ]
 
 Runs the provided export hook (i.e. "suspend", "unsuspend") for this service.

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.168.2.14
retrieving revision 1.168.2.15
diff -u -d -r1.168.2.14 -r1.168.2.15
--- Schema.pm	8 Feb 2010 15:32:36 -0000	1.168.2.14
+++ Schema.pm	17 Feb 2010 08:30:36 -0000	1.168.2.15
@@ -1519,9 +1519,10 @@
 	'parent_svcnum',    'int', 'NULL',       '', '', '',
 	'registrarnum',     'int', 'NULL',       '', '', '',
 	'registrarkey', 'varchar', 'NULL',      512, '', '',
-	'setup_date',  @date_type, '', '',
+	'setup_date',      @date_type, '', '',
 	'renewal_interval', 'int', 'NULL',       '', '', '',
 	'expiration_date', @date_type, '', '',
+        'max_accounts',     'int', 'NULL',       '', '', '',
       ],
       'primary_key' => 'svcnum',
       'unique' => [ ],

Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.324.2.24
retrieving revision 1.324.2.25
diff -u -d -r1.324.2.24 -r1.324.2.25
--- Conf.pm	16 Feb 2010 18:36:43 -0000	1.324.2.24
+++ Conf.pm	17 Feb 2010 08:30:36 -0000	1.324.2.25
@@ -3510,6 +3510,13 @@
     'type'        => 'checkbox',
   },
 
+  {
+    'key'         => 'svc_domain-edit_domain',
+    'section'     => '',
+    'description' => 'Enable domain renaming',
+    'type'        => 'checkbox',
+  },
+
   { key => "apacheroot", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachine", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },
   { key => "apachemachines", section => "deprecated", description => "<b>DEPRECATED</b>", type => "text" },

Index: svc_domain.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/svc_domain.pm,v
retrieving revision 1.56.2.1
retrieving revision 1.56.2.2
diff -u -d -r1.56.2.1 -r1.56.2.2
--- svc_domain.pm	28 Oct 2009 19:05:11 -0000	1.56.2.1
+++ svc_domain.pm	17 Feb 2010 08:30:36 -0000	1.56.2.2
@@ -89,6 +89,8 @@
 
 =item expiration_date - UNIX timestamp
 
+=item max_accounts
+
 =back
 
 =head1 METHODS
@@ -109,6 +111,9 @@
     'cancel_weight'  => 60,
     'fields' => {
       'domain' => 'Domain',
+      'max_accounts' => { label => 'Maximum number of accounts',
+                          'disable_inventory' => 1,
+                        },
     },
   };
 }
@@ -290,7 +295,8 @@
               : $new->replace_old;
 
   return "Can't change domain - reorder."
-    if $old->getfield('domain') ne $new->getfield('domain'); 
+    if $old->getfield('domain') ne $new->getfield('domain')
+    && ! $conf->exists('svc_domain-edit_domain'); 
 
   # Better to do it here than to force the caller to remember that svc_domain is weird.
   $new->setfield(action => 'I');
@@ -335,6 +341,7 @@
 
   my $error = $self->ut_numbern('svcnum')
               || $self->ut_numbern('catchall')
+              || $self->ut_numbern('max_accounts')
   ;
   return $error if $error;
 
@@ -429,6 +436,7 @@
     'PTR'   => sub { $_[0]->reczone <=> $_[1]->reczone },
   );
 
+  map { $_ } #return $self->num_domain_record( PARAMS ) unless wantarray;
   sort {    $order{$a->rectype} <=> $order{$b->rectype}
          or &{ $sort{$a->rectype} || sub { 0; } }($a, $b)
        }

Index: part_export.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export.pm,v
retrieving revision 1.102.4.1
retrieving revision 1.102.4.2
diff -u -d -r1.102.4.1 -r1.102.4.2
--- part_export.pm	8 Feb 2010 15:32:37 -0000	1.102.4.1
+++ part_export.pm	17 Feb 2010 08:30:36 -0000	1.102.4.2
@@ -376,6 +376,15 @@
 The elements are displayed in the UI to lead the the operator to external
 configuration, monitoring, and similar tools.
 
+=item export_getsettings SVC_OBJECT SETTINGS_HASHREF DEFAUTS_HASHREF
+
+Adds a hashref of settings to SETTINGSREF specific to this export and
+SVC_OBJECT.  The elements can be displayed in the UI on the service view.
+
+DEFAULTSREF is a hashref with the same keys where true values indicate the
+setting is a default (and thus can be displayed in the UI with less emphasis,
+or hidden by default).
+
 =cut
 
 =back



More information about the freeside-commits mailing list