From: ivan Date: Fri, 4 Oct 2002 12:57:06 +0000 (+0000) Subject: working on the road: X-Git-Tag: freeside_1_5_0pre1~205 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=c4d2226e0cc4bdd6d9f689b061b5f4f5b9609b0b working on the road: - easier "change package" link for changing one package to another - sqlradius export now compatible with Pg - indices on phone numbers - install instructions specify Pg 7.1 (at least until ILIKE thing is changed) - searching on phone number fragments --- diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm index 3c781c043..0f93703ae 100644 --- a/FS/FS/part_export/sqlradius.pm +++ b/FS/FS/part_export/sqlradius.pm @@ -187,10 +187,10 @@ sub sqlradius_insert { #subroutine, not method } else { my $i_sth = $dbh->prepare( - "INSERT INTO rad$table ( id, UserName, Attribute, Value ) ". - "VALUES ( ?, ?, ?, ? )" + "INSERT INTO rad$table ( UserName, Attribute, Value ) ". + "VALUES ( ?, ?, ? )" ) or die $dbh->errstr; - $i_sth->execute( '', $username, $attribute, $attributes{$attribute} ) + $i_sth->execute( $username, $attribute, $attributes{$attribute} ) or die $i_sth->errstr; } @@ -204,7 +204,7 @@ sub sqlradius_usergroup_insert { #subroutine, not method my( $username, @groups ) = @_; my $sth = $dbh->prepare( - "INSERT INTO usergroup ( id, UserName, GroupName ) VALUES ( ?, ?, ? )" + "INSERT INTO usergroup ( UserName, GroupName ) VALUES ( ?, ? )" ) or die $dbh->errstr; foreach my $group ( @groups ) { $sth->execute( '', $username, $group ) diff --git a/FS/FS/type_pkgs.pm b/FS/FS/type_pkgs.pm index 8e0d4ef56..efba60dbd 100644 --- a/FS/FS/type_pkgs.pm +++ b/FS/FS/type_pkgs.pm @@ -94,11 +94,24 @@ sub check { ''; #no error } +=item part_pkg + +Returns the FS::part_pkg object associated with this record. + +=cut + +sub part_pkg { + my $self = shift; + qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); +} + +=cut + =back =head1 VERSION -$Id: type_pkgs.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $ +$Id: type_pkgs.pm,v 1.2 2002-10-04 12:57:06 ivan Exp $ =head1 BUGS diff --git a/FS/bin/freeside-setup b/FS/bin/freeside-setup index f6a543fc8..d61e8b0bf 100755 --- a/FS/bin/freeside-setup +++ b/FS/bin/freeside-setup @@ -111,8 +111,9 @@ my($dbdef) = new DBIx::DBSchema ( map { my $cust_main = $dbdef->table('cust_main'); unless ($ship) { #remove ship_ from cust_main $cust_main->delcolumn($_) foreach ( grep /^ship_/, $cust_main->columns ); -} else { #add indices on ship_last and ship_company - push @{$cust_main->index->lol_ref}, ( ['ship_last'], ['ship_company'] ) +} else { #add indices + push @{$cust_main->index->lol_ref}, + map { [ "ship_$_" ] } qw( last company daytime night fax ); } #add radius attributes to svc_acct @@ -496,7 +497,9 @@ sub tables_hash_hack { 'primary_key' => 'custnum', 'unique' => [], #'index' => [ ['last'], ['company'] ], - 'index' => [ ['last'], [ 'company' ], [ 'referral_custnum' ] ], + 'index' => [ ['last'], [ 'company' ], [ 'referral_custnum' ], + [ 'daytime' ], [ 'night' ], [ 'fax' ], + ], }, 'cust_main_invoice' => { diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 3d19e4d35..3c48a746f 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -12,7 +12,7 @@ Before installing, you need:
  • rsync
  • A transactional database engine supported by Perl's DBI.