From: cvs2git Date: Mon, 12 Aug 2002 06:17:10 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'BESTPRACTICAL'. X-Git-Tag: BESTPRACTIAL~2 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=160be29a0dc62e79a4fb95d2ab8c0c7e5996760e This commit was manufactured by cvs2svn to create branch 'BESTPRACTICAL'. --- diff --git a/ANNOUCE.1.4.0 b/ANNOUCE.1.4.0 deleted file mode 100644 index d110c6f3a..000000000 --- a/ANNOUCE.1.4.0 +++ /dev/null @@ -1,50 +0,0 @@ -Hi, - -I'm pleased to announce the first beta release of Freeside 1.4.0. -Freeside is a web-based, open-source billing and account administration -package for ISPs, web hosts, and similar businesses. - -You can see a web demo, read the documentation, and download the new beta -at . - -Although Freeside is free software, it is supported commercially with -installation, customization, training and support services. Please -consider our services and help support the development of the software! - - -Major new features in 1.4.0 include: - -- Billing engine has been rewritten and now has support for easily added - "price plans". Included price plans include anniversary billing, - 1st-of-the-month billing (pro-rated and subscription), free for N days, - commissions for referrals and per-minute/per-hour charges. - -- Customer-to-customer referrals, tracking and commissions. - -- Configurable invoice events triggered for delinquent customers can - re-send invoices, suspend accounts, charge late fees, and so on. - -- Export and provisioning system has been rewritten. New provisioning - methods can now be "plugged-in" for any service type. Included exports - include BSD and Linux password files, configurable shell commands, - RADIUS (both text and SQL, including groups), BIND configuration files, - Cyrus, vpopmail, and many others. - -- Complete set of history tables tracking all changes to the database. - -- Job queue with display and retry for provisioning tasks. - -- UI overhaul - easier to navigate and use. Quick package order and - one-time charges. Separate billing and service contact information. - Customer comments. - -- Performance optimizations. - -- Financials have been rewritten. Apply payments and credits against - specific invoices (in whole or in part), or have the system apply - automatically. - -- Texas tax. - -- Improved documentation and easier install. - diff --git a/Artistic b/Artistic deleted file mode 100644 index 4ffc78e97..000000000 --- a/Artistic +++ /dev/null @@ -1,125 +0,0 @@ - The "Artistic License" - - Preamble - -The intent of this document is to state the conditions under which a -Package may be copied, such that the Copyright Holder maintains some -semblance of artistic control over the development of the Package, -while giving the users of the package the right to use and distribute -the Package in a more-or-less customary fashion, plus the right to make -reasonable modifications. - -It also grants you the rights to reuse parts of a Package in your own -programs without transferring this License to those programs, provided -that you meet some reasonable requirements. - -Definitions: - - "Package" refers to the collection of files distributed by the - Copyright Holder, and derivatives of that collection of files - created through textual modification. - - "Standard Version" refers to such a Package if it has not been - modified, or has been modified in accordance with the wishes - of the Copyright Holder as specified below. - - "Copyright Holder" is whoever is named in the copyright or - copyrights for the package. - - "You" is you, if you're thinking about copying or distributing - this Package. - - "Reasonable copying fee" is whatever you can justify on the - basis of media cost, duplication charges, time of people involved, - and so on. (You will not be required to justify it to the - Copyright Holder, but only to the computing community at large - as a market that must bear the fee.) - - "Freely Available" means that no fee is charged for the item - itself, though there may be fees involved in handling the item. - It also means that recipients of the item may redistribute it - under the same conditions they received it. - -1. You may make and give away verbatim copies of the source form of the -Standard Version of this Package without restriction, provided that you -duplicate all of the original copyright notices and associated disclaimers. - -2. You may apply bug fixes, portability fixes and other modifications -derived from the Public Domain or from the Copyright Holder. A Package -modified in such a way shall still be considered the Standard Version. - -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and -when you changed that file, and provided that you do at least ONE of the -following: - - a) place your modifications in the Public Domain or otherwise make them - Freely Available, such as by posting said modifications to Usenet or - an equivalent medium, or placing the modifications on a major archive - site such as uunet.uu.net, or by allowing the Copyright Holder to include - your modifications in the Standard Version of the Package. - - b) use the modified Package only within your corporation or organization. - - c) rename any non-standard executables so the names do not conflict - with standard executables, which must also be provided, and provide - a separate manual page for each non-standard executable that clearly - documents how it differs from the Standard Version. - - d) make other distribution arrangements with the Copyright Holder. - -4. You may distribute the programs of this Package in object code or -executable form, provided that you do at least ONE of the following: - - a) distribute a Standard Version of the executables and library files, - together with instructions (in the manual page or equivalent) on where - to get the Standard Version. - - b) accompany the distribution with the machine-readable source of - the Package with your modifications. - - c) give non-standard executables non-standard names, and clearly - document the differences in manual pages (or equivalent), together - with instructions on where to get the Standard Version. - - d) make other distribution arrangements with the Copyright Holder. - -5. You may charge a reasonable copying fee for any distribution of this -Package. You may charge any fee you choose for support of this -Package. You may not charge a fee for this Package itself. However, -you may distribute this Package in aggregate with other (possibly -commercial) programs as part of a larger (possibly commercial) software -distribution provided that you do not advertise this Package as a -product of your own. - -6. The scripts and library files supplied as input to or produced as -output from the programs of this Package do not automatically fall -under the copyright of this Package, but belong to whomever generated -them, and may be sold commercially, and may be aggregated with this -Package. If such scripts or library files are aggregated with this -Package via the so-called "undump" or "unexec" methods of producing a -binary executable image, then distribution of such an image shall -neither be construed as a distribution of this Package nor shall it -fall under the restrictions of Paragraphs 3 and 4, provided that you do -not represent such an executable image as a Standard Version of this -Package. - -7. You may reuse parts of this Package in your own programs, provided that -you explicitly state where you got them from, in the source code (and, left -to your courtesy, in the documentation), duplicating all the associated -copyright notices and disclaimers. Besides your changes, if any, must be -clearly marked as such. Parts reused that way will no longer fall under this -license if, and only if, the name of your program(s) have no immediate -connection with the name of the Package itself or its associated programs. -You may then apply whatever restrictions you wish on the reused parts or -choose to place them in the Public Domain--this will apply only within the -context of your package. - -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. - -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - The End diff --git a/CREDITS b/CREDITS deleted file mode 100644 index d89f4f564..000000000 --- a/CREDITS +++ /dev/null @@ -1,110 +0,0 @@ -Thanks to Matt Simerson of MichWeb Inc. for documentation -and pre-release testing. Without his help the documentation in 1.0.0 -release would have consisted of a single screenfull of text. -(To clear up some misunderstanding, Matt did not write the current -documentation.) - -Steve Cleff did the default background image in 1.0.x and -is also the creator of Freeside's elusive mascot, Snakeman, who we hope will -make an appearance in an upcoming version. - -Jerry St. Pierre did the "SISD" graphic used in -1.0.x and most of 1.1.x. - -Mark Norris of Urban Design, Inc. did the red "S" -logo for later 1.1.x versions and 1.2.x - -Brian McCane? contributed PostgreSQL support, HTML -style enhancements and many, many bugfixes. - -Cerkit contributed rsync support and desynced hosts. -His changes will hopefully be included in an upcoming version. - -CompleteHOST, Inc. (http://www.completehost.com) funded the development of the -following features: - - Multiple, separate databases and configurations on one box. - - Per-customer pricing (custom packages) - - Internationalization wrt addresses (cust_main, cust_main_county) -Thanks! - -Mark Williamson and Roger Mangraviti - contributed state/provence listings for Australia. - -Peter Wemm sent in a bunch of bugfixes for the 1.2 -release. - -Greg Kuhnert sent some documentation updates. - -Joel Griffiths contribued many bugfixes as well as -the print-batch script. - -NetLoud funded the development of the following -features: - - IEAK support for the signup server - - Pre-payment support - -NetAcces.Net (not netaccess.net) funded the development of the following -features: - - DNS tracking and export to BIND configuration files - - Web site virtual host tracking and export to Apache configuration files - -Kristian Hoffmann contributed Netscape CCK -autoconfiguration support for the signup server, lots of great mailing -lists posts which I shamelessly made into documentation, fixes to get rid of -the embarassing and non-database-normal "owed" field, and many other things -I'm forgetting. - -Jeff Finucane send in a bunch of bugfixes (for the sendmail -export, cancel-unaudited.cgi), patches to support billing date modification, -and probably other things too (sorry if I forgot them). And yet even more -bug squashing, thanks! *and* he single-handedly implemented all the necessary -work to get rid of svc_acct_sm and the "default domain" thanks!! and rewrote -the financials! wow, thanks jeff! and contributed financial reports! - -Kenny Elliott contributed ICRADIUS radreply table support, -allowing attributes with ICRADIUS, helped fix many bugs, and some -other stuff I can't recall (sorry). - -Stephen Amadei contribued portability cleanups for the -low-level DBI stuff. - -Jason Spence contributed admin.html and other -documentation, autocapnames javascript, bugfixes & other neat stuff I can't -remember. - -Brad Dameron contributed code to do configurable state -and referral defaults. - -Surf and Sip, Inc., sponsored a long-requested -feature - the session monitor and time-based prepaid cards. -Matt Peterson and Mack ? tested -the new features and contributed many bugfixes. - -Landel Telecom sponsored shipping addresses and -customer notes, as well as an update of the CP provisioning. - -nikotel, Inc. sponsored the inclusion of -customer-to-customer referrals in the web interface and signup server. - -Three Bubba's Innanet sponsored expedited check entry, -the "similar names warning" feature, and a number of other enhancements. - -Dave Burgess sent in a bunch of fixes and small changes -and will doubtless send more once he's got his tree under control. - -Luke Pfeifer contributed the "subscription" price plan. - -Noment Networks, LLC sponsored ICRADIUS/FreeRADIUS -groups, message catalogs, and signup server enhancements. - -Donald Greer provided the SQL to work around MySQL's lack -of subqueries, and Dale Hege provided the patches. -Thanks! - - sent in several documentation patches. - -"Stephen Bechard" sent in patches for svc_www services and -other fixes. - -Everything else is my (Ivan Kohler ) fault. - diff --git a/FS/Changes b/FS/Changes deleted file mode 100644 index c94ef10f5..000000000 --- a/FS/Changes +++ /dev/null @@ -1,5 +0,0 @@ -Revision history for Perl extension FS. - -0.01 Wed Aug 4 00:13:45 1999 - - original version; created by h2xs 1.19 - diff --git a/FS/FS.pm b/FS/FS.pm deleted file mode 100644 index 963c73548..000000000 --- a/FS/FS.pm +++ /dev/null @@ -1,231 +0,0 @@ -package FS; - -use strict; -use vars qw($VERSION); - -$VERSION = '0.01'; - -#find missing entries in this file with: -# for a in `ls *pm | cut -d. -f1`; do grep 'L' ../FS.pm >/dev/null || echo "missing $a" ; done - -1; -__END__ - -=head1 NAME - -FS - Freeside Perl modules - -=head1 SYNOPSIS - -Freeside perl modules and CLI utilities. - -=head2 Utility classes - -L - Freeside configuration values - -L - Freeside configuration option meta-data. - -L - User class (not yet OO) - -L - Non OO-subroutines for the web interface. - -L - Message catalog - -L - Search cache - -L - RADIUS dictionary - -=head2 Database record classes - -L - Database record base class - -L - POP (Point of Presence, not Post -Office Protocol) class - -L - Local calling area class - -L - Referral class - -L - Locale (tax rate) class - -L - Tax exemption record class - -L - Service base class - -L - Account (shell, RADIUS, POP3) class - -L - RADIUS groups - -L - Domain class - -L - DNS zone entries - -L - Mail forwarding class - -L - (Depreciated) Vitual mail alias class - -L - Web virtual host class. - -L - Service definition class - -L - Column constraint class - -L - Class linking service definitions (see L) -with exports (see L) - -L - External provisioning export class - -L - Export option class - -L - Package (billing item) definition class - -L - Class linking package (billing item) -definitions (see L) with service definitions -(see L) - -L - Agent (reseller) class - -L - Agent type class - -L - Class linking agent types (see -L) with package (billing item) definitions -(see L) - -L - Service class - -L - Package (billing item) class - -L - Customer class - -L - Invoice destination -class - -L - Invoice class - -L - Invoice line item class - -L - Invoice event definition class - -L - Completed invoice event class - -L - Payment class - -L - Payment application class - -L - Credit class - -L - Refund class - -L - Refund application class - -L - Credit invoice application class - -L - Credit card transaction queue class - -L - Prepaid "calling card" credit class. - -L - Network Access Server class - -L - NAS port class - -L - User login session class - -L - Job queue - -L - Job arguments - -L - Job dependencies - -L - Message catalogs - -=head1 Remote API modules - -L - -L - -L - -=head2 Command-line utilities - -L - -L - -L - -L - -L - -L - -L - -L - -L - -L - -L - -=head2 User Interface classes (under (stalled) development; not yet usable) - -L - User-interface base class - -L - Gtk user-interface class - -L - CGI (HTML) user-interface class - -L - agent table user-interface class - -=head2 Notes - -To quote perl(1), "If you're intending to read these straight through for the -first time, the suggested order will tend to reduce the number of forward -references." - -If you've never used OO modules before, -http://www.cpan.org/doc/FMTEYEWTK/easy_objects.html might help you out. - -=head1 DESCRIPTION - -Freeside is a billing and administration package for Internet Service -Providers. - -The Freeside home page is at . - -The main documentation is in httemplate/docs. - -=head1 SUPPORT - -A mailing list for users is available. Send a blank message to - to subscribe. - -A mailing list for developers is available. It is intended to be lower volume -and higher SNR than the users list. Send a blank message to - to subscribe. - -Commercial support is available; see -. - -=head1 AUTHOR - -Primarily Ivan Kohler , with help from many kind folks. - -See the CREDITS file in the Freeside distribution for a (hopefully) complete -list and the individal files for details. - -=head1 SEE ALSO - -perl(1), main Freeside documentation in htdocs/docs/ - -=head1 BUGS - -Those modules which would be useful separately should be pulled out, -renamed appropriately and uploaded to CPAN. So far: DBIx::DBSchema, Net::SSH -and Net::SCP... - -=cut - diff --git a/FS/FS/CGI.pm b/FS/FS/CGI.pm deleted file mode 100644 index e44ebcc0a..000000000 --- a/FS/FS/CGI.pm +++ /dev/null @@ -1,314 +0,0 @@ -package FS::CGI; - -use strict; -use vars qw(@EXPORT_OK @ISA); -use Exporter; -use CGI; -use URI::URL; -#use CGI::Carp qw(fatalsToBrowser); -use FS::UID; - -@ISA = qw(Exporter); -@EXPORT_OK = qw(header menubar idiot eidiot popurl table itable ntable - small_custview myexit); - -=head1 NAME - -FS::CGI - Subroutines for the web interface - -=head1 SYNOPSIS - - use FS::CGI qw(header menubar idiot eidiot popurl); - - print header( 'Title', '' ); - print header( 'Title', menubar('item', 'URL', ... ) ); - - idiot "error message"; - eidiot "error message"; - - $url = popurl; #returns current url - $url = popurl(3); #three levels up - -=head1 DESCRIPTION - -Provides a few common subroutines for the web interface. - -=head1 SUBROUTINES - -=over 4 - -=item header TITLE, MENUBAR - -Returns an HTML header. - -=cut - -sub header { - my($title,$menubar,$etc)=@_; #$etc is for things like onLoad= etc. - #use Carp; - $etc = '' unless defined $etc; - - my $x = < - - - $title - - - - - - - - $title - -

-END - $x .= $menubar. "

" if $menubar; - $x; -} - -=item menubar ITEM, URL, ... - -Returns an HTML menubar. - -=cut - -sub menubar { #$menubar=menubar('Main Menu', '../', 'Item', 'url', ... ); - my($item,$url,@html); - while (@_) { - ($item,$url)=splice(@_,0,2); - push @html, qq!$item!; - } - join(' | ',@html); -} - -=item idiot ERROR - -This is depriciated. Don't use it. - -Sends an HTML error message. - -=cut - -sub idiot { - #warn "idiot depriciated"; - my($error)=@_; -# my $cgi = &FS::UID::cgi(); -# if ( $cgi->isa('CGI::Base') ) { -# no strict 'subs'; -# &CGI::Base::SendHeaders; -# } else { -# print $cgi->header( @FS::CGI::header ); -# } - print < - - Error processing your request - - - - - -
-

Error processing your request

-
- Your request could not be processed because of the following error: -

$error - - -END - -} - -=item eidiot ERROR - -This is depriciated. Don't use it. - -Sends an HTML error message, then exits. - -=cut - -sub eidiot { - warn "eidiot depriciated"; - $HTML::Mason::Commands::r->send_http_header - if defined $HTML::Mason::Commands::r; - idiot(@_); - &myexit(); -} - -=item myexit - -You probably shouldn't use this; but if you must: - -If running under mod_perl, calles Apache::exit, otherwise, calls exit. - -=cut - -sub myexit { - if (exists $ENV{MOD_PERL}) { - - if ( defined $main::Response - && $main::Response->isa('Apache::ASP::Response') ) { #Apache::ASP - $main::Response->End(); - require Apache; - Apache::exit(); - } elsif ( defined $HTML::Mason::Commands::m ) { #Mason - #$HTML::Mason::Commands::m->flush_buffer(); - $HTML::Mason::Commands::m->abort(); - die "shouldn't fall through to here (mason \$m->abort didn't)"; - } else { - #??? well, it is $ENV{MOD_PERL} - warn "running under unknown mod_perl environment; trying Apache::exit()"; - require Apache; - Apache::exit(); - } - } else { - exit; - } -} - -=item popurl LEVEL - -Returns current URL with LEVEL levels of path removed from the end (default 0). - -=cut - -sub popurl { - my($up)=@_; - my $cgi = &FS::UID::cgi; - my $url = new URI::URL ( $cgi->isa('Apache') ? $cgi->uri : $cgi->url ); - my(@path)=$url->path_components; - splice @path, 0-$up; - $url->path_components(@path); - my $x = $url->as_string; - $x .= '/' unless $x =~ /\/$/; - $x; -} - -=item table - -Returns HTML tag for beginning a table. - -=cut - -sub table { - my $col = shift; - if ( $col ) { - qq!!; - } else { - '
'; - } -} - -=item itable - -Returns HTML tag for beginning an (invisible) table. - -=cut - -sub itable { - my $col = shift; - my $cellspacing = shift || 0; - if ( $col ) { - qq!
!; - } else { - qq!
!; - } -} - -=item ntable - -This is getting silly. - -=cut - -sub ntable { - my $col = shift; - my $cellspacing = shift || 0; - if ( $col ) { - qq!
!; - } else { - '
'; - } - -} - -=item small_custview CUSTNUM || CUST_MAIN_OBJECT, COUNTRYDEFAULT - -Sheesh. I should just switch to Mason. - -=cut - -sub small_custview { - use FS::Record qw(qsearchs); - use FS::cust_main; - - my $arg = shift; - my $countrydefault = shift || 'US'; - - my $cust_main = ref($arg) ? $arg - : qsearchs('cust_main', { 'custnum' => $arg } ) - or die "unknown custnum $arg"; - - my $html = 'Customer #'. $cust_main->custnum. ''. - ntable('#e8e8e8'). '
'. ntable("#cccccc",2). - '
Billing
Address
'. - $cust_main->getfield('last'). ', '. $cust_main->first. '
'; - - $html .= $cust_main->company. '
' if $cust_main->company; - $html .= $cust_main->address1. '
'; - $html .= $cust_main->address2. '
' if $cust_main->address2; - $html .= $cust_main->city. ', '. $cust_main->state. ' '. $cust_main->zip. '
'; - $html .= $cust_main->country. '
' - if $cust_main->country && $cust_main->country ne $countrydefault; - - $html .= '
'; - - if ( defined $cust_main->dbdef_table->column('ship_last') ) { - - my $pre = $cust_main->ship_last ? 'ship_' : ''; - - $html .= ''. ntable("#cccccc",2). - 'Service
Address'. - $cust_main->get("${pre}last"). ', '. - $cust_main->get("${pre}first"). '
'; - $html .= $cust_main->get("${pre}company"). '
' - if $cust_main->get("${pre}company"); - $html .= $cust_main->get("${pre}address1"). '
'; - $html .= $cust_main->get("${pre}address2"). '
' - if $cust_main->get("${pre}address2"); - $html .= $cust_main->get("${pre}city"). ', '. - $cust_main->get("${pre}state"). ' '. - $cust_main->get("${pre}ship_zip"). '
'; - $html .= $cust_main->get("${pre}country"). '
' - if $cust_main->get("${pre}country") - && $cust_main->get("${pre}country") ne $countrydefault; - - $html .= ''; - } - - $html .= ''; - - $html; -} - -=back - -=head1 BUGS - -Not OO. - -Not complete. - -small_custview sooooo doesn't belong here. i should just switch to Mason. - -=head1 SEE ALSO - -L, L - -=cut - -1; - - diff --git a/FS/FS/ClientAPI.pm b/FS/FS/ClientAPI.pm deleted file mode 100644 index f7b8eb028..000000000 --- a/FS/FS/ClientAPI.pm +++ /dev/null @@ -1,44 +0,0 @@ -package FS::ClientAPI; - -use strict; -use vars qw(%handler); - -%handler = (); - -#find modules -foreach my $INC ( @INC ) { - foreach my $file ( glob("$INC/FS/ClientAPI/*") ) { - $file =~ /\/(\w+)\.pm$/ or do { - warn "unrecognized ClientAPI file: $file"; - next - }; - my $mod = $1; - #warn "using FS::ClientAPI::$mod"; - eval "use FS::ClientAPI::$mod;"; - die "error using FS::ClientAPI::$mod: $@" if $@; - } -} - -#(sub for modules) -sub register_handlers { - my $self = shift; - my %new_handlers = @_; - foreach my $key ( keys %new_handlers ) { - warn "WARNING: redefining sub $key" if exists $handler{$key}; - #warn "registering $key"; - $handler{$key} = $new_handlers{$key}; - } -} - -#--- - -sub dispatch { - my ( $self, $name ) = ( shift, shift ); - my $sub = $handler{$name} - or die "unknown FS::ClientAPI sub $name (known: ". join(" ", keys %handler ); - #or die "unknown FS::ClientAPI sub $name"; - &{$sub}(@_); -} - -1; - diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm deleted file mode 100644 index 674785524..000000000 --- a/FS/FS/ClientAPI/MyAccount.pm +++ /dev/null @@ -1,136 +0,0 @@ -package FS::ClientAPI::MyAccount; - -use strict; -use vars qw($cache); -use Digest::MD5 qw(md5_hex); -use Date::Format; -use Cache::SharedMemoryCache; #store in db? -use FS::CGI qw(small_custview); #doh -use FS::Conf; -use FS::Record qw(qsearchs); -use FS::svc_acct; -use FS::svc_domain; -use FS::cust_main; -use FS::cust_bill; - -use FS::ClientAPI; #hmm -FS::ClientAPI->register_handlers( - 'MyAccount/login' => \&login, - 'MyAccount/customer_info' => \&customer_info, - 'MyAccount/invoice' => \&invoice, -); - -#store in db? -my $cache = new Cache::SharedMemoryCache(); - -#false laziness w/FS::ClientAPI::passwd::passwd (needs to handle encrypted pw) -sub login { - my $p = shift; - - my $svc_domain = qsearchs('svc_domain', { 'domain' => $p->{'domain'} } ) - or return { error => "Domain not found" }; - - my $svc_acct = - ( length($p->{'password'}) < 13 - && qsearchs( 'svc_acct', { 'username' => $p->{'username'}, - 'domsvc' => $svc_domain->svcnum, - '_password' => $p->{'password'} } ) - ) - || qsearchs( 'svc_acct', { 'username' => $p->{'username'}, - 'domsvc' => $svc_domain->svcnum, - '_password' => $p->{'password'} } ); - - unless ( $svc_acct ) { return { error => 'Incorrect password.' } } - - my $session = { - 'svcnum' => $svc_acct->svcnum, - }; - - my $cust_pkg = $svc_acct->cust_svc->cust_pkg; - if ( $cust_pkg ) { - my $cust_main = $cust_pkg->cust_main; - $session->{'custnum'} = $cust_main->custnum; - } - - my $session_id; - do { - $session_id = md5_hex(md5_hex(time(). {}. rand(). $$)) - } until ( ! defined $cache->get($session_id) ); #just in case - - $cache->set( $session_id, $session, '1 hour' ); - - return { 'error' => '', - 'session_id' => $session_id, - }; -} - -sub customer_info { - my $p = shift; - my $session = $cache->get($p->{'session_id'}) - or return { 'error' => "Can't resume session" }; #better error message - - my %return; - - my $custnum = $session->{'custnum'}; - - if ( $custnum ) { #customer record - - my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) - or return { 'error' => "unknown custnum $custnum" }; - - $return{balance} = $cust_main->balance; - - my @open = map { - { - invnum => $_->invnum, - date => time2str("%b %o, %Y", $_->_date), - owed => $_->owed, - }; - } $cust_main->open_cust_bill; - $return{open_invoices} = \@open; - - my $conf = new FS::Conf; - $return{small_custview} = - small_custview( $cust_main, $conf->config('defaultcountry') ); - - $return{name} = $cust_main->first. ' '. $cust_main->get('last'); - - } else { #no customer record - - my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $session->{'svcnum'} } ) - or die "unknown svcnum"; - $return{name} = $svc_acct->email; - - } - - - return { 'error' => '', - 'custnum' => $custnum, - %return, - }; - -} - -sub invoice { - my $p = shift; - my $session = $cache->get($p->{'session_id'}) - or return { 'error' => "Can't resume session" }; #better error message - - my $custnum = $session->{'custnum'}; - - my $invnum = $p->{'invnum'}; - - my $cust_bill = qsearchs('cust_bill', { 'invnum' => $invnum, - 'custnum' => $custnum } ) - or return { 'error' => "Can't find invnum" }; - - #my %return; - - return { 'error' => '', - 'invnum' => $invnum, - 'invoice_text' => join('', $cust_bill->print_text ), - }; - -} - - diff --git a/FS/FS/ClientAPI/passwd.pm b/FS/FS/ClientAPI/passwd.pm deleted file mode 100644 index 29606227d..000000000 --- a/FS/FS/ClientAPI/passwd.pm +++ /dev/null @@ -1,56 +0,0 @@ -package FS::ClientAPI::passwd; - -use strict; -use FS::Record qw(qsearchs); -use FS::svc_acct; -#use FS::svc_domain; - -use FS::ClientAPI; #hmm -FS::ClientAPI->register_handlers( - 'passwd/passwd' => \&passwd, - 'passwd/chfn' => \&chfn, - 'passwd/chsh' => \&chsh, -); - -sub passwd { - my $packet = shift; - - #my $domain = qsearchs('svc_domain', { 'domain' => $packet->{'domain'} } ) - # or return { error => "Domain $domain not found" }; - - my $old_password = $packet->{'old_password'}; - my $new_password = $packet->{'new_password'}; - my $new_gecos = $packet->{'new_gecos'}; - my $new_shell = $packet->{'new_shell'}; - -#false laziness w/FS::ClientAPI::MyAccount::login (needs to handle encrypted pw) - my $svc_acct = - ( length($old_password) < 13 - && qsearchs( 'svc_acct', { 'username' => $packet->{'username'}, - #'domsvc' => $svc_domain->svcnum, - '_password' => $old_password } ) - ) - || qsearchs( 'svc_acct', { 'username' => $packet->{'username'}, - #'domsvc' => $svc_domain->svcnum, - '_password' => $old_password } ); - - unless ( $svc_acct ) { return { error => 'Incorrect password.' } } - - my %hash = $svc_acct->hash; - my $new_svc_acct = new FS::svc_acct ( \%hash ); - $new_svc_acct->setfield('_password', $new_password ) - if $new_password && $new_password ne $old_password; - $new_svc_acct->setfield('finger',$new_gecos) if $new_gecos; - $new_svc_acct->setfield('shell',$new_shell) if $new_shell; - my $error = $new_svc_acct->replace($svc_acct); - - return { error => $error }; - -} - -sub chfn {} - -sub chsh {} - -1; - diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm deleted file mode 100644 index e93eaf3fc..000000000 --- a/FS/FS/Conf.pm +++ /dev/null @@ -1,972 +0,0 @@ -package FS::Conf; - -use vars qw($default_dir @config_items $DEBUG ); -use IO::File; -use File::Basename; -use FS::ConfItem; - -$DEBUG = 0; - -=head1 NAME - -FS::Conf - Freeside configuration values - -=head1 SYNOPSIS - - use FS::Conf; - - $conf = new FS::Conf "/config/directory"; - - $FS::Conf::default_dir = "/config/directory"; - $conf = new FS::Conf; - - $dir = $conf->dir; - - $value = $conf->config('key'); - @list = $conf->config('key'); - $bool = $conf->exists('key'); - - $conf->touch('key'); - $conf->set('key' => 'value'); - $conf->delete('key'); - - @config_items = $conf->config_items; - -=head1 DESCRIPTION - -Read and write Freeside configuration values. Keys currently map to filenames, -but this may change in the future. - -=head1 METHODS - -=over 4 - -=item new [ DIRECTORY ] - -Create a new configuration object. A directory arguement is required if -$FS::Conf::default_dir has not been set. - -=cut - -sub new { - my($proto,$dir) = @_; - my($class) = ref($proto) || $proto; - my($self) = { 'dir' => $dir || $default_dir } ; - bless ($self, $class); -} - -=item dir - -Returns the directory. - -=cut - -sub dir { - my($self) = @_; - my $dir = $self->{dir}; - -e $dir or die "FATAL: $dir doesn't exist!"; - -d $dir or die "FATAL: $dir isn't a directory!"; - -r $dir or die "FATAL: Can't read $dir!"; - -x $dir or die "FATAL: $dir not searchable (executable)!"; - $dir =~ /^(.*)$/; - $1; -} - -=item config KEY - -Returns the configuration value or values (depending on context) for key. - -=cut - -sub config { - my($self,$file)=@_; - my($dir)=$self->dir; - my $fh = new IO::File "<$dir/$file" or return; - if ( wantarray ) { - map { - /^(.*)$/ - or die "Illegal line (array context) in $dir/$file:\n$_\n"; - $1; - } <$fh>; - } else { - <$fh> =~ /^(.*)$/ - or die "Illegal line (scalar context) in $dir/$file:\n$_\n"; - $1; - } -} - -=item exists KEY - -Returns true if the specified key exists, even if the corresponding value -is undefined. - -=cut - -sub exists { - my($self,$file)=@_; - my($dir) = $self->dir; - -e "$dir/$file"; -} - -=item touch KEY - -Creates the specified configuration key if it does not exist. - -=cut - -sub touch { - my($self, $file) = @_; - my $dir = $self->dir; - unless ( $self->exists($file) ) { - warn "[FS::Conf] TOUCH $file\n" if $DEBUG; - system('touch', "$dir/$file"); - } -} - -=item set KEY VALUE - -Sets the specified configuration key to the given value. - -=cut - -sub set { - my($self, $file, $value) = @_; - my $dir = $self->dir; - $value =~ /^(.*)$/s; - $value = $1; - unless ( join("\n", @{[ $self->config($file) ]}) eq $value ) { - warn "[FS::Conf] SET $file\n" if $DEBUG; -# warn "$dir" if is_tainted($dir); -# warn "$dir" if is_tainted($file); - chmod 0644, "$dir/$file"; - my $fh = new IO::File ">$dir/$file" or return; - chmod 0644, "$dir/$file"; - print $fh "$value\n"; - } -} -#sub is_tainted { -# return ! eval { join('',@_), kill 0; 1; }; -# } - -=item delete KEY - -Deletes the specified configuration key. - -=cut - -sub delete { - my($self, $file) = @_; - my $dir = $self->dir; - if ( $self->exists($file) ) { - warn "[FS::Conf] DELETE $file\n"; - unlink "$dir/$file"; - } -} - -=item config_items - -Returns all of the possible configuration items as FS::ConfItem objects. See -L. - -=cut - -sub config_items { - my $self = shift; - #quelle kludge - @config_items, - map { - my $basename = basename($_); - $basename =~ /^(.*)$/; - $basename = $1; - new FS::ConfItem { - 'key' => $basename, - 'section' => 'billing', - 'description' => 'Alternate template file for invoices. See the billing documentation for details.', - 'type' => 'textarea', - } - } glob($self->dir. '/invoice_template_*') - ; -} - -=back - -=head1 BUGS - -If this was more than just crud that will never be useful outside Freeside I'd -worry that config_items is freeside-specific and icky. - -=head1 SEE ALSO - -"Configuration" in the web interface (config/config.cgi). - -httemplate/docs/config.html - -=cut - -@config_items = map { new FS::ConfItem $_ } ( - - { - 'key' => 'address', - 'section' => 'deprecated', - 'description' => 'This configuration option is no longer used. See invoice_template instead.', - 'type' => 'text', - }, - - { - 'key' => 'alerter_template', - 'section' => 'billing', - 'description' => 'Template file for billing method expiration alerts. See the billing documentation for details.', - 'type' => 'textarea', - }, - - { - 'key' => 'apacheroot', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a www_shellcommands export instead. The directory containing Apache virtual hosts', - 'type' => 'text', - }, - - { - 'key' => 'apacheip', - 'section' => 'apache', - 'description' => 'The current IP address to assign to new virtual hosts', - 'type' => 'text', - }, - - { - 'key' => 'apachemachine', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a www_shellcommands export instead. A machine with the apacheroot directory and user home directories. The existance of this file enables setup of virtual host directories, and, in conjunction with the `home\' configuration file, symlinks into user home directories.', - 'type' => 'text', - }, - - { - 'key' => 'apachemachines', - 'section' => 'apache', - 'description' => 'Your Apache machines, one per line. This enables export of `/etc/apache/vhosts.conf\', which can be included in your Apache configuration via the Include directive.', - 'type' => 'textarea', - }, - - { - 'key' => 'bindprimary', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a bind export instead. Your BIND primary nameserver. This enables export of /var/named/named.conf and zone files into /var/named', - 'type' => 'text', - }, - - { - 'key' => 'bindsecondaries', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a bind_slave export instead. Your BIND secondary nameservers, one per line. This enables export of /var/named/named.conf', - 'type' => 'textarea', - }, - - { - 'key' => 'business-onlinepayment', - 'section' => 'billing', - 'description' => 'Business::OnlinePayment support, at least three lines: processor, login, and password. An optional fourth line specifies the action or actions (multiple actions are separated with `,\': for example: `Authorization Only, Post Authorization\'). Optional additional lines are passed to Business::OnlinePayment as %processor_options.', - 'type' => 'textarea', - }, - - { - 'key' => 'business-onlinepayment-description', - 'section' => 'billing', - 'description' => 'String passed as the description field to Business::OnlinePayment. Evaluated as a double-quoted perl string, with the following variables available: $agent (the agent name), and $pkgs (a comma-separated list of packages to which the invoiced being charged applies)', - 'type' => 'text', - }, - - { - 'key' => 'bsdshellmachines', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a bsdshell export instead. Your BSD flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd\' and `/etc/master.passwd\'.', - 'type' => 'textarea', - }, - - { - 'key' => 'countrydefault', - 'section' => 'UI', - 'description' => 'Default two-letter country code (if not supplied, the default is `US\')', - 'type' => 'text', - }, - - { - 'key' => 'cybercash3.2', - 'section' => 'billing', - 'description' => 'CyberCash Cashregister v3.2 support. Two lines: the full path and name of your merchant_conf file, and the transaction type (`mauthonly\' or `mauthcapture\').', - 'type' => 'textarea', - }, - - { - 'key' => 'cyrus', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a cyrus export instead. This option used to integrate with Cyrus IMAP Server, three lines: IMAP server, admin username, and admin password. Cyrus::IMAP::Admin should be installed locally and the connection to the server secured.', - 'type' => 'textarea', - }, - - { - 'key' => 'cp_app', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a cp export instead. This option used to integrate with Critial Path Account Provisioning Protocol, four lines: "host:port", username, password, and workgroup (for new users).', - 'type' => 'textarea', - }, - - { - 'key' => 'deletecustomers', - 'section' => 'UI', - 'description' => 'Enable customer deletions. Be very careful! Deleting a customer will remove all traces that this customer ever existed! It should probably only be used when auditing a legacy database. Normally, you cancel all of a customers\' packages if they cancel service.', - 'type' => 'checkbox', - }, - - { - 'key' => 'deletepayments', - 'section' => 'UI', - 'description' => 'Enable deletion of unclosed payments. Be very careful! Only delete payments that were data-entry errors, not adjustments. Optionally specify one or more comma-separated email addresses to be notified when a payment is deleted.', - 'type' => [qw( checkbox text )], - }, - - { - 'key' => 'dirhash', - 'section' => 'shell', - 'description' => 'Optional numeric value to control directory hashing. If positive, hashes directories for the specified number of levels from the front of the username. If negative, hashes directories for the specified number of levels from the end of the username. Some examples:

  • 1: user -> /home/u/user
  • 2: user -> /home/u/s/user
  • -1: user -> /home/r/user
  • -2: user -> home/r/e/user
', - 'type' => 'text', - }, - - { - 'key' => 'disable_customer_referrals', - 'section' => 'UI', - 'description' => 'Disable new customer-to-customer referrals in the web interface', - 'type' => 'checkbox', - }, - - { - 'key' => 'domain', - 'section' => 'deprecated', - 'description' => 'Your domain name.', - 'type' => 'text', - }, - - { - 'key' => 'editreferrals', - 'section' => 'UI', - 'description' => 'Enable advertising source modification for existing customers', - 'type' => 'checkbox', - }, - - { - 'key' => 'emailinvoiceonly', - 'section' => 'billing', - 'description' => 'Disables postal mail invoices', - 'type' => 'checkbox', - }, - - { - 'key' => 'disablepostalinvoicedefault', - 'section' => 'billing', - 'description' => 'Disables postal mail invoices as the default option in the UI. Be careful not to setup customers which are not sent invoices. See emailinvoiceauto.', - 'type' => 'checkbox', - }, - - { - 'key' => 'emailinvoiceauto', - 'section' => 'billing', - 'description' => 'Automatically adds new accounts to the email invoice list upon customer creation', - 'type' => 'checkbox', - }, - - { - 'key' => 'erpcdmachines', - 'section' => '', - 'description' => 'Your ERPCD authenticaion machines, one per line. This enables export of `/usr/annex/acp_passwd\' and `/usr/annex/acp_dialup\'', - 'type' => 'textarea', - }, - - { - 'key' => 'hidecancelledpackages', - 'section' => 'UI', - 'description' => 'Prevent cancelled packages from showing up in listings (though they will still be in the database)', - 'type' => 'checkbox', - }, - - { - 'key' => 'hidecancelledcustomers', - 'section' => 'UI', - 'description' => 'Prevent customers with only cancelled packages from showing up in listings (though they will still be in the database)', - 'type' => 'checkbox', - }, - - { - 'key' => 'home', - 'section' => 'required', - 'description' => 'For new users, prefixed to username to create a directory name. Should have a leading but not a trailing slash.', - 'type' => 'text', - }, - - { - 'key' => 'icradiusmachines', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add an sqlradius export instead. This option used to enable radcheck and radreply table population - by default in the Freeside database, or in the database specified by the icradius_secrets config option (the radcheck and radreply tables needs to be created manually). You do not need to use MySQL for your Freeside database to export to an ICRADIUS/FreeRADIUS MySQL database with this option.
ADDITIONAL DEPRECATED FUNCTIONALITY (instead use MySQL replication or point icradius_secrets to the external database) - your ICRADIUS machines or FreeRADIUS (with MySQL authentication) machines, one per line. Machines listed in this file will have the radcheck table exported to them. Each line should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password. For example: "radius.isp.tld radius_db radius_user passw0rd"
', - 'type' => [qw( checkbox textarea )], - }, - - { - 'key' => 'icradius_mysqldest', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add an sqlradius https://billing.crosswind.net/freeside/browse/part_export.cgi">export instead. Used to be the destination directory for the MySQL databases, on the ICRADIUS/FreeRADIUS machines. Defaults to "/usr/local/var/".', - 'type' => 'text', - }, - - { - 'key' => 'icradius_mysqlsource', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add an sqlradius https://billing.crosswind.net/freeside/browse/part_export.cgi">export instead. Used to be the source directory for for the MySQL radcheck table files, on the Freeside machine. Defaults to "/usr/local/var/freeside".', - 'type' => 'text', - }, - - { - 'key' => 'icradius_secrets', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add an sqlradius https://billing.crosswind.net/freeside/browse/part_export.cgi">export instead. This option used to specify a database for ICRADIUS/FreeRADIUS export. Three lines: DBI data source, username and password.', - 'type' => 'textarea', - }, - - { - 'key' => 'invoice_from', - 'section' => 'required', - 'description' => 'Return address on email invoices', - 'type' => 'text', - }, - - { - 'key' => 'invoice_template', - 'section' => 'required', - 'description' => 'Required template file for invoices. See the billing documentation for details.', - 'type' => 'textarea', - }, - - { - 'key' => 'lpr', - 'section' => 'required', - 'description' => 'Print command for paper invoices, for example `lpr -h\'', - 'type' => 'text', - }, - - { - 'key' => 'maildisablecatchall', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, now the default. Turning this option on used to disable the requirement that each virtual domain have a catch-all mailbox.', - 'type' => 'checkbox', - }, - - { - 'key' => 'money_char', - 'section' => '', - 'description' => 'Currency symbol - defaults to `$\'', - 'type' => 'text', - }, - - { - 'key' => 'mxmachines', - 'section' => 'deprecated', - 'description' => 'MX entries for new domains, weight and machine, one per line, with trailing `.\'', - 'type' => 'textarea', - }, - - { - 'key' => 'nsmachines', - 'section' => 'deprecated', - 'description' => 'NS nameservers for new domains, one per line, with trailing `.\'', - 'type' => 'textarea', - }, - - { - 'key' => 'defaultrecords', - 'section' => 'BIND', - 'description' => 'DNS entries to add automatically when creating a domain', - 'type' => 'editlist', - 'editlist_parts' => [ { type=>'text' }, - { type=>'immutable', value=>'IN' }, - { type=>'select', - select_enum=>{ map { $_=>$_ } qw(A CNAME MX NS)} }, - { type=> 'text' }, ], - }, - - { - 'key' => 'arecords', - 'section' => 'deprecated', - 'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain', - 'type' => 'textarea', - }, - - { - 'key' => 'cnamerecords', - 'section' => 'deprecated', - 'description' => 'A list of tab seperated CNAME records to add automatically when creating a domain', - 'type' => 'textarea', - }, - - { - 'key' => 'nismachines', - 'section' => 'deprecated', - 'description' => 'DEPRECATED. Your NIS master (not slave master) machines, one per line. This enables export of `/etc/global/passwd\' and `/etc/global/shadow\'.', - 'type' => 'textarea', - }, - - { - 'key' => 'passwordmin', - 'section' => 'password', - 'description' => 'Minimum password length (default 6)', - 'type' => 'text', - }, - - { - 'key' => 'passwordmax', - 'section' => 'password', - 'description' => 'Maximum password length (default 8) (don\'t set this over 12 if you need to import or export crypt() passwords)', - 'type' => 'text', - }, - - { - 'key' => 'qmailmachines', - 'section' => 'mail', - 'description' => 'Your qmail machines, one per line. This enables export of `/var/qmail/control/virtualdomains\', `/var/qmail/control/recipientmap\', and `/var/qmail/control/rcpthosts\'. Setting this option (even if empty) also turns on user `.qmail-extension\' file maintenance in conjunction with the shellmachine option.', - 'type' => [qw( checkbox textarea )], - }, - - { - 'key' => 'radiusmachines', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add an sqlradius export instead. This option used to export to be: your RADIUS authentication machines, one per line. This enables export of `/etc/raddb/users\'.', - 'type' => 'textarea', - }, - - { - 'key' => 'referraldefault', - 'section' => 'UI', - 'description' => 'Default referral, specified by refnum', - 'type' => 'text', - }, - -# { -# 'key' => 'registries', -# 'section' => 'required', -# 'description' => 'Directory which contains domain registry information. Each registry is a directory.', -# }, - - { - 'key' => 'report_template', - 'section' => 'required', - 'description' => 'Required template file for reports. See the billing documentation for details.', - 'type' => 'textarea', - }, - - - { - 'key' => 'maxsearchrecordsperpage', - 'section' => 'UI', - 'description' => 'If set, number of search records to return per page.', - 'type' => 'text', - }, - - { - 'key' => 'sendmailconfigpath', - 'section' => 'mail', - 'description' => 'Sendmail configuration file path. Defaults to `/etc\'. Many newer distributions use `/etc/mail\'.', - 'type' => 'text', - }, - - { - 'key' => 'sendmailmachines', - 'section' => 'mail', - 'description' => 'Your sendmail machines, one per line. This enables export of `/etc/virtusertable\' and `/etc/sendmail.cw\'.', - 'type' => 'textarea', - }, - - { - 'key' => 'sendmailrestart', - 'section' => 'mail', - 'description' => 'If defined, the command which is run on sendmail machines after files are copied.', - 'type' => 'text', - }, - - { - 'key' => 'session-start', - 'section' => 'session', - 'description' => 'If defined, the command which is executed on the Freeside machine when a session begins. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.', - 'type' => 'text', - }, - - { - 'key' => 'session-stop', - 'section' => 'session', - 'description' => 'If defined, the command which is executed on the Freeside machine when a session ends. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on.', - 'type' => 'text', - }, - - { - 'key' => 'shellmachine', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a shellcommands export instead. This option used to contain a single machine with user home directories mounted. This enables home directory creation, renaming and archiving/deletion. In conjunction with `qmailmachines\', it also enables `.qmail-extension\' file maintenance.', - 'type' => 'text', - }, - - { - 'key' => 'shellmachine-useradd', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a shellcommands export instead. This option used to contain command(s) to run on shellmachine when an account is created. If the shellmachine option is set but this option is not, useradd -d $dir -m -s $shell -u $uid $username is the default. If this option is set but empty, cp -pr /etc/skel $dir; chown -R $uid.$gid $dir is the default instead. Otherwise the value is evaluated as a double-quoted perl string, with the following variables available: $username, $uid, $gid, $dir, and $shell.', - 'type' => [qw( checkbox text )], - }, - - { - 'key' => 'shellmachine-userdel', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a shellcommands export instead. This option used to contain command(s) to run on shellmachine when an account is deleted. If the shellmachine option is set but this option is not, userdel $username is the default. If this option is set but empty, rm -rf $dir is the default instead. Otherwise the value is evaluated as a double-quoted perl string, with the following variables available: $username and $dir.', - 'type' => [qw( checkbox text )], - }, - - { - 'key' => 'shellmachine-usermod', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a shellcommands export instead. This option used to contain command(s) to run on shellmachine when an account is modified. If the shellmachine option is set but this option is empty, [ -d $old_dir ] && mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir ) is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $old_dir, $new_dir, $uid and $gid.', - #'type' => [qw( checkbox text )], - 'type' => 'text', - }, - - { - 'key' => 'shellmachines', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a sysvshell export instead. Your Linux and System V flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd\' and `/etc/shadow\' files.', - 'type' => 'textarea', - }, - - { - 'key' => 'shells', - 'section' => 'required', - 'description' => 'Legal shells (think /etc/shells). You probably want to `cut -d: -f7 /etc/passwd | sort | uniq\' initially so that importing doesn\'t fail with `Illegal shell\' errors, then remove any special entries afterwords. A blank line specifies that an empty shell is permitted.', - 'type' => 'textarea', - }, - - { - 'key' => 'showpasswords', - 'section' => 'UI', - 'description' => 'Display unencrypted user passwords in the web interface', - 'type' => 'checkbox', - }, - - { - 'key' => 'signupurl', - 'section' => 'UI', - 'description' => 'if you are using customer-to-customer referrals, and you enter the URL of your signup server CGI, the customer view screen will display a customized link to the signup server with the appropriate customer as referral', - 'type' => 'text', - }, - - { - 'key' => 'smtpmachine', - 'section' => 'required', - 'description' => 'SMTP relay for Freeside\'s outgoing mail', - 'type' => 'text', - }, - - { - 'key' => 'soadefaultttl', - 'section' => 'BIND', - 'description' => 'SOA default TTL for new domains.', - 'type' => 'text', - }, - - { - 'key' => 'soaemail', - 'section' => 'BIND', - 'description' => 'SOA email for new domains, in BIND form (`.\' instead of `@\'), with trailing `.\'', - 'type' => 'text', - }, - - { - 'key' => 'soaexpire', - 'section' => 'BIND', - 'description' => 'SOA expire for new domains', - 'type' => 'text', - }, - - { - 'key' => 'soamachine', - 'section' => 'BIND', - 'description' => 'SOA machine for new domains, with trailing `.\'', - 'type' => 'text', - }, - - { - 'key' => 'soarefresh', - 'section' => 'BIND', - 'description' => 'SOA refresh for new domains', - 'type' => 'text', - }, - - { - 'key' => 'soaretry', - 'section' => 'BIND', - 'description' => 'SOA retry for new domains', - 'type' => 'text', - }, - - { - 'key' => 'statedefault', - 'section' => 'UI', - 'description' => 'Default state or province (if not supplied, the default is `CA\')', - 'type' => 'text', - }, - - { - 'key' => 'radiusprepend', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, real-time text radius now edits an existing file in place - just (turn off freeside-queued and) edit your RADIUS users file directly. The contents used to be be prepended to the top of the RADIUS users file (text exports only).', - 'type' => 'textarea', - }, - - { - 'key' => 'textradiusprepend', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, use RADIUS check attributes instead. The contents used to be prepended to the first line of a user\'s RADIUS entry in text exports.', - 'type' => 'text', - }, - - { - 'key' => 'unsuspendauto', - 'section' => 'billing', - 'description' => 'Enables the automatic unsuspension of suspended packages when a customer\'s balance due changes from positive to zero or negative as the result of a payment or credit', - 'type' => 'checkbox', - }, - - { - 'key' => 'usernamemin', - 'section' => 'username', - 'description' => 'Minimum username length (default 2)', - 'type' => 'text', - }, - - { - 'key' => 'usernamemax', - 'section' => 'username', - 'description' => 'Maximum username length', - 'type' => 'text', - }, - - { - 'key' => 'username-ampersand', - 'section' => 'username', - 'description' => 'Allow the ampersand character (&) in usernames. Be careful when using this option in conjunction with shellmachine-useradd and other configuration options which execute shell commands, as the ampersand will be interpreted by the shell if not quoted.', - 'type' => 'checkbox', - }, - - { - 'key' => 'username-letter', - 'section' => 'username', - 'description' => 'Usernames must contain at least one letter', - 'type' => 'checkbox', - }, - - { - 'key' => 'username-letterfirst', - 'section' => 'username', - 'description' => 'Usernames must start with a letter', - 'type' => 'checkbox', - }, - - { - 'key' => 'username-noperiod', - 'section' => 'username', - 'description' => 'Disallow periods in usernames', - 'type' => 'checkbox', - }, - - { - 'key' => 'username-nounderscore', - 'section' => 'username', - 'description' => 'Disallow underscores in usernames', - 'type' => 'checkbox', - }, - - { - 'key' => 'username-nodash', - 'section' => 'username', - 'description' => 'Disallow dashes in usernames', - 'type' => 'checkbox', - }, - - { - 'key' => 'username-uppercase', - 'section' => 'username', - 'description' => 'Allow uppercase characters in usernames', - 'type' => 'checkbox', - }, - - { - 'key' => 'username_policy', - 'section' => '', - 'description' => 'This file controls the mechanism for preventing duplicate usernames in passwd/radius files exported from svc_accts. This should be one of \'prepend domsvc\' \'append domsvc\' \'append domain\' or \'append @domain\'', - 'type' => 'select', - 'select_enum' => [ 'prepend domsvc', 'append domsvc', 'append domain', 'append @domain' ], - #'type' => 'text', - }, - - { - 'key' => 'vpopmailmachines', - 'section' => 'deprecated', - 'description' => 'DEPRECATED, add a cp export instead. This option used to contain your vpopmail pop toasters, one per line. Each line is of the form "machinename vpopdir vpopuid vpopgid". For example: poptoaster.domain.tld /home/vpopmail 508 508 Note: vpopuid and vpopgid are values taken from the vpopmail machine\'s /etc/passwd', - 'type' => 'textarea', - }, - - { - 'key' => 'vpopmailrestart', - 'section' => 'mail', - 'description' => 'If defined, the shell commands to run on vpopmail machines after files are copied. An example can be found in eg/vpopmailrestart of the source distribution.', - 'type' => 'textarea', - }, - - { - 'key' => 'safe-part_pkg', - 'section' => 'UI', - 'description' => 'Validates package definition setup and recur expressions against a preset list. Useful for webdemos, annoying to powerusers.', - 'type' => 'checkbox', - }, - - { - 'key' => 'safe-part_bill_event', - 'section' => 'UI', - 'description' => 'Validates invoice event expressions against a preset list. Useful for webdemos, annoying to powerusers.', - 'type' => 'checkbox', - }, - - { - 'key' => 'show_ss', - 'section' => 'UI', - 'description' => 'Turns on display/collection of SS# in the web interface.', - 'type' => 'checkbox', - }, - - { - 'key' => 'agent_defaultpkg', - 'section' => 'UI', - 'description' => 'Setting this option will cause new packages to be available to all agent types by default.', - 'type' => 'checkbox', - }, - - { - 'key' => 'legacy_link', - 'section' => 'UI', - 'description' => 'Display options in the web interface to link legacy pre-Freeside services.', - 'type' => 'checkbox', - }, - - { - 'key' => 'queue_dangerous_controls', - 'section' => 'UI', - 'description' => 'Enable queue modification controls on account pages and for new jobs. Unless you are a developer working on new export code, you should probably leave this off to avoid causing provisioning problems.', - 'type' => 'checkbox', - }, - - { - 'key' => 'security_phrase', - 'section' => 'password', - 'description' => 'Enable the tracking of a "security phrase" with each account. Not recommended, as it is vulnerable to social engineering.', - 'type' => 'checkbox', - }, - - { - 'key' => 'locale', - 'section' => 'UI', - 'description' => 'Message locale', - 'type' => 'select', - 'select_enum' => [ qw(en_US) ], - }, - - { - 'key' => 'signup_server-payby', - 'section' => '', - 'description' => 'Acceptable payment types for the signup server', - 'type' => 'selectmultiple', - 'select_enum' => [ qw(CARD PREPAY BILL COMP) ], - }, - - { - 'key' => 'signup_server-email', - 'section' => '', - 'description' => 'Comma-separated list of email addresses to receive notification of signups via the signup server.', - 'type' => 'text', - }, - - - { - 'key' => 'show-msgcat-codes', - 'section' => 'UI', - 'description' => 'Show msgcat codes in error messages. Turn this option on before reporting errors to the mailing list.', - 'type' => 'checkbox', - }, - - { - 'key' => 'signup_server-realtime', - 'section' => '', - 'description' => 'Run billing for signup server signups immediately, and suspend accounts which subsequently have a balance.', - 'type' => 'checkbox', - }, - - { - 'key' => 'declinetemplate', - 'section' => 'billing', - 'description' => 'Template file for credit card decline emails.', - 'type' => 'textarea', - }, - - { - 'key' => 'emaildecline', - 'section' => 'billing', - 'description' => 'Enable emailing of credit card decline notices.', - 'type' => 'checkbox', - }, - - { - 'key' => 'require_cardname', - 'section' => 'billing', - 'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.', - 'type' => 'checkbox', - }, - - { - 'key' => 'enable_taxclasses', - 'section' => 'billing', - 'description' => 'Enable per-package tax classes', - 'type' => 'checkbox', - }, - - { - 'key' => 'welcome_email', - 'section' => '', - 'description' => 'Template file for welcome email. Welcome emails are sent to the customer email invoice destination(s) each time a svc_acct record is created. See the Text::Template documentation for details on the template substitution language. The following variables are available: $username, $password, $first, $last and $pkg.', - 'type' => 'textarea', - }, - - { - 'key' => 'welcome_email-from', - 'section' => '', - 'description' => 'From: address header for welcome email', - 'type' => 'text', - }, - - { - 'key' => 'welcome_email-subject', - 'section' => '', - 'description' => 'Subject: header for welcome email', - 'type' => 'text', - }, - - { - 'key' => 'welcome_email-mimetype', - 'section' => '', - 'description' => 'MIME type for welcome email', - 'type' => 'select', - 'select_enum' => [ 'text/plain', 'text/html' ], - }, - -); - -1; - diff --git a/FS/FS/ConfItem.pm b/FS/FS/ConfItem.pm deleted file mode 100644 index 83295b4fa..000000000 --- a/FS/FS/ConfItem.pm +++ /dev/null @@ -1,63 +0,0 @@ -package FS::ConfItem; - -=head1 NAME - -FS::ConfItem - Configutaion option meta-data. - -=head1 SYNOPSIS - - use FS::Conf; - @config_items = $conf->config_items; - - foreach $item ( @config_items ) { - $key = $item->key; - $section = $item->section; - $description = $item->description; - } - -=head1 DESCRIPTION - -=head1 METHODS - -=over 4 - -=item new - -=cut - -sub new { - my $proto = shift; - my $class = ref($proto) || $proto; - my $self = @_ ? shift : {}; - bless ($self, $class); -} - -=item key - -=item section - -=item description - -=cut - -sub AUTOLOAD { - my $self = shift; - my $field = $AUTOLOAD; - $field =~ s/.*://; - $self->{$field}; -} - -=back - -=head1 BUGS - -Terse docs. - -=head1 SEE ALSO - -L - -=cut - -1; - diff --git a/FS/FS/InitHandler.pm b/FS/FS/InitHandler.pm deleted file mode 100644 index 87f507c22..000000000 --- a/FS/FS/InitHandler.pm +++ /dev/null @@ -1,88 +0,0 @@ -package FS::InitHandler; - -use strict; -use vars qw($DEBUG); -use FS::UID qw(adminsuidsetup); -use FS::Record; - -$DEBUG = 1; - -sub handler { - - use Date::Format; - use Date::Parse; - use Tie::IxHash; - use HTML::Entities; - use IO::Handle; - use IO::File; - use String::Approx; - use HTML::Widgets::SelectLayers 0.02; - #use FS::UID; - #use FS::Record; - use FS::Conf; - use FS::CGI; - use FS::Msgcat; - - use FS::agent; - use FS::agent_type; - use FS::domain_record; - use FS::cust_bill; - use FS::cust_bill_pay; - use FS::cust_credit; - use FS::cust_credit_bill; - use FS::cust_main; - use FS::cust_main_county; - use FS::cust_pay; - use FS::cust_pkg; - use FS::cust_refund; - use FS::cust_svc; - use FS::nas; - use FS::part_bill_event; - use FS::part_pkg; - use FS::part_referral; - use FS::part_svc; - use FS::pkg_svc; - use FS::port; - use FS::queue; - use FS::raddb; - use FS::session; - use FS::svc_acct; - use FS::svc_acct_pop; - use FS::svc_acct_sm; - use FS::svc_domain; - use FS::svc_forward; - use FS::svc_www; - use FS::type_pkgs; - use FS::part_export; - use FS::part_export_option; - use FS::export_svc; - use FS::msgcat; - - warn "[FS::InitHandler] handler called\n" if $DEBUG; - - #this is sure to be broken on freebsd - $> = $FS::UID::freeside_uid; - - open(MAPSECRETS,"<$FS::UID::conf_dir/mapsecrets") - or die "can't read $FS::UID::conf_dir/mapsecrets: $!"; - - my %seen; - while () { - next if /^\s*(#|$)/; - /^([\w\-\.]+)\s(.*)$/ - or do { warn "strange line in mapsecrets: $_"; next; }; - my($user, $datasrc) = ($1, $2); - next if $seen{$datasrc}++; - warn "[FS::InitHandler] preloading $datasrc for $user\n" if $DEBUG; - adminsuidsetup($user); - } - - close MAPSECRETS; - - #lalala probably broken on freebsd - ($<, $>) = ($>, $<); - $< = 0; - -} - -1; diff --git a/FS/FS/Msgcat.pm b/FS/FS/Msgcat.pm deleted file mode 100644 index 625743dc0..000000000 --- a/FS/FS/Msgcat.pm +++ /dev/null @@ -1,98 +0,0 @@ -package FS::Msgcat; - -use strict; -use vars qw( @ISA @EXPORT_OK $conf $locale $debug ); -use Exporter; -use FS::UID; -#use FS::Record qw( qsearchs ); # wtf? won't import... -use FS::Record; -use FS::Conf; -use FS::msgcat; - -@ISA = qw(Exporter); -@EXPORT_OK = qw( gettext geterror ); - -$FS::UID::callback{'Msgcat'} = sub { - $conf = new FS::Conf; - $locale = $conf->config('locale') || 'en_US'; - $debug = $conf->exists('show-msgcat-codes') -}; - -=head1 NAME - -FS::Msgcat - Message catalog functions - -=head1 SYNOPSIS - - use FS::Msgcat qw(gettext geterror); - - #simple interface for retreiving messages... - $message = gettext('msgcode'); - #or errors (includes the error code) - $message = geterror('msgcode'); - -=head1 DESCRIPTION - -FS::Msgcat provides functions to use the message catalog. If you want to -maintain the message catalog database, see L instead. - -=head1 SUBROUTINES - -=over 4 - -=item gettext MSGCODE - -Returns the full message for the supplied message code. - -=cut - -sub gettext { - $debug ? geterror(@_) : _gettext(@_); -} - -sub _gettext { - my $msgcode = shift; - my $msgcat = FS::Record::qsearchs('msgcat', { - 'msgcode' => $msgcode, - 'locale' => $locale - } ); - if ( $msgcat ) { - $msgcat->msg; - } else { - warn "WARNING: message for msgcode $msgcode in locale $locale not found"; - $msgcode; - } - -} - -=item geterror MSGCODE - -Returns the full message for the supplied message code, including the message -code. - -=cut - -sub geterror { - my $msgcode = shift; - my $msg = _gettext($msgcode); - if ( $msg eq $msgcode ) { - "Error code $msgcode (message for locale $locale not found)"; - } else { - "$msg (error code $msgcode)"; - } -} - -=back - -=head1 BUGS - -i18n/l10n, eek - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm deleted file mode 100644 index e6126a13b..000000000 --- a/FS/FS/Record.pm +++ /dev/null @@ -1,1258 +0,0 @@ -package FS::Record; - -use strict; -use vars qw( $dbdef_file $dbdef $setup_hack $AUTOLOAD @ISA @EXPORT_OK $DEBUG - $me %dbdef_cache ); -use subs qw(reload_dbdef); -use Exporter; -use Carp qw(carp cluck croak confess); -use File::CounterFile; -use Locale::Country; -use DBI qw(:sql_types); -use DBIx::DBSchema 0.19; -use FS::UID qw(dbh checkruid getotaker datasrc driver_name); -use FS::SearchCache; -use FS::Msgcat qw(gettext); - -@ISA = qw(Exporter); -@EXPORT_OK = qw(dbh fields hfields qsearch qsearchs dbdef jsearch); - -$DEBUG = 0; -$me = '[FS::Record]'; - -#ask FS::UID to run this stuff for us later -$FS::UID::callback{'FS::Record'} = sub { - $File::CounterFile::DEFAULT_DIR = "/usr/local/etc/freeside/counters.". datasrc; - $dbdef_file = "/usr/local/etc/freeside/dbdef.". datasrc; - &reload_dbdef unless $setup_hack; #$setup_hack needed now? -}; - -=head1 NAME - -FS::Record - Database record objects - -=head1 SYNOPSIS - - use FS::Record; - use FS::Record qw(dbh fields qsearch qsearchs dbdef); - - $record = new FS::Record 'table', \%hash; - $record = new FS::Record 'table', { 'column' => 'value', ... }; - - $record = qsearchs FS::Record 'table', \%hash; - $record = qsearchs FS::Record 'table', { 'column' => 'value', ... }; - @records = qsearch FS::Record 'table', \%hash; - @records = qsearch FS::Record 'table', { 'column' => 'value', ... }; - - $table = $record->table; - $dbdef_table = $record->dbdef_table; - - $value = $record->get('column'); - $value = $record->getfield('column'); - $value = $record->column; - - $record->set( 'column' => 'value' ); - $record->setfield( 'column' => 'value' ); - $record->column('value'); - - %hash = $record->hash; - - $hashref = $record->hashref; - - $error = $record->insert; - #$error = $record->add; #deprecated - - $error = $record->delete; - #$error = $record->del; #deprecated - - $error = $new_record->replace($old_record); - #$error = $new_record->rep($old_record); #deprecated - - $value = $record->unique('column'); - - $error = $record->ut_float('column'); - $error = $record->ut_number('column'); - $error = $record->ut_numbern('column'); - $error = $record->ut_money('column'); - $error = $record->ut_text('column'); - $error = $record->ut_textn('column'); - $error = $record->ut_alpha('column'); - $error = $record->ut_alphan('column'); - $error = $record->ut_phonen('column'); - $error = $record->ut_anything('column'); - $error = $record->ut_name('column'); - - $dbdef = reload_dbdef; - $dbdef = reload_dbdef "/non/standard/filename"; - $dbdef = dbdef; - - $quoted_value = _quote($value,'table','field'); - - #depriciated - $fields = hfields('table'); - if ( $fields->{Field} ) { # etc. - - @fields = fields 'table'; #as a subroutine - @fields = $record->fields; #as a method call - - -=head1 DESCRIPTION - -(Mostly) object-oriented interface to database records. Records are currently -implemented on top of DBI. FS::Record is intended as a base class for -table-specific classes to inherit from, i.e. FS::cust_main. - -=head1 CONSTRUCTORS - -=over 4 - -=item new [ TABLE, ] HASHREF - -Creates a new record. It doesn't store it in the database, though. See -L<"insert"> for that. - -Note that the object stores this hash reference, not a distinct copy of the -hash it points to. You can ask the object for a copy with the I -method. - -TABLE can only be omitted when a dervived class overrides the table method. - -=cut - -sub new { - my $proto = shift; - my $class = ref($proto) || $proto; - my $self = {}; - bless ($self, $class); - - unless ( defined ( $self->table ) ) { - $self->{'Table'} = shift; - carp "warning: FS::Record::new called with table name ". $self->{'Table'}; - } - - my $hashref = $self->{'Hash'} = shift; - - foreach my $field ( grep !defined($hashref->{$_}), $self->fields ) { - $hashref->{$field}=''; - } - - $self->_cache($hashref, shift) if $self->can('_cache') && @_; - - $self; -} - -sub new_or_cached { - my $proto = shift; - my $class = ref($proto) || $proto; - my $self = {}; - bless ($self, $class); - - $self->{'Table'} = shift unless defined ( $self->table ); - - my $hashref = $self->{'Hash'} = shift; - my $cache = shift; - if ( defined( $cache->cache->{$hashref->{$cache->key}} ) ) { - my $obj = $cache->cache->{$hashref->{$cache->key}}; - $obj->_cache($hashref, $cache) if $obj->can('_cache'); - $obj; - } else { - $cache->cache->{$hashref->{$cache->key}} = $self->new($hashref, $cache); - } - -} - -sub create { - my $proto = shift; - my $class = ref($proto) || $proto; - my $self = {}; - bless ($self, $class); - if ( defined $self->table ) { - cluck "create constructor is depriciated, use new!"; - $self->new(@_); - } else { - croak "FS::Record::create called (not from a subclass)!"; - } -} - -=item qsearch TABLE, HASHREF, SELECT, EXTRA_SQL, CACHE_OBJ - -Searches the database for all records matching (at least) the key/value pairs -in HASHREF. Returns all the records found as `FS::TABLE' objects if that -module is loaded (i.e. via `use FS::cust_main;'), otherwise returns FS::Record -objects. - -###oops, argh, FS::Record::new only lets us create database fields. -#Normal behaviour if SELECT is not specified is `*', as in -#C!; - $county_html .= ''; - } else { - $county_html .= - qq!!; - } - - my $state_html = qq!'; - - $state_html .= ''; - - my $country_html = qq!'; - - ($county_html, $state_html, $country_html); - -} - -=back - -=head1 BUGS - -regionselector? putting web ui components in here? they should probably live -somewhere else... - -=head1 SEE ALSO - -L, L, L, schema.html from the base -documentation. - -=cut - -1; - diff --git a/FS/FS/cust_main_invoice.pm b/FS/FS/cust_main_invoice.pm deleted file mode 100644 index a5533a088..000000000 --- a/FS/FS/cust_main_invoice.pm +++ /dev/null @@ -1,184 +0,0 @@ -package FS::cust_main_invoice; - -use strict; -use vars qw(@ISA $conf); -use Exporter; -use FS::Record qw( qsearchs ); -use FS::Conf; -use FS::cust_main; -use FS::svc_acct; -use FS::Msgcat qw(gettext); - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::cust_main_invoice - Object methods for cust_main_invoice records - -=head1 SYNOPSIS - - use FS::cust_main_invoice; - - $record = new FS::cust_main_invoice \%hash; - $record = new FS::cust_main_invoice { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $email_address = $record->address; - -=head1 DESCRIPTION - -An FS::cust_main_invoice object represents an invoice destination. FS::cust_main_invoice inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item destnum - primary key - -=item custnum - customer (see L) - -=item dest - Invoice destination: If numeric, a svcnum (see L), if string, a literal email address, or `POST' to enable mailing (the default if no cust_main_invoice records exist) - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new invoice destination. To add the invoice destination to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -sub table { 'cust_main_invoice'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=item delete - -Delete this record from the database. - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - - return "Can't change custnum!" unless $old->custnum == $new->custnum; - - $new->SUPER::replace($old); -} - - -=item check - -Checks all fields to make sure this is a valid invoice destination. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. - -=cut - -sub check { - my $self = shift; - - my $error = $self->ut_numbern('destnum') - || $self->ut_number('custnum') - || $self->checkdest; - ; - return $error if $error; - - return "Unknown customer" - unless qsearchs('cust_main',{ 'custnum' => $self->custnum }); - - ''; #noerror -} - -=item checkdest - -Checks the dest field only. - -#If it finds that the account ends in the -#same domain configured as the B configuration file, it will change the -#invoice destination from an email address to a service number (see -#L). - -=cut - -sub checkdest { - my $self = shift; - - my $error = $self->ut_text('dest'); - return $error if $error; - - if ( $self->dest eq 'POST' ) { - #contemplate our navel - } elsif ( $self->dest =~ /^(\d+)$/ ) { - return "Unknown local account (specified by svcnum: ". $self->dest. ")" - unless qsearchs( 'svc_acct', { 'svcnum' => $self->dest } ); - } elsif ( $self->dest =~ /^([\w\.\-\&\+]+)\@(([\w\.\-]+\.)+\w+)$/ ) { - my($user, $domain) = ($1, $2); -# if ( $domain eq $mydomain ) { -# my $svc_acct = qsearchs( 'svc_acct', { 'username' => $user } ); -# return "Unknown local account: $user\@$domain (specified literally)" -# unless $svc_acct; -# $svc_acct->svcnum =~ /^(\d+)$/ or die "Non-numeric svcnum?!"; -# $self->dest($1); -# } - $self->dest("$1\@$2"); - } else { - return gettext("illegal_email_invoice_address"); - } - - ''; #no error -} - -=item address - -Returns the literal email address for this record (or `POST'). - -=cut - -sub address { - my $self = shift; - if ( $self->dest =~ /^(\d+)$/ ) { - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $1 } ) - or return undef; - $svc_acct->email; - } else { - $self->dest; - } -} - -=back - -=head1 VERSION - -$Id: cust_main_invoice.pm,v 1.12 2002-04-12 13:22:02 ivan Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L, L - -=cut - -1; - diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm deleted file mode 100644 index 98eba704b..000000000 --- a/FS/FS/cust_pay.pm +++ /dev/null @@ -1,422 +0,0 @@ -package FS::cust_pay; - -use strict; -use vars qw( @ISA $conf $unsuspendauto $smtpmachine $invoice_from ); -use Date::Format; -use Mail::Header; -use Mail::Internet 1.44; -use Business::CreditCard; -use FS::UID qw( dbh ); -use FS::Record qw( dbh qsearch qsearchs dbh ); -use FS::cust_bill; -use FS::cust_bill_pay; -use FS::cust_main; - -@ISA = qw( FS::Record ); - -#ask FS::UID to run this stuff for us later -$FS::UID::callback{'FS::cust_pay'} = sub { - - $conf = new FS::Conf; - $unsuspendauto = $conf->exists('unsuspendauto'); - $smtpmachine = $conf->config('smtpmachine'); - $invoice_from = $conf->config('invoice_from'); - -}; - -=head1 NAME - -FS::cust_pay - Object methods for cust_pay objects - -=head1 SYNOPSIS - - use FS::cust_pay; - - $record = new FS::cust_pay \%hash; - $record = new FS::cust_pay { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::cust_pay object represents a payment; the transfer of money from a -customer. FS::cust_pay inherits from FS::Record. The following fields are -currently supported: - -=over 4 - -=item paynum - primary key (assigned automatically for new payments) - -=item custnum - customer (see L) - -=item paid - Amount of this payment - -=item _date - specified as a UNIX timestamp; see L. Also see -L and L for conversion functions. - -=item payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free) - -=item payinfo - card number, check #, or comp issuer (4-8 lowercase alphanumerics; think username), respectively - -=item paybatch - text field for tracking card processing - -=item closed - books closed flag, empty or `Y' - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new payment. To add the payment to the databse, see L<"insert">. - -=cut - -sub table { 'cust_pay'; } - -=item insert - -Adds this payment to the database. - -For backwards-compatibility and convenience, if the additional field invnum -is defined, an FS::cust_bill_pay record for the full amount of the payment -will be created. In this case, custnum is optional. - -=cut - -sub insert { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - if ( $self->invnum ) { - my $cust_bill = qsearchs('cust_bill', { 'invnum' => $self->invnum } ) - or do { - $dbh->rollback if $oldAutoCommit; - return "Unknown cust_bill.invnum: ". $self->invnum; - }; - $self->custnum($cust_bill->custnum ); - } - - my $cust_main = qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); - my $old_balance = $cust_main->balance; - - my $error = $self->check; - return $error if $error; - - $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error inserting $self: $error"; - } - - if ( $self->invnum ) { - my $cust_bill_pay = new FS::cust_bill_pay { - 'invnum' => $self->invnum, - 'paynum' => $self->paynum, - 'amount' => $self->paid, - '_date' => $self->_date, - }; - $error = $cust_bill_pay->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error inserting $cust_bill_pay: $error"; - } - } - - if ( $self->paybatch =~ /^webui-/ ) { - my @cust_pay = qsearch('cust_pay', { - 'custnum' => $self->custnum, - 'paybatch' => $self->paybatch, - } ); - if ( scalar(@cust_pay) > 1 ) { - $dbh->rollback if $oldAutoCommit; - return "a payment with webui token ". $self->paybatch. " already exists"; - } - } - - #false laziness w/ cust_credit::insert - if ( $unsuspendauto && $old_balance && $cust_main->balance <= 0 ) { - my @errors = $cust_main->unsuspend; - #return - # side-fx with nested transactions? upstack rolls back? - warn "WARNING:Errors unsuspending customer ". $cust_main->custnum. ": ". - join(' / ', @errors) - if @errors; - } - #eslaf - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -sub upgrade_replace { #1.3.x->1.4.x - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->check; - return $error if $error; - - my %new = $self->hash; - my $new = FS::cust_pay->new(\%new); - - if ( $self->invnum ) { - my $cust_bill_pay = new FS::cust_bill_pay { - 'invnum' => $self->invnum, - 'paynum' => $self->paynum, - 'amount' => $self->paid, - '_date' => $self->_date, - }; - $error = $cust_bill_pay->insert; - if ( $error =~ - /total cust_bill_pay.amount and cust_credit_bill.amount .* for invnum .* greater than cust_bill.charged/ ) { - #warn $error; - my $cust_bill = qsearchs( 'cust_bill', { 'invnum' => $self->invnum } ); - $new->custnum($cust_bill->custnum); - } elsif ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } else { - $new->custnum($cust_bill_pay->cust_bill->custnum); - } - } else { - die; - } - - $error = $new->SUPER::replace($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - - -} - -=item delete - -Deletes this payment and all associated applications (see L), -unless the closed flag is set. - -=cut - -sub delete { - my $self = shift; - return "Can't delete closed payment" if $self->closed =~ /^Y/i; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - foreach my $cust_bill_pay ( $self->cust_bill_pay ) { - my $error = $cust_bill_pay->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - my $error = $self->SUPER::delete(@_); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - if ( $conf->config('deletepayments') ne '' ) { - - my $cust_main = qsearchs('cust_main',{ 'custnum' => $self->custnum }); - #false laziness w/FS::cust_bill::send & fs_signup_server - $ENV{MAILADDRESS} = $invoice_from; #??? well as good as any - my $header = new Mail::Header ( [ - "From: $invoice_from", - "To: ". $conf->config('deletepayments'), - "Sender: $invoice_from", - "Reply-To: $invoice_from", - "Date: ". time2str("%a, %d %b %Y %X %z", time), - "Subject: FREESIDE NOTIFICATION: Payment deleted", - ] ); - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ - "This is an automatic message from your Freeside installation\n", - "informing you that the following payment has been deleted:\n", - "\n", - 'paynum: '. $self->paynum. "\n", - 'custnum: '. $self->custnum. - " (". $cust_main->last. ", ". $cust_main->first. ")\n", - 'paid: $'. sprintf("%.2f", $self->paid). "\n", - 'date: '. time2str("%a %b %e %T %Y", $self->_date). "\n", - 'payby: '. $self->payby. "\n", - 'payinfo: '. $self->payinfo. "\n", - 'paybatch: '. $self->paybatch. "\n", - ], - ); - $!=0; - $message->smtpsend( Host => $smtpmachine ) - or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or do { - $dbh->rollback if $oldAutoCommit; - return "(customer # ". $self->custnum. - ") can't send payment deletion email to ". - $conf->config('deletepayments'). - " via server $smtpmachine with SMTP: $!"; - }; - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item replace OLD_RECORD - -Currently unimplemented (accounting reasons). - -=cut - -sub replace { - return "Can't (yet?) modify cust_pay records!"; -} - -=item check - -Checks all fields to make sure this is a valid payment. If there is an error, -returns the error, otherwise returns false. Called by the insert method. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('paynum') - || $self->ut_numbern('custnum') - || $self->ut_money('paid') - || $self->ut_numbern('_date') - || $self->ut_textn('paybatch') - || $self->ut_enum('closed', [ '', 'Y' ]) - ; - return $error if $error; - - return "paid must be > 0 " if $self->paid <= 0; - - return "unknown cust_main.custnum: ". $self->custnum - unless $self->invnum - || qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); - - $self->_date(time) unless $self->_date; - - $self->payby =~ /^(CARD|BILL|COMP)$/ or return "Illegal payby"; - $self->payby($1); - - #false laziness with cust_refund::check - if ( $self->payby eq 'CARD' ) { - my $payinfo = $self->payinfo; - $payinfo =~ s/\D//g; - $self->payinfo($payinfo); - if ( $self->payinfo ) { - $self->payinfo =~ /^(\d{13,16})$/ - or return "Illegal (mistyped?) credit card number (payinfo)"; - $self->payinfo($1); - validate($self->payinfo) or return "Illegal credit card number"; - return "Unknown card type" if cardtype($self->payinfo) eq "Unknown"; - } else { - $self->payinfo('N/A'); - } - - } else { - $error = $self->ut_textn('payinfo'); - return $error if $error; - } - - ''; #no error - -} - -=item cust_bill_pay - -Returns all applications to invoices (see L) for this -payment. - -=cut - -sub cust_bill_pay { - my $self = shift; - sort { $a->_date <=> $b->_date } - qsearch( 'cust_bill_pay', { 'paynum' => $self->paynum } ) - ; -} - -=item unapplied - -Returns the amount of this payment that is still unapplied; which is -paid minus all payment applications (see L). - -=cut - -sub unapplied { - my $self = shift; - my $amount = $self->paid; - $amount -= $_->amount foreach ( $self->cust_bill_pay ); - sprintf("%.2f", $amount ); -} - -=back - -=head1 VERSION - -$Id: cust_pay.pm,v 1.21 2002-06-04 14:35:52 ivan Exp $ - -=head1 BUGS - -Delete and replace methods. - -=head1 SEE ALSO - -L, L, L, schema.html from the -base documentation. - -=cut - -1; - diff --git a/FS/FS/cust_pay_batch.pm b/FS/FS/cust_pay_batch.pm deleted file mode 100644 index c4427c387..000000000 --- a/FS/FS/cust_pay_batch.pm +++ /dev/null @@ -1,209 +0,0 @@ -package FS::cust_pay_batch; - -use strict; -use vars qw( @ISA ); -use FS::Record; -use Business::CreditCard; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::cust_pay_batch - Object methods for batch cards - -=head1 SYNOPSIS - - use FS::cust_pay_batch; - - $record = new FS::cust_pay_batch \%hash; - $record = new FS::cust_pay_batch { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::cust_pay_batch object represents a credit card transaction ready to be -batched (sent to a processor). FS::cust_pay_batch inherits from FS::Record. -Typically called by the collect method of an FS::cust_main object. The -following fields are currently supported: - -=over 4 - -=item paybatchnum - primary key (automatically assigned) - -=item cardnum - -=item exp - card expiration - -=item amount - -=item invnum - invoice - -=item custnum - customer - -=item payname - name on card - -=item first - name - -=item last - name - -=item address1 - -=item address2 - -=item city - -=item state - -=item zip - -=item country - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new record. To add the record to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -sub table { 'cust_pay_batch'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=item delete - -Delete this record from the database. If there is an error, returns the error, -otherwise returns false. - -=item replace OLD_RECORD - -#inactive -# -#Replaces the OLD_RECORD with this one in the database. If there is an error, -#returns the error, otherwise returns false. - -=cut - -sub replace { - return "Can't (yet?) replace batched transactions!"; -} - -=item check - -Checks all fields to make sure this is a valid transaction. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('paybatchnum') - || $self->ut_numbern('trancode') #depriciated - || $self->ut_number('cardnum') - || $self->ut_money('amount') - || $self->ut_number('invnum') - || $self->ut_number('custnum') - || $self->ut_text('address1') - || $self->ut_textn('address2') - || $self->ut_text('city') - || $self->ut_textn('state') - ; - - return $error if $error; - - $self->getfield('last') =~ /^([\w \,\.\-\']+)$/ or return "Illegal last name"; - $self->setfield('last',$1); - - $self->first =~ /^([\w \,\.\-\']+)$/ or return "Illegal first name"; - $self->first($1); - - my $cardnum = $self->cardnum; - $cardnum =~ s/\D//g; - $cardnum =~ /^(\d{13,16})$/ - or return "Illegal credit card number"; - $cardnum = $1; - $self->cardnum($cardnum); - validate($cardnum) or return "Illegal credit card number"; - return "Unknown card type" if cardtype($cardnum) eq "Unknown"; - - if ( $self->exp eq '' ) { - return "Expriation date required"; #unless - $self->exp(''); - } else { - if ( $self->exp =~ /^(\d{4})[\/\-](\d{1,2})[\/\-](\d{1,2})$/ ) { - $self->exp("$1-$2-$3"); - } elsif ( $self->exp =~ /^(\d{1,2})[\/\-](\d{2}(\d{2})?)$/ ) { - if ( length($2) == 4 ) { - $self->exp("$2-$1-01"); - } elsif ( $2 > 98 ) { #should pry change to check for "this year" - $self->exp("19$2-$1-01"); - } else { - $self->exp("20$2-$1-01"); - } - } else { - return "Illegal expiration date"; - } - } - - if ( $self->payname eq '' ) { - $self->payname( $self->first. " ". $self->getfield('last') ); - } else { - $self->payname =~ /^([\w \,\.\-\']+)$/ - or return "Illegal billing name"; - $self->payname($1); - } - - #$self->zip =~ /^\s*(\w[\w\-\s]{3,8}\w)\s*$/ - # or return "Illegal zip: ". $self->zip; - #$self->zip($1); - - $self->country =~ /^(\w\w)$/ or return "Illegal country: ". $self->country; - $self->country($1); - - $error = $self->ut_zip('zip', $self->country); - return $error if $error; - - #check invnum, custnum, ? - - ''; #no error -} - -=back - -=head1 VERSION - -$Id: cust_pay_batch.pm,v 1.6 2002-02-22 23:08:11 ivan Exp $ - -=head1 BUGS - -There should probably be a configuration file with a list of allowed credit -card types. - -=head1 SEE ALSO - -L, L - -=cut - -1; - diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm deleted file mode 100644 index 8b65ac4bd..000000000 --- a/FS/FS/cust_pkg.pm +++ /dev/null @@ -1,710 +0,0 @@ -package FS::cust_pkg; - -use strict; -use vars qw(@ISA); -use FS::UID qw( getotaker dbh ); -use FS::Record qw( qsearch qsearchs ); -use FS::cust_svc; -use FS::part_pkg; -use FS::cust_main; -use FS::type_pkgs; -use FS::pkg_svc; - -# need to 'use' these instead of 'require' in sub { cancel, suspend, unsuspend, -# setup } -# because they load configuraion by setting FS::UID::callback (see TODO) -use FS::svc_acct; -use FS::svc_acct_sm; -use FS::svc_domain; -use FS::svc_www; -use FS::svc_forward; - -@ISA = qw( FS::Record ); - -sub _cache { - my $self = shift; - my ( $hashref, $cache ) = @_; - #if ( $hashref->{'pkgpart'} ) { - if ( $hashref->{'pkg'} ) { - # #@{ $self->{'_pkgnum'} } = (); - # my $subcache = $cache->subcache('pkgpart', 'part_pkg'); - # $self->{'_pkgpart'} = $subcache; - # #push @{ $self->{'_pkgnum'} }, - # FS::part_pkg->new_or_cached($hashref, $subcache); - $self->{'_pkgpart'} = FS::part_pkg->new($hashref); - } - if ( exists $hashref->{'svcnum'} ) { - #@{ $self->{'_pkgnum'} } = (); - my $subcache = $cache->subcache('svcnum', 'cust_svc', $hashref->{pkgnum}); - $self->{'_svcnum'} = $subcache; - #push @{ $self->{'_pkgnum'} }, - FS::cust_svc->new_or_cached($hashref, $subcache) if $hashref->{svcnum}; - } -} - -=head1 NAME - -FS::cust_pkg - Object methods for cust_pkg objects - -=head1 SYNOPSIS - - use FS::cust_pkg; - - $record = new FS::cust_pkg \%hash; - $record = new FS::cust_pkg { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->cancel; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $part_pkg = $record->part_pkg; - - @labels = $record->labels; - - $seconds = $record->seconds_since($timestamp); - - $error = FS::cust_pkg::order( $custnum, \@pkgparts ); - $error = FS::cust_pkg::order( $custnum, \@pkgparts, \@remove_pkgnums ] ); - -=head1 DESCRIPTION - -An FS::cust_pkg object represents a customer billing item. FS::cust_pkg -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item pkgnum - primary key (assigned automatically for new billing items) - -=item custnum - Customer (see L) - -=item pkgpart - Billing item definition (see L) - -=item setup - date - -=item bill - date - -=item susp - date - -=item expire - date - -=item cancel - date - -=item otaker - order taker (assigned automatically if null, see L) - -=item manual_flag - If this field is set to 1, disables the automatic -unsuspension of this package when using the B config file. - -=back - -Note: setup, bill, susp, expire and cancel are specified as UNIX timestamps; -see L. Also see L and L for -conversion functions. - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Create a new billing item. To add the item to the database, see L<"insert">. - -=cut - -sub table { 'cust_pkg'; } - -=item insert - -Adds this billing item to the database ("Orders" the item). If there is an -error, returns the error, otherwise returns false. - -=cut - -sub insert { - my $self = shift; - - # custnum might not have have been defined in sub check (for one-shot new - # customers), so check it here instead - # (is this still necessary with transactions?) - - my $error = $self->ut_number('custnum'); - return $error if $error; - - my $cust_main = $self->cust_main; - return "Unknown customer ". $self->custnum unless $cust_main; - - my $agent = qsearchs( 'agent', { 'agentnum' => $cust_main->agentnum } ); - my $pkgpart_href = $agent->pkgpart_hashref; - return "agent ". $agent->agentnum. " can't purchase pkgpart ". $self->pkgpart - unless $pkgpart_href->{ $self->pkgpart }; - - $self->SUPER::insert; - -} - -=item delete - -This method now works but you probably shouldn't use it. - -You don't want to delete billing items, because there would then be no record -the customer ever purchased the item. Instead, see the cancel method. - -=cut - -#sub delete { -# return "Can't delete cust_pkg records!"; -#} - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -Currently, custnum, setup, bill, susp, expire, and cancel may be changed. - -Changing pkgpart may have disasterous effects. See the order subroutine. - -setup and bill are normally updated by calling the bill method of a customer -object (see L). - -suspend is normally updated by the suspend and unsuspend methods. - -cancel is normally updated by the cancel method (and also the order subroutine -in some cases). - -=cut - -sub replace { - my( $new, $old ) = ( shift, shift ); - - #return "Can't (yet?) change pkgpart!" if $old->pkgpart != $new->pkgpart; - return "Can't change otaker!" if $old->otaker ne $new->otaker; - - #allow this *sigh* - #return "Can't change setup once it exists!" - # if $old->getfield('setup') && - # $old->getfield('setup') != $new->getfield('setup'); - - #some logic for bill, susp, cancel? - - $new->SUPER::replace($old); -} - -=item check - -Checks all fields to make sure this is a valid billing item. If there is an -error, returns the error, otherwise returns false. Called by the insert and -replace methods. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('pkgnum') - || $self->ut_numbern('custnum') - || $self->ut_number('pkgpart') - || $self->ut_numbern('setup') - || $self->ut_numbern('bill') - || $self->ut_numbern('susp') - || $self->ut_numbern('cancel') - ; - return $error if $error; - - if ( $self->custnum ) { - return "Unknown customer ". $self->custnum unless $self->cust_main; - } - - return "Unknown pkgpart: ". $self->pkgpart - unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); - - $self->otaker(getotaker) unless $self->otaker; - $self->otaker =~ /^(\w{0,16})$/ or return "Illegal otaker"; - $self->otaker($1); - - if ( $self->dbdef_table->column('manual_flag') ) { - $self->manual_flag =~ /^([01]?)$/ or return "Illegal manual_flag"; - $self->manual_flag($1); - } - - ''; #no error -} - -=item cancel - -Cancels and removes all services (see L and L) -in this package, then cancels the package itself (sets the cancel field to -now). - -If there is an error, returns the error, otherwise returns false. - -=cut - -sub cancel { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - foreach my $cust_svc ( - qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } ) - ) { - my $error = $cust_svc->cancel; - - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Error cancelling cust_svc: $error"; - } - - } - - unless ( $self->getfield('cancel') ) { - my %hash = $self->hash; - $hash{'cancel'} = time; - my $new = new FS::cust_pkg ( \%hash ); - $error = $new->replace($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; #no errors -} - -=item suspend - -Suspends all services (see L and L) in this -package, then suspends the package itself (sets the susp field to now). - -If there is an error, returns the error, otherwise returns false. - -=cut - -sub suspend { - my $self = shift; - my $error ; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - foreach my $cust_svc ( - qsearch( 'cust_svc', { 'pkgnum' => $self->pkgnum } ) - ) { - my $part_svc = qsearchs( 'part_svc', { 'svcpart' => $cust_svc->svcpart } ); - - $part_svc->svcdb =~ /^([\w\-]+)$/ or do { - $dbh->rollback if $oldAutoCommit; - return "Illegal svcdb value in part_svc!"; - }; - my $svcdb = $1; - require "FS/$svcdb.pm"; - - my $svc = qsearchs( $svcdb, { 'svcnum' => $cust_svc->svcnum } ); - if ($svc) { - $error = $svc->suspend; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - } - - unless ( $self->getfield('susp') ) { - my %hash = $self->hash; - $hash{'susp'} = time; - my $new = new FS::cust_pkg ( \%hash ); - $error = $new->replace($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; #no errors -} - -=item unsuspend - -Unsuspends all services (see L and L) in this -package, then unsuspends the package itself (clears the susp field). - -If there is an error, returns the error, otherwise returns false. - -=cut - -sub unsuspend { - my $self = shift; - my($error); - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - foreach my $cust_svc ( - qsearch('cust_svc',{'pkgnum'=> $self->pkgnum } ) - ) { - my $part_svc = qsearchs( 'part_svc', { 'svcpart' => $cust_svc->svcpart } ); - - $part_svc->svcdb =~ /^([\w\-]+)$/ or do { - $dbh->rollback if $oldAutoCommit; - return "Illegal svcdb value in part_svc!"; - }; - my $svcdb = $1; - require "FS/$svcdb.pm"; - - my $svc = qsearchs( $svcdb, { 'svcnum' => $cust_svc->svcnum } ); - if ($svc) { - $error = $svc->unsuspend; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - } - - unless ( ! $self->getfield('susp') ) { - my %hash = $self->hash; - $hash{'susp'} = ''; - my $new = new FS::cust_pkg ( \%hash ); - $error = $new->replace($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; #no errors -} - -=item part_pkg - -Returns the definition for this billing item, as an FS::part_pkg object (see -L). - -=cut - -sub part_pkg { - my $self = shift; - #exists( $self->{'_pkgpart'} ) - $self->{'_pkgpart'} - ? $self->{'_pkgpart'} - : qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); -} - -=item cust_svc - -Returns the services for this package, as FS::cust_svc objects (see -L) - -=cut - -sub cust_svc { - my $self = shift; - if ( $self->{'_svcnum'} ) { - values %{ $self->{'_svcnum'}->cache }; - } else { - qsearch ( 'cust_svc', { 'pkgnum' => $self->pkgnum } ); - } -} - -=item labels - -Returns a list of lists, calling the label method for all services -(see L) of this billing item. - -=cut - -sub labels { - my $self = shift; - map { [ $_->label ] } $self->cust_svc; -} - -=item cust_main - -Returns the parent customer object (see L). - -=cut - -sub cust_main { - my $self = shift; - qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); -} - -=item seconds_since TIMESTAMP - -Returns the number of seconds all accounts (see L) in this -package have been online since TIMESTAMP. - -TIMESTAMP is specified as a UNIX timestamp; see L. Also see -L and L for conversion functions. - -=cut - -sub seconds_since { - my($self, $since) = @_; - my $seconds = 0; - - foreach my $cust_svc ( - grep { $_->part_svc->svcdb eq 'svc_acct' } $self->cust_svc - ) { - $seconds += $cust_svc->seconds_since($since); - } - - $seconds; - -} - -=back - -=head1 SUBROUTINES - -=over 4 - -=item order CUSTNUM, PKGPARTS_ARYREF, [ REMOVE_PKGNUMS_ARYREF [ RETURN_CUST_PKG_ARRAYREF ] ] - -CUSTNUM is a customer (see L) - -PKGPARTS is a list of pkgparts specifying the the billing item definitions (see -L) to order for this customer. Duplicates are of course -permitted. - -REMOVE_PKGNUMS is an optional list of pkgnums specifying the billing items to -remove for this customer. The services (see L) are moved to the -new billing items. An error is returned if this is not possible (see -L). An empty arrayref is equivalent to not specifying this -parameter. - -RETURN_CUST_PKG_ARRAYREF, if specified, will be filled in with the -newly-created cust_pkg objects. - -=cut - -sub order { - my($custnum, $pkgparts, $remove_pkgnums, $return_cust_pkg) = @_; - $remove_pkgnums = [] unless defined($remove_pkgnums); - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - # generate %part_pkg - # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart - # - my($cust_main)=qsearchs('cust_main',{'custnum'=>$custnum}); - my($agent)=qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); - my %part_pkg = %{ $agent->pkgpart_hashref }; - - my(%svcnum); - # generate %svcnum - # for those packages being removed: - #@{ $svcnum{$svcpart} } goes from a svcpart to a list of FS::cust_svc objects - my($pkgnum); - foreach $pkgnum ( @{$remove_pkgnums} ) { - foreach my $cust_svc (qsearch('cust_svc',{'pkgnum'=>$pkgnum})) { - push @{ $svcnum{$cust_svc->getfield('svcpart')} }, $cust_svc; - } - } - - my @cust_svc; - #generate @cust_svc - # for those packages the customer is purchasing: - # @{$pkgparts} is a list of said packages, by pkgpart - # @cust_svc is a corresponding list of lists of FS::Record objects - foreach my $pkgpart ( @{$pkgparts} ) { - unless ( $part_pkg{$pkgpart} ) { - $dbh->rollback if $oldAutoCommit; - return "Customer not permitted to purchase pkgpart $pkgpart!"; - } - push @cust_svc, [ - map { - ( $svcnum{$_} && @{ $svcnum{$_} } ) ? shift @{ $svcnum{$_} } : (); - } map { $_->svcpart } - qsearch('pkg_svc', { pkgpart => $pkgpart, - quantity => { op=>'>', value=>'0', } } ) - ]; - } - - #special-case until this can be handled better - # move services to new svcparts - even if the svcparts don't match (svcdb - # needs to...) - # looks like they're moved in no particular order, ewwwwwwww - # and looks like just one of each svcpart can be moved... o well - - #start with still-leftover services - #foreach my $svcpart ( grep { scalar(@{ $svcnum{$_} }) } keys %svcnum ) { - foreach my $svcpart ( keys %svcnum ) { - next unless @{ $svcnum{$svcpart} }; - - my $svcdb = $svcnum{$svcpart}->[0]->part_svc->svcdb; - - #find an empty place to put one - my $i = 0; - foreach my $pkgpart ( @{$pkgparts} ) { - my @pkg_svc = - qsearch('pkg_svc', { pkgpart => $pkgpart, - quantity => { op=>'>', value=>'0', } } ); - #my @pkg_svc = - # grep { $_->quantity > 0 } qsearch('pkg_svc', { pkgpart=>$pkgpart } ); - if ( ! @{$cust_svc[$i]} #find an empty place to put them with - && grep { $svcdb eq $_->part_svc->svcdb } #with appropriate svcdb - @pkg_svc - ) { - my $new_svcpart = - ( grep { $svcdb eq $_->part_svc->svcdb } @pkg_svc )[0]->svcpart; - my $cust_svc = shift @{$svcnum{$svcpart}}; - $cust_svc->svcpart($new_svcpart); - #warn "changing from $svcpart to $new_svcpart!!!\n"; - $cust_svc[$i] = [ $cust_svc ]; - } - $i++; - } - - } - - #check for leftover services - foreach (keys %svcnum) { - next unless @{ $svcnum{$_} }; - $dbh->rollback if $oldAutoCommit; - return "Leftover services, svcpart $_: svcnum ". - join(', ', map { $_->svcnum } @{ $svcnum{$_} } ); - } - - #no leftover services, let's make changes. - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - #first cancel old packages - foreach my $pkgnum ( @{$remove_pkgnums} ) { - my($old) = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - unless ( $old ) { - $dbh->rollback if $oldAutoCommit; - return "Package $pkgnum not found to remove!"; - } - my(%hash) = $old->hash; - $hash{'cancel'}=time; - my($new) = new FS::cust_pkg ( \%hash ); - my($error)=$new->replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Couldn't update package $pkgnum: $error"; - } - } - - #now add new packages, changing cust_svc records if necessary - my $pkgpart; - while ($pkgpart=shift @{$pkgparts} ) { - - my $new = new FS::cust_pkg { - 'custnum' => $custnum, - 'pkgpart' => $pkgpart, - }; - my $error = $new->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Couldn't insert new cust_pkg record: $error"; - } - push @{$return_cust_pkg}, $new if $return_cust_pkg; - my $pkgnum = $new->pkgnum; - - foreach my $cust_svc ( @{ shift @cust_svc } ) { - my(%hash) = $cust_svc->hash; - $hash{'pkgnum'}=$pkgnum; - my $new = new FS::cust_svc ( \%hash ); - - #avoid Record diffing missing changed svcpart field from above. - my $old = qsearchs('cust_svc', { 'svcnum' => $cust_svc->svcnum } ); - - my $error = $new->replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Couldn't link old service to new package: $error"; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; #no errors -} - -=back - -=head1 VERSION - -$Id: cust_pkg.pm,v 1.22 2002-05-22 12:17:06 ivan Exp $ - -=head1 BUGS - -sub order is not OO. Perhaps it should be moved to FS::cust_main and made so? - -In sub order, the @pkgparts array (passed by reference) is clobbered. - -Also in sub order, no money is adjusted. Once FS::part_pkg defines a standard -method to pass dates to the recur_prog expression, it should do so. - -FS::svc_acct, FS::svc_acct_sm, and FS::svc_domain are loaded via 'use' at -compile time, rather than via 'require' in sub { setup, suspend, unsuspend, -cancel } because they use %FS::UID::callback to load configuration values. -Probably need a subroutine which decides what to do based on whether or not -we've fetched the user yet, rather than a hash. See FS::UID and the TODO. - -Now that things are transactional should the check in the insert method be -moved to check ? - -=head1 SEE ALSO - -L, L, L, L, -L, schema.html from the base documentation - -=cut - -1; - diff --git a/FS/FS/cust_refund.pm b/FS/FS/cust_refund.pm deleted file mode 100644 index 8fe6876d3..000000000 --- a/FS/FS/cust_refund.pm +++ /dev/null @@ -1,282 +0,0 @@ -package FS::cust_refund; - -use strict; -use vars qw( @ISA ); -use Business::CreditCard; -use FS::Record qw( qsearchs dbh ); -use FS::UID qw(getotaker); -use FS::cust_credit; -use FS::cust_credit_refund; -use FS::cust_main; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::cust_refund - Object method for cust_refund objects - -=head1 SYNOPSIS - - use FS::cust_refund; - - $record = new FS::cust_refund \%hash; - $record = new FS::cust_refund { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::cust_refund represents a refund: the transfer of money to a customer; -equivalent to a negative payment (see L). FS::cust_refund -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item refundnum - primary key (assigned automatically for new refunds) - -=item custnum - customer (see L) - -=item refund - Amount of the refund - -=item _date - specified as a UNIX timestamp; see L. Also see -L and L for conversion functions. - -=item payby - `CARD' (credit cards), `BILL' (billing), or `COMP' (free) - -=item payinfo - card number, P.O.#, or comp issuer (4-8 lowercase alphanumerics; think username) - -=item paybatch - text field for tracking card processing - -=item otaker - order taker (assigned automatically, see L) - -=item closed - books closed flag, empty or `Y' - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new refund. To add the refund to the database, see L<"insert">. - -=cut - -sub table { 'cust_refund'; } - -=item insert - -Adds this refund to the database. - -For backwards-compatibility and convenience, if the additional field crednum is -defined, an FS::cust_credit_refund record for the full amount of the refund -will be created. In this case, custnum is optional. - -=cut - -sub insert { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - if ( $self->crednum ) { - my $cust_credit = qsearchs('cust_credit', { 'crednum' => $self->crednum } ) - or do { - $dbh->rollback if $oldAutoCommit; - return "Unknown cust_credit.crednum: ". $self->crednum; - }; - $self->custnum($cust_credit->custnum); - } - - my $error = $self->check; - return $error if $error; - - $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - if ( $self->crednum ) { - my $cust_credit_refund = new FS::cust_credit_refund { - 'crednum' => $self->crednum, - 'refundnum' => $self->refundnum, - 'amount' => $self->refund, - '_date' => $self->_date, - }; - $error = $cust_credit_refund->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - #$self->custnum($cust_credit_refund->cust_credit->custnum); - } - - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -sub upgrade_replace { #1.3.x->1.4.x - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->check; - return $error if $error; - - my %new = $self->hash; - my $new = FS::cust_refund->new(\%new); - - if ( $self->crednum ) { - my $cust_credit_refund = new FS::cust_credit_refund { - 'crednum' => $self->crednum, - 'refundnum' => $self->refundnum, - 'amount' => $self->refund, - '_date' => $self->_date, - }; - $error = $cust_credit_refund->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - $new->custnum($cust_credit_refund->cust_credit->custnum); - } else { - die; - } - - $error = $new->SUPER::replace($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item delete - -Currently unimplemented (accounting reasons). - -=cut - -sub delete { - my $self = shift; - return "Can't delete closed refund" if $self->closed =~ /^Y/i; - $self->SUPER::delete(@_); -} - -=item replace OLD_RECORD - -Currently unimplemented (accounting reasons). - -=cut - -sub replace { - return "Can't (yet?) modify cust_refund records!"; -} - -=item check - -Checks all fields to make sure this is a valid refund. If there is an error, -returns the error, otherwise returns false. Called by the insert method. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('refundnum') - || $self->ut_numbern('custnum') - || $self->ut_money('refund') - || $self->ut_numbern('_date') - || $self->ut_textn('paybatch') - || $self->ut_enum('closed', [ '', 'Y' ]) - ; - return $error if $error; - - return "refund must be > 0 " if $self->refund <= 0; - - $self->_date(time) unless $self->_date; - - return "unknown cust_main.custnum: ". $self->custnum - unless $self->crednum - || qsearchs( 'cust_main', { 'custnum' => $self->custnum } ); - - $self->payby =~ /^(CARD|BILL|COMP)$/ or return "Illegal payby"; - $self->payby($1); - - #false laziness with cust_pay::check - if ( $self->payby eq 'CARD' ) { - my $payinfo = $self->payinfo; - $payinfo =~ s/\D//g; - $self->payinfo($payinfo); - if ( $self->payinfo ) { - $self->payinfo =~ /^(\d{13,16})$/ - or return "Illegal (mistyped?) credit card number (payinfo)"; - $self->payinfo($1); - validate($self->payinfo) or return "Illegal credit card number"; - return "Unknown card type" if cardtype($self->payinfo) eq "Unknown"; - } else { - $self->payinfo('N/A'); - } - - } else { - $error = $self->ut_textn('payinfo'); - return $error if $error; - } - - $self->otaker(getotaker); - - ''; #no error -} - -=back - -=head1 VERSION - -$Id: cust_refund.pm,v 1.18 2002-02-19 03:22:39 jeff Exp $ - -=head1 BUGS - -Delete and replace methods. - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm deleted file mode 100644 index c7cc4b322..000000000 --- a/FS/FS/cust_svc.pm +++ /dev/null @@ -1,367 +0,0 @@ -package FS::cust_svc; - -use strict; -use vars qw( @ISA ); -use Carp qw( cluck ); -use FS::Record qw( qsearch qsearchs dbh ); -use FS::cust_pkg; -use FS::part_pkg; -use FS::part_svc; -use FS::pkg_svc; -use FS::svc_acct; -use FS::svc_acct_sm; -use FS::svc_domain; -use FS::svc_forward; -use FS::domain_record; - -@ISA = qw( FS::Record ); - -sub _cache { - my $self = shift; - my ( $hashref, $cache ) = @_; - if ( $hashref->{'username'} ) { - $self->{'_svc_acct'} = FS::svc_acct->new($hashref, ''); - } - if ( $hashref->{'svc'} ) { - $self->{'_svcpart'} = FS::part_svc->new($hashref); - } -} - -=head1 NAME - -FS::cust_svc - Object method for cust_svc objects - -=head1 SYNOPSIS - - use FS::cust_svc; - - $record = new FS::cust_svc \%hash - $record = new FS::cust_svc { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - ($label, $value) = $record->label; - -=head1 DESCRIPTION - -An FS::cust_svc represents a service. FS::cust_svc inherits from FS::Record. -The following fields are currently supported: - -=over 4 - -=item svcnum - primary key (assigned automatically for new services) - -=item pkgnum - Package (see L) - -=item svcpart - Service definition (see L) - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new service. To add the refund to the database, see L<"insert">. -Services are normally created by creating FS::svc_ objects (see -L, L, and L, among others). - -=cut - -sub table { 'cust_svc'; } - -=item insert - -Adds this service to the database. If there is an error, returns the error, -otherwise returns false. - -=item delete - -Deletes this service from the database. If there is an error, returns the -error, otherwise returns false. Note that this only removes the cust_svc -record - you should probably use the B method instead. - -=item cancel - -Cancels the relevant service by calling the B method of the associated -FS::svc_XXX object (i.e. an FS::svc_acct object or FS::svc_domain object), -deleting the FS::svc_XXX record and then deleting this record. - -If there is an error, returns the error, otherwise returns false. - -=cut - -sub cancel { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $part_svc = $self->part_svc; - - $part_svc->svcdb =~ /^([\w\-]+)$/ or do { - $dbh->rollback if $oldAutoCommit; - return "Illegal svcdb value in part_svc!"; - }; - my $svcdb = $1; - require "FS/$svcdb.pm"; - - my $svc = $self->svc_x; - if ($svc) { - my $error = $svc->cancel; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Error canceling service: $error"; - } - $error = $svc->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Error deleting service: $error"; - } - } - - my $error = $self->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "Error deleting cust_svc: $error"; - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; #no errors - -} - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $new->SUPER::replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error if $error; - } - - if ( $new->svcpart != $old->svcpart ) { - my $svc_x = $new->svc_x; - my $new_svc_x = ref($svc_x)->new({$svc_x->hash}); - my $error = $new_svc_x->replace($svc_x); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error if $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; #no error - -} - -=item check - -Checks all fields to make sure this is a valid service. If there is an error, -returns the error, otehrwise returns false. Called by the insert and -replace methods. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('svcnum') - || $self->ut_numbern('pkgnum') - || $self->ut_number('svcpart') - ; - return $error if $error; - - my $part_svc = qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } ); - return "Unknown svcpart" unless $part_svc; - - if ( $self->pkgnum ) { - my $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } ); - return "Unknown pkgnum" unless $cust_pkg; - my $pkg_svc = qsearchs( 'pkg_svc', { - 'pkgpart' => $cust_pkg->pkgpart, - 'svcpart' => $self->svcpart, - }); - # or new FS::pkg_svc ( { 'pkgpart' => $cust_pkg->pkgpart, - # 'svcpart' => $self->svcpart, - # 'quantity' => 0 } ); - - my @cust_svc = qsearch('cust_svc', { - 'pkgnum' => $self->pkgnum, - 'svcpart' => $self->svcpart, - }); - return "Already ". scalar(@cust_svc). " ". $part_svc->svc. - " services for pkgnum ". $self->pkgnum - if scalar(@cust_svc) >= $pkg_svc->quantity; - } - - ''; #no error -} - -=item part_svc - -Returns the definition for this service, as a FS::part_svc object (see -L). - -=cut - -sub part_svc { - my $self = shift; - $self->{'_svcpart'} - ? $self->{'_svcpart'} - : qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } ); -} - -=item cust_pkg - -Returns the definition for this service, as a FS::part_svc object (see -L). - -=cut - -sub cust_pkg { - my $self = shift; - qsearchs( 'cust_pkg', { 'pkgnum' => $self->pkgnum } ); -} - -=item label - -Returns a list consisting of: -- The name of this service (from part_svc) -- A meaningful identifier (username, domain, or mail alias) -- The table name (i.e. svc_domain) for this service - -=cut - -sub label { - my $self = shift; - my $svcdb = $self->part_svc->svcdb; - my $svc_x = $self->svc_x - or die "can't find $svcdb.svcnum ". $self->svcnum; - my $tag; - if ( $svcdb eq 'svc_acct' ) { - $tag = $svc_x->email; - } elsif ( $svcdb eq 'svc_acct_sm' ) { - my $domuser = $svc_x->domuser eq '*' ? '(anything)' : $svc_x->domuser; - my $svc_domain = qsearchs ( 'svc_domain', { 'svcnum' => $svc_x->domsvc } ); - my $domain = $svc_domain->domain; - $tag = "$domuser\@$domain"; - } elsif ( $svcdb eq 'svc_forward' ) { - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $svc_x->srcsvc } ); - $tag = $svc_acct->email. '->'; - if ( $svc_x->dstsvc ) { - $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $svc_x->dstsvc } ); - $tag .= $svc_acct->email; - } else { - $tag .= $svc_x->dst; - } - } elsif ( $svcdb eq 'svc_domain' ) { - $tag = $svc_x->getfield('domain'); - } elsif ( $svcdb eq 'svc_www' ) { - my $domain = qsearchs( 'domain_record', { 'recnum' => $svc_x->recnum } ); - $tag = $domain->reczone; - } else { - cluck "warning: asked for label of unsupported svcdb; using svcnum"; - $tag = $svc_x->getfield('svcnum'); - } - $self->part_svc->svc, $tag, $svcdb; -} - -=item svc_x - -Returns the FS::svc_XXX object for this service (i.e. an FS::svc_acct object or -FS::svc_domain object, etc.) - -=cut - -sub svc_x { - my $self = shift; - my $svcdb = $self->part_svc->svcdb; - if ( $svcdb eq 'svc_acct' && $self->{'_svc_acct'} ) { - $self->{'_svc_acct'}; - } else { - qsearchs( $svcdb, { 'svcnum' => $self->svcnum } ); - } -} - -=item seconds_since TIMESTAMP - -See L. Equivalent to -$cust_svc->svc_x->seconds_since, but more efficient. Meaningless for records -where B is not "svc_acct". - -=cut - -#note: implementation here, POD in FS::svc_acct -sub seconds_since { - my($self, $since) = @_; - my $dbh = dbh; - my $sth = $dbh->prepare(' SELECT SUM(logout-login) FROM session - WHERE svcnum = ? - AND login >= ? - AND logout IS NOT NULL' - ) or die $dbh->errstr; - $sth->execute($self->svcnum, $since) or die $sth->errstr; - $sth->fetchrow_arrayref->[0]; -} - -=back - -=head1 VERSION - -$Id: cust_svc.pm,v 1.15 2002-05-22 12:17:06 ivan Exp $ - -=head1 BUGS - -Behaviour of changing the svcpart of cust_svc records is undefined and should -possibly be prohibited, and pkg_svc records are not checked. - -pkg_svc records are not checked in general (here). - -Deleting this record doesn't check or delete the svc_* record associated -with this record. - -=head1 SEE ALSO - -L, L, L, L, -schema.html from the base documentation - -=cut - -1; - diff --git a/FS/FS/cust_tax_exempt.pm b/FS/FS/cust_tax_exempt.pm deleted file mode 100644 index ab873c0a7..000000000 --- a/FS/FS/cust_tax_exempt.pm +++ /dev/null @@ -1,131 +0,0 @@ -package FS::cust_tax_exempt; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::cust_tax_exempt - Object methods for cust_tax_exempt records - -=head1 SYNOPSIS - - use FS::cust_tax_exempt; - - $record = new FS::cust_tax_exempt \%hash; - $record = new FS::cust_tax_exempt { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::cust_tax_exempt object represents a historical record of a customer tax -exemption. Currently this is only used for "texas tax". FS::cust_tax_exempt -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item exemptnum - primary key - -=item custnum - customer (see L) - -=item taxnum - tax rate (see L) - -=item year - -=item month - -=item amount - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new exemption record. To add the example to the database, see -L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'cust_tax_exempt'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - $self->ut_numbern('exemptnum') - || $self->ut_foreign_key('custnum', 'cust_main', 'custnum') - || $self->ut_foreign_key('taxnum', 'cust_main_county', 'taxnum') - || $self->ut_number('year') #check better - || $self->ut_number('month') #check better - || $self->ut_money('amount') - ; -} - -=back - -=head1 BUGS - -Texas tax is a royal pain in the ass. - -=head1 SEE ALSO - -L, L, L, schema.html from the -base documentation. - -=cut - -1; - diff --git a/FS/FS/domain_record.pm b/FS/FS/domain_record.pm deleted file mode 100644 index 37cc6c9e8..000000000 --- a/FS/FS/domain_record.pm +++ /dev/null @@ -1,332 +0,0 @@ -package FS::domain_record; - -use strict; -use vars qw( @ISA $noserial_hack ); -#use FS::Record qw( qsearch qsearchs ); -use FS::Record qw( qsearchs dbh ); -use FS::svc_domain; -use FS::svc_www; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::domain_record - Object methods for domain_record records - -=head1 SYNOPSIS - - use FS::domain_record; - - $record = new FS::domain_record \%hash; - $record = new FS::domain_record { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::domain_record object represents an entry in a DNS zone. -FS::domain_record inherits from FS::Record. The following fields are currently -supported: - -=over 4 - -=item recnum - primary key - -=item svcnum - Domain (see L) of this entry - -=item reczone - partial (or full) zone for this entry - -=item recaf - address family for this entry, currently only `IN' is recognized. - -=item rectype - record type for this entry (A, MX, etc.) - -=item recdata - data for this entry - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new entry. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -sub table { 'domain_record'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -sub insert { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - if ( $self->rectype eq '_mstr' ) { #delete all other records - foreach my $domain_record ( reverse $self->svc_domain->domain_record ) { - my $error = $domain_record->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - - my $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - unless ( $self->rectype =~ /^(SOA|_mstr)$/ ) { - my $error = $self->increment_serial; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item delete - -Delete this record from the database. - -=cut - -sub delete { - my $self = shift; - - return "Can't delete a domain record which has a website!" - if qsearchs( 'svc_www', { 'recnum' => $self->recnum } ); - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - unless ( $self->rectype =~ /^(SOA|_mstr)$/ ) { - my $error = $self->increment_serial; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::replace(@_); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - unless ( $self->rectype eq 'SOA' ) { - my $error = $self->increment_serial; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('recnum') - || $self->ut_number('svcnum') - ; - return $error if $error; - - return "Unknown svcnum (in svc_domain)" - unless qsearchs('svc_domain', { 'svcnum' => $self->svcnum } ); - - $self->reczone =~ /^(@|[a-z0-9\.\-\*]+)$/i - or return "Illegal reczone: ". $self->reczone; - $self->reczone($1); - - $self->recaf =~ /^(IN)$/ or return "Illegal recaf: ". $self->recaf; - $self->recaf($1); - - $self->rectype =~ /^(SOA|NS|MX|A|PTR|CNAME|_mstr)$/ - or return "Illegal rectype (only SOA NS MX A PTR CNAME recognized): ". - $self->rectype; - $self->rectype($1); - - return "Illegal reczone for ". $self->rectype. ": ". $self->reczone - if $self->rectype !~ /^MX$/i && $self->reczone =~ /\*/; - - if ( $self->rectype eq 'SOA' ) { - my $recdata = $self->recdata; - $recdata =~ s/\s+/ /g; - $recdata =~ /^([a-z0-9\.\-]+ [\w\-\+]+\.[a-z0-9\.\-]+ \( (\d+ ){5}\))$/i - or return "Illegal data for SOA record: $recdata"; - $self->recdata($1); - } elsif ( $self->rectype eq 'NS' ) { - $self->recdata =~ /^([a-z0-9\.\-]+)$/i - or return "Illegal data for NS record: ". $self->recdata; - $self->recdata($1); - } elsif ( $self->rectype eq 'MX' ) { - $self->recdata =~ /^(\d+)\s+([a-z0-9\.\-]+)$/i - or return "Illegal data for MX record: ". $self->recdata; - $self->recdata("$1 $2"); - } elsif ( $self->rectype eq 'A' ) { - $self->recdata =~ /^((\d{1,3}\.){3}\d{1,3})$/ - or return "Illegal data for A record: ". $self->recdata; - $self->recdata($1); - } elsif ( $self->rectype eq 'PTR' ) { - $self->recdata =~ /^([a-z0-9\.\-]+)$/i - or return "Illegal data for PTR record: ". $self->recdata; - $self->recdata($1); - } elsif ( $self->rectype eq 'CNAME' ) { - $self->recdata =~ /^([a-z0-9\.\-]+)$/i - or return "Illegal data for CNAME record: ". $self->recdata; - $self->recdata($1); - } elsif ( $self->rectype eq '_mstr' ) { - $self->recdata =~ /^((\d{1,3}\.){3}\d{1,3})$/ - or return "Illegal data for _master pseudo-record: ". $self->recdata; - } else { - die "ack!"; - } - - ''; #no error -} - -=item increment_serial - -=cut - -sub increment_serial { - return '' if $noserial_hack; - my $self = shift; - - my $soa = qsearchs('domain_record', { - svcnum => $self->svcnum, - reczone => '@', #or full domain ? - recaf => 'IN', - rectype => 'SOA', - } ) or return "soa record not found; can't increment serial"; - - my $data = $soa->recdata; - $data =~ s/(\(\D*)(\d+)/$1.($2+1)/e; #well, it works. - - my %hash = $soa->hash; - $hash{recdata} = $data; - my $new = new FS::domain_record \%hash; - $new->replace($soa); -} - -=item svc_domain - -Returns the domain (see L) for this record. - -=cut - -sub svc_domain { - my $self = shift; - qsearchs('svc_domain', { svcnum => $self->svcnum } ); -} - -=back - -=head1 VERSION - -$Id: domain_record.pm,v 1.11 2002-06-23 19:16:45 ivan Exp $ - -=head1 BUGS - -The data validation doesn't check everything it could. In particular, -there is no protection against bad data that passes the regex, duplicate -SOA records, forgetting the trailing `.', impossible IP addersses, etc. Of -course, it's still better than editing the zone files directly. :) - -=head1 SEE ALSO - -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/export_svc.pm b/FS/FS/export_svc.pm deleted file mode 100644 index da9ac698a..000000000 --- a/FS/FS/export_svc.pm +++ /dev/null @@ -1,123 +0,0 @@ -package FS::export_svc; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::part_export; -use FS::part_svc; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::export_svc - Object methods for export_svc records - -=head1 SYNOPSIS - - use FS::export_svc; - - $record = new FS::export_svc \%hash; - $record = new FS::export_svc { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::export_svc object links a service definition (see L) to -an export (see L). FS::export_svc inherits from FS::Record. -The following fields are currently supported: - -=over 4 - -=item exportsvcnum - primary key - -=item exportnum - export (see L) - -=item svcpart - service definition (see L) - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new record. To add the record to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'export_svc'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid record. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - $self->ut_numbern('exportsvcnum') - || $self->ut_number('exportnum') - || $self->ut_foreign_key('exportnum', 'part_export', 'exportnum') - || $self->ut_number('svcpart') - || $self->ut_foreign_key('svcpart', 'part_svc', 'svcpart') - ; -} - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L, L, L, schema.html from the base -documentation. - -=cut - -1; - diff --git a/FS/FS/msgcat.pm b/FS/FS/msgcat.pm deleted file mode 100644 index fa10d34fa..000000000 --- a/FS/FS/msgcat.pm +++ /dev/null @@ -1,132 +0,0 @@ -package FS::msgcat; - -use strict; -use vars qw( @ISA ); -use Exporter; -use FS::UID; -use FS::Record qw( qsearchs ); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::msgcat - Object methods for message catalog entries - -=head1 SYNOPSIS - - use FS::msgcat; - - $record = new FS::msgcat \%hash; - $record = new FS::msgcat { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::msgcat object represents an message catalog entry. FS::msgcat inherits -from FS::Record. The following fields are currently supported: - -=over 4 - -=item msgnum - primary key - -=item msgcode - Error code - -=item locale - Locale - -=item msg - Message - -=back - -If you just want to B message catalogs, see L. - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new example. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'msgcat'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('msgnum') - || $self->ut_text('msgcode') - || $self->ut_text('msg') - ; - return $error if $error; - - $self->locale =~ /^([\w\@]+)$/ or return "illegal locale: ". $self->locale; - $self->locale($1); - - ''; #no error -} - -=back - -=head1 BUGS - -i18n/l10n, eek - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/nas.pm b/FS/FS/nas.pm deleted file mode 100644 index 58c6827ea..000000000 --- a/FS/FS/nas.pm +++ /dev/null @@ -1,152 +0,0 @@ -package FS::nas; - -use strict; -use vars qw( @ISA ); -use FS::Record qw(qsearchs); #qsearch); -use FS::UID qw( dbh ); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::nas - Object methods for nas records - -=head1 SYNOPSIS - - use FS::nas; - - $record = new FS::nas \%hash; - $record = new FS::nas { - 'nasnum' => 1, - 'nasip' => '10.4.20.23', - 'nasfqdn' => 'box1.brc.nv.us.example.net', - }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->heartbeat($timestamp); - -=head1 DESCRIPTION - -An FS::nas object represents an Network Access Server on your network, such as -a terminal server or equivalent. FS::nas inherits from FS::Record. The -following fields are currently supported: - -=over 4 - -=item nasnum - primary key - -=item nas - NAS name - -=item nasip - NAS ip address - -=item nasfqdn - NAS fully-qualified domain name - -=item last - timestamp indicating the last instant the NAS was in a known - state (used by the session monitoring). - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new NAS. To add the NAS to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'nas'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - $self->ut_numbern('nasnum') - || $self->ut_text('nas') - || $self->ut_ip('nasip') - || $self->ut_domain('nasfqdn') - || $self->ut_numbern('last'); -} - -=item heartbeat TIMESTAMP - -Updates the timestamp for this nas - -=cut - -sub heartbeat { - my($self, $timestamp) = @_; - my $dbh = dbh; - my $sth = - $dbh->prepare("UPDATE nas SET last = ? WHERE nasnum = ? AND last < ?"); - $sth->execute($timestamp, $self->nasnum, $timestamp) or die $sth->errstr; - $self->last($timestamp); -} - -=back - -=head1 VERSION - -$Id: nas.pm,v 1.6 2002-03-04 12:48:49 ivan Exp $ - -=head1 BUGS - -heartbeat method uses SQL directly and doesn't update history tables. - -=head1 SEE ALSO - -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_bill_event.pm b/FS/FS/part_bill_event.pm deleted file mode 100644 index a31b09b36..000000000 --- a/FS/FS/part_bill_event.pm +++ /dev/null @@ -1,183 +0,0 @@ -package FS::part_bill_event; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::Conf; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::part_bill_event - Object methods for part_bill_event records - -=head1 SYNOPSIS - - use FS::part_bill_event; - - $record = new FS::part_bill_event \%hash; - $record = new FS::part_bill_event { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_bill_event object represents an invoice event definition - -a callback which is triggered when an invoice is a certain amount of time -overdue. FS::part_bill_event inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item eventpart - primary key - -=item payby - CARD, BILL, or COMP - -=item event - event name - -=item eventcode - event action - -=item seconds - how long after the invoice date events of this type are triggered - -=item weight - ordering for events with identical seconds - -=item plan - eventcode plan - -=item plandata - additional plan data - -=item disabled - Disabled flag, empty or `Y' - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new invoice event definition. To add the example to the database, -see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'part_bill_event'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid invoice event definition. If -there is an error, returns the error, otherwise returns false. Called by the -insert and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - $self->weight(0) unless $self->weight; - - my $conf = new FS::Conf; - if ( $conf->exists('safe-part_bill_event') ) { - my $error = $self->ut_anything('eventcode'); - return $error if $error; - - my $c = $self->eventcode; - - $c =~ /^\s*\$cust_main\->(suspend|cancel|invoicing_list_addpost|bill|collect)\(\);\s*("";)?\s*$/ - - or $c =~ /^\s*\$cust_bill\->(comp|realtime_card|realtime_card_cybercash|batch_card|send)\(\);\s*$/ - - or $c =~ /^\s*\$cust_bill\->send\(\'\w+\'\);\s*$/ - - or $c =~ /^\s*\$cust_main\->apply_payments; \$cust_main->apply_credits; "";\s*$/ - - or $c =~ /^\s*\$cust_main\->charge\( \s*\d*\.?\d*\s*,\s*\'[\w \!\@\#\$\%\&\(\)\-\+\;\:\"\,\.\?\/]*\'\s*\);\s*$/ - - or do { - #log - return "illegal eventcode: $c"; - }; - - } - - my $error = $self->ut_numbern('eventpart') - || $self->ut_enum('payby', [qw( CARD BILL COMP )] ) - || $self->ut_text('event') - || $self->ut_anything('eventcode') - || $self->ut_number('seconds') - || $self->ut_enum('disabled', [ '', 'Y' ] ) - || $self->ut_number('weight') - || $self->ut_textn('plan') - || $self->ut_anything('plandata') - ; - return $error if $error; - - #quelle kludge - if ( $self->plandata =~ /^templatename\s+(.*)$/ ) { - my $name= $1; - unless ( $conf->exists("invoice_template_$name") ) { - $conf->set( - "invoice_template_$name" => - join("\n", $conf->config('invoice_template') ) - ); - } - } - - ''; - -} - -=back - -=head1 BUGS - -Alas. - -=head1 SEE ALSO - -L, L, L, schema.html from the -base documentation. - -=cut - -1; - diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm deleted file mode 100644 index 4f45fbeec..000000000 --- a/FS/FS/part_export.pm +++ /dev/null @@ -1,850 +0,0 @@ -package FS::part_export; - -use strict; -use vars qw( @ISA @EXPORT_OK %exports ); -use Exporter; -use Tie::IxHash; -use FS::Record qw( qsearch qsearchs dbh ); -use FS::part_svc; -use FS::part_export_option; -use FS::export_svc; - -@ISA = qw(FS::Record); -@EXPORT_OK = qw(export_info); - -=head1 NAME - -FS::part_export - Object methods for part_export records - -=head1 SYNOPSIS - - use FS::part_export; - - $record = new FS::part_export \%hash; - $record = new FS::part_export { 'column' => 'value' }; - - #($new_record, $options) = $template_recored->clone( $svcpart ); - - $error = $record->insert( { 'option' => 'value' } ); - $error = $record->insert( \%options ); - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_export object represents an export of Freeside data to an external -provisioning system. FS::part_export inherits from FS::Record. The following -fields are currently supported: - -=over 4 - -=item exportnum - primary key - -=item machine - Machine name - -=item exporttype - Export type - -=item nodomain - blank or "Y" : usernames are exported to this service with no domain - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new export. To add the export to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'part_export'; } - -=cut - -#=item clone SVCPART -# -#An alternate constructor. Creates a new export by duplicating an existing -#export. The given svcpart is assigned to the new export. -# -#Returns a list consisting of the new export object and a hashref of options. -# -#=cut -# -#sub clone { -# my $self = shift; -# my $class = ref($self); -# my %hash = $self->hash; -# $hash{'exportnum'} = ''; -# $hash{'svcpart'} = shift; -# ( $class->new( \%hash ), -# { map { $_->optionname => $_->optionvalue } -# qsearch('part_export_option', { 'exportnum' => $self->exportnum } ) -# } -# ); -#} - -=item insert HASHREF - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -If a hash reference of options is supplied, part_export_option records are -created (see L). - -=cut - -#false laziness w/queue.pm -sub insert { - my $self = shift; - my $options = shift; - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $optionname ( keys %{$options} ) { - my $part_export_option = new FS::part_export_option ( { - 'exportnum' => $self->exportnum, - 'optionname' => $optionname, - 'optionvalue' => $options->{$optionname}, - } ); - $error = $part_export_option->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item delete - -Delete this record from the database. - -=cut - -#foreign keys would make this much less tedious... grr dumb mysql -sub delete { - my $self = shift; - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $part_export_option ( $self->part_export_option ) { - my $error = $part_export_option->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - foreach my $export_svc ( $self->export_svc ) { - my $error = $export_svc->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item replace OLD_RECORD HASHREF - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -If a hash reference of options is supplied, part_export_option records are -created or modified (see L). - -=cut - -sub replace { - my $self = shift; - my $old = shift; - my $options = shift; - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $optionname ( keys %{$options} ) { - my $old = qsearchs( 'part_export_option', { - 'exportnum' => $self->exportnum, - 'optionname' => $optionname, - } ); - my $new = new FS::part_export_option ( { - 'exportnum' => $self->exportnum, - 'optionname' => $optionname, - 'optionvalue' => $options->{$optionname}, - } ); - $new->optionnum($old->optionnum) if $old; - my $error = $old ? $new->replace($old) : $new->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - #remove extraneous old options - foreach my $opt ( - grep { !exists $options->{$_->optionname} } $old->part_export_option - ) { - my $error = $opt->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -}; - -=item check - -Checks all fields to make sure this is a valid export. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - my $error = - $self->ut_numbern('exportnum') - || $self->ut_domain('machine') - || $self->ut_alpha('exporttype') - ; - return $error if $error; - - warn $self->machine. "!!!\n"; - - $self->machine =~ /^([\w\-\.]*)$/ - or return "Illegal machine: ". $self->machine; - $self->machine($1); - - $self->nodomain =~ /^(Y?)$/ or return "Illegal nodomain: ". $self->nodomain; - $self->nodomain($1); - - $self->deprecated(1); #BLAH - - #check exporttype? - - ''; #no error -} - -#=item part_svc -# -#Returns the service definition (see L) for this export. -# -#=cut -# -#sub part_svc { -# my $self = shift; -# qsearchs('part_svc', { svcpart => $self->svcpart } ); -#} - -sub part_svc { - use Carp; - croak "FS::part_export::part_svc deprecated"; - #confess "FS::part_export::part_svc deprecated"; -} - -=item export_svc - -Returns a list of associated FS::export_svc records. - -=cut - -sub export_svc { - my $self = shift; - qsearch('export_svc', { 'exportnum' => $self->exportnum } ); -} - -=item part_export_option - -Returns all options as FS::part_export_option objects (see -L). - -=cut - -sub part_export_option { - my $self = shift; - qsearch('part_export_option', { 'exportnum' => $self->exportnum } ); -} - -=item options - -Returns a list of option names and values suitable for assigning to a hash. - -=cut - -sub options { - my $self = shift; - map { $_->optionname => $_->optionvalue } $self->part_export_option; -} - -=item option OPTIONNAME - -Returns the option value for the given name, or the empty string. - -=cut - -sub option { - my $self = shift; - my $part_export_option = - qsearchs('part_export_option', { - exportnum => $self->exportnum, - optionname => shift, - } ); - $part_export_option ? $part_export_option->optionvalue : ''; -} - -=item rebless - -Reblesses the object into the FS::part_export::EXPORTTYPE class, where -EXPORTTYPE is the object's I field. There should be better docs -on how to create new exports (and they should live in their own files and be -autoloaded-on-demand), but until then, see L. - -=cut - -sub rebless { - my $self = shift; - my $exporttype = $self->exporttype; - my $class = ref($self). "::$exporttype"; - eval "use $class;"; - die $@ if $@; - bless($self, $class); -} - -=item export_insert SVC_OBJECT - -=cut - -sub export_insert { - my $self = shift; - $self->rebless; - $self->_export_insert(@_); -} - -#sub AUTOLOAD { -# my $self = shift; -# $self->rebless; -# my $method = $AUTOLOAD; -# #$method =~ s/::(\w+)$/::_$1/; #infinite loop prevention -# $method =~ s/::(\w+)$/_$1/; #infinite loop prevention -# $self->$method(@_); -#} - -=item export_replace NEW OLD - -=cut - -sub export_replace { - my $self = shift; - $self->rebless; - $self->_export_replace(@_); -} - -=item export_delete - -=cut - -sub export_delete { - my $self = shift; - $self->rebless; - $self->_export_delete(@_); -} - -=item export_suspend - -=cut - -sub export_suspend { - my $self = shift; - $self->rebless; - $self->_export_suspend(@_); -} - -=item export_unsuspend - -=cut - -sub export_unsuspend { - my $self = shift; - $self->rebless; - $self->_export_unsuspend(@_); -} - -#fallbacks providing useful error messages intead of infinite loops -sub _export_insert { - my $self = shift; - return "_export_insert: unknown export type ". $self->exporttype; -} - -sub _export_replace { - my $self = shift; - return "_export_replace: unknown export type ". $self->exporttype; -} - -sub _export_delete { - my $self = shift; - return "_export_delete: unknown export type ". $self->exporttype; -} - -#fallbacks providing null operations - -sub _export_suspend { - my $self = shift; - #warn "warning: _export_suspened unimplemented for". ref($self); - ''; -} - -sub _export_unsuspend { - my $self = shift; - #warn "warning: _export_unsuspend unimplemented for ". ref($self); - ''; -} - -=back - -=head1 SUBROUTINES - -=over 4 - -=item export_info [ SVCDB ] - -Returns a hash reference of the exports for the given I, or if no -I is specified, for all exports. The keys of the hash are -Is and the values are again hash references containing information -on the export: - - 'desc' => 'Description', - 'options' => { - 'option' => { label=>'Option Label' }, - 'option2' => { label=>'Another label' }, - }, - 'nodomain' => 'Y', #or '' - 'notes' => 'Additional notes', - -=cut - -sub export_info { - #warn $_[0]; - return $exports{$_[0]} if @_; - #{ map { %{$exports{$_}} } keys %exports }; - my $r = { map { %{$exports{$_}} } keys %exports }; -} - -#=item exporttype2svcdb EXPORTTYPE -# -#Returns the applicable I for an I. -# -#=cut -# -#sub exporttype2svcdb { -# my $exporttype = $_[0]; -# foreach my $svcdb ( keys %exports ) { -# return $svcdb if grep { $exporttype eq $_ } keys %{$exports{$svcdb}}; -# } -# ''; -#} - -tie my %sysvshell_options, 'Tie::IxHash', - 'crypt' => { label=>'Password encryption', - type=>'select', options=>[qw(crypt md5)], - default=>'crypt', - }, -; - -tie my %bsdshell_options, 'Tie::IxHash', - 'crypt' => { label=>'Password encryption', - type=>'select', options=>[qw(crypt md5)], - default=>'crypt', - }, -; - -tie my %shellcommands_options, 'Tie::IxHash', - #'machine' => { label=>'Remote machine' }, - 'user' => { label=>'Remote username', default=>'root' }, - 'useradd' => { label=>'Insert command', - default=>'useradd -d $dir -m -s $shell -u $uid -p $crypt_password $username' - #default=>'cp -pr /etc/skel $dir; chown -R $uid.$gid $dir' - }, - 'useradd_stdin' => { label=>'Insert command STDIN', - type =>'textarea', - default=>'', - }, - 'userdel' => { label=>'Delete command', - default=>'userdel -r $username', - #default=>'rm -rf $dir', - }, - 'userdel_stdin' => { label=>'Delete command STDIN', - type =>'textarea', - default=>'', - }, - 'usermod' => { label=>'Modify command', - default=>'usermod -d $new_dir -m -l $new_username -s $new_shell -u $new_uid -p $new_crypt_password $old_username', - #default=>'[ -d $old_dir ] && mv $old_dir $new_dir || ( '. - # 'chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; '. - # 'find . -depth -print | cpio -pdm $new_dir; '. - # 'chmod u-t $new_dir; chown -R $uid.$gid $new_dir; '. - # 'rm -rf $old_dir'. - #')' - }, - 'usermod_stdin' => { label=>'Modify command STDIN', - type =>'textarea', - default=>'', - }, -; - -tie my %shellcommands_withdomain_options, 'Tie::IxHash', - 'user' => { label=>'Remote username', default=>'root' }, - 'useradd' => { label=>'Insert command', - #default=>'' - }, - 'useradd_stdin' => { label=>'Insert command STDIN', - type =>'textarea', - #default=>"$_password\n$_password\n", - }, - 'userdel' => { label=>'Delete command', - #default=>'', - }, - 'userdel_stdin' => { label=>'Delete command STDIN', - type =>'textarea', - #default=>'', - }, - 'usermod' => { label=>'Modify command', - default=>'', - }, - 'usermod_stdin' => { label=>'Modify command STDIN', - type =>'textarea', - #default=>"$_password\n$_password\n", - }, -; - -tie my %www_shellcommands_options, 'Tie::IxHash', - 'user' => { lable=>'Remote username', default=>'root' }, - 'useradd' => { label=>'Insert command', - default=>'mkdir /var/www/$zone; chown $username /var/www/$zone; ln -s /var/www/$zone $homedir/$zone', - }, - 'userdel' => { label=>'Delete command', - default=>'[ -n "$zone" ] && rm -rf /var/www/$zone; rm $homedir/$zone', - }, - 'usermod' => { label=>'Modify command', - default=>'[ -n "$old_zone" ] && rm $old_homedir/$old_zone; [ "$old_zone" != "$new_zone" -a -n "$new_zone" ] && mv /var/www/$old_zone /var/www/$new_zone; [ "$old_username" != "$new_username" ] && chown -R $new_username /var/www/$new_zone; ln -s /var/www/$new_zone $new_homedir/$new_zone', - }, -; - -tie my %textradius_options, 'Tie::IxHash', - 'user' => { label=>'Remote username', default=>'root' }, - 'users' => { label=>'users file location', default=>'/etc/raddb/users' }, -; - -tie my %sqlradius_options, 'Tie::IxHash', - 'datasrc' => { label=>'DBI data source ' }, - 'username' => { label=>'Database username' }, - 'password' => { label=>'Database password' }, -; - -tie my %cyrus_options, 'Tie::IxHash', - 'server' => { label=>'IMAP server' }, - 'username' => { label=>'Admin username' }, - 'password' => { label=>'Admin password' }, -; - -tie my %cp_options, 'Tie::IxHash', - 'host' => { label=>'Hostname' }, - 'port' => { label=>'Port number' }, - 'username' => { label=>'Username' }, - 'password' => { label=>'Password' }, - 'domain' => { label=>'Domain' }, - 'workgroup' => { label=>'Default Workgroup' }, -; - -tie my %infostreet_options, 'Tie::IxHash', - 'url' => { label=>'XML-RPC Access URL', }, - 'login' => { label=>'InfoStreet login', }, - 'password' => { label=>'InfoStreet password', }, - 'groupID' => { label=>'InfoStreet groupID', }, -; - -tie my %vpopmail_options, 'Tie::IxHash', - 'machine' => { label=>'vpopmail machine', }, - 'dir' => { label=>'directory', }, # ?more info? default? - 'uid' => { label=>'vpopmail uid' }, - 'gid' => { label=>'vpopmail gid' }, -; - -tie my %bind_options, 'Tie::IxHash', - #'machine' => { label=>'named machine' }, - 'named_conf' => { label => 'named.conf location', - default=> '/etc/bind/named.conf' }, - 'zonepath' => { label => 'path to zone files', - default=> '/etc/bind/', }, -; - -tie my %bind_slave_options, 'Tie::IxHash', - #'machine' => { label=> 'Slave machine' }, - 'master' => { label=> 'Master IP address(s) (semicolon-separated)' }, - 'named_conf' => { label => 'named.conf location', - default => '/etc/bind/named.conf' }, -; - -tie my %http_options, 'Tie::IxHash', - 'method' => { label =>'Method', - type =>'select', - #options =>[qw(POST GET)], - options =>[qw(POST)], - default =>'POST' }, - 'url' => { label => 'URL', default => 'http://', }, - 'insert_data' => { - label => 'Insert data', - type => 'textarea', - default => join("\n", - 'DomainName $svc_x->domain', - 'Email ( grep { $_ ne "POST" } $svc_x->cust_svc->cust_pkg->cust_main->invoicing_list)[0]', - 'test 1', - 'reseller $svc_x->cust_svc->cust_pkg->part_pkg->pkg =~ /reseller/i', - ), - }, - 'delete_data' => { - label => 'Delete data', - type => 'textarea', - default => join("\n", - ), - }, - 'replace_data' => { - label => 'Replace data', - type => 'textarea', - default => join("\n", - ), - }, -; - -tie my %sqlmail_options, 'Tie::IxHash', - 'datasrc' => { label=>'DBI data source' }, - 'username' => { label=>'Database username' }, - 'password' => { label=>'Database password' }, -; - - -#export names cannot have dashes... -%exports = ( - 'svc_acct' => { - 'sysvshell' => { - 'desc' => - 'Batch export of /etc/passwd and /etc/shadow files (Linux/SysV).', - 'options' => \%sysvshell_options, - 'nodomain' => 'Y', - 'notes' => 'MD5 crypt requires installation of Crypt::PasswdMD5 from CPAN. Run bin/sysvshell.export to export the files.', - }, - 'bsdshell' => { - 'desc' => - 'Batch export of /etc/passwd and /etc/master.passwd files (BSD).', - 'options' => \%bsdshell_options, - 'nodomain' => 'Y', - 'notes' => 'MD5 crypt requires installation of Crypt::PasswdMD5 from CPAN. Run bin/bsdshell.export to export the files.', - }, -# 'nis' => { -# 'desc' => -# 'Batch export of /etc/global/passwd and /etc/global/shadow for NIS ', -# 'options' => {}, -# }, - 'textradius' => { - 'desc' => 'Real-time export to a text /etc/raddb/users file (Livingston, Cistron)', - 'options' => \%textradius_options, - 'notes' => 'This will edit a text RADIUS users file in place on a remote server. Requires installation of RADIUS::UserFile from CPAN. If using RADIUS::UserFile 1.01, make sure to apply this patch. Also make sure rsync is installed on the remote machine, and SSH is setup for unattended operation.', - }, - - 'shellcommands' => { - 'desc' => 'Real-time export via remote SSH (i.e. useradd, userdel, etc.)', - 'options' => \%shellcommands_options, - 'nodomain' => 'Y', - 'notes' => 'Run remote commands via SSH. Usernames are considered unique (also see shellcommands_withdomain). You probably want this if the commands you are running will not accept a domain as a parameter. You will need to setup SSH for unattended operation.

Use these buttons for some useful presets:
', - }, - - 'shellcommands_withdomain' => { - 'desc' => 'Real-time export via remote SSH.', - 'options' => \%shellcommands_withdomain_options, - 'notes' => 'Run remote commands via SSH. username@domain (rather than just usernames) are considered unique (also see shellcommands). You probably want this if the commands you are running will accept a domain as a parameter, and will allow the same username with different domains. You will need to setup SSH for unattended operation.', - }, - - 'sqlradius' => { - 'desc' => 'Real-time export to SQL-backed RADIUS (ICRADIUS, FreeRADIUS)', - 'options' => \%sqlradius_options, - 'nodomain' => 'Y', - 'notes' => 'Real-time export of radcheck, radreply and usergroup tables to any SQL database for FreeRADIUS or ICRADIUS. An existing RADIUS database will be updated in realtime, but you can use freeside-sqlradius-reset to delete the entire RADIUS database and repopulate the tables from the Freeside database. See the DBI documentation and the documentation for your DBD for the exact syntax of a DBI data source. If using FreeRADIUS 0.5 or above, make sure your op fields are set to allow NULL values.', - }, - - 'sqlmail' => { - 'desc' => 'Real-time export to SQL-backed mail server', - 'options' => \%sqlmail_options, - 'nodomain' => 'Y', - 'notes' => 'Database schema can be made to work with Courier IMAP and Exim. Others could work but are untested. (...extended description from pc-intouch?...)', - }, - - 'cyrus' => { - 'desc' => 'Real-time export to Cyrus IMAP server', - 'options' => \%cyrus_options, - 'nodomain' => 'Y', - 'notes' => 'Integration with Cyrus IMAP Server. Cyrus::IMAP::Admin should be installed locally and the connection to the server secured. svc_acct.quota, if available, is used to set the Cyrus quota. ' - }, - - 'cp' => { - 'desc' => 'Real-time export to Critical Path Account Provisioning Protocol', - 'options' => \%cp_options, - 'notes' => 'Real-time export to Critial Path Account Provisioning Protocol. Requires installation of Net::APP from CPAN.', - }, - - 'infostreet' => { - 'desc' => 'Real-time export to InfoStreet streetSmartAPI', - 'options' => \%infostreet_options, - 'nodomain' => 'Y', - 'notes' => 'Real-time export to InfoStreet streetSmartAPI. Requires installation of Frontier::Client from CPAN.', - }, - - 'vpopmail' => { - 'desc' => 'Real-time export to vpopmail text files', - 'options' => \%vpopmail_options, - 'notes' => 'Real time export to vpopmail text files (...extended description from jeff?...)', - }, - - }, - - 'svc_domain' => { - - 'bind' => { - 'desc' =>'Batch export to BIND named', - 'options' => \%bind_options, - 'notes' => 'Batch export of BIND zone and configuration files to primary nameserver. File::Rsync must be installed. Run bin/bind.export to export the files.', - }, - - 'bind_slave' => { - 'desc' =>'Batch export to slave BIND named', - 'options' => \%bind_slave_options, - 'notes' => 'Batch export of BIND configuration file to a secondary nameserver. Zones are slaved from the listed masters. File::Rsync must be installed. Run bin/bind.export to export the files.', - }, - - 'http' => { - 'desc' => 'Send an HTTP or HTTPS GET or POST request', - 'options' => \%http_options, - 'notes' => 'Send an HTTP or HTTPS GET or POST to the specified URL. libwww-perl must be installed. For HTTPS support, Crypt::SSLeay or IO::Socket::SSL is required.', - }, - - 'sqlmail' => { - 'desc' => 'Real-time export to SQL-backed mail server', - 'options' => \%sqlmail_options, - #'nodomain' => 'Y', - 'notes' => 'Database schema can be made to work with Courier IMAP and Exim. Others could work but are untested. (...extended description from pc-intouch?...)', - }, - - - }, - - 'svc_acct_sm' => {}, - - 'svc_forward' => { - 'sqlmail' => { - 'desc' => 'Real-time export to SQL-backed mail server', - 'options' => \%sqlmail_options, - #'nodomain' => 'Y', - 'notes' => 'Database schema can be made to work with Courier IMAP and Exim. Others could work but are untested. (...extended description from pc-intouch?...)', - }, - }, - - 'svc_www' => { - 'www_shellcommands' => { - 'desc' => 'Run remote commands via SSH, for virtual web sites.', - 'options' => \%www_shellcommands_options, - 'notes' => 'Run remote commands via SSH, for virtual web sites. You will need to setup SSH for unattended operation.', - }, - - }, - -); - -=back - -=head1 NEW EXPORT CLASSES - -Should be added to the %export hash here, and a module should be added in -FS/FS/part_export/ (an example may be found in eg/export_template.pm) - -=head1 BUGS - -All the stuff in the %exports hash should be generated from the specific -export modules. - -Hmm... cust_export class (not necessarily a database table...) ... ? - -deprecated column... - -=head1 SEE ALSO - -L, L, L, -L, -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_export/bind.pm b/FS/FS/part_export/bind.pm deleted file mode 100644 index b72c9bdb0..000000000 --- a/FS/FS/part_export/bind.pm +++ /dev/null @@ -1,7 +0,0 @@ -package FS::part_export::bind; - -use vars qw(@ISA); -use FS::part_export::null; - -@ISA = qw(FS::part_export::null); - diff --git a/FS/FS/part_export/bind_slave.pm b/FS/FS/part_export/bind_slave.pm deleted file mode 100644 index ebb29c1d7..000000000 --- a/FS/FS/part_export/bind_slave.pm +++ /dev/null @@ -1,7 +0,0 @@ -package FS::part_export::bind_slave; - -use vars qw(@ISA); -use FS::part_export::null; - -@ISA = qw(FS::part_export::null); - diff --git a/FS/FS/part_export/bsdshell.pm b/FS/FS/part_export/bsdshell.pm deleted file mode 100644 index 06642097f..000000000 --- a/FS/FS/part_export/bsdshell.pm +++ /dev/null @@ -1,7 +0,0 @@ -package FS::part_export::bsdshell; - -use vars qw(@ISA); -use FS::part_export::null; - -@ISA = qw(FS::part_export::null); - diff --git a/FS/FS/part_export/cp.pm b/FS/FS/part_export/cp.pm deleted file mode 100644 index d998c1d95..000000000 --- a/FS/FS/part_export/cp.pm +++ /dev/null @@ -1,112 +0,0 @@ -package FS::part_export::cp; - -use vars qw(@ISA); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert { - my( $self, $svc_acct ) = (shift, shift); - $self->cp_queue( $svc_acct->svcnum, 'create_mailbox', - Mailbox => $svc_acct->username, - Password => $svc_acct->_password, - Workgroup => $self->option('workgroup'), - Domain => $svc_acct->domain, - ); -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - return "can't change domain with Critical Path" - if $old->domain ne $new->domain; - return '' unless $old->username ne $new->username - || $old->_password ne $new->_password; - $self->cp_queue( $new->svcnum, 'replace', $new->domain, - $old->username, $new->username, $old->_password, $new->_password ); -} - -sub _export_delete { - my( $self, $svc_acct ) = (shift, shift); - $self->cp_queue( $svc_acct->svcnum, 'delete_mailbox', - Mailbox => $svc_acct->username, - Domain => $svc_acct->domain, - ); -} - -sub cp_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => 'FS::part_export::cp::cp_command', - }; - $queue->insert( - $self->option('host'), - $self->option('port'), - $self->option('username'), - $self->option('password'), - $self->option('domain'), - $method, - @_, - ); -} - -sub cp_command { #subroutine, not method - my($host, $port, $username, $password, $login_domain, $method, @args) = @_; - - #quelle hack - if ( $method eq 'replace' ) { - - my( $domain, $old_username, $new_username, $old_password, $new_password) - = @args; - - if ( $old_username ne $new_username ) { - cp_command($host, $port, $username, $password, 'rename_mailbox', - Domain => $domain, - Old_Mailbox => $old_username, - New_Mailbox => $new_username, - ); - } - - my $other = 'F'; - if ( $new_password =~ /^\*SUSPENDED\* (.*)$/ ) { - $new_password = $1; - $other = 'T'; - } - cp_command($host, $port, $username, $password, 'set_mailbox_status', - Domain => $domain, - Mailbox => $new_username, - Other => $other, - Other_Bounce => $other, - ); - - if ( $old_password ne $new_password ) { - cp_command($host, $port, $username, $password, 'change_mailbox', - Domain => $domain, - Mailbox => $new_username, - Password => $new_password, - ); - } - - return; - } - #eof quelle hack - - eval "use Net::APP;"; - - my $app = new Net::APP ( - "$host:$port", - User => $username, - Password => $password, - Domain => $login_domain, - Timeout => 60, - #Debug => 1, - ) or die "$@\n"; - - $app->$method( @args ); - - die $app->message."\n" unless $app->ok; - -} - diff --git a/FS/FS/part_export/cyrus.pm b/FS/FS/part_export/cyrus.pm deleted file mode 100644 index 110ff198f..000000000 --- a/FS/FS/part_export/cyrus.pm +++ /dev/null @@ -1,98 +0,0 @@ -package FS::part_export::cyrus; - -use vars qw(@ISA); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc_acct) = (shift, shift); - $self->cyrus_queue( $svc_acct->svcnum, 'insert', - $svc_acct->username, $svc_acct->quota ); -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - return "can't change username using Cyrus" - if $old->username ne $new->username; - return ''; -# #return '' unless $old->_password ne $new->_password; -# $self->cyrus_queue( $new->svcnum, -# 'replace', $new->username, $new->_password ); -} - -sub _export_delete { - my( $self, $svc_acct ) = (shift, shift); - $self->cyrus_queue( $svc_acct->svcnum, 'delete', - $svc_acct->username ); -} - -#a good idea to queue anything that could fail or take any time -sub cyrus_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::cyrus::cyrus_$method", - }; - $queue->insert( - $self->option('server'), - $self->option('username'), - $self->option('password'), - @_ - ); -} - -sub cyrus_insert { #subroutine, not method - my $client = cyrus_connect(shift, shift, shift); - my( $username, $quota ) = @_; - my $rc = $client->create("user.$username"); - my $error = $client->error; - die "creating user.$username: $error" if $error; - - $rc = $client->setacl("user.$username", $username => 'all' ); - $error = $client->error; - die "setacl user.$username: $error" if $error; - - if ( $quota ) { - $rc = $client->setquota("user.$username", 'STORAGE' => $quota ); - $error = $client->error; - die "setquota user.$username: $error" if $error; - } - -} - -sub cyrus_delete { #subroutine, not method - my ( $server, $admin_username, $password_username, $username ) = @_; - my $client = cyrus_connect($server, $admin_username, $password_username); - - my $rc = $client->setacl("user.$username", $admin_username => 'all' ); - my $error = $client->error; - die $error if $error; - - $rc = $client->delete("user.$username"); - $error = $client->error; - die $error if $error; -} - -sub cyrus_connect { - - my( $server, $admin_username, $admin_password ) = @_; - - eval "use Cyrus::IMAP::Admin;"; - - my $client = Cyrus::IMAP::Admin->new($server); - $client->authenticate( - -user => $admin_username, - -mechanism => "login", - -password => $admin_password, - ); - $client; - -} - -#sub cyrus_replace { #subroutine, not method -#} - - diff --git a/FS/FS/part_export/http.pm b/FS/FS/part_export/http.pm deleted file mode 100644 index 0e02f0f8e..000000000 --- a/FS/FS/part_export/http.pm +++ /dev/null @@ -1,88 +0,0 @@ -package FS::part_export::http; - -use vars qw(@ISA); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert { - my $self = shift; - $self->_export_command('insert', @_); -} - -sub _export_delete { - my $self = shift; - $self->_export_command('delete', @_); -} - -sub _export_command { - my( $self, $action, $svc_x ) = ( shift, shift, shift ); - - return unless $self->option("${action}_data"); - - $self->http_queue( $svc_x->svcnum, - $self->option('method'), - $self->option('url'), - map { - /^\s*(\S+)\s+(.*)$/ or /()()/; - my( $field, $value_expression ) = ( $1, $2 ); - my $value = eval $value_expression; - die $@ if $@; - ( $field, $value ); - } split(/\n/, $self->option("${action}_data") ) - ); - -} - -sub _export_replace { - my( $self, $new, $old ) = ( shift, shift, shift ); - - return unless $self->option('replace_data'); - - $self->http_queue( $svc_x->svcnum, - $self->option('method'), - $self->option('url'), - map { - /^\s*(\S+)\s+(.*)$/ or /()()/; - my( $field, $value_expression ) = ( $1, $2 ); - die $@ if $@; - ( $field, $value ); - } split(/\n/, $self->option('replace_data') ) - ); - -} - -sub http_queue { - my($self, $svcnum) = (shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::http::http", - }; - $queue->insert( @_ ); -} - -sub http { - my($method, $url, @data) = @_; - - $method = lc($method); - - eval "use LWP::UserAgent;"; - die "using LWP::UserAgent: $@" if $@; - eval "use HTTP::Request::Common;"; - die "using HTTP::Request::Common: $@" if $@; - - my $ua = LWP::UserAgent->new; - - #my $response = $ua->$method( - # $url, \%data, - # 'Content-Type'=>'application/x-www-form-urlencoded' - #); - my $req = HTTP::Request::Common::POST( $url, \@data ); - my $response = $ua->request($req); - - die $response->error_as_HTML if $response->is_error; - -} - diff --git a/FS/FS/part_export/infostreet.pm b/FS/FS/part_export/infostreet.pm deleted file mode 100644 index f2d519932..000000000 --- a/FS/FS/part_export/infostreet.pm +++ /dev/null @@ -1,218 +0,0 @@ -package FS::part_export::infostreet; - -use vars qw(@ISA %infostreet2cust_main $DEBUG); -use FS::UID qw(dbh); -use FS::part_export; - -@ISA = qw(FS::part_export); - -$DEBUG = 0; - -%infostreet2cust_main = ( - 'firstName' => 'first', - 'lastName' => 'last', - 'address1' => 'address1', - 'address2' => 'address2', - 'city' => 'city', - 'state' => 'state', - 'zipCode' => 'zip', - 'country' => 'country', - 'phoneNumber' => 'daytime', - 'faxNumber' => 'night', #noment-request... -); - -sub rebless { shift; } - -sub _export_insert { - my( $self, $svc_acct ) = (shift, shift); - my $cust_main = $svc_acct->cust_svc->cust_pkg->cust_main; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $err_or_queue = $self->infostreet_err_or_queue( $svc_acct->svcnum, - 'createUser', $svc_acct->username, $svc_acct->_password ); - return $err_or_queue unless ref($err_or_queue); - my $jobnum = $err_or_queue->jobnum; - - my %contact_info = ( map { - $_ => $cust_main->getfield( $infostreet2cust_main{$_} ); - } keys %infostreet2cust_main ); - - my @emails = grep { $_ ne 'POST' } $cust_main->invoicing_list; - $contact_info{'email'} = $emails[0] if @emails; - - #this one is kinda noment-specific - $contact_info{'organization'} = $cust_main->agent->agent; - - $err_or_queue = $self->infostreet_queueContact( $svc_acct->svcnum, - $svc_acct->username, %contact_info ); - return $err_or_queue unless ref($err_or_queue); - my $error = $err_or_queue->depend_insert( $jobnum ); - return $error if $error; - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - return "can't change username with InfoStreet" - if $old->username ne $new->username; - return '' unless $old->_password ne $new->_password; - $self->infostreet_queue( $new->svcnum, - 'passwd', $new->username, $new->_password ); -} - -sub _export_delete { - my( $self, $svc_acct ) = (shift, shift); - $self->infostreet_queue( $svc_acct->svcnum, - 'purgeAccount,releaseUsername', $svc_acct->username ); -} - -sub _export_suspend { - my( $self, $svc_acct ) = (shift, shift); - $self->infostreet_queue( $svc_acct->svcnum, - 'setStatus', $svc_acct->username, 'DISABLED' ); -} - -sub _export_unsuspend { - my( $self, $svc_acct ) = (shift, shift); - $self->infostreet_queue( $svc_acct->svcnum, - 'setStatus', $svc_acct->username, 'ACTIVE' ); -} - -sub infostreet_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => 'FS::part_export::infostreet::infostreet_command', - }; - $queue->insert( - $self->option('url'), - $self->option('login'), - $self->option('password'), - $self->option('groupID'), - $method, - @_, - ); -} - -#ick false laziness -sub infostreet_err_or_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => 'FS::part_export::infostreet::infostreet_command', - }; - $queue->insert( - $self->option('url'), - $self->option('login'), - $self->option('password'), - $self->option('groupID'), - $method, - @_, - ) or $queue; -} - -sub infostreet_queueContact { - my( $self, $svcnum ) = (shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => 'FS::part_export::infostreet::infostreet_setContact', - }; - $queue->insert( - $self->option('url'), - $self->option('login'), - $self->option('password'), - $self->option('groupID'), - @_, - ) or $queue; -} - -sub infostreet_setContact { - my($url, $is_username, $is_password, $groupID, $username, %contact_info) = @_; - my $accountID = infostreet_command($url, $is_username, $is_password, $groupID, - 'getAccountID', $username); - foreach my $field ( keys %contact_info ) { - infostreet_command($url, $is_username, $is_password, $groupID, - 'setContactField', [ 'int'=>$accountID ], $field, $contact_info{$field} ); - } - -} - -sub infostreet_command { #subroutine, not method - my($url, $username, $password, $groupID, $method, @args) = @_; - - warn "[FS::part_export::infostreet] $method ".join(' ', @args)."\n" if $DEBUG; - - #quelle hack - if ( $method =~ /,/ ) { - foreach my $part ( split(/,\s*/, $method) ) { - infostreet_command($url, $username, $password, $groupID, $part, @args); - } - return; - } - - eval "use Frontier::Client;"; - die $@ if $@; - - eval 'sub Frontier::RPC2::String::repr { - my $self = shift; - my $value = $$self; - $value =~ s/([&<>\"])/$Frontier::RPC2::char_entities{$1}/ge; - $value; - }'; - die $@ if $@; - - my $conn = Frontier::Client->new( url => $url ); - my $key_result = $conn->call( 'authenticate', $username, $password, $groupID); - my %key_result = _infostreet_parse($key_result); - die $key_result{error} unless $key_result{success}; - my $key = $key_result{data}; - - #my $result = $conn->call($method, $key, @args); - my $result = $conn->call( $method, $key, - map { - if ( ref($_) ) { - my( $type, $value) = @{$_}; - $conn->$type($value); - } else { - $conn->string($_); - } - } @args ); - my %result = _infostreet_parse($result); - die $result{error} unless $result{success}; - - $result->{data}; - -} - -#sub infostreet_command_byid { #subroutine, not method; -# my($url, $username, $password, $groupID, $method, @args ) = @_; -# -# infostreet_command -# -#} - -sub _infostreet_parse { #subroutine, not method - my $arg = shift; - map { - my $value = $arg->{$_}; - #warn ref($value); - $value = $value->value() - if ref($value) && $value->isa('Frontier::RPC2::DataType'); - $_=>$value; - } keys %$arg; -} - - diff --git a/FS/FS/part_export/null.pm b/FS/FS/part_export/null.pm deleted file mode 100644 index 0145af3a4..000000000 --- a/FS/FS/part_export/null.pm +++ /dev/null @@ -1,13 +0,0 @@ -package FS::part_export::null; - -use vars qw(@ISA); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert {} -sub _export_replace {} -sub _export_delete {} - diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm deleted file mode 100644 index e4005761b..000000000 --- a/FS/FS/part_export/shellcommands.pm +++ /dev/null @@ -1,85 +0,0 @@ -package FS::part_export::shellcommands; - -use vars qw(@ISA @saltset); -use String::ShellQuote; -use FS::part_export; - -@ISA = qw(FS::part_export); - -@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -sub rebless { shift; } - -sub _export_insert { - my($self) = shift; - $self->_export_command('useradd', @_); -} - -sub _export_delete { - my($self) = shift; - $self->_export_command('userdel', @_); -} - -sub _export_command { - my ( $self, $action, $svc_acct) = (shift, shift, shift); - my $command = $self->option($action); - my $stdin = $self->option($action."_stdin"); - { - no strict 'refs'; - ${$_} = $svc_acct->getfield($_) foreach $svc_acct->fields; - } - $finger = shell_quote $finger; - $crypt_password = ''; #surpress "used only once" warnings - $crypt_password = crypt( $svc_acct->_password, - $saltset[int(rand(64))].$saltset[int(rand(64))] ); - $self->shellcommands_queue( $svc_acct->svcnum, - user => $self->option('user')||'root', - host => $self->machine, - command => eval(qq("$command")), - stdin_string => eval(qq("$stdin")), - ); -} - -sub _export_replace { - my($self, $new, $old ) = (shift, shift, shift); - my $command = $self->option('usermod'); - my $stdin = $self->option('usermod_stdin'); - { - no strict 'refs'; - ${"old_$_"} = $old->getfield($_) foreach $old->fields; - ${"new_$_"} = $new->getfield($_) foreach $new->fields; - } - $new_finger = shell_quote $new_finger; - $new_crypt_password = ''; #surpress "used only once" warnings - $new_crypt_password = crypt( $new->_password, - $saltset[int(rand(64))].$saltset[int(rand(64))]); - $self->shellcommands_queue( $new->svcnum, - user => $self->option('user')||'root', - host => $self->machine, - command => eval(qq("$command")), - stdin_string => eval(qq("$stdin")), - ); -} - -#a good idea to queue anything that could fail or take any time -sub shellcommands_queue { - my( $self, $svcnum ) = (shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::shellcommands::ssh_cmd", - }; - $queue->insert( @_ ); -} - -sub ssh_cmd { #subroutine, not method - use Net::SSH '0.06'; - &Net::SSH::ssh_cmd( { @_ } ); -} - -#sub shellcommands_insert { #subroutine, not method -#} -#sub shellcommands_replace { #subroutine, not method -#} -#sub shellcommands_delete { #subroutine, not method -#} - diff --git a/FS/FS/part_export/shellcommands_withdomain.pm b/FS/FS/part_export/shellcommands_withdomain.pm deleted file mode 100644 index a15c24d88..000000000 --- a/FS/FS/part_export/shellcommands_withdomain.pm +++ /dev/null @@ -1,7 +0,0 @@ -package FS::part_export::shellcommands_withdomain; - -use vars qw(@ISA); -use FS::part_export::shellcommands; - -@ISA = qw(FS::part_export::shellcommands); - diff --git a/FS/FS/part_export/sqlmail.pm b/FS/FS/part_export/sqlmail.pm deleted file mode 100644 index 4194daf0c..000000000 --- a/FS/FS/part_export/sqlmail.pm +++ /dev/null @@ -1,111 +0,0 @@ -package FS::part_export::sqlmail; - -use vars qw(@ISA %fs_mail_table %fields); -use FS::part_export; - -@ISA = qw(FS::part_export); - -%fs_mail_table = ( svc_acct => 'user', - svc_domain => 'domain' ); - -# fields that need to be copied into the fs_mail tables -$fields{user} = [qw(username _password finger domsvc svcnum )]; -$fields{domain} = [qw(domain svcnum catchall )]; - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc) = (shift, shift); - # this is a svc_something. - - my $table = $fs_mail_table{$svc->cust_svc->part_svc->svcdb}; - my @attrib = map {$svc->$_} @{$fields{$table}}; - my $error = $self->sqlmail_queue( $svc->svcnum, 'insert', - $table, @attrib ); - return $error if $error; - ''; -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - - my $table = $fs_mail_table{$new->cust_svc->part_svc->svcdb}; - - my @old = ($old->svcnum, 'delete', $table, $old->svcnum); - my @narf = map {$new->$_} @{$fields{$table}}; - $self->sqlmail_queue($new->svcnum, 'replace', $table, - $new->svcnum, @narf); - - return $error if $error; - ''; -} - -sub _export_delete { - my( $self, $svc ) = (shift, shift); - my $table = $fs_mail_table{$new->cust_svc->part_svc->svcdb}; - $self->sqlmail_queue( $svc->svcnum, 'delete', $table, - $svc->svcnum ); -} - -sub sqlmail_queue { - my( $self, $svcnum, $method, $table ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::sqlmail::sqlmail_$method", - }; - $queue->insert( - $self->option('datasrc'), - $self->option('username'), - $self->option('password'), - @_, - ); -} - -sub sqlmail_insert { #subroutine, not method - my $dbh = sqlmail_connect(shift, shift, shift); - my( $table, @attrib ) = @_; - - my $sth = $dbh->prepare( - "INSERT INTO $table (" . join (',', @{$fields{$table}}) . - ") VALUES ('" . join ("','", @attrib) . "')" - ) or die $dbh->errstr; - $sth->execute() or die $sth->errstr; - - $dbh->disconnect; -} - -sub sqlmail_delete { #subroutine, not method - my $dbh = sqlmail_connect(shift, shift, shift); - my( $table, $svcnum ) = @_; - - my $sth = $dbh->prepare( - "DELETE FROM $table WHERE svcnum = $svcnum" - ) or die $dbh->errstr; - $sth->execute() or die $sth->errstr; - - $dbh->disconnect; -} - -sub sqlmail_replace { - my $dbh = sqlmail_connect(shift, shift, shift); - my( $table, $svcnum, @attrib ) = @_; - - my %data; - @data{@{$fields{$table}}} = @attrib; - - my $sth = $dbh->prepare( - "UPDATE $table SET " . - ( join ',', map {$_ . "='" . $data{$_} . "'"} keys(%data) ) . - " WHERE svcnum = $svcnum" - ) or die $dbh->errstr; - $sth->execute() or die $sth->errstr; - - $dbh->disconnect; -} - -sub sqlmail_connect { - #my($datasrc, $username, $password) = @_; - #DBI->connect($datasrc, $username, $password) or die $DBI::errstr; - DBI->connect(@_) or die $DBI::errstr; -} - diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm deleted file mode 100644 index 3c781c043..000000000 --- a/FS/FS/part_export/sqlradius.pm +++ /dev/null @@ -1,273 +0,0 @@ -package FS::part_export::sqlradius; - -use vars qw(@ISA); -use FS::Record qw( dbh ); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc_acct) = (shift, shift); - - foreach my $table (qw(reply check)) { - my $method = "radius_$table"; - my %attrib = $svc_acct->$method(); - next unless keys %attrib; - my $err_or_queue = $self->sqlradius_queue( $svc_acct->svcnum, 'insert', - $table, $svc_acct->username, %attrib ); - return $err_or_queue unless ref($err_or_queue); - } - my @groups = $svc_acct->radius_groups; - if ( @groups ) { - my $err_or_queue = $self->sqlradius_queue( - $svc_acct->svcnum, 'usergroup_insert', - $svc_acct->username, @groups ); - return $err_or_queue unless ref($err_or_queue); - } - ''; -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $jobnum = ''; - if ( $old->username ne $new->username ) { - my $err_or_queue = $self->sqlradius_queue( $new->svcnum, 'rename', - $new->username, $old->username ); - unless ( ref($err_or_queue) ) { - $dbh->rollback if $oldAutoCommit; - return $err_or_queue; - } - $jobnum = $err_or_queue->jobnum; - } - - foreach my $table (qw(reply check)) { - my $method = "radius_$table"; - my %new = $new->$method(); - my %old = $old->$method(); - if ( grep { !exists $old{$_} #new attributes - || $new{$_} ne $old{$_} #changed - } keys %new - ) { - my $err_or_queue = $self->sqlradius_queue( $new->svcnum, 'insert', - $table, $new->username, %new ); - unless ( ref($err_or_queue) ) { - $dbh->rollback if $oldAutoCommit; - return $err_or_queue; - } - if ( $jobnum ) { - my $error = $err_or_queue->depend_insert( $jobnum ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - - my @del = grep { !exists $new{$_} } keys %old; - if ( @del ) { - my $err_or_queue = $self->sqlradius_queue( $new->svcnum, 'attrib_delete', - $table, $new->username, @del ); - unless ( ref($err_or_queue) ) { - $dbh->rollback if $oldAutoCommit; - return $err_or_queue; - } - if ( $jobnum ) { - my $error = $err_or_queue->depend_insert( $jobnum ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - } - - # (sorta) false laziness with FS::svc_acct::replace - my @oldgroups = @{$old->usergroup}; #uuuh - my @newgroups = $new->radius_groups; - my @delgroups = (); - foreach my $oldgroup ( @oldgroups ) { - if ( grep { $oldgroup eq $_ } @newgroups ) { - @newgroups = grep { $oldgroup ne $_ } @newgroups; - next; - } - push @delgroups, $oldgroup; - } - - if ( @delgroups ) { - my $err_or_queue = $self->sqlradius_queue( $new->svcnum, 'usergroup_delete', - $new->username, @delgroups ); - unless ( ref($err_or_queue) ) { - $dbh->rollback if $oldAutoCommit; - return $err_or_queue; - } - if ( $jobnum ) { - my $error = $err_or_queue->depend_insert( $jobnum ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - - if ( @newgroups ) { - my $err_or_queue = $self->sqlradius_queue( $new->svcnum, 'usergroup_insert', - $new->username, @newgroups ); - unless ( ref($err_or_queue) ) { - $dbh->rollback if $oldAutoCommit; - return $err_or_queue; - } - if ( $jobnum ) { - my $error = $err_or_queue->depend_insert( $jobnum ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -sub _export_delete { - my( $self, $svc_acct ) = (shift, shift); - my $err_or_queue = $self->sqlradius_queue( $svc_acct->svcnum, 'delete', - $svc_acct->username ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub sqlradius_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::sqlradius::sqlradius_$method", - }; - $queue->insert( - $self->option('datasrc'), - $self->option('username'), - $self->option('password'), - @_, - ) or $queue; -} - -sub sqlradius_insert { #subroutine, not method - my $dbh = sqlradius_connect(shift, shift, shift); - my( $table, $username, %attributes ) = @_; - - foreach my $attribute ( keys %attributes ) { - - my $s_sth = $dbh->prepare( - "SELECT COUNT(*) FROM rad$table WHERE UserName = ? AND Attribute = ?" - ) or die $dbh->errstr; - $s_sth->execute( $username, $attribute ) or die $s_sth->errstr; - - if ( $s_sth->fetchrow_arrayref->[0] ) { - - my $u_sth = $dbh->prepare( - "UPDATE rad$table SET Value = ? WHERE UserName = ? AND Attribute = ?" - ) or die $dbh->errstr; - $u_sth->execute($attributes{$attribute}, $username, $attribute) - or die $u_sth->errstr; - - } else { - - my $i_sth = $dbh->prepare( - "INSERT INTO rad$table ( id, UserName, Attribute, Value ) ". - "VALUES ( ?, ?, ?, ? )" - ) or die $dbh->errstr; - $i_sth->execute( '', $username, $attribute, $attributes{$attribute} ) - or die $i_sth->errstr; - - } - - } - $dbh->disconnect; -} - -sub sqlradius_usergroup_insert { #subroutine, not method - my $dbh = sqlradius_connect(shift, shift, shift); - my( $username, @groups ) = @_; - - my $sth = $dbh->prepare( - "INSERT INTO usergroup ( id, UserName, GroupName ) VALUES ( ?, ?, ? )" - ) or die $dbh->errstr; - foreach my $group ( @groups ) { - $sth->execute( '', $username, $group ) - or die "can't insert into groupname table: ". $sth->errstr; - } - $dbh->disconnect; -} - -sub sqlradius_usergroup_delete { #subroutine, not method - my $dbh = sqlradius_connect(shift, shift, shift); - my( $username, @groups ) = @_; - - my $sth = $dbh->prepare( - "DELETE FROM usergroup WHERE UserName = ? AND GroupName = ?" - ) or die $dbh->errstr; - foreach my $group ( @groups ) { - $sth->execute( $username, $group ) - or die "can't delete from groupname table: ". $sth->errstr; - } - $dbh->disconnect; -} - -sub sqlradius_rename { #subroutine, not method - my $dbh = sqlradius_connect(shift, shift, shift); - my($new_username, $old_username) = @_; - foreach my $table (qw(radreply radcheck usergroup )) { - my $sth = $dbh->prepare("UPDATE $table SET Username = ? WHERE UserName = ?") - or die $dbh->errstr; - $sth->execute($new_username, $old_username) - or die "can't update $table: ". $sth->errstr; - } - $dbh->disconnect; -} - -sub sqlradius_attrib_delete { #subroutine, not method - my $dbh = sqlradius_connect(shift, shift, shift); - my( $table, $username, @attrib ) = @_; - - foreach my $attribute ( @attrib ) { - my $sth = $dbh->prepare( - "DELETE FROM rad$table WHERE UserName = ? AND Attribute = ?" ) - or die $dbh->errstr; - $sth->execute($username,$attribute) - or die "can't delete from rad$table table: ". $sth->errstr; - } - $dbh->disconnect; -} - -sub sqlradius_delete { #subroutine, not method - my $dbh = sqlradius_connect(shift, shift, shift); - my $username = shift; - - foreach my $table (qw( radcheck radreply usergroup )) { - my $sth = $dbh->prepare( "DELETE FROM $table WHERE UserName = ?" ); - $sth->execute($username) - or die "can't delete from $table table: ". $sth->errstr; - } - $dbh->disconnect; -} - -sub sqlradius_connect { - #my($datasrc, $username, $password) = @_; - #DBI->connect($datasrc, $username, $password) or die $DBI::errstr; - DBI->connect(@_) or die $DBI::errstr; -} - diff --git a/FS/FS/part_export/sysvshell.pm b/FS/FS/part_export/sysvshell.pm deleted file mode 100644 index f3f6b34b6..000000000 --- a/FS/FS/part_export/sysvshell.pm +++ /dev/null @@ -1,7 +0,0 @@ -package FS::part_export::sysvshell; - -use vars qw(@ISA); -use FS::part_export::null; - -@ISA = qw(FS::part_export::null); - diff --git a/FS/FS/part_export/textradius.pm b/FS/FS/part_export/textradius.pm deleted file mode 100644 index 1492f2672..000000000 --- a/FS/FS/part_export/textradius.pm +++ /dev/null @@ -1,166 +0,0 @@ -package FS::part_export::textradius; - -use vars qw(@ISA $prefix); -use Fcntl qw(:flock); -use FS::UID qw(datasrc); -use FS::part_export; - -@ISA = qw(FS::part_export); - -$prefix = "/usr/local/etc/freeside/export."; - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc_acct) = (shift, shift); - $err_or_queue = $self->textradius_queue( $svc_acct->svcnum, 'insert', - $svc_acct->username, $svc_acct->radius_check, '-', $svc_acct->radius_reply); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - return "can't (yet?) change username with textradius" - if $old->username ne $new->username; - #return '' unless $old->_password ne $new->_password; - $err_or_queue = $self->textradius_queue( $new->svcnum, 'insert', - $new->username, $new->radius_check, '-', $new->radius_reply); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub _export_delete { - my( $self, $svc_acct ) = (shift, shift); - $err_or_queue = $self->textradius_queue( $svc_acct->svcnum, 'delete', - $svc_acct->username ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -#a good idea to queue anything that could fail or take any time -sub textradius_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::textradius::textradius_$method", - }; - $queue->insert( - $self->option('user')||'root', - $self->machine, - $self->option('users'), - @_, - ) or $queue; -} - -sub textradius_insert { #subroutine, not method - my( $user, $host, $users, $username, @attributes ) = @_; - - #silly arg processing - my($att, @check); - push @check, $att while @attributes && ($att=shift @attributes) ne '-'; - my %check = @check; - my %reply = @attributes; - - my $file = textradius_download($user, $host, $users); - - eval "use RADIUS::UserFile;"; - die $@ if $@; - - my $userfile = new RADIUS::UserFile( - File => $file, - Who => [ $username ], - Check_Items => [ keys %check ], - ) or die "error parsing $file"; - - $userfile->remove($username); - $userfile->add( - Who => $username, - Attributes => { %check, %reply }, - Comment => 'user added by Freeside', - ) or die "error adding to $file"; - - $userfile->update( Who => [ $username ] ) - or die "error updating $file"; - - textradius_upload($user, $host, $users); - -} - -sub textradius_delete { #subroutine, not method - my( $user, $host, $users, $username ) = @_; - - my $file = textradius_download($user, $host, $users); - - eval "use RADIUS::UserFile;"; - die $@ if $@; - - my $userfile = new RADIUS::UserFile( - File => $file, - Who => [ $username ], - ) or die "error parsing $file"; - - $userfile->remove($username); - - $userfile->update( Who => [ $username ] ) - or die "error updating $file"; - - textradius_upload($user, $host, $users); -} - -sub textradius_download { - my( $user, $host, $users ) = @_; - - my $dir = $prefix. datasrc; - mkdir $dir, 0700 or die $! unless -d $dir; - $dir .= "/$host"; - mkdir $dir, 0700 or die $! unless -d $dir; - - my $dest = "$dir/users"; - - eval "use File::Rsync;"; - die $@ if $@; - my $rsync = File::Rsync->new({ rsh => 'ssh' }); - - open(LOCK, "+>>$dest.lock") - and flock(LOCK,LOCK_EX) - or die "can't open $dest.lock: $!"; - - $rsync->exec( { - src => "$user\@$host:$users", - dest => $dest, - } ); # true/false return value from exec is not working, alas - if ( $rsync->err ) { - die "error downloading $user\@$host:$users : ". - 'exit status: '. $rsync->status. ', '. - 'STDERR: '. join(" / ", $rsync->err). ', '. - 'STDOUT: '. join(" / ", $rsync->out); - } - - $dest; -} - -sub textradius_upload { - my( $user, $host, $users ) = @_; - - my $dir = $prefix. datasrc. "/$host"; - - eval "use File::Rsync;"; - die $@ if $@; - my $rsync = File::Rsync->new({ - rsh => 'ssh', - #dry_run => 1, - }); - $rsync->exec( { - src => "$dir/users", - dest => "$user\@$host:$users", - } ); # true/false return value from exec is not working, alas - if ( $rsync->err ) { - die "error uploading to $user\@$host:$users : ". - 'exit status: '. $rsync->status. ', '. - 'STDERR: '. join(" / ", $rsync->err). ', '. - 'STDOUT: '. join(" / ", $rsync->out); - } - - flock(LOCK,LOCK_UN); - close LOCK; - -} - diff --git a/FS/FS/part_export/vpopmail.pm b/FS/FS/part_export/vpopmail.pm deleted file mode 100644 index 6a486faa1..000000000 --- a/FS/FS/part_export/vpopmail.pm +++ /dev/null @@ -1,179 +0,0 @@ -package FS::part_export::vpopmail; - -use vars qw(@ISA @saltset $exportdir $rsync $ssh); -use File::Path; -use FS::UID qw( datasrc ); -use FS::part_export; - -@ISA = qw(FS::part_export); - -@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -$rsync = "rsync"; -$ssh = "ssh"; - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc_acct) = (shift, shift); - $self->vpopmail_queue( $svc_acct->svcnum, 'insert', - $svc_acct->username, - crypt($svc_acct->_password,$saltset[int(rand(64))].$saltset[int(rand(64))]), - $svc_acct->domain, - ); -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - - my $cpassword = crypt( - $new->_password, $saltset[int(rand(64))].$saltset[int(rand(64))] - ); - - return "can't change username with vpopmail" - if $old->username ne $new->username; - - #no.... if mail can't be preserved, better to disallow username changes - #if ($old->username ne $new->username || $old->domain ne $new->domain ) { - # vpopmail_queue( $svc_acct->svcnum, 'delete', - # $old->username, $old->domain - # ); - # vpopmail_queue( $svc_acct->svcnum, 'insert', - # $new->username, - # $cpassword, - # $new->domain, - # ); - - return '' unless $old->_password ne $new->_password; - - $self->vpopmail_queue( $new->svcnum, 'replace', - $new->username, $cpassword, $new->domain ); -} - -sub _export_delete { - my( $self, $svc_acct ) = (shift, shift); - $self->vpopmail_queue( $svc_acct->svcnum, 'delete', - $svc_acct->username, $svc_acct->domain ); -} - -#a good idea to queue anything that could fail or take any time -sub vpopmail_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $exportdir = "/usr/local/etc/freeside/export." . datasrc; - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::vpopmail::vpopmail_$method", - }; - $queue->insert( - $exportdir, - $self->option('machine'), - $self->option('dir'), - $self->option('uid'), - $self->option('gid'), - @_ - ); -} - -sub vpopmail_insert { #subroutine, not method - my( $exportdir, $machine, $dir, $uid, $gid ) = splice @_,0,5; - my( $username, $password, $domain ) = @_; - - (open(VPASSWD, ">>$exportdir/domains/$domain/vpasswd") - and flock(VPASSWD,LOCK_EX) - ) or die "can't open vpasswd file for $username\@$domain: ". - "$exportdir/domains/$domain/vpasswd: $!"; - print VPASSWD join(":", - $username, - $password, - '1', - '0', - $username, - "$dir/domains/$domain/$username", - 'NOQUOTA', - ), "\n"; - - flock(VPASSWD,LOCK_UN); - close(VPASSWD); - - for my $mkdir ( - map { "$exportdir/domains/$domain/$username$_" } - ( '', qw( /Maildir /Maildir/cur /Maildir/new /Maildir/tmp ) ) - ) { - mkdir $mkdir, 0700 or die "can't mkdir $mkdir: $!"; - } - - vpopmail_sync( $exportdir, $machine, $dir, $uid, $gid ); - -} - -sub vpopmail_replace { #subroutine, not method - my( $exportdir, $machine, $dir, $uid, $gid ) = splice @_,0,5; - my( $username, $password, $domain ) = @_; - - (open(VPASSWD, "$exportdir/domains/$domain/vpasswd") - and flock(VPASSWD,LOCK_EX) - ) or die "can't open $exportdir/domains/$domain/vpasswd: $!"; - - open(VPASSWDTMP, ">$exportdir/domains/$domain/vpasswd.tmp") - or die "Can't open $exportdir/domains/$domain/vpasswd.tmp: $!"; - - while () { - my ($mailbox, $pw, @rest) = split(':', $_); - print VPASSWDTMP $_ unless $username eq $mailbox; - print VPASSWDTMP join (':', ($mailbox, $password, @rest)) - if $username eq $mailbox; - } - - close(VPASSWDTMP); - - rename "$exportdir/domains/$domain/vpasswd.tmp", "$exportdir/domains/$domain/vpasswd" - or die "Can't rename $exportdir/domains/$domain/vpasswd.tmp: $!"; - - flock(VPASSWD,LOCK_UN); - close(VPASSWD); - - vpopmail_sync( $exportdir, $machine, $dir, $uid, $gid ); - -} - -sub vpopmail_delete { #subroutine, not method - my( $exportdir, $machine, $dir, $uid, $gid ) = splice @_,0,5; - my( $username, $domain ) = @_; - - (open(VPASSWD, "$exportdir/domains/$domain/vpasswd") - and flock(VPASSWD,LOCK_EX) - ) or die "can't open $exportdir/domains/$domain/vpasswd: $!"; - - open(VPASSWDTMP, ">$exportdir/domains/$domain/vpasswd.tmp") - or die "Can't open $exportdir/domains/$domain/vpasswd.tmp: $!"; - - while () { - my ($mailbox, $rest) = split(':', $_); - print VPASSWDTMP $_ unless $username eq $mailbox; - } - - close(VPASSWDTMP); - - rename "$exportdir/domains/$domain/vpasswd.tmp", - "$exportdir/domains/$domain/vpasswd" - or die "Can't rename $exportdir/domains/$domain/vpasswd.tmp: $!"; - - flock(VPASSWD,LOCK_UN); - close(VPASSWD); - - rmtree "$exportdir/domains/$domain/$username" - or die "can't rmtree $exportdir/domains/$domain/$username: $!"; - - vpopmail_sync( $exportdir, $machine, $dir, $uid, $gid ); -} - -sub vpopmail_sync { - my( $exportdir, $machine, $dir, $uid, $gid ) = splice @_,0,5; - - chdir $exportdir; - my @args = ( $rsync, "-rlpt", "-e", $ssh, "domains/", - "vpopmail\@$machine:$dir/domains/" ); - system {$args[0]} @args; -} - - diff --git a/FS/FS/part_export/www_shellcommands.pm b/FS/FS/part_export/www_shellcommands.pm deleted file mode 100644 index 84c162761..000000000 --- a/FS/FS/part_export/www_shellcommands.pm +++ /dev/null @@ -1,112 +0,0 @@ -package FS::part_export::www_shellcommands; - -use strict; -use vars qw(@ISA); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert { - my($self) = shift; - $self->_export_command('useradd', @_); -} - -sub _export_delete { - my($self) = shift; - $self->_export_command('userdel', @_); -} - -sub _export_command { - my ( $self, $action, $svc_www) = (shift, shift, shift); - my $command = $self->option($action); - - #set variable for the command - { - no strict 'refs'; - ${$_} = $svc_www->getfield($_) foreach $svc_www->fields; - } - my $domain_record = $svc_www->domain_record; # or die ? - my $zone = $domain_record->reczone; # or die ? - unless ( $zone =~ /\.$/ ) { - my $svc_domain = $domain_record->svc_domain; # or die ? - $zone .= '.'. $svc_domain->domain; - } - - my $svc_acct = $svc_www->svc_acct; # or die ? - my $username = $svc_acct->username; - my $homedir = $svc_acct->dir; # or die ? - - #done setting variables for the command - - $self->shellcommands_queue( $svc_www->svcnum, - user => $self->option('user')||'root', - host => $self->machine, - command => eval(qq("$command")), - ); -} - -sub _export_replace { - my($self, $new, $old ) = (shift, shift, shift); - my $command = $self->option('usermod'); - - #set variable for the command - { - no strict 'refs'; - ${"old_$_"} = $old->getfield($_) foreach $old->fields; - ${"new_$_"} = $new->getfield($_) foreach $new->fields; - } - my $old_domain_record = $old->domain_record; # or die ? - my $old_zone = $old_domain_record->reczone; # or die ? - unless ( $old_zone =~ /\.$/ ) { - my $old_svc_domain = $old_domain_record->svc_domain; # or die ? - $old_zone .= '.'. $old_svc_domain->domain; - } - - my $old_svc_acct = $old->svc_acct; # or die ? - my $old_username = $old_svc_acct->username; - my $old_homedir = $old_svc_acct->dir; # or die ? - - my $new_domain_record = $new->domain_record; # or die ? - my $new_zone = $new_domain_record->reczone; # or die ? - unless ( $new_zone =~ /\.$/ ) { - my $new_svc_domain = $new_domain_record->svc_domain; # or die ? - $new_zone .= '.'. $new_svc_domain->domain; - } - - my $new_svc_acct = $new->svc_acct; # or die ? - my $new_username = $new_svc_acct->username; - my $new_homedir = $new_svc_acct->dir; # or die ? - - #done setting variables for the command - - $self->shellcommands_queue( $new->svcnum, - user => $self->option('user')||'root', - host => $self->machine, - command => eval(qq("$command")), - ); -} - -#a good idea to queue anything that could fail or take any time -sub shellcommands_queue { - my( $self, $svcnum ) = (shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::www_shellcommands::ssh_cmd", - }; - $queue->insert( @_ ); -} - -sub ssh_cmd { #subroutine, not method - use Net::SSH '0.06'; - &Net::SSH::ssh_cmd( { @_ } ); -} - -#sub shellcommands_insert { #subroutine, not method -#} -#sub shellcommands_replace { #subroutine, not method -#} -#sub shellcommands_delete { #subroutine, not method -#} - diff --git a/FS/FS/part_export_option.pm b/FS/FS/part_export_option.pm deleted file mode 100644 index a0b19fde1..000000000 --- a/FS/FS/part_export_option.pm +++ /dev/null @@ -1,134 +0,0 @@ -package FS::part_export_option; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::part_export; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::part_export_option - Object methods for part_export_option records - -=head1 SYNOPSIS - - use FS::part_export_option; - - $record = new FS::part_export_option \%hash; - $record = new FS::part_export_option { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_export_option object represents an export option. -FS::part_export_option inherits from FS::Record. The following fields are -currently supported: - -=over 4 - -=item optionnum - primary key - -=item exportnum - export (see L) - -=item optionname - option name - -=item optionvalue - option value - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new export option. To add the export option to the database, see -L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'part_export_option'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid export option. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('optionnum') - || $self->ut_number('exportnum') - || $self->ut_alpha('optionname') - || $self->ut_anything('optionvalue') - ; - return $error if $error; - - return "Unknown exportnum: ". $self->exportnum - unless qsearchs('part_export', { 'exportnum' => $self->exportnum } ); - - #check options & values? - - ''; #no error -} - -=back - -=head1 BUGS - -Possibly. - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm deleted file mode 100644 index e914636e4..000000000 --- a/FS/FS/part_pkg.pm +++ /dev/null @@ -1,317 +0,0 @@ -package FS::part_pkg; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch dbh ); -use FS::pkg_svc; -use FS::agent_type; -use FS::type_pkgs; -use FS::Conf; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::part_pkg - Object methods for part_pkg objects - -=head1 SYNOPSIS - - use FS::part_pkg; - - $record = new FS::part_pkg \%hash - $record = new FS::part_pkg { 'column' => 'value' }; - - $custom_record = $template_record->clone; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - @pkg_svc = $record->pkg_svc; - - $svcnum = $record->svcpart; - $svcnum = $record->svcpart( 'svc_acct' ); - -=head1 DESCRIPTION - -An FS::part_pkg object represents a billing item definition. FS::part_pkg -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item pkgpart - primary key (assigned automatically for new billing item definitions) - -=item pkg - Text name of this billing item definition (customer-viewable) - -=item comment - Text name of this billing item definition (non-customer-viewable) - -=item setup - Setup fee expression - -=item freq - Frequency of recurring fee - -=item recur - Recurring fee expression - -=item setuptax - Setup fee tax exempt flag, empty or `Y' - -=item recurtax - Recurring fee tax exempt flag, empty or `Y' - -=item taxclass - Tax class flag - -=item plan - Price plan - -=item plandata - Price plan data - -=item disabled - Disabled flag, empty or `Y' - -=back - -setup and recur are evaluated as Safe perl expressions. You can use numbers -just as you would normally. More advanced semantics are not yet defined. - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new billing item definition. To add the billing item definition to -the database, see L<"insert">. - -=cut - -sub table { 'part_pkg'; } - -=item clone - -An alternate constructor. Creates a new billing item definition by duplicating -an existing definition. A new pkgpart is assigned and `(CUSTOM) ' is prepended -to the comment field. To add the billing item definition to the database, see -L<"insert">. - -=cut - -sub clone { - my $self = shift; - my $class = ref($self); - my %hash = $self->hash; - $hash{'pkgpart'} = ''; - $hash{'comment'} = "(CUSTOM) ". $hash{'comment'} - unless $hash{'comment'} =~ /^\(CUSTOM\) /; - #new FS::part_pkg ( \%hash ); # ? - new $class ( \%hash ); # ? -} - -=item insert - -Adds this billing item definition to the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub insert { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - my $conf = new FS::Conf; - - if ( $conf->exists('agent_defaultpkg') ) { - foreach my $agent_type ( qsearch('agent_type', {} ) ) { - my $type_pkgs = new FS::type_pkgs({ - 'typenum' => $agent_type->typenum, - 'pkgpart' => $self->pkgpart, - }); - my $error = $type_pkgs->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -=item delete - -Currently unimplemented. - -=cut - -sub delete { - return "Can't (yet?) delete package definitions."; -# check & make sure the pkgpart isn't in cust_pkg or type_pkgs? -} - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=item check - -Checks all fields to make sure this is a valid billing item definition. If -there is an error, returns the error, otherwise returns false. Called by the -insert and replace methods. - -=cut - -sub check { - my $self = shift; - - my $conf = new FS::Conf; - if ( $conf->exists('safe-part_pkg') ) { - - my $error = $self->ut_anything('setup') - || $self->ut_anything('recur'); - return $error if $error; - - my $s = $self->setup; - - $s =~ /^\s*\d*\.?\d*\s*$/ - - or $s =~ /^my \$d = \$cust_pkg->bill || \$time; \$d += 86400 \* \s*\d+\s*; \$cust_pkg->bill\(\$d\); \$cust_pkg_mod_flag=1; \s*\d*\.?\d*\s*$/ - - or do { - #log! - return "illegal setup: $s"; - }; - - my $r = $self->recur; - - $r =~ /^\s*\d*\.?\d*\s*$/ - - #or $r =~ /^\$sdate += 86400 \* \s*\d+\s*; \s*\d*\.?\d*\s*$/ - - or $r =~ /^my \$mnow = \$sdate; my \(\$sec,\$min,\$hour,\$mday,\$mon,\$year\) = \(localtime\(\$sdate\) \)\[0,1,2,3,4,5\]; my \$mstart = timelocal\(0,0,0,1,\$mon,\$year\); my \$mend = timelocal\(0,0,0,1, \$mon == 11 \? 0 : \$mon\+1, \$year\+\(\$mon==11\)\); \$sdate = \$mstart; \( \$part_pkg->freq \- 1 \) \* \d*\.?\d* \/ \$part_pkg\-\>freq \+ \d*\.?\d* \/ \$part_pkg\-\>freq \* \(\$mend\-\$mnow\) \/ \(\$mend\-\$mstart\) ;\s*$/ - - or $r =~ /^my \$mnow = \$sdate; my \(\$sec,\$min,\$hour,\$mday,\$mon,\$year\) = \(localtime\(\$sdate\) \)\[0,1,2,3,4,5\]; \$sdate = timelocal\(0,0,0,1,\$mon,\$year\); \s*\d*\.?\d*\s*;\s*$/ - - or $r =~ /^my \$error = \$cust_pkg\->cust_main\->credit\( \s*\d*\.?\d*\s* \* scalar\(\$cust_pkg\->cust_main\->referral_cust_main_ncancelled\(\s*\d+\s*\)\), "commission" \); die \$error if \$error; \s*\d*\.?\d*\s*;\s*$/ - - or $r =~ /^my \$error = \$cust_pkg\->cust_main\->credit\( \s*\d*\.?\d*\s* \* scalar\(\$cust_pkg\->cust_main->referral_cust_pkg\(\s*\d+\s*\)\), "commission" \); die \$error if \$error; \s*\d*\.?\d*\s*;\s*$/ - - or $r =~ /^my \$error = \$cust_pkg\->cust_main\->credit\( \s*\d*\.?\d*\s* \* scalar\( grep \{ my \$pkgpart = \$_\->pkgpart; grep \{ \$_ == \$pkgpart \} \(\s*(\s*\d+,\s*)*\s*\) \} \$cust_pkg\->cust_main->referral_cust_pkg\(\s*\d+\s*\)\), "commission" \); die \$error if \$error; \s*\d*\.?\d*\s*;\s*$/ - - or $r =~ /^my \$hours = \$cust_pkg\->seconds_since\(\$cust_pkg\->bill \|\| 0\) \/ 3600 \- \s*\d*\.?\d*\s*; \$hours = 0 if \$hours < 0; \s*\d*\.?\d*\s* \+ \s*\d*\.?\d*\s* \* \$hours;\s*$/ - - or $r =~ /^my \$min = \$cust_pkg\->seconds_since\(\$cust_pkg\->bill \|\| 0\) \/ 60 \- \s*\d*\.?\d*\s*; \$min = 0 if \$min < 0; \s*\d*\.?\d*\s* \+ \s*\d*\.?\d*\s* \* \$min;\s*$/ - - or do { - #log! - return "illegal recur: $r"; - }; - - } - - $self->ut_numbern('pkgpart') - || $self->ut_text('pkg') - || $self->ut_text('comment') - || $self->ut_anything('setup') - || $self->ut_number('freq') - || $self->ut_anything('recur') - || $self->ut_alphan('plan') - || $self->ut_anything('plandata') - || $self->ut_enum('setuptax', [ '', 'Y' ] ) - || $self->ut_enum('recurtax', [ '', 'Y' ] ) - || $self->ut_textn('taxclass') - || $self->ut_enum('disabled', [ '', 'Y' ] ) - ; -} - -=item pkg_svc - -Returns all FS::pkg_svc objects (see L) for this package -definition (with non-zero quantity). - -=cut - -sub pkg_svc { - my $self = shift; - grep { $_->quantity } qsearch( 'pkg_svc', { 'pkgpart' => $self->pkgpart } ); -} - -=item svcpart [ SVCDB ] - -Returns the svcpart of a single service definition (see L) -associated with this billing item definition (see L). Returns -false if there not exactly one service definition with quantity 1, or if -SVCDB is specified and does not match the svcdb of the service definition, - -=cut - -sub svcpart { - my $self = shift; - my $svcdb = shift; - my @pkg_svc = $self->pkg_svc; - return '' if scalar(@pkg_svc) != 1 - || $pkg_svc[0]->quantity != 1 - || ( $svcdb && $pkg_svc[0]->part_svc->svcdb ne $svcdb ); - $pkg_svc[0]->svcpart; -} - -=item payby - -Returns a list of the acceptable payment types for this package. Eventually -this should come out of a database table and be editable, but currently has the -following logic instead; - -If the package has B<0> setup and B<0> recur, the single item B is -returned, otherwise, the single item B is returned. - -=cut - -sub payby { - my $self = shift; - #if ( $self->setup == 0 && $self->recur == 0 ) { - if ( $self->setup =~ /^\s*0+(\.0*)?\s*$/ - && $self->recur =~ /^\s*0+(\.0*)?\s*$/ ) { - ( 'BILL' ); - } else { - ( 'CARD' ); - } -} - -=back - -=head1 VERSION - -$Id: part_pkg.pm,v 1.16 2002-06-10 01:39:50 khoff Exp $ - -=head1 BUGS - -The delete method is unimplemented. - -setup and recur semantics are not yet defined (and are implemented in -FS::cust_bill. hmm.). - -=head1 SEE ALSO - -L, L, L, L, L. -schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_pop_local.pm b/FS/FS/part_pop_local.pm deleted file mode 100644 index 0b7cdf6c9..000000000 --- a/FS/FS/part_pop_local.pm +++ /dev/null @@ -1,116 +0,0 @@ -package FS::part_pop_local; - -use strict; -use vars qw( @ISA ); -use FS::Record; # qw( qsearchs ); - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::part_pop_local - Object methods for part_pop_local records - -=head1 SYNOPSIS - - use FS::part_pop_local; - - $record = new FS::part_pop_local \%hash; - $record = new FS::part_pop_local { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_pop_local object represents a local call area. Each -FS::part_pop_local record maps a NPA/NXX (area code and exchange) to the POP -(see L) which is a local call. FS::part_pop_local inherits -from FS::Record. The following fields are currently supported: - -=over 4 - -=item localnum - primary key (assigned automatically for new accounts) - -=item popnum - see L - -=item city - -=item state - -=item npa - area code - -=item nxx - exchange - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new point of presence (if only it were that easy!). To add the -point of presence to the database, see L<"insert">. - -=cut - -sub table { 'part_pop_local'; } - -=item insert - -Adds this point of presence to the database. If there is an error, returns the -error, otherwise returns false. - -=item delete - -Removes this point of presence from the database. - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=item check - -Checks all fields to make sure this is a valid point of presence. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - - $self->ut_numbern('localnum') - or $self->ut_numbern('popnum') - or $self->ut_text('city') - or $self->ut_text('state') - or $self->ut_number('npa') - or $self->ut_number('nxx') - ; - -} - -=back - -=head1 VERSION - -$Id: part_pop_local.pm,v 1.1 2001-09-26 09:17:06 ivan Exp $ - -=head1 BUGS - -US/CA-centric. - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_referral.pm b/FS/FS/part_referral.pm deleted file mode 100644 index 23885dffd..000000000 --- a/FS/FS/part_referral.pm +++ /dev/null @@ -1,116 +0,0 @@ -package FS::part_referral; - -use strict; -use vars qw( @ISA ); -use FS::Record; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::part_referral - Object methods for part_referral objects - -=head1 SYNOPSIS - - use FS::part_referral; - - $record = new FS::part_referral \%hash - $record = new FS::part_referral { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_referral represents a advertising source - where a customer heard -of your services. This can be used to track the effectiveness of a particular -piece of advertising, for example. FS::part_referral inherits from FS::Record. -The following fields are currently supported: - -=over 4 - -=item refnum - primary key (assigned automatically for new referrals) - -=item referral - Text name of this advertising source - -=back - -=head1 NOTE - -These were called B before version 1.4.0 - the name was changed -so as not to be confused with the new customer-to-customer referrals. - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new advertising source. To add the referral to the database, see -L<"insert">. - -=cut - -sub table { 'part_referral'; } - -=item insert - -Adds this advertising source to the database. If there is an error, returns -the error, otherwise returns false. - -=item delete - -Currently unimplemented. - -=cut - -sub delete { - my $self = shift; - return "Can't (yet?) delete part_referral records"; - #need to make sure no customers have this referral! -} - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=item check - -Checks all fields to make sure this is a valid advertising source. If there is -an error, returns the error, otherwise returns false. Called by the insert and -replace methods. - -=cut - -sub check { - my $self = shift; - - $self->ut_numbern('refnum') - || $self->ut_text('referral') - ; -} - -=back - -=head1 BUGS - -The delete method is unimplemented. - -`Advertising source'. Yes, it's a sucky name. The only other ones I could -come up with were "Marketing channel" and "Heard Abouts" and those are -definately both worse. - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm deleted file mode 100644 index 959a3f887..000000000 --- a/FS/FS/part_svc.pm +++ /dev/null @@ -1,348 +0,0 @@ -package FS::part_svc; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs fields dbh ); -use FS::part_svc_column; -use FS::part_export; -use FS::export_svc; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::part_svc - Object methods for part_svc objects - -=head1 SYNOPSIS - - use FS::part_svc; - - $record = new FS::part_svc \%hash - $record = new FS::part_svc { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_svc represents a service definition. FS::part_svc inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item svcpart - primary key (assigned automatically for new service definitions) - -=item svc - text name of this service definition - -=item svcdb - table used for this service. See L, -L, and L, among others. - -=item disabled - Disabled flag, empty or `Y' - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new service definition. To add the service definition to the -database, see L<"insert">. - -=cut - -sub table { 'part_svc'; } - -=item insert EXTRA_FIELDS_ARRAYREF - -Adds this service definition to the database. If there is an error, returns -the error, otherwise returns false. - -TODOC: - -=item I__I - Default or fixed value for I in I. - -=item I__I_flag - defines I__I action: null, `D' for default, or `F' for fixed - -TODOC: EXTRA_FIELDS_ARRAYREF - -=cut - -sub insert { - my $self = shift; - my @fields = (); - @fields = @{shift(@_)} if @_; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - my $svcdb = $self->svcdb; -# my @rows = map { /^${svcdb}__(.*)$/; $1 } -# grep ! /_flag$/, -# grep /^${svcdb}__/, -# fields('part_svc'); - foreach my $field ( - grep { $_ ne 'svcnum' - && defined( $self->getfield($svcdb.'__'.$_.'_flag') ) - } (fields($svcdb), @fields) - ) { - my $part_svc_column = $self->part_svc_column($field); - my $previous = qsearchs('part_svc_column', { - 'svcpart' => $self->svcpart, - 'columnname' => $field, - } ); - - my $flag = $self->getfield($svcdb.'__'.$field.'_flag'); - if ( uc($flag) =~ /^([DF])$/ ) { - $part_svc_column->setfield('columnflag', $1); - $part_svc_column->setfield('columnvalue', - $self->getfield($svcdb.'__'.$field) - ); - if ( $previous ) { - $error = $part_svc_column->replace($previous); - } else { - $error = $part_svc_column->insert; - } - } else { - $error = $previous ? $previous->delete : ''; - } - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -=item delete - -Currently unimplemented. - -=cut - -sub delete { - return "Can't (yet?) delete service definitions."; -# check & make sure the svcpart isn't in cust_svc or pkg_svc (in any packages)? -} - -=item replace OLD_RECORD [ '1.3-COMPAT' [ , EXTRA_FIELDS_ARRAYREF ] ] - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -TODOC: 1.3-COMPAT - -TODOC: EXTRA_FIELDS_ARRAYREF - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - - return "Can't change svcdb for an existing service definition!" - unless $old->svcdb eq $new->svcdb; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $new->SUPER::replace( $old ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - if ( @_ && $_[0] eq '1.3-COMPAT' ) { - shift; - my @fields = (); - @fields = @{shift(@_)} if @_; - - my $svcdb = $new->svcdb; - foreach my $field ( - grep { $_ ne 'svcnum' - && defined( $new->getfield($svcdb.'__'.$_.'_flag') ) - } (fields($svcdb),@fields) - ) { - my $part_svc_column = $new->part_svc_column($field); - my $previous = qsearchs('part_svc_column', { - 'svcpart' => $new->svcpart, - 'columnname' => $field, - } ); - - my $flag = $new->getfield($svcdb.'__'.$field.'_flag'); - if ( uc($flag) =~ /^([DF])$/ ) { - $part_svc_column->setfield('columnflag', $1); - $part_svc_column->setfield('columnvalue', - $new->getfield($svcdb.'__'.$field) - ); - if ( $previous ) { - $error = $part_svc_column->replace($previous); - } else { - $error = $part_svc_column->insert; - } - } else { - $error = $previous ? $previous->delete : ''; - } - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } else { - $dbh->rollback if $oldAutoCommit; - return 'non-1.3-COMPAT interface not yet written'; - #not yet implemented - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -=item check - -Checks all fields to make sure this is a valid service definition. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - my $recref = $self->hashref; - - my $error; - $error= - $self->ut_numbern('svcpart') - || $self->ut_text('svc') - || $self->ut_alpha('svcdb') - || $self->ut_enum('disabled', [ '', 'Y' ] ) - ; - return $error if $error; - - my @fields = eval { fields( $recref->{svcdb} ) }; #might die - return "Unknown svcdb!" unless @fields; - -##REPLACED BY part_svc_column -# my $svcdb; -# foreach $svcdb ( qw( -# svc_acct svc_acct_sm svc_domain -# ) ) { -# my @rows = map { /^${svcdb}__(.*)$/; $1 } -# grep ! /_flag$/, -# grep /^${svcdb}__/, -# fields('part_svc'); -# foreach my $row (@rows) { -# unless ( $svcdb eq $recref->{svcdb} ) { -# $recref->{$svcdb.'__'.$row}=''; -# $recref->{$svcdb.'__'.$row.'_flag'}=''; -# next; -# } -# $recref->{$svcdb.'__'.$row.'_flag'} =~ /^([DF]?)$/ -# or return "Illegal flag for $svcdb $row"; -# $recref->{$svcdb.'__'.$row.'_flag'} = $1; -# -# my $error = $self->ut_anything($svcdb.'__'.$row); -# return $error if $error; -# -# } -# } - - ''; #no error -} - -=item part_svc_column COLUMNNAME - -Returns the part_svc_column object (see L) for the given -COLUMNNAME, or a new part_svc_column object if none exists. - -=cut - -sub part_svc_column { - my $self = shift; - my $columnname = shift; - qsearchs('part_svc_column', { - 'svcpart' => $self->svcpart, - 'columnname' => $columnname, - } - ) or new FS::part_svc_column { - 'svcpart' => $self->svcpart, - 'columnname' => $columnname, - }; -} - -=item all_part_svc_column - -=cut - -sub all_part_svc_column { - my $self = shift; - qsearch('part_svc_column', { 'svcpart' => $self->svcpart } ); -} - -=item part_export - -=cut - -sub part_export { - my $self = shift; - map { qsearchs('part_export', { 'exportnum' => $_->exportnum } ) } - qsearch('export_svc', { 'svcpart' => $self->svcpart } ); -} - -=back - -=head1 VERSION - -$Id: part_svc.pm,v 1.13 2002-04-11 22:05:31 ivan Exp $ - -=head1 BUGS - -Delete is unimplemented. - -The list of svc_* tables is hardcoded. When svc_acct_pop is renamed, this -should be fixed. - -all_part_svc_column and part_export methods should be documented - -=head1 SEE ALSO - -L, L, L, L, -L, L, L, L, -schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/part_svc_column.pm b/FS/FS/part_svc_column.pm deleted file mode 100644 index 37e841e87..000000000 --- a/FS/FS/part_svc_column.pm +++ /dev/null @@ -1,118 +0,0 @@ -package FS::part_svc_column; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( fields ); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::part_svc_column - Object methods for part_svc_column objects - -=head1 SYNOPSIS - - use FS::part_svc_column; - - $record = new FS::part_svc_column \%hash - $record = new FS::part_svc_column { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::part_svc_column record represents a service definition column -constraint. FS::part_svc_column inherits from FS::Record. The following -fields are currently supported: - -=over 4 - -=item columnnum - primary key (assigned automatcially for new records) - -=item svcpart - service definition (see L) - -=item columnname - column name in part_svc.svcdb table - -=item columnvalue - default or fixed value for the column - -=item columnflag - null, D or F - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new column constraint. To add the column constraint to the database, see L<"insert">. - -=cut - -sub table { 'part_svc_column'; } - -=item insert - -Adds this service definition to the database. If there is an error, returns -the error, otherwise returns false. - -=item delete - -Deletes this record from the database. If there is an error, returns the -error, otherwise returns false. - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=item check - -Checks all fields to make sure this is a valid record. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_numbern('columnnum') - || $self->ut_number('svcpart') - || $self->ut_alpha('columnname') - || $self->ut_anything('columnvalue') - ; - return $error if $error; - - $self->columnflag =~ /^([DF])$/ - or return "illegal columnflag ". $self->columnflag; - $self->columnflag(uc($1)); - - ''; #no error -} - -=back - -=head1 VERSION - -$Id: part_svc_column.pm,v 1.1 2001-09-07 20:49:15 ivan Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L, L, L, L, -L, L, L, L, -schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/pkg_svc.pm b/FS/FS/pkg_svc.pm deleted file mode 100644 index 3c544ffd8..000000000 --- a/FS/FS/pkg_svc.pm +++ /dev/null @@ -1,152 +0,0 @@ -package FS::pkg_svc; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearchs ); -use FS::part_pkg; -use FS::part_svc; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::pkg_svc - Object methods for pkg_svc records - -=head1 SYNOPSIS - - use FS::pkg_svc; - - $record = new FS::pkg_svc \%hash; - $record = new FS::pkg_svc { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $part_pkg = $record->part_pkg; - - $part_svc = $record->part_svc; - -=head1 DESCRIPTION - -An FS::pkg_svc record links a billing item definition (see L) to -a service definition (see L). FS::pkg_svc inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item pkgpart - Billing item definition (see L) - -=item svcpart - Service definition (see L) - -=item quantity - Quantity of this service definition that this billing item -definition includes - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Create a new record. To add the record to the database, see L<"insert">. - -=cut - -sub table { 'pkg_svc'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=item delete - -Deletes this record from the database. If there is an error, returns the -error, otherwise returns false. - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - - return "Can't change pkgpart!" if $old->pkgpart != $new->pkgpart; - return "Can't change svcpart!" if $old->svcpart != $new->svcpart; - - $new->SUPER::replace($old); -} - -=item check - -Checks all fields to make sure this is a valid record. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. - -=cut - -sub check { - my $self = shift; - - my $error; - $error = - $self->ut_number('pkgpart') - || $self->ut_number('svcpart') - || $self->ut_number('quantity') - ; - return $error if $error; - - return "Unknown pkgpart!" unless $self->part_pkg; - return "Unknown svcpart!" unless $self->part_svc; - - ''; #no error -} - -=item part_pkg - -Returns the FS::part_pkg object (see L). - -=cut - -sub part_pkg { - my $self = shift; - qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); -} - -=item part_svc - -Returns the FS::part_svc object (see L). - -=cut - -sub part_svc { - my $self = shift; - qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } ); -} - -=back - -=head1 VERSION - -$Id: pkg_svc.pm,v 1.3 2002-06-10 01:39:50 khoff Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L, L, L, schema.html from the base -documentation. - -=cut - -1; - diff --git a/FS/FS/port.pm b/FS/FS/port.pm deleted file mode 100644 index 13455ca89..000000000 --- a/FS/FS/port.pm +++ /dev/null @@ -1,160 +0,0 @@ -package FS::port; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearchs ); -use FS::nas; -use FS::session; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::port - Object methods for port records - -=head1 SYNOPSIS - - use FS::port; - - $record = new FS::port \%hash; - $record = new FS::port { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $session = $port->session; - -=head1 DESCRIPTION - -An FS::port object represents an individual port on a NAS. FS::port inherits -from FS::Record. The following fields are currently supported: - -=over 4 - -=item portnum - primary key - -=item ip - IP address of this port - -=item nasport - port number on the NAS - -=item nasnum - NAS this port is on - see L - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new port. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'port'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - my $error = - $self->ut_numbern('portnum') - || $self->ut_ipn('ip') - || $self->ut_numbern('nasport') - || $self->ut_number('nasnum'); - ; - return $error if $error; - return "Either ip or nasport must be specified" - unless $self->ip || $self->nasport; - return "Unknown nasnum" - unless qsearchs('nas', { 'nasnum' => $self->nasnum } ); - ''; #no error -} - -=item session - -Returns the currently open session on this port, or if no session is currently -open, the most recent session. See L. - -=cut - -sub session { - my $self = shift; - qsearchs('session', { 'portnum' => $self->portnum }, '*', - 'ORDER BY login DESC LIMIT 1' ); -} - -=back - -=head1 VERSION - -$Id: port.pm,v 1.5 2001-02-14 04:33:06 ivan Exp $ - -=head1 BUGS - -The author forgot to customize this manpage. - -The session method won't deal well if you have multiple open sessions on a -port, for example if your RADIUS server drops B records. Suggestions for -how to deal with this sort of lossage welcome; should we close the session -when we get a new session on that port? Tag it as invalid somehow? Close it -one second after it was opened? *sigh* Maybe FS::session shouldn't let you -create overlapping sessions, at least folks will find out their logging is -dropping records. - -If you think the above refers multiple user logins you need to read the -manpages again. - -=head1 SEE ALSO - -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/prepay_credit.pm b/FS/FS/prepay_credit.pm deleted file mode 100644 index 7ed9b8344..000000000 --- a/FS/FS/prepay_credit.pm +++ /dev/null @@ -1,126 +0,0 @@ -package FS::prepay_credit; - -use strict; -use vars qw( @ISA ); -#use FS::Record qw( qsearch qsearchs ); -use FS::Record qw(); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::prepay_credit - Object methods for prepay_credit records - -=head1 SYNOPSIS - - use FS::prepay_credit; - - $record = new FS::prepay_credit \%hash; - $record = new FS::prepay_credit { - 'identifier' => '4198123455512121' - 'amount' => '19.95', - }; - - $record = new FS::prepay_credit { - 'identifier' => '4198123455512121' - 'seconds' => '7200', - }; - - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::table_name object represents an pre--paid credit, such as a pre-paid -"calling card". FS::prepay_credit inherits from FS::Record. The following -fields are currently supported: - -=over 4 - -=item field - description - -=item identifier - identifier entered by the user to receive the credit - -=item amount - amount of the credit - -=item seconds - time amount of credit (see L) - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new pre-paid credit. To add the example to the database, see -L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -sub table { 'prepay_credit'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -=item delete - -Delete this record from the database. - -=cut - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -=item check - -Checks all fields to make sure this is a valid pre-paid credit. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - - my $identifier = $self->identifier; - $identifier =~ s/\W//g; #anything else would just confuse things - $self->identifier($identifier); - - $self->ut_numbern('prepaynum') - || $self->ut_alpha('identifier') - || $self->ut_money('amount') - || $self->utnumbern('seconds') - ; - -} - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/queue.pm b/FS/FS/queue.pm deleted file mode 100644 index d35dc883f..000000000 --- a/FS/FS/queue.pm +++ /dev/null @@ -1,401 +0,0 @@ -package FS::queue; - -use strict; -use vars qw( @ISA @EXPORT_OK $conf $jobnums); -use Exporter; -use FS::UID; -use FS::Conf; -use FS::Record qw( qsearch qsearchs dbh ); -#use FS::queue; -use FS::queue_arg; -use FS::queue_depend; -use FS::cust_svc; - -@ISA = qw(FS::Record); -@EXPORT_OK = qw( joblisting ); - -$FS::UID::callback{'FS::queue'} = sub { - $conf = new FS::Conf; -}; - -$jobnums = ''; - -=head1 NAME - -FS::queue - Object methods for queue records - -=head1 SYNOPSIS - - use FS::queue; - - $record = new FS::queue \%hash; - $record = new FS::queue { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::queue object represents an queued job. FS::queue inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item jobnum - primary key - -=item job - fully-qualified subroutine name - -=item status - job status - -=item statustext - freeform text status message - -=item _date - UNIX timestamp - -=item svcnum - optional link to service (see L) - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new job. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'queue'; } - -=item insert [ ARGUMENT, ARGUMENT... ] - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -If any arguments are supplied, a queue_arg record for each argument is also -created (see L). - -=cut - -#false laziness w/part_export.pm -sub insert { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $arg ( @_ ) { - my $queue_arg = new FS::queue_arg ( { - 'jobnum' => $self->jobnum, - 'arg' => $arg, - } ); - $error = $queue_arg->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - push @$jobnums, $self->jobnum if $jobnums; - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item delete - -Delete this record from the database. Any corresponding queue_arg records are -deleted as well - -=cut - -sub delete { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my @del = qsearch( 'queue_arg', { 'jobnum' => $self->jobnum } ); - push @del, qsearch( 'queue_depend', { 'depend_jobnum' => $self->jobnum } ); - - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $del ( @del ) { - $error = $del->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; - -} - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid job. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - my $error = - $self->ut_numbern('jobnum') - || $self->ut_anything('job') - || $self->ut_numbern('_date') - || $self->ut_enum('status',['', qw( new locked failed )]) - || $self->ut_anything('statustext') - || $self->ut_numbern('svcnum') - ; - return $error if $error; - - $error = $self->ut_foreign_keyn('svcnum', 'cust_svc', 'svcnum'); - $self->svcnum('') if $error; - - $self->status('new') unless $self->status; - $self->_date(time) unless $self->_date; - - ''; #no error -} - -=item args - -Returns a list of the arguments associated with this job. - -=cut - -sub args { - my $self = shift; - map $_->arg, qsearch( 'queue_arg', - { 'jobnum' => $self->jobnum }, - '', - 'ORDER BY argnum' - ); -} - -=item cust_svc - -Returns the FS::cust_svc object associated with this job, if any. - -=cut - -sub cust_svc { - my $self = shift; - qsearchs('cust_svc', { 'svcnum' => $self->svcnum } ); -} - -=item queue_depend - -Returns the FS::queue_depend objects associated with this job, if any. - -=cut - -sub queue_depend { - my $self = shift; - qsearch('queue_depend', { 'jobnum' => $self->jobnum } ); -} - - -=item depend_insert OTHER_JOBNUM - -Inserts a dependancy for this job - it will not be run until the other job -specified completes. If there is an error, returns the error, otherwise -returns false. - -When using job dependancies, you should wrap the insertion of all relevant jobs -in a database transaction. - -=cut - -sub depend_insert { - my($self, $other_jobnum) = @_; - my $queue_depend = new FS::queue_depend ( { - 'jobnum' => $self->jobnum, - 'depend_jobnum' => $other_jobnum, - } ); - $queue_depend->insert; -} - -=back - -=head1 SUBROUTINES - -=over 4 - -=item joblisting HASHREF NOACTIONS - -=cut - -sub joblisting { - my($hashref, $noactions) = @_; - - use Date::Format; - use HTML::Entities; - use FS::CGI; - - my @queue = qsearch( 'queue', $hashref ); - return '' unless scalar(@queue); - - my $p = FS::CGI::popurl(2); - - my $html = qq!
!. - FS::CGI::table(). < - Job - Args - Date - Status -END - $html .= 'Account' unless $hashref->{svcnum}; - $html .= ''; - - my $dangerous = $conf->exists('queue_dangerous_controls'); - - my $areboxes = 0; - - foreach my $queue ( sort { - $a->getfield('jobnum') <=> $b->getfield('jobnum') - } @queue ) { - my $queue_hashref = $queue->hashref; - my $jobnum = $queue->jobnum; - - my $args; - if ( $dangerous || $queue->job !~ /^FS::part_export::/ || !$noactions ) { - $args = encode_entities( join(' ', - map { length($_)<54 ? $_ : substr($_,0,32)."..." } $queue->args #1&g - ) ); - } else { - $args = ''; - } - - my $date = time2str( "%a %b %e %T %Y", $queue->_date ); - my $status = $queue->status; - $status .= ': '. $queue->statustext if $queue->statustext; - my @queue_depend = $queue->queue_depend; - $status .= ' (waiting for '. - join(', ', map { $_->depend_jobnum } @queue_depend ). - ')' - if @queue_depend; - my $changable = $dangerous - || ( ! $noactions && $status =~ /^failed/ || $status =~ /^locked/ ); - if ( $changable ) { - $status .= - qq! ( retry |!. - qq! remove )!; - } - my $cust_svc = $queue->cust_svc; - - $html .= < - $jobnum - $queue_hashref->{job} - $args - $date - $status -END - - unless ( $hashref->{svcnum} ) { - my $account; - if ( $cust_svc ) { - my $table = $cust_svc->part_svc->svcdb; - my $label = ( $cust_svc->label )[1]; - $account = qq!$label!; - } else { - $account = ''; - } - $html .= "$account"; - } - - if ( $changable ) { - $areboxes=1; - $html .= - qq!!; - - } - - $html .= ''; - -} - - $html .= ''; - - if ( $areboxes ) { - $html .= '
'. - '
'; - } - - $html; - -} - -=back - -=head1 VERSION - -$Id: queue.pm,v 1.15 2002-07-02 06:48:59 ivan Exp $ - -=head1 BUGS - -$jobnums global - -=head1 SEE ALSO - -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/queue_arg.pm b/FS/FS/queue_arg.pm deleted file mode 100644 index 08fe47341..000000000 --- a/FS/FS/queue_arg.pm +++ /dev/null @@ -1,121 +0,0 @@ -package FS::queue_arg; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::queue_arg - Object methods for queue_arg records - -=head1 SYNOPSIS - - use FS::queue_arg; - - $record = new FS::queue_arg \%hash; - $record = new FS::queue_arg { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::queue_arg object represents job argument. FS::queue_arg inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item argnum - primary key - -=item jobnum - see L - -=item arg - argument - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new argument. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'queue_arg'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid argument. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - my $error = - $self->ut_numbern('argnum') - || $self->ut_numbern('jobnum') - || $self->ut_anything('arg') - ; - return $error if $error; - - ''; #no error -} - -=back - -=head1 VERSION - -$Id: queue_arg.pm,v 1.1 2001-09-11 00:08:18 ivan Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/queue_depend.pm b/FS/FS/queue_depend.pm deleted file mode 100644 index 4a4e3c55c..000000000 --- a/FS/FS/queue_depend.pm +++ /dev/null @@ -1,120 +0,0 @@ -package FS::queue_depend; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::queue; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::queue_depend - Object methods for queue_depend records - -=head1 SYNOPSIS - - use FS::queue_depend; - - $record = new FS::queue_depend \%hash; - $record = new FS::queue_depend { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::queue_depend object represents an job dependancy. FS::queue_depend -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item dependnum - primary key - -=item jobnum - source jobnum (see L). - -=item depend_jobnum - dependancy jobnum (see L) - -=back - -The job specified by B depends on the job specified B - -the B job will not be run until the B job has completed -sucessfully (or manually removed). - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new dependancy. To add the dependancy to the database, see -L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'queue_depend'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid dependancy. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - - $self->ut_numbern('dependnum') - || $self->ut_foreign_key('jobnum', 'queue', 'jobnum') - || $self->ut_foreign_key('depend_jobnum', 'queue', 'jobnum') - ; -} - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/raddb.pm b/FS/FS/raddb.pm deleted file mode 100644 index 497d98450..000000000 --- a/FS/FS/raddb.pm +++ /dev/null @@ -1,1091 +0,0 @@ -package FS::raddb; -use vars qw(%attrib); - -%attrib = ( - 'ascend_bi_directional_au' => 'Ascend-Bi-Directional-Auth', - 'h323_connect_time' => 'h323-connect-time', - 'connect_rate' => 'Connect-Rate', - 'bind_auth_service_grp' => 'Bind_Auth_Service_Grp', - 'usr_callback_type' => 'USR-Callback-Type', - 'erx_primary_wins' => 'ERX-Primary-Wins', - 'ascend_x25_x121_address' => 'Ascend-X25-X121-Address', - 'usr_log_filter_packets' => 'USR-Log-Filter-Packets', - 'annex_addr_resolution_pr' => 'Annex-Addr-Resolution-Protocol', - 'usr_ip_rip_simple_auth_p' => 'USR-IP-RIP-Simple-Auth-Password', - 'dialback_name' => 'Dialback-Name', - 'x_ascend_fr_dce_n392' => 'X-Ascend-FR-DCE-N392', - 'usr_host_type' => 'USR-Host-Type', - 'le_modem_info' => 'LE-Modem-Info', - 'x_ascend_menu_selector' => 'X-Ascend-Menu-Selector', - 'x_ascend_fr_dce_n393' => 'X-Ascend-FR-DCE-N393', - 'ascend_ip_direct' => 'Ascend-IP-Direct', - 'x_ascend_pre_output_octe' => 'X-Ascend-Pre-Output-Octets', - 'x_ascend_ft1_caller' => 'X-Ascend-FT1-Caller', - 'usr_last_callers_number_' => 'USR-Last-Callers-Number-ANI', - 'usr_rmmie_product_code' => 'USR-RMMIE-Product-Code', - 'usr_igmp_robustness' => 'USR-IGMP-Robustness', - 'ms_chap2_success' => 'MS-CHAP2-Success', - 'ascend_home_agent_passwo' => 'Ascend-Home-Agent-Password', - 'acc_bridging_support' => 'Acc-Bridging-Support', - 'annex_transmit_speed' => 'Annex-Transmit-Speed', - 'old_password' => 'Old-Password', - 'x_ascend_metric' => 'X-Ascend-Metric', - 'acc_clearing_location' => 'Acc-Clearing-Location', - 'ascend_multilink_id' => 'Ascend-Multilink-ID', - 'ascend_egress_enabled' => 'Ascend-Egress-Enabled', - 'usr_bridging' => 'USR-Bridging', - 'ascend_assign_ip_server' => 'Ascend-Assign-IP-Server', - 'acc_dns_server_sec' => 'Acc-Dns-Server-Sec', - 'ascend_home_agent_ip_add' => 'Ascend-Home-Agent-IP-Addr', - 'usr_dnis_reauthenticatio' => 'USR-DNIS-ReAuthentication', - 'acc_modem_error_protocol' => 'Acc-Modem-Error-Protocol', - 'ascend_backup' => 'Ascend-Backup', - 'usr_connect_time' => 'USR-Connect-Time', - 'ascend_cbcp_mode' => 'Ascend-CBCP-Mode', - 'usr_rmmie_x2_status' => 'USR-RMMIE-x2-Status', - 'ascend_multicast_gleave_' => 'Ascend-Multicast-GLeave-Delay', - 'erx_ingress_statistics' => 'ERX-Ingress-Statistics', - 'cisco_nas_port' => 'Cisco-NAS-Port', - 'le_admin_group' => 'LE-Admin-Group', - 'annex_mrru' => 'Annex-MRRU', - 'x_ascend_add_seconds' => 'X-Ascend-Add-Seconds', - 'ascend_token_expiry' => 'Ascend-Token-Expiry', - 'usr_igmp_maximum_respons' => 'USR-IGMP-Maximum-Response-Time', - 'ascend_calling_id_presen' => 'Ascend-Calling-Id-Presentatn', - 'connect_info' => 'Connect-Info', - 'ascend_access_intercept_' => 'Ascend-Access-Intercept-LEA', - 'x_ascend_dba_monitor' => 'X-Ascend-DBA-Monitor', - 'client_dns_pri' => 'Client_DNS_Pri', - 'ip_host_addr' => 'Ip_Host_Addr', - 'callback_id' => 'Callback-Id', - 'acct_mcast_out_octets' => 'Acct_Mcast_Out_Octets', - 'acct_input_octets_64' => 'Acct_Input_Octets_64', - 'tunnel_function' => 'Tunnel_Function', - 'ascend_fr_direct_profile' => 'Ascend-FR-Direct-Profile', - 'h323_incoming_conf_id' => 'h323-incoming-conf-id', - 'ascend_ppp_vj_1172' => 'Ascend-PPP-VJ-1172', - 'ms_new_arap_password' => 'MS-New-ARAP-Password', - 'h323_voice_quality' => 'h323-voice-quality', - 'framed_appletalk_network' => 'Framed-AppleTalk-Network', - 'bind_int_interface_name' => 'Bind_Int_Interface_Name', - 'event_timestamp' => 'Event-Timestamp', - 'ascend_bir_enable' => 'Ascend-BIR-Enable', - 'usr_fallback_enabled' => 'USR-Fallback-Enabled', - 'ascend_dhcp_pool_number' => 'Ascend-DHCP-Pool-Number', - 'acct_session_id' => 'Acct-Session-Id', - 'ascend_private_route_req' => 'Ascend-Private-Route-Required', - 'usr_rmmie_pwrlvl_farecho' => 'USR-RMMIE-PwrLvl-FarEcho-Canc', - 'usr_at_input_filter' => 'USR-AT-Input-Filter', - 'erx_egress_statistics' => 'ERX-Egress-Statistics', - 'x_ascend_call_type' => 'X-Ascend-Call-Type', - 'acct_tunnel_client_endpo' => 'Acct-Tunnel-Client-Endpoint', - 'x_ascend_assign_ip_clien' => 'X-Ascend-Assign-IP-Client', - 'ascend_if_netmask' => 'Ascend-IF-Netmask', - 'ascend_dhcp_maximum_leas' => 'Ascend-DHCP-Maximum-Leases', - 'usr_at_output_filter' => 'USR-AT-Output-Filter', - 'usr_rad_dvmrp_metric' => 'USR-Rad-Dvmrp-Metric', - 'rate_limit_rate' => 'Rate_Limit_Rate', - 'prefix' => 'Prefix', - 'ascend_x25_pad_banner' => 'Ascend-X25-Pad-Banner', - 'usr_rmmie_rcv_pwrlvl_375' => 'USR-RMMIE-Rcv-PwrLvl-3750Hz', - 'x_ascend_user_acct_key' => 'X-Ascend-User-Acct-Key', - 'group_name' => 'Group-Name', - 'ascend_receive_secret' => 'Ascend-Receive-Secret', - 'reply_message' => 'Reply-Message', - 'le_nat_sess_dir_fail_act' => 'LE-NAT-Sess-Dir-Fail-Action', - 'framed_callback_id' => 'Framed-Callback-Id', - 'cisco_disconnect_cause' => 'Cisco-Disconnect-Cause', - 'stripped_user_name' => 'Stripped-User-Name', - 'annex_keypress_timeout' => 'Annex-Keypress-Timeout', - 'annex_receive_speed' => 'Annex-Receive-Speed', - 'ms_chap_domain' => 'MS-CHAP-Domain', - 'ascend_atm_connect_group' => 'Ascend-ATM-Connect-Group', - 'usr_send_name' => 'USR-Send-Name', - 'usr_local_framed_ip_addr' => 'USR-Local-Framed-IP-Addr', - 'erx_alternate_cli_vroute' => 'ERX-Alternate-Cli-Vrouter-Name', - 'usr_fallback_limit' => 'USR-Fallback-Limit', - 'ascend_pri_number_type' => 'Ascend-PRI-Number-Type', - 'x_ascend_minimum_channel' => 'X-Ascend-Minimum-Channels', - 'x_ascend_fr_direct_dlci' => 'X-Ascend-FR-Direct-DLCI', - 'ascend_fr_link_mgt' => 'Ascend-FR-Link-Mgt', - 'annex_host_allow' => 'Annex-Host-Allow', - 'x_ascend_force_56' => 'X-Ascend-Force-56', - 'police_burst' => 'Police_Burst', - 'pvc_profile_name' => 'PVC_Profile_Name', - 'ms_filter' => 'MS-Filter', - 'rate_limit_burst' => 'Rate_Limit_Burst', - 'ascend_number_sessions' => 'Ascend-Number-Sessions', - 'cisco_call_filter' => 'Cisco-Call-Filter', - 'erx_igmp_enable' => 'ERX-Igmp-Enable', - 'ascend_filter_required' => 'Ascend-Filter-Required', - 'erx_cli_allow_all_vr_acc' => 'ERX-Cli-Allow-All-VR-Access', - 'acc_callback_delay' => 'Acc-Callback-Delay', - 'usr_default_dte_data_rat' => 'USR-Default-DTE-Data-Rate', - 'le_ip_pool' => 'LE-IP-Pool', - 'cisco_pre_output_packets' => 'Cisco-Pre-Output-Packets', - 'x_ascend_group' => 'X-Ascend-Group', - 'usr_channel_connected_to' => 'USR-Channel-Connected-To', - 'usr_ipx_rip_output_filte' => 'USR-IPX-RIP-Output-Filter', - 'usr_esn' => 'USR-ESN', - 'annex_user_level' => 'Annex-User-Level', - 'x_ascend_primary_home_ag' => 'X-Ascend-Primary-Home-Agent', - 'no_such_attribute' => 'No-Such-Attribute', - 'x_ascend_pri_number_type' => 'X-Ascend-PRI-Number-Type', - 'ms_mppe_send_key' => 'MS-MPPE-Send-Key', - 'usr_actual_voltage' => 'USR-Actual-Voltage', - 'annex_acct_servers' => 'Annex-Acct-Servers', - 'ascend_handle_ipx' => 'Ascend-Handle-IPX', - 'cisco_xmit_rate' => 'Cisco-Xmit-Rate', - 'acc_service_profile' => 'Acc-Service-Profile', - 'x_ascend_ara_pw' => 'X-Ascend-Ara-PW', - 'ascend_ckt_type' => 'Ascend-Ckt-Type', - 'cisco_data_rate' => 'Cisco-Data-Rate', - 'group' => 'Group', - 'nas_port' => 'NAS-Port', - 'usr_ipx_call_output_filt' => 'USR-IPX-Call-Output-Filter', - 'tunnel_type' => 'Tunnel-Type', - 'usr_rmmie_manufacturer_i' => 'USR-RMMIE-Manufacturer-ID', - 'user_name_is_star' => 'User-Name-Is-Star', - 'usr_call_arrival_in_gmt' => 'USR-Call-Arrival-in-GMT', - 'x_ascend_number_sessions' => 'X-Ascend-Number-Sessions', - 'ascend_send_auth' => 'Ascend-Send-Auth', - 'user_service_type' => 'User-Service-Type', - 'annex_cli_filter' => 'Annex-CLI-Filter', - 'erx_cli_initial_access_l' => 'ERX-Cli-Initial-Access-Level', - 'ascend_call_direction' => 'Ascend-Call-Direction', - 'usr_chassis_temp_thresho' => 'USR-Chassis-Temp-Threshold', - 'usr_pw_usr_ofilter_ipx' => 'USR-PW_USR_OFilter_IPX', - 'tunnel_session_auth' => 'Tunnel_Session_Auth', - 'x_ascend_connect_progres' => 'X-Ascend-Connect-Progress', - 'ascend_atm_connect_vci' => 'Ascend-ATM-Connect-Vci', - 'x_ascend_maximum_call_du' => 'X-Ascend-Maximum-Call-Duration', - 'usr_rmmie_planned_discon' => 'USR-RMMIE-Planned-Disconnect', - 'x_ascend_fr_dte_n392' => 'X-Ascend-FR-DTE-N392', - 'login_host' => 'Login-Host', - 'ascend_user_acct_host' => 'Ascend-User-Acct-Host', - 'x_ascend_fr_dte_n393' => 'X-Ascend-FR-DTE-N393', - 'acc_tunnel_secret' => 'Acc-Tunnel-Secret', - 'usr_at_rtmp_input_filter' => 'USR-AT-RTMP-Input-Filter', - 'framed_protocol' => 'Framed-Protocol', - 'login_callback_number' => 'Login-Callback-Number', - 'ascend_dsl_rate_type' => 'Ascend-Dsl-Rate-Type', - 'ascend_pre_output_packet' => 'Ascend-Pre-Output-Packets', - 'proxy_state' => 'Proxy-State', - 'usr_pw_usr_ofilter_ip' => 'USR-PW_USR_OFilter_IP', - 'cisco_data_filter' => 'Cisco-Data-Filter', - 'cisco_target_util' => 'Cisco-Target-Util', - 'usr_ids0_call_type' => 'USR-IDS0-Call-Type', - 'usr_blocks_resent' => 'USR-Blocks-Resent', - 'usr_terminal_type' => 'USR-Terminal-Type', - 'ascend_history_weigh_typ' => 'Ascend-History-Weigh-Type', - 'framed_routing' => 'Framed-Routing', - 'ascend_client_assign_dns' => 'Ascend-Client-Assign-DNS', - 'ascend_atm_group' => 'Ascend-ATM-Group', - 'bind_bypass_bypass' => 'Bind_Bypass_Bypass', - 'le_ip_gateway' => 'LE-IP-Gateway', - 'cisco_ip_pool_definition' => 'Cisco-IP-Pool-Definition', - 'x_ascend_maximum_time' => 'X-Ascend-Maximum-Time', - 'usr_request_type' => 'USR-Request-Type', - 'usr_call_arrival_time' => 'USR-Call-Arrival-Time', - 'tunnel_domain' => 'Tunnel_Domain', - 'ms_chap_nt_enc_pw' => 'MS-CHAP-NT-Enc-PW', - 'shiva_calling_number' => 'Shiva-Calling-Number', - 'ip_address_pool_name' => 'Ip_Address_Pool_Name', - 'erx_secondary_dns' => 'ERX-Secondary-Dns', - 'x_ascend_pre_input_octet' => 'X-Ascend-Pre-Input-Octets', - 'ascend_home_agent_udp_po' => 'Ascend-Home-Agent-UDP-Port', - 'le_nat_outsource_inmap' => 'LE-NAT-Outsource-Inmap', - 'x_ascend_home_agent_pass' => 'X-Ascend-Home-Agent-Password', - 'tunnel_password' => 'Tunnel-Password', - 'usr_compression_type' => 'USR-Compression-Type', - 'usr_connect_speed' => 'USR-Connect-Speed', - 'usr_connect_time_limit' => 'USR-Connect-Time-Limit', - 'arap_challenge_response' => 'ARAP-Challenge-Response', - 'ms_link_utilization_thre' => 'MS-Link-Utilization-Threshold', - 'usr_mp_edo' => 'USR-MP-EDO', - 'usr_primary_nbns_server' => 'USR-Primary_NBNS_Server', - 'usr_imsi' => 'USR-IMSI', - 'ascend_fr_direct' => 'Ascend-FR-Direct', - 'ascend_vrouter_name' => 'Ascend-VRouter-Name', - 'ascend_preempt_limit' => 'Ascend-Preempt-Limit', - 'ascend_ip_pool_definitio' => 'Ascend-IP-Pool-Definition', - 'h323_gw_id' => 'h323-gw-id', - 'usr_framed_ipx_route' => 'USR-Framed-IPX-Route', - 'x_ascend_maximum_channel' => 'X-Ascend-Maximum-Channels', - 'login_lat_node' => 'Login-LAT-Node', - 'acct_session_time' => 'Acct-Session-Time', - 'ascend_disconnect_cause' => 'Ascend-Disconnect-Cause', - 'ms_mppe_encryption_polic' => 'MS-MPPE-Encryption-Policy', - 'ms_ras_version' => 'MS-RAS-Version', - 'class' => 'Class', - 'caller_id' => 'Caller-ID', - 'ascend_access_intercept_' => 'Ascend-Access-Intercept-Log', - 'ascend_service_type' => 'Ascend-Service-Type', - 'ascend_h323_dialed_time' => 'Ascend-H323-Dialed-Time', - 'exec_program_wait' => 'Exec-Program-Wait', - 'ascend_x25_nui_password_' => 'Ascend-X25-Nui-Password-Prompt', - 'ascend_appletalk_peer_mo' => 'Ascend-Appletalk-Peer-Mode', - 'login_lat_group' => 'Login-LAT-Group', - 'strip_user_name' => 'Strip-User-Name', - 'nas_ip_address' => 'NAS-IP-Address', - 'ascend_maximum_time' => 'Ascend-Maximum-Time', - 'erx_atm_pcr' => 'ERX-Atm-PCR', - 'ascend_client_primary_dn' => 'Ascend-Client-Primary-DNS', - 'auth_type' => 'Auth-Type', - 'ascend_secondary_home_ag' => 'Ascend-Secondary-Home-Agent', - 'x_ascend_idle_limit' => 'X-Ascend-Idle-Limit', - 'ms_ras_vendor' => 'MS-RAS-Vendor', - 'ascend_pre_input_packets' => 'Ascend-Pre-Input-Packets', - 'ascend_bridge' => 'Ascend-Bridge', - 'h323_redirect_number' => 'h323-redirect-number', - 'usr_simplified_mnp_level' => 'USR-Simplified-MNP-Levels', - 'annex_edo' => 'Annex-EDO', - 'acc_nbns_server_sec' => 'Acc-Nbns-Server-Sec', - 'ascend_cbcp_trunk_group' => 'Ascend-CBCP-Trunk-Group', - 'x_ascend_data_svc' => 'X-Ascend-Data-Svc', - 'le_terminate_detail' => 'LE-Terminate-Detail', - 'acct_output_octets' => 'Acct-Output-Octets', - 'usr_calling_party_number' => 'USR-Calling-Party-Number', - 'x_ascend_dhcp_maximum_le' => 'X-Ascend-DHCP-Maximum-Leases', - 'ascend_force_56' => 'Ascend-Force-56', - 'shiva_acct_serv_switch' => 'Shiva-Acct-Serv-Switch', - 'tunnel_algorithm' => 'Tunnel_Algorithm', - 'usr_max_channels' => 'USR-Max-Channels', - 'usr_port_tap_priority' => 'USR-Port-Tap-Priority', - 'le_nat_outmap' => 'LE-NAT-Outmap', - 'usr_call_connecting_time' => 'USR-Call-Connecting-Time', - 'usr_supports_tags' => 'USR-Supports-Tags', - 'idle_timeout' => 'Idle-Timeout', - 'usr_ip_rip_input_filter' => 'USR-IP-RIP-Input-Filter', - 'erx_ingress_policy_name' => 'ERX-Ingress-Policy-Name', - 'usr_pw_cutoff' => 'USR-PW_Cutoff', - 'usr_channel_expansion' => 'USR-Channel-Expansion', - 'x_ascend_send_secret' => 'X-Ascend-Send-Secret', - 'h323_call_origin' => 'h323-call-origin', - 'h323_preferred_lang' => 'h323-preferred-lang', - 'ascend_base_channel_coun' => 'Ascend-Base-Channel-Count', - 'bind_auth_context' => 'Bind_Auth_Context', - 'ascend_calling_id_number' => 'Ascend-Calling-Id-Number-Plan', - 'ascend_modem_shelfno' => 'Ascend-Modem-ShelfNo', - 'tunnel_police_burst' => 'Tunnel_Police_Burst', - 'pvc_circuit_padding' => 'PVC_Circuit_Padding', - 'acc_ml_call_threshold' => 'Acc-ML-Call-Threshold', - 'usr_end_time' => 'USR-End-Time', - 'usr_ipx' => 'USR-IPX', - 'ms_primary_dns_server' => 'MS-Primary-DNS-Server', - 'ascend_dsl_upstream_limi' => 'Ascend-Dsl-Upstream-Limit', - 'usr_blocks_sent' => 'USR-Blocks-Sent', - 'bind_dot1q_vlan_tag_id' => 'Bind_Dot1q_Vlan_Tag_Id', - 'ascend_private_route' => 'Ascend-Private-Route', - 'usr_back_channel_data_ra' => 'USR-Back-Channel-Data-Rate', - 'ascend_dropped_packets' => 'Ascend-Dropped-Packets', - 'cisco_route_ip' => 'Cisco-Route-IP', - 'nas_identifier' => 'NAS-Identifier', - 'ascend_presession_time' => 'Ascend-PreSession-Time', - 'usr_call_type' => 'USR-Call-Type', - 'usr_acct_reason_code' => 'USR-Acct-Reason-Code', - 'acc_dialout_auth_passwor' => 'Acc-Dialout-Auth-Password', - 'acc_connect_tx_speed' => 'Acc-Connect-Tx-Speed', - 'cisco_pre_input_octets' => 'Cisco-Pre-Input-Octets', - 'x_ascend_send_passwd' => 'X-Ascend-Send-Passwd', - 'ascend_bir_bridge_group' => 'Ascend-BIR-Bridge-Group', - 'ascend_fr_profile_name' => 'Ascend-FR-Profile-Name', - 'ascend_group' => 'Ascend-Group', - 'crypt_password' => 'Crypt-Password', - 'usr_port_tap_address' => 'USR-Port-Tap-Address', - 'le_nat_outsource_outmap' => 'LE-NAT-Outsource-Outmap', - 'usr_vpn_encrypter' => 'USR-VPN-Encrypter', - 'usr_blocks_received' => 'USR-Blocks-Received', - 'tunnel_group' => 'Tunnel_Group', - 'ascend_shared_profile_en' => 'Ascend-Shared-Profile-Enable', - 'replicate_to_realm' => 'Replicate-To-Realm', - 'usr_mobile_ip_address' => 'USR-Mobile-IP-Address', - 'x_ascend_authen_alias' => 'X-Ascend-Authen-Alias', - 'ascend_fr_linkup' => 'Ascend-FR-LinkUp', - 'tunnel_rate_limit_rate' => 'Tunnel_Rate_Limit_Rate', - 'acc_access_community' => 'Acc-Access-Community', - 'x_ascend_presession_time' => 'X-Ascend-PreSession-Time', - 'ms_chap_cpw_1' => 'MS-CHAP-CPW-1', - 'ms_chap_cpw_2' => 'MS-CHAP-CPW-2', - 'erx_primary_dns' => 'ERX-Primary-Dns', - 'ascend_fr_circuit_name' => 'Ascend-FR-Circuit-Name', - 'ascend_token_immediate' => 'Ascend-Token-Immediate', - 'cisco_idle_limit' => 'Cisco-Idle-Limit', - 'usr_speed_of_connection' => 'USR-Speed-Of-Connection', - 'shiva_links_in_bundle' => 'Shiva-Links-In-Bundle', - 'x_ascend_fr_profile_name' => 'X-Ascend-FR-Profile-Name', - 'cisco_multilink_id' => 'Cisco-Multilink-ID', - 'x_ascend_preempt_limit' => 'X-Ascend-Preempt-Limit', - 'ascend_assign_ip_client' => 'Ascend-Assign-IP-Client', - 'usr_iwf_ip_address' => 'USR-IWF-IP-Address', - 'acct_unique_session_id' => 'Acct-Unique-Session-Id', - 'framed_pool' => 'Framed-Pool', - 'usr_igmp_version' => 'USR-IGMP-Version', - 'tunnel_max_tunnels' => 'Tunnel_Max_Tunnels', - 'annex_unauthenticated_ti' => 'Annex-Unauthenticated-Time', - 'bg_path_cost' => 'BG_Path_Cost', - 'ascend_client_assign_win' => 'Ascend-Client-Assign-WINS', - 'x_ascend_dial_number' => 'X-Ascend-Dial-Number', - 'cisco_maximum_channels' => 'Cisco-Maximum-Channels', - 'usr_pw_framed_routing_v2' => 'USR-PW_Framed_Routing_V2', - 'usr_channel_decrement' => 'USR-Channel-Decrement', - 'x_ascend_route_ipx' => 'X-Ascend-Route-IPX', - 'port_limit' => 'Port-Limit', - 'ascend_dsl_downstream_li' => 'Ascend-Dsl-Downstream-Limit', - 'ascend_ip_tos_precedence' => 'Ascend-IP-TOS-Precedence', - 'usr_multicast_receive' => 'USR-Multicast-Receive', - 'usr_auth_mode' => 'USR-Auth-Mode', - 'expiration' => 'Expiration', - 'x_ascend_fr_circuit_name' => 'X-Ascend-FR-Circuit-Name', - 'x_ascend_token_immediate' => 'X-Ascend-Token-Immediate', - 'ascend_ft1_caller' => 'Ascend-FT1-Caller', - 'shiva_event_flags' => 'Shiva-Event-Flags', - 'framed_netmask' => 'Framed-Netmask', - 'ascend_minimum_channels' => 'Ascend-Minimum-Channels', - 'acc_ml_damping_factor' => 'Acc-ML-Damping-Factor', - 'bind_sub_password' => 'Bind_Sub_Password', - 'ascend_ip_tos_apply_to' => 'Ascend-IP-TOS-Apply-To', - 'x_ascend_home_agent_udp_' => 'X-Ascend-Home-Agent-UDP-Port', - 'x_ascend_menu_item' => 'X-Ascend-Menu-Item', - 'ascend_session_type' => 'Ascend-Session-Type', - 'usr_pw_packet' => 'USR-PW_Packet', - 'session' => 'Session', - 'usr_mic' => 'USR-MIC', - 'usr_line_reversals' => 'USR-Line-Reversals', - 'assigned_ip_address' => 'Assigned_IP_Address', - 'cisco_ip_direct' => 'Cisco-IP-Direct', - 'le_ipsec_log_options' => 'LE-IPSec-Log-Options', - 'tunnel_rate_limit_burst' => 'Tunnel_Rate_Limit_Burst', - 'x_ascend_assign_ip_globa' => 'X-Ascend-Assign-IP-Global-Pool', - 'x_ascend_inc_channel_cou' => 'X-Ascend-Inc-Channel-Count', - 'h323_return_code' => 'h323-return-code', - 'shiva_disconnect_reason' => 'Shiva-Disconnect-Reason', - 'filter_id' => 'Filter-Id', - 'usr_appletalk_network_ra' => 'USR-Appletalk-Network-Range', - 'ascend_temporary_rtes' => 'Ascend-Temporary-Rtes', - 'ascend_h323_conference_i' => 'Ascend-H323-Conference-Id', - 'h323_billing_model' => 'h323-billing-model', - 'usr_bearer_capabilities' => 'USR-Bearer-Capabilities', - 'framed_appletalk_zone' => 'Framed-AppleTalk-Zone', - 'usr_harc_disconnect_code' => 'USR-HARC-Disconnect-Code', - 'usr_ipx_rip_input_filter' => 'USR-IPX-RIP-Input-Filter', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Bound', - 'ascend_pw_lifetime' => 'Ascend-PW-Lifetime', - 'acc_dialout_auth_usernam' => 'Acc-Dialout-Auth-Username', - 'ascend_x25_pad_x3_parame' => 'Ascend-X25-Pad-X3-Parameters', - 'bind_dot1q_slot' => 'Bind_Dot1q_Slot', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-RtLim', - 'x_ascend_multicast_clien' => 'X-Ascend-Multicast-Client', - 'ascend_authen_alias' => 'Ascend-Authen-Alias', - 'ascend_dec_channel_count' => 'Ascend-Dec-Channel-Count', - 'dhcp_max_leases' => 'DHCP_Max_Leases', - 'shiva_called_number' => 'Shiva-Called-Number', - 'annex_tunnel_authen_mode' => 'Annex-Tunnel-Authen-Mode', - 'usr_call_error_code' => 'USR-Call-Error-Code', - 'x_ascend_user_acct_type' => 'X-Ascend-User-Acct-Type', - 'ascend_atm_connect_vpi' => 'Ascend-ATM-Connect-Vpi', - 'ascend_x25_pad_x3_profil' => 'Ascend-X25-Pad-X3-Profile', - 'usr_mobileip_home_agent_' => 'USR-MobileIP-Home-Agent-Address', - 'suffix' => 'Suffix', - 'bind_tun_context' => 'Bind_Tun_Context', - 'x_ascend_ppp_address' => 'X-Ascend-PPP-Address', - 'usr_dtr_false_timeout' => 'USR-DTR-False-Timeout', - 'usr_final_rx_link_data_r' => 'USR-Final-Rx-Link-Data-Rate', - 'ms_chap_error' => 'MS-CHAP-Error', - 'x_ascend_home_agent_ip_a' => 'X-Ascend-Home-Agent-IP-Addr', - 'ascend_data_svc' => 'Ascend-Data-Svc', - 'usr_rmmie_pwrlvl_noise_l' => 'USR-RMMIE-PwrLvl-Noise-Lvl', - 'usr_dtr_true_timeout' => 'USR-DTR-True-Timeout', - 'context_name' => 'Context-Name', - 'usr_card_type' => 'USR-Card-Type', - 'ascend_fr_link_status_dl' => 'Ascend-FR-Link-Status-DLCI', - 'annex_sec_profile_index' => 'Annex-Sec-Profile-Index', - 'usr_pw_usr_ofilter_sap' => 'USR-PW_USR_OFilter_SAP', - 'tunnel_medium_type' => 'Tunnel-Medium-Type', - 'x_ascend_require_auth' => 'X-Ascend-Require-Auth', - 'ascend_connect_progress' => 'Ascend-Connect-Progress', - 'x_ascend_modem_shelfno' => 'X-Ascend-Modem-ShelfNo', - 'cisco_pre_input_packets' => 'Cisco-Pre-Input-Packets', - 'ascend_fr_dce_n392' => 'Ascend-FR-DCE-N392', - 'ascend_fr_dce_n393' => 'Ascend-FR-DCE-N393', - 'ascend_client_primary_wi' => 'Ascend-Client-Primary-WINS', - 'shiva_link_protocol' => 'Shiva-Link-Protocol', - 'bridge_group' => 'Bridge_Group', - 'client_port_dnis' => 'Client-Port-DNIS', - 'usr_mpip_tunnel_originat' => 'USR-MPIP-Tunnel-Originator', - 'le_nat_log_options' => 'LE-NAT-Log-Options', - 'usr_number_of_rings_limi' => 'USR-Number-of-Rings-Limit', - 'usr_retrains_granted' => 'USR-Retrains-Granted', - 'acc_ip_gateway_pri' => 'Acc-Ip-Gateway-Pri', - 'usr_number_of_fallbacks' => 'USR-Number-of-Fallbacks', - 'usr_tunnel_auth_hostname' => 'USR-Tunnel-Auth-Hostname', - 'annex_filter' => 'Annex-Filter', - 'ascend_mtu' => 'Ascend-MTU', - 'ms_arap_pw_change_reason' => 'MS-ARAP-PW-Change-Reason', - 'private_group_id' => 'Private-Group-Id', - 'ascend_cache_time' => 'Ascend-Cache-Time', - 'acc_ml_clear_threshold' => 'Acc-ML-Clear-Threshold', - 'x_ascend_dhcp_reply' => 'X-Ascend-DHCP-Reply', - 'ascend_h323_gatekeeper' => 'Ascend-H323-Gatekeeper', - 'x_ascend_xmit_rate' => 'X-Ascend-Xmit-Rate', - 'usr_last_number_dialed_o' => 'USR-Last-Number-Dialed-Out', - 'acc_connect_rx_speed' => 'Acc-Connect-Rx-Speed', - 'acc_clearing_cause' => 'Acc-Clearing-Cause', - 'ascend_call_attempt_limi' => 'Ascend-Call-Attempt-Limit', - 'x_ascend_data_rate' => 'X-Ascend-Data-Rate', - 'termination_action' => 'Termination-Action', - 'ascend_pre_input_octets' => 'Ascend-Pre-Input-Octets', - 'x_ascend_ipx_route' => 'X-Ascend-IPX-Route', - 'x_ascend_ts_idle_mode' => 'X-Ascend-TS-Idle-Mode', - 'client_ip_address' => 'Client-IP-Address', - 'ascend_add_seconds' => 'Ascend-Add-Seconds', - 'login_ip_host' => 'Login-IP-Host', - 'annex_sw_version' => 'Annex-SW-Version', - 'huntgroup_name' => 'Huntgroup-Name', - 'usr_pw_vpn_gateway' => 'USR-PW_VPN_Gateway', - 'ascend_x25_reverse_charg' => 'Ascend-X25-Reverse-Charging', - 'lac_real_port' => 'LAC_Real_Port', - 'ascend_dba_monitor' => 'Ascend-DBA-Monitor', - 'annex_user_server_locati' => 'Annex-User-Server-Location', - 'ascend_h323_fegw_address' => 'Ascend-H323-Fegw-Address', - 'acct_output_gigawords' => 'Acct-Output-Gigawords', - 'bind_l2tp_tunnel_name' => 'Bind_L2TP_Tunnel_Name', - 'x_ascend_token_idle' => 'X-Ascend-Token-Idle', - 'acc_apsm_oversubscribed' => 'Acc-Apsm-Oversubscribed', - 'ip_tos_field' => 'IP_TOS_Field', - 'ascend_dsl_cir_xmit_limi' => 'Ascend-Dsl-CIR-Xmit-Limit', - 'usr_number_of_link_naks' => 'USR-Number-of-Link-NAKs', - 'framed_address' => 'Framed-Address', - 'x_ascend_num_in_multilin' => 'X-Ascend-Num-In-Multilink', - 'hint' => 'Hint', - 'ascend_source_ip_check' => 'Ascend-Source-IP-Check', - 'arap_zone_access' => 'ARAP-Zone-Access', - 'x_ascend_fr_direct_profi' => 'X-Ascend-FR-Direct-Profile', - 'x_ascend_bridge_address' => 'X-Ascend-Bridge-Address', - 'usr_iwf_call_identifier' => 'USR-IWF-Call-Identifier', - 'ascend_home_network_name' => 'Ascend-Home-Network-Name', - 'ascend_require_auth' => 'Ascend-Require-Auth', - 'source_validation' => 'Source_Validation', - 'ms_primary_nbns_server' => 'MS-Primary-NBNS-Server', - 'h323_setup_time' => 'h323-setup-time', - 'tunnel_remote_name' => 'Tunnel_Remote_Name', - 'ascend_maximum_channels' => 'Ascend-Maximum-Channels', - 'ascend_tunneling_protoco' => 'Ascend-Tunneling-Protocol', - 'arap_security_data' => 'ARAP-Security-Data', - 'ascend_ipx_peer_mode' => 'Ascend-IPX-Peer-Mode', - 'ascend_cir_timer' => 'Ascend-CIR-Timer', - 'ascend_ts_idle_limit' => 'Ascend-TS-Idle-Limit', - 'ascend_cache_refresh' => 'Ascend-Cache-Refresh', - 'usr_rmmie_status' => 'USR-RMMIE-Status', - 'annex_callback_portlist' => 'Annex-Callback-Portlist', - 'usr_port_tap' => 'USR-Port-Tap', - 'ascend_client_secondary_' => 'Ascend-Client-Secondary-DNS', - 'x_ascend_first_dest' => 'X-Ascend-First-Dest', - 'lac_port' => 'LAC_Port', - 'acc_callback_cbcp_type' => 'Acc-Callback-CBCP-Type', - 'usr_call_reference_numbe' => 'USR-Call-Reference-Number', - 'mcast_receive' => 'Mcast_Receive', - 'x_ascend_link_compressio' => 'X-Ascend-Link-Compression', - 'ascend_inter_arrival_jit' => 'Ascend-Inter-Arrival-Jitter', - 'x_ascend_assign_ip_pool' => 'X-Ascend-Assign-IP-Pool', - 'usr_chassis_call_span' => 'USR-Chassis-Call-Span', - 'arap_password' => 'ARAP-Password', - 'usr_ip_default_route_opt' => 'USR-IP-Default-Route-Option', - 'ascend_endpoint_disc' => 'Ascend-Endpoint-Disc', - 'tunnel_dnis' => 'Tunnel_DNIS', - 'ms_acct_auth_type' => 'MS-Acct-Auth-Type', - 'ascend_ts_idle_mode' => 'Ascend-TS-Idle-Mode', - 'shasta_service_profile' => 'Shasta-Service-Profile', - 'usr_cdma_call_reference_' => 'USR-CDMA-Call-Reference-Number', - 'usr_at_zip_input_filter' => 'USR-AT-Zip-Input-Filter', - 'x_ascend_pw_warntime' => 'X-Ascend-PW-Warntime', - 'ascend_fr_direct_dlci' => 'Ascend-FR-Direct-DLCI', - 'usr_dte_ring_no_answer_l' => 'USR-DTE-Ring-No-Answer-Limit', - 'ascend_multicast_rate_li' => 'Ascend-Multicast-Rate-Limit', - 'usr_routing_protocol' => 'USR-Routing-Protocol', - 'pam_auth' => 'Pam-Auth', - 'client_dns_sec' => 'Client_DNS_Sec', - 'bg_trans_bpdu' => 'BG_Trans_BPDU', - 'police_rate' => 'Police_Rate', - 'calling_station_id' => 'Calling-Station-Id', - 'usr_called_party_number' => 'USR-Called-Party-Number', - 'shiva_network_protocols' => 'Shiva-Network-Protocols', - 'x_ascend_client_gateway' => 'X-Ascend-Client-Gateway', - 'acct_input_octets' => 'Acct-Input-Octets', - 'ascend_call_type' => 'Ascend-Call-Type', - 'annex_product_name' => 'Annex-Product-Name', - 'framed_compression' => 'Framed-Compression', - 'ascend_atm_direct' => 'Ascend-ATM-Direct', - 'x_ascend_remote_addr' => 'X-Ascend-Remote-Addr', - 'usr_tunneled_mlpp' => 'USR-Tunneled-MLPP', - 'le_ipsec_outsource_profi' => 'LE-IPSec-Outsource-Profile', - 'ascend_atm_vci' => 'Ascend-ATM-Vci', - 'usr_number_of_link_timeo' => 'USR-Number-of-Link-Timeouts', - 'usr_et_bridge_input_filt' => 'USR-ET-Bridge-Input-Filter', - 'x_ascend_fr_t391' => 'X-Ascend-FR-T391', - 'x_ascend_fr_t392' => 'X-Ascend-FR-T392', - 'h323_conf_id' => 'h323-conf-id', - 'usr_call_end_date_time' => 'USR-Call-End-Date-Time', - 'ascend_fr_t391' => 'Ascend-FR-T391', - 'bg_aging_time' => 'BG_Aging_Time', - 'x_ascend_pre_output_pack' => 'X-Ascend-Pre-Output-Packets', - 'acc_dialout_auth_mode' => 'Acc-Dialout-Auth-Mode', - 'ascend_calling_subaddres' => 'Ascend-Calling-Subaddress', - 'ascend_fr_t392' => 'Ascend-FR-T392', - 'acct_link_count' => 'Acct-Link-Count', - 'usr_chassis_call_slot' => 'USR-Chassis-Call-Slot', - 'h323_credit_time' => 'h323-credit-time', - 'nas_port_id' => 'NAS-Port-Id', - 'x_ascend_call_filter' => 'X-Ascend-Call-Filter', - 'ascend_destination_nas_p' => 'Ascend-Destination-Nas-Port', - 'arap_features' => 'ARAP-Features', - 'x_ascend_history_weigh_t' => 'X-Ascend-History-Weigh-Type', - 'annex_host_restrict' => 'Annex-Host-Restrict', - 'usr_compression_reset_mo' => 'USR-Compression-Reset-Mode', - 'cisco_maximum_time' => 'Cisco-Maximum-Time', - 'tunnel_max_sessions' => 'Tunnel_Max_Sessions', - 'bind_ses_context' => 'Bind_Ses_Context', - 'x_ascend_ppp_vj_slot_com' => 'X-Ascend-PPP-VJ-Slot-Comp', - 'usr_mobile_numbytes_rxed' => 'USR-Mobile-NumBytes-Rxed', - 'usr_rmmie_last_update_ti' => 'USR-RMMIE-Last-Update-Time', - 'ascend_atm_loopback_cell' => 'Ascend-ATM-Loopback-Cell-Loss', - 'ascend_bir_proxy' => 'Ascend-BIR-Proxy', - 'acct_mcast_in_packets' => 'Acct_Mcast_In_Packets', - 'shiva_type_of_service' => 'Shiva-Type-Of-Service', - 'ascend_fr_dte_n392' => 'Ascend-FR-DTE-N392', - 'usr_at_call_input_filter' => 'USR-AT-Call-Input-Filter', - 'ascend_fr_dte_n393' => 'Ascend-FR-DTE-N393', - 'x_ascend_backup' => 'X-Ascend-Backup', - 'char_noecho' => 'Char-Noecho', - 'usr_rmmie_last_update_ev' => 'USR-RMMIE-Last-Update-Event', - 'le_advice_of_charge' => 'LE-Advice-of-Charge', - 'ascend_calling_id_type_o' => 'Ascend-Calling-Id-Type-Of-Num', - 'ascend_pppoe_enable' => 'Ascend-PPPoE-Enable', - 'usr_sync_async_mode' => 'USR-Sync-Async-Mode', - 'state' => 'State', - 'x_ascend_user_acct_base' => 'X-Ascend-User-Acct-Base', - 'x_ascend_ipx_alias' => 'X-Ascend-IPX-Alias', - 'ascend_ip_tos' => 'Ascend-IP-TOS', - 'annex_secondary_dns_serv' => 'Annex-Secondary-DNS-Server', - 'tunnel_session_auth_ctx' => 'Tunnel_Session_Auth_Ctx', - 'usr_mbi_ct_pri_card_span' => 'USR-Mbi_Ct_PRI_Card_Span_Line', - 'usr_call_event_code' => 'USR-Call-Event-Code', - 'chap_password' => 'CHAP-Password', - 'le_nat_tcp_session_timeo' => 'LE-NAT-TCP-Session-Timeout', - 'usr_call_start_date_time' => 'USR-Call-Start-Date-Time', - 'usr_multicast_forwarding' => 'USR-Multicast-Forwarding', - 'client_id' => 'Client-Id', - 'sql_user_name' => 'SQL-User-Name', - 'x_ascend_billing_number' => 'X-Ascend-Billing-Number', - 'ms_secondary_nbns_server' => 'MS-Secondary-NBNS-Server', - 'cisco_num_in_multilink' => 'Cisco-Num-In-Multilink', - 'x_ascend_client_assign_d' => 'X-Ascend-Client-Assign-DNS', - 'x_ascend_user_acct_port' => 'X-Ascend-User-Acct-Port', - 'usr_local_ip_address' => 'USR-Local-IP-Address', - 'x_ascend_ip_pool_definit' => 'X-Ascend-IP-Pool-Definition', - 'ascend_metric' => 'Ascend-Metric', - 'x_ascend_bacp_enable' => 'X-Ascend-BACP-Enable', - 'x_ascend_user_acct_time' => 'X-Ascend-User-Acct-Time', - 'x_ascend_mpp_idle_percen' => 'X-Ascend-MPP-Idle-Percent', - 'annex_authen_servers' => 'Annex-Authen-Servers', - 'x_ascend_data_filter' => 'X-Ascend-Data-Filter', - 'ascend_idle_limit' => 'Ascend-Idle-Limit', - 'ldap_userdn' => 'Ldap-UserDn', - 'x_ascend_target_util' => 'X-Ascend-Target-Util', - 'shiva_connect_reason' => 'Shiva-Connect-Reason', - 'usr_ds0' => 'USR-DS0', - 'annex_re_chap_timeout' => 'Annex-Re-CHAP-Timeout', - 'shasta_vpn_name' => 'Shasta-VPN-Name', - 'acct_tunnel_connection_i' => 'Acct-Tunnel-Connection-Id', - 'h323_prompt_id' => 'h323-prompt-id', - 'x_ascend_ipx_peer_mode' => 'X-Ascend-IPX-Peer-Mode', - 'ascend_numbering_plan_id' => 'Ascend-Numbering-Plan-ID', - 'x_ascend_ts_idle_limit' => 'X-Ascend-TS-Idle-Limit', - 'ascend_atm_fault_managem' => 'Ascend-ATM-Fault-Management', - 'annex_primary_nbns_serve' => 'Annex-Primary-NBNS-Server', - 'lac_port_type' => 'LAC_Port_Type', - 'usr_initial_rx_link_data' => 'USR-Initial-Rx-Link-Data-Rate', - 'usr_interface_index' => 'USR-Interface-Index', - 'usr_expansion_algorithm' => 'USR-Expansion-Algorithm', - 'ascend_tunnel_vrouter_na' => 'Ascend-Tunnel-VRouter-Name', - 'usr_pw_vpn_neighbor' => 'USR-PW_VPN_Neighbor', - 'bind_type' => 'Bind_Type', - 'acc_ccp_option' => 'Acc-Ccp-Option', - 'ascend_route_appletalk' => 'Ascend-Route-Appletalk', - 'erx_alternate_cli_access' => 'ERX-Alternate-Cli-Access-Level', - 'usr_at_rtmp_output_filte' => 'USR-AT-RTMP-Output-Filter', - 'erx_atm_mbs' => 'ERX-Atm-MBS', - 'usr_at_call_output_filte' => 'USR-AT-Call-Output-Filter', - 'ms_old_arap_password' => 'MS-Old-ARAP-Password', - 'x_ascend_client_primary_' => 'X-Ascend-Client-Primary-DNS', - 'x_ascend_host_info' => 'X-Ascend-Host-Info', - 'bind_auth_protocol' => 'Bind_Auth_Protocol', - 'cisco_link_compression' => 'Cisco-Link-Compression', - 'annex_syslog_tap' => 'Annex-Syslog-Tap', - 'tunnel_window' => 'Tunnel_Window', - 'usr_gateway_ip_address' => 'USR-Gateway-IP-Address', - 'ascend_redirect_number' => 'Ascend-Redirect-Number', - 'x_ascend_secondary_home_' => 'X-Ascend-Secondary-Home-Agent', - 'usr_pw_index' => 'USR-PW_Index', - 'le_multicast_client' => 'LE-Multicast-Client', - 'annex_modem_disc_reason' => 'Annex-Modem-Disc-Reason', - 'annex_primary_dns_server' => 'Annex-Primary-DNS-Server', - 'erx_secondary_wins' => 'ERX-Secondary-Wins', - 'fall_through' => 'Fall-Through', - 'acct_mcast_out_packets' => 'Acct_Mcast_Out_Packets', - 'x_ascend_transit_number' => 'X-Ascend-Transit-Number', - 'usr_unauthenticated_time' => 'USR-Unauthenticated-Time', - 'le_ipsec_active_profile' => 'LE-IPSec-Active-Profile', - 'ascend_ip_pool_chaining' => 'Ascend-IP-Pool-Chaining', - 'usr_syslog_tap' => 'USR-Syslog-Tap', - 'ascend_multicast_client' => 'Ascend-Multicast-Client', - 'usr_device_connected_to' => 'USR-Device-Connected-To', - 'tunnel_l2f_second_passwo' => 'Tunnel_L2F_Second_Password', - 'add_prefix' => 'Add-Prefix', - 'tunnel_cmd_timeout' => 'Tunnel_Cmd_Timeout', - 'x_ascend_remove_seconds' => 'X-Ascend-Remove-Seconds', - 'acct_mcast_in_octets' => 'Acct_Mcast_In_Octets', - 'ascend_appletalk_route' => 'Ascend-Appletalk-Route', - 'ascend_fcp_parameter' => 'Ascend-FCP-Parameter', - 'acc_ip_compression' => 'Acc-Ip-Compression', - 'usr_modem_training_time' => 'USR-Modem-Training-Time', - 'usr_primary_dns_server' => 'USR-Primary_DNS_Server', - 'erx_egress_policy_name' => 'ERX-Egress-Policy-Name', - 'x_ascend_base_channel_co' => 'X-Ascend-Base-Channel-Count', - 'x_ascend_pre_input_packe' => 'X-Ascend-Pre-Input-Packets', - 'password_retry' => 'Password-Retry', - 'ascend_source_auth' => 'Ascend-Source-Auth', - 'cisco_pw_lifetime' => 'Cisco-PW-Lifetime', - 'acc_dns_server_pri' => 'Acc-Dns-Server-Pri', - 'ascend_netware_timeout' => 'Ascend-Netware-timeout', - 'ascend_ppp_async_map' => 'Ascend-PPP-Async-Map', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Ttl', - 'x_ascend_modem_slotno' => 'X-Ascend-Modem-SlotNo', - 'x_ascend_ip_direct' => 'X-Ascend-IP-Direct', - 'simultaneous_use' => 'Simultaneous-Use', - 'erx_virtual_router_name' => 'ERX-Virtual-Router-Name', - 'ascend_bridge_non_pppoe' => 'Ascend-Bridge-Non-PPPoE', - 'ascend_fr_08_mode' => 'Ascend-FR-08-Mode', - 'h323_call_type' => 'h323-call-type', - 'tunnel_context' => 'Tunnel_Context', - 'usr_transmit_acc_map' => 'USR-Transmit-Acc-Map', - 'usr_ipx_wan' => 'USR-IPX-WAN', - 'usr_ip_call_input_filter' => 'USR-IP-Call-Input-Filter', - 'usr_call_connect_in_gmt' => 'USR-Call-Connect-in-GMT', - 'acct_multi_session_id' => 'Acct-Multi-Session-Id', - 'usr_reply_script1' => 'USR-Reply-Script1', - 'cisco_ppp_vj_slot_comp' => 'Cisco-PPP-VJ-Slot-Comp', - 'usr_reply_script2' => 'USR-Reply-Script2', - 'usr_reply_script3' => 'USR-Reply-Script3', - 'usr_reply_script4' => 'USR-Reply-Script4', - 'usr_reply_script5' => 'USR-Reply-Script5', - 'usr_reply_script6' => 'USR-Reply-Script6', - 'user_category' => 'User-Category', - 'mcast_send' => 'Mcast_Send', - 'ascend_send_secret' => 'Ascend-Send-Secret', - 'usr_tunnel_switch_endpoi' => 'USR-Tunnel-Switch-Endpoint', - 'tunnel_retransmit' => 'Tunnel_Retransmit', - 'add_port_to_ip_address' => 'Add-Port-To-IP-Address', - 'ascend_ipx_node_addr' => 'Ascend-IPX-Node-Addr', - 'x_ascend_netware_timeout' => 'X-Ascend-Netware-timeout', - 'erx_sa_validate' => 'ERX-Sa-Validate', - 'le_ipsec_passive_profile' => 'LE-IPSec-Passive-Profile', - 'usr_chassis_slot' => 'USR-Chassis-Slot', - 'usr_final_tx_link_data_r' => 'USR-Final-Tx-Link-Data-Rate', - 'usr_nfas_id' => 'USR-NFAS-ID', - 'called_station_id' => 'Called-Station-Id', - 'login_lat_port' => 'Login-LAT-Port', - 'ascend_dialed_number' => 'Ascend-Dialed-Number', - 'h323_credit_amount' => 'h323-credit-amount', - 'tunnel_local_name' => 'Tunnel_Local_Name', - 'framed_ip_netmask' => 'Framed-IP-Netmask', - 'client_port_id' => 'Client-Port-Id', - 'bg_span_dis' => 'BG_Span_Dis', - 'multi_link_flag' => 'Multi-Link-Flag', - 'bind_sub_user_at_context' => 'Bind_Sub_User_At_Context', - 'usr_ipx_routing' => 'USR-IPX-Routing', - 'ascend_fr_nailed_grp' => 'Ascend-FR-Nailed-Grp', - 'ascend_pre_output_octets' => 'Ascend-Pre-Output-Octets', - 'pppoe_url' => 'PPPOE_URL', - 'ascend_ara_pw' => 'Ascend-Ara-PW', - 'acc_callback_mode' => 'Acc-Callback-Mode', - 'usr_server_time' => 'USR-Server-Time', - 'ascend_seconds_of_histor' => 'Ascend-Seconds-Of-History', - 'ns_mta_md5_password' => 'NS-MTA-MD5-Password', - 'tunnel_server_endpoint' => 'Tunnel-Server-Endpoint', - 'usr_channel' => 'USR-Channel', - 'ascend_dsl_cir_recv_limi' => 'Ascend-Dsl-CIR-Recv-Limit', - 'acct_session_start_time' => 'Acct-Session-Start-Time', - 'ascend_send_passwd' => 'Ascend-Send-Passwd', - 'ascend_num_in_multilink' => 'Ascend-Num-In-Multilink', - 'usr_ip_rip_policies' => 'USR-IP-RIP-Policies', - 'vendor_specific' => 'Vendor-Specific', - 'x_ascend_event_type' => 'X-Ascend-Event-Type', - 'lac_real_port_type' => 'LAC_Real_Port_Type', - 'x_ascend_modem_portno' => 'X-Ascend-Modem-PortNo', - 'usr_originate_answer_mod' => 'USR-Originate-Answer-Mode', - 'framed_ipx_network' => 'Framed-IPX-Network', - 'ascend_modem_slotno' => 'Ascend-Modem-SlotNo', - 'ms_mppe_encryption_type' => 'MS-MPPE-Encryption-Type', - 'annex_cli_command' => 'Annex-CLI-Command', - 'acct_status_type' => 'Acct-Status-Type', - 'usr_et_bridge_call_outpu' => 'USR-ET-Bridge-Call-Output-Filte', - 'usr_pw_vpn_id' => 'USR-PW_VPN_ID', - 'usr_sap_filter_in' => 'USR-SAP-Filter-In', - 'usr_rad_multicast_routin' => 'USR-Rad-Multicast-Routing-Proto', - 'annex_audit_level' => 'Annex-Audit-Level', - 'x_ascend_shared_profile_' => 'X-Ascend-Shared-Profile-Enable', - 'ascend_dial_number' => 'Ascend-Dial-Number', - 'ascend_link_compression' => 'Ascend-Link-Compression', - 'usr_event_date_time' => 'USR-Event-Date-Time', - 'usr_mp_edo_hiper' => 'USR-MP-EDO-HIPER', - 'usr_re_chap_timeout' => 'USR-Re-Chap-Timeout', - 'x_ascend_third_prompt' => 'X-Ascend-Third-Prompt', - 'x_ascend_ppp_vj_1172' => 'X-Ascend-PPP-VJ-1172', - 'annex_disconnect_reason' => 'Annex-Disconnect-Reason', - 'ascend_fr_svc_addr' => 'Ascend-FR-SVC-Addr', - 'nas_real_port' => 'NAS_Real_Port', - 'usr_power_supply_number' => 'USR-Power-Supply-Number', - 'ms_secondary_dns_server' => 'MS-Secondary-DNS-Server', - 'ascend_port_redir_server' => 'Ascend-Port-Redir-Server', - 'ascend_x25_pad_alias_1' => 'Ascend-X25-Pad-Alias-1', - 'x_ascend_fcp_parameter' => 'X-Ascend-FCP-Parameter', - 'ascend_x25_pad_alias_2' => 'Ascend-X25-Pad-Alias-2', - 'ascend_ipsec_profile' => 'Ascend-IPSEC-Profile', - 'ascend_x25_pad_alias_3' => 'Ascend-X25-Pad-Alias-3', - 'usr_mobile_numbytes_txed' => 'USR-Mobile-NumBytes-Txed', - 'ascend_atm_vpi' => 'Ascend-ATM-Vpi', - 'annex_input_filter' => 'Annex-Input-Filter', - 'menu' => 'Menu', - 'x_ascend_route_ip' => 'X-Ascend-Route-IP', - 'usr_rmmie_num_of_updates' => 'USR-RMMIE-Num-Of-Updates', - 'acc_request_type' => 'Acc-Request-Type', - 'ascend_dhcp_reply' => 'Ascend-DHCP-Reply', - 'usr_number_of_upshifts' => 'USR-Number-of-Upshifts', - 'usr_rmmie_firmware_versi' => 'USR-RMMIE-Firmware-Version', - 'bind_bypass_context' => 'Bind_Bypass_Context', - 'ascend_dialout_allowed' => 'Ascend-Dialout-Allowed', - 'annex_tunnel_authen_type' => 'Annex-Tunnel-Authen-Type', - 'x_ascend_bridge' => 'X-Ascend-Bridge', - 'ascend_client_secondary_' => 'Ascend-Client-Secondary-WINS', - 'erx_local_loopback_inter' => 'ERX-Local-Loopback-Interface', - 'acct_input_gigawords' => 'Acct-Input-Gigawords', - 'usr_equalization_type' => 'USR-Equalization-Type', - 'usr_port_tap_format' => 'USR-Port-Tap-Format', - 'x_ascend_ppp_async_map' => 'X-Ascend-PPP-Async-Map', - 'acc_ipx_compression' => 'Acc-Ipx-Compression', - 'ascend_nas_port_format' => 'Ascend-NAS-Port-Format', - 'acc_modem_modulation_typ' => 'Acc-Modem-Modulation-Type', - 'ascend_modem_portno' => 'Ascend-Modem-PortNo', - 'usr_et_bridge_output_fil' => 'USR-ET-Bridge-Output-Filter', - 'ascend_ipx_header_compre' => 'Ascend-IPX-Header-Compression', - 'framed_appletalk_link' => 'Framed-AppleTalk-Link', - 'x_ascend_receive_secret' => 'X-Ascend-Receive-Secret', - 'ascend_route_ipx' => 'Ascend-Route-IPX', - 'ascend_user_acct_type' => 'Ascend-User-Acct-Type', - 'ascend_token_idle' => 'Ascend-Token-Idle', - 'framed_ip_address' => 'Framed-IP-Address', - 'ascend_call_block_durati' => 'Ascend-Call-Block-Duration', - 'ascend_ppp_address' => 'Ascend-PPP-Address', - 'usr_mbi_ct_pri_card_slot' => 'USR-Mbi_Ct_PRI_Card_Slot', - 'x_ascend_dec_channel_cou' => 'X-Ascend-Dec-Channel-Count', - 'x_ascend_send_auth' => 'X-Ascend-Send-Auth', - 'usr_characters_received' => 'USR-Characters-Received', - 'usr_pw_tunnel_authentica' => 'USR-PW_Tunnel_Authentication', - 'usr_call_end_time' => 'USR-Call-End-Time', - 'x_ascend_dialout_allowed' => 'X-Ascend-Dialout-Allowed', - 'x_ascend_call_attempt_li' => 'X-Ascend-Call-Attempt-Limit', - 'initial_modulation_type' => 'Initial-Modulation-Type', - 'usr_packet_bus_session' => 'USR-Packet-Bus-Session', - 'x_ascend_ipx_node_addr' => 'X-Ascend-IPX-Node-Addr', - 'ascend_ppp_vj_slot_comp' => 'Ascend-PPP-VJ-Slot-Comp', - 'ascend_menu_item' => 'Ascend-Menu-Item', - 'x_ascend_fr_link_mgt' => 'X-Ascend-FR-Link-Mgt', - 'usr_rmmie_serial_number' => 'USR-RMMIE-Serial-Number', - 'message_authenticator' => 'Message-Authenticator', - 'usr_dte_data_idle_timout' => 'USR-DTE-Data-Idle-Timout', - 'usr_port_tap_facility' => 'USR-Port-Tap-Facility', - 'acc_ml_mlx_admin_state' => 'Acc-ML-MLX-Admin-State', - 'usr_modem_group' => 'USR-Modem-Group', - 'x_ascend_callback' => 'X-Ascend-Callback', - 'acct_input_packets_64' => 'Acct_Input_Packets_64', - 'ascend_third_prompt' => 'Ascend-Third-Prompt', - 'configuration_token' => 'Configuration-Token', - 'x_ascend_fr_nailed_grp' => 'X-Ascend-FR-Nailed-Grp', - 'acct_output_octets_64' => 'Acct_Output_Octets_64', - 'h323_time_and_day' => 'h323-time-and-day', - 'ascend_port_redir_portnu' => 'Ascend-Port-Redir-Portnum', - 'acct_interim_interval' => 'Acct-Interim-Interval', - 'ascend_uu_info' => 'Ascend-UU-Info', - 'usr_pw_vpn_name' => 'USR-PW_VPN_Name', - 'ascend_maximum_call_dura' => 'Ascend-Maximum-Call-Duration', - 'ascend_atm_direct_profil' => 'Ascend-ATM-Direct-Profile', - 'acc_input_errors' => 'Acc-Input-Errors', - 'bind_dot1q_port' => 'Bind_Dot1q_Port', - 'ascend_first_dest' => 'Ascend-First-Dest', - 'x_ascend_if_netmask' => 'X-Ascend-IF-Netmask', - 'tunnel_session_auth_serv' => 'Tunnel_Session_Auth_Service_Grp', - 'annex_local_ip_address' => 'Annex-Local-IP-Address', - 'termination_menu' => 'Termination-Menu', - 'ms_chap2_cpw' => 'MS-CHAP2-CPW', - 'ascend_mpp_idle_percent' => 'Ascend-MPP-Idle-Percent', - 'usr_characters_sent' => 'USR-Characters-Sent', - 'eap_message' => 'EAP-Message', - 'acct_delay_time' => 'Acct-Delay-Time', - 'ascend_remote_fw' => 'Ascend-Remote-FW', - 'x_ascend_tunneling_proto' => 'X-Ascend-Tunneling-Protocol', - 'shiva_session_id' => 'Shiva-Session-Id', - 'usr_igmp_query_interval' => 'USR-IGMP-Query-Interval', - 'usr_accm_type' => 'USR-ACCM-Type', - 'usr_call_terminate_in_gm' => 'USR-Call-Terminate-in-GMT', - 'usr_rad_location_type' => 'USR-Rad-Location-Type', - 'ascend_filter' => 'Ascend-Filter', - 'ascend_primary_home_agen' => 'Ascend-Primary-Home-Agent', - 'x_ascend_user_acct_host' => 'X-Ascend-User-Acct-Host', - 'chap_challenge' => 'CHAP-Challenge', - 'acct_output_packets_64' => 'Acct_Output_Packets_64', - 'bind_auth_max_sessions' => 'Bind_Auth_Max_Sessions', - 'cisco_pre_output_octets' => 'Cisco-Pre-Output-Octets', - 'x_ascend_fr_direct' => 'X-Ascend-FR-Direct', - 'x_ascend_client_secondar' => 'X-Ascend-Client-Secondary-DNS', - 'usr_rmmie_pwrlvl_nearech' => 'USR-RMMIE-PwrLvl-NearEcho-Canc', - 'ascend_bridge_address' => 'Ascend-Bridge-Address', - 'user_name' => 'User-Name', - 'usr_rmmie_firmware_build' => 'USR-RMMIE-Firmware-Build-Date', - 'ms_chap_mppe_keys' => 'MS-CHAP-MPPE-Keys', - 'usr_number_of_characters' => 'USR-Number-Of-Characters-Lost', - 'usr_physical_state' => 'USR-Physical-State', - 'x_ascend_assign_ip_serve' => 'X-Ascend-Assign-IP-Server', - 'bind_int_context' => 'Bind_Int_Context', - 'erx_tunnel_virtual_route' => 'ERX-Tunnel-Virtual-Router', - 'ascend_xmit_rate' => 'Ascend-Xmit-Rate', - 'usr_secondary_dns_server' => 'USR-Secondary_DNS_Server', - 'ascend_dsl_rate_mode' => 'Ascend-Dsl-Rate-Mode', - 'ascend_data_rate' => 'Ascend-Data-Rate', - 'realm' => 'Realm', - 'usr_ipx_call_input_filte' => 'USR-IPX-Call-Input-Filter', - 'ascend_ipx_route' => 'Ascend-IPX-Route', - 'usr_failure_to_connect_r' => 'USR-Failure-to-Connect-Reason', - 'x_ascend_home_network_na' => 'X-Ascend-Home-Network-Name', - 'acc_nbns_server_pri' => 'Acc-Nbns-Server-Pri', - 'usr_modulation_type' => 'USR-Modulation-Type', - 'service_type' => 'Service-Type', - 'ascend_callback_delay' => 'Ascend-Callback-Delay', - 'ascend_owner_ip_addr' => 'Ascend-Owner-IP-Addr', - 'x_ascend_handle_ipx' => 'X-Ascend-Handle-IPX', - 'usr_connect_term_reason' => 'USR-Connect-Term-Reason', - 'x_ascend_multicast_rate_' => 'X-Ascend-Multicast-Rate-Limit', - 'h323_disconnect_time' => 'h323-disconnect-time', - 'acc_ip_gateway_sec' => 'Acc-Ip-Gateway-Sec', - 'usr_number_of_blers' => 'USR-Number-of-Blers', - 'x_ascend_fr_type' => 'X-Ascend-FR-Type', - 'ascend_assign_ip_pool' => 'Ascend-Assign-IP-Pool', - 'ascend_qos_upstream' => 'Ascend-QOS-Upstream', - 'usr_nas_type' => 'USR-NAS-Type', - 'acc_dial_port_index' => 'Acc-Dial-Port-Index', - 'usr_initial_tx_link_data' => 'USR-Initial-Tx-Link-Data-Rate', - 'ascend_fr_type' => 'Ascend-FR-Type', - 'usr_mbi_ct_tdm_time_slot' => 'USR-Mbi_Ct_TDM_Time_Slot', - 'usr_rmmie_pwrlvl_xmit_lv' => 'USR-RMMIE-PwrLvl-Xmit-Lvl', - 'erx_atm_service_category' => 'ERX-Atm-Service-Category', - 'usr_appletalk' => 'USR-Appletalk', - 'usr_send_script1' => 'USR-Send-Script1', - 'usr_send_script2' => 'USR-Send-Script2', - 'usr_send_script3' => 'USR-Send-Script3', - 'usr_ospf_addressless_ind' => 'USR-OSPF-Addressless-Index', - 'acct_input_packets' => 'Acct-Input-Packets', - 'usr_send_script4' => 'USR-Send-Script4', - 'usr_send_script5' => 'USR-Send-Script5', - 'usr_send_script6' => 'USR-Send-Script6', - 'usr_service_option' => 'USR-Service-Option', - 'ascend_dropped_octets' => 'Ascend-Dropped-Octets', - 'usr_ip' => 'USR-IP', - 'usr_tunnel_security' => 'USR-Tunnel-Security', - 'acc_acct_on_off_reason' => 'Acc-Acct-On-Off-Reason', - 'shiva_compression_type' => 'Shiva-Compression-Type', - 'ascend_pw_warntime' => 'Ascend-PW-Warntime', - 'usr_security_resp_limit' => 'USR-Security-Resp-Limit', - 'ascend_x25_pad_prompt' => 'Ascend-X25-Pad-Prompt', - 'cisco_asing_ip_pool' => 'Cisco-Asing-IP-Pool', - 'acc_route_policy' => 'Acc-Route-Policy', - 'annex_local_username' => 'Annex-Local-Username', - 'x_ascend_call_by_call' => 'X-Ascend-Call-By-Call', - 'ascend_calling_id_screen' => 'Ascend-Calling-Id-Screening', - 'x_ascend_dhcp_pool_numbe' => 'X-Ascend-DHCP-Pool-Number', - 'nas_port_type' => 'NAS-Port-Type', - 'ascend_route_ip' => 'Ascend-Route-IP', - 'ascend_client_gateway' => 'Ascend-Client-Gateway', - 'ascend_qos_downstream' => 'Ascend-QOS-Downstream', - 'ms_bap_usage' => 'MS-BAP-Usage', - 'usr_vts_session_key' => 'USR-VTS-Session-Key', - 'usr_receive_acc_map' => 'USR-Receive-Acc-Map', - 'ascend_expect_callback' => 'Ascend-Expect-Callback', - 'password' => 'Password', - 'packet_type' => 'Packet-Type', - 'ascend_remote_addr' => 'Ascend-Remote-Addr', - 'ascend_recv_name' => 'Ascend-Recv-Name', - 'ms_acct_eap_type' => 'MS-Acct-EAP-Type', - 'usr_filter_zones' => 'USR-Filter-Zones', - 'annex_output_filter' => 'Annex-Output-Filter', - 'usr_rmmie_rcv_tot_pwrlvl' => 'USR-RMMIE-Rcv-Tot-PwrLvl', - 'usr_mp_mrru' => 'USR-MP-MRRU', - 'ascend_call_filter' => 'Ascend-Call-Filter', - 'usr_keypress_timeout' => 'USR-Keypress-Timeout', - 'usr_modem_setup_time' => 'USR-Modem-Setup-Time', - 'acct_authentic' => 'Acct-Authentic', - 'pppoe_motm' => 'PPPOE_MOTM', - 'x_ascend_expect_callback' => 'X-Ascend-Expect-Callback', - 'erx_atm_scr' => 'ERX-Atm-SCR', - 'erx_address_pool_name' => 'ERX-Address-Pool-Name', - 'challenge_state' => 'Challenge-State', - 'usr_multicast_proxy' => 'USR-Multicast-Proxy', - 'framed_filter_id' => 'Framed-Filter-Id', - 'add_suffix' => 'Add-Suffix', - 'ascend_auth_type' => 'Ascend-Auth-Type', - 'session_timeout' => 'Session-Timeout', - 'ascend_callback' => 'Ascend-Callback', - 'usr_chat_script_name' => 'USR-Chat-Script-Name', - 'port_message' => 'Port-Message', - 'acct_output_packets' => 'Acct-Output-Packets', - 'ascend_session_svr_key' => 'Ascend-Session-Svr-Key', - 'login_tcp_port' => 'Login-TCP-Port', - 'erx_tunnel_password' => 'ERX-Tunnel-Password', - 'shasta_user_privilege' => 'Shasta-User-Privilege', - 'usr_secondary_nbns_serve' => 'USR-Secondary_NBNS_Server', - 'usr_security_login_limit' => 'USR-Security-Login-Limit', - 'usr_start_time' => 'USR-Start-Time', - 'acc_access_partition' => 'Acc-Access-Partition', - 'versanet_termination_cau' => 'Versanet-Termination-Cause', - 'x_ascend_call_block_dura' => 'X-Ascend-Call-Block-Duration', - 'mcast_maxgroups' => 'Mcast_MaxGroups', - 'ascend_user_acct_base' => 'Ascend-User-Acct-Base', - 'usr_vpn_gw_location_id' => 'USR-VPN-GW-Location-Id', - 'usr_block_error_count_li' => 'USR-Block-Error-Count-Limit', - 'ascend_telnet_profile' => 'Ascend-Telnet-Profile', - 'ascend_port_redir_protoc' => 'Ascend-Port-Redir-Protocol', - 'ascend_call_by_call' => 'Ascend-Call-By-Call', - 'usr_disconnect_cause_ind' => 'USR-Disconnect-Cause-Indicator', - 'x_ascend_fr_linkup' => 'X-Ascend-FR-LinkUp', - 'ascend_billing_number' => 'Ascend-Billing-Number', - 'usr_ds0s' => 'USR-DS0s', - 'usr_at_zip_output_filter' => 'USR-AT-Zip-Output-Filter', - 'ascend_user_acct_port' => 'Ascend-User-Acct-Port', - 'login_port' => 'Login-Port', - 'arap_security' => 'ARAP-Security', - 'tunnel_deadtime' => 'Tunnel_Deadtime', - 'ascend_user_acct_time' => 'Ascend-User-Acct-Time', - 'ms_chap_challenge' => 'MS-CHAP-Challenge', - 'ascend_x25_rpoa' => 'Ascend-X25-Rpoa', - 'login_time' => 'Login-Time', - 'current_time' => 'Current-Time', - 'login_service' => 'Login-Service', - 'ascend_menu_selector' => 'Ascend-Menu-Selector', - 'ascend_bacp_enable' => 'Ascend-BACP-Enable', - 'shiva_link_speed' => 'Shiva-Link-Speed', - 'ascend_private_route_tab' => 'Ascend-Private-Route-Table-ID', - 'x_ascend_session_svr_key' => 'X-Ascend-Session-Svr-Key', - 'ascend_data_filter' => 'Ascend-Data-Filter', - 'ascend_target_util' => 'Ascend-Target-Util', - 'shiva_function' => 'Shiva-Function', - 'usr_pw_usr_ifilter_ip' => 'USR-PW_USR_IFilter_IP', - 'usr_igmp_routing' => 'USR-IGMP-Routing', - 'acc_tunnel_port' => 'Acc-Tunnel-Port', - 'x_ascend_fr_n391' => 'X-Ascend-FR-N391', - 'medium_type' => 'Medium_Type', - 'annex_domain_name' => 'Annex-Domain-Name', - 'ascend_fr_n391' => 'Ascend-FR-N391', - 'callback_number' => 'Callback-Number', - 'usr_chassis_temperature' => 'USR-Chassis-Temperature', - 'dialback_no' => 'Dialback-No', - 'ms_mppe_recv_key' => 'MS-MPPE-Recv-Key', - 'ascend_ipx_alias' => 'Ascend-IPX-Alias', - 'le_nat_inmap' => 'LE-NAT-Inmap', - 'tunnel_police_rate' => 'Tunnel_Police_Rate', - 'acct_terminate_cause' => 'Acct-Terminate-Cause', - 'le_nat_other_session_tim' => 'LE-NAT-Other-Session-Timeout', - 'usr_ip_rip_output_filter' => 'USR-IP-RIP-Output-Filter', - 'exec_program' => 'Exec-Program', - 'h323_disconnect_cause' => 'h323-disconnect-cause', - 'usr_chassis_call_channel' => 'USR-Chassis-Call-Channel', - 'x_ascend_fr_dlci' => 'X-Ascend-FR-DLCI', - 'ms_link_drop_time_limit' => 'MS-Link-Drop-Time-Limit', - 'acc_callback_num_valid' => 'Acc-Callback-Num-Valid', - 'cisco_presession_time' => 'Cisco-PreSession-Time', - 'ms_chap_response' => 'MS-CHAP-Response', - 'usr_spoofing' => 'USR-Spoofing', - 'usr_num_fax_pages_proces' => 'USR-Num-Fax-Pages-Processed', - 'ascend_x25_cug' => 'Ascend-X25-Cug', - 'ascend_fr_dlci' => 'Ascend-FR-DLCI', - 'shiva_user_attributes' => 'Shiva-User-Attributes', - 'ms_chap_lm_enc_pw' => 'MS-CHAP-LM-Enc-PW', - 'ascend_transit_number' => 'Ascend-Transit-Number', - 'usr_last_number_dialed_i' => 'USR-Last-Number-Dialed-In-DNIS', - 'usr_ip_saa_filter' => 'USR-IP-SAA-Filter', - 'usr_pw_usr_ifilter_ipx' => 'USR-PW_USR_IFilter_IPX', - 'ascend_remove_seconds' => 'Ascend-Remove-Seconds', - 'le_connect_detail' => 'LE-Connect-Detail', - 'ascend_assign_ip_global_' => 'Ascend-Assign-IP-Global-Pool', - 'proxy_to_realm' => 'Proxy-To-Realm', - 'usr_retrains_requested' => 'USR-Retrains-Requested', - 'h323_remote_address' => 'h323-remote-address', - 'ascend_x25_nui_prompt' => 'Ascend-X25-Nui-Prompt', - 'acc_customer_id' => 'Acc-Customer-Id', - 'ms_chap2_response' => 'MS-CHAP2-Response', - 'ascend_host_info' => 'Ascend-Host-Info', - 'annex_addr_resolution_se' => 'Annex-Addr-Resolution-Servers', - 'x_ascend_multilink_id' => 'X-Ascend-Multilink-ID', - 'login_lat_service' => 'Login-LAT-Service', - 'usr_rmmie_rcv_pwrlvl_330' => 'USR-RMMIE-Rcv-PwrLvl-3300Hz', - 'ascend_event_type' => 'Ascend-Event-Type', - 'ascend_inc_channel_count' => 'Ascend-Inc-Channel-Count', - 'cisco_ppp_async_map' => 'Cisco-PPP-Async-Map', - 'usr_min_compression_size' => 'USR-Min-Compression-Size', - 'ascend_traffic_shaper' => 'Ascend-Traffic-Shaper', - 'ascend_user_acct_key' => 'Ascend-User-Acct-Key', - 'usr_port_tap_output' => 'USR-Port-Tap-Output', - 'ascend_x25_nui' => 'Ascend-X25-Nui', - 'x_ascend_disconnect_caus' => 'X-Ascend-Disconnect-Cause', - 'ascend_cbcp_enable' => 'Ascend-CBCP-Enable', - 'usr_framed_ip_address_po' => 'USR-Framed_IP_Address_Pool_Name', - 'ascend_x25_profile_name' => 'Ascend-X25-Profile-Name', - 'usr_orig_nas_type' => 'USR-Orig-NAS-Type', - 'acc_output_errors' => 'Acc-Output-Errors', - 'h323_redirect_ip_address' => 'h323-redirect-ip-address', - 'usr_ip_call_output_filte' => 'USR-IP-Call-Output-Filter', - 'cisco_avpair' => 'Cisco-AVPair', - 'usr_slot_connected_to' => 'USR-Slot-Connected-To', - 'framed_route' => 'Framed-Route', - 'ascend_global_call_id' => 'Ascend-Global-Call-Id', - 'x_ascend_seconds_of_hist' => 'X-Ascend-Seconds-Of-History', - 'x_ascend_temporary_rtes' => 'X-Ascend-Temporary-Rtes', - 'h323_currency_type' => 'h323-currency-type', - 'x_ascend_token_expiry' => 'X-Ascend-Token-Expiry', - 'pvc_encapsulation_type' => 'PVC_Encapsulation_Type', - 'x_ascend_pw_lifetime' => 'X-Ascend-PW-Lifetime', - 'usr_expected_voltage' => 'USR-Expected-Voltage', - 'usr_simplified_v42bis_us' => 'USR-Simplified-V42bis-Usage', - 'shiva_customer_id' => 'Shiva-Customer-Id', - 'usr_compression_algorith' => 'USR-Compression-Algorithm', - 'annex_system_disc_reason' => 'Annex-System-Disc-Reason', - 'annex_secondary_nbns_ser' => 'Annex-Secondary-NBNS-Server', - 'usr_q931_call_reference_' => 'USR-Q931-Call-Reference-Value', - 'usr_send_password' => 'USR-Send-Password', - 'prompt' => 'Prompt', - 'usr_cusr_hat_script_rule' => 'USR-CUSR-hat-Script-Rules', - 'usr_event_id' => 'USR-Event-Id', - 'usr_ccp_algorithm' => 'USR-CCP-Algorithm', - 'usr_mbi_ct_bchannel_used' => 'USR-Mbi_Ct_BChannel_Used', - 'ascend_svc_enabled' => 'Ascend-SVC-Enabled', - 'framed_mtu' => 'Framed-MTU', - 'acc_reason_code' => 'Acc-Reason-Code', - 'bind_l2tp_flow_control' => 'Bind_L2TP_Flow_Control', - 'ascend_cbcp_delay' => 'Ascend-CBCP-Delay', - 'le_ipsec_deny_action' => 'LE-IPSec-Deny-Action', - - #NOMENT - 'nomadix_bw_down' => 'Nomadix-Bw-Down', - 'nomadix_bw_up' => 'Nomadix-Bw-Up', - 'nomadix_ip_upsell' => 'Nomadix-IP-Upsell', -); - -1; diff --git a/FS/FS/radius_usergroup.pm b/FS/FS/radius_usergroup.pm deleted file mode 100644 index 647621d28..000000000 --- a/FS/FS/radius_usergroup.pm +++ /dev/null @@ -1,130 +0,0 @@ -package FS::radius_usergroup; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); -use FS::svc_acct; - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::radius_usergroup - Object methods for radius_usergroup records - -=head1 SYNOPSIS - - use FS::radius_usergroup; - - $record = new FS::radius_usergroup \%hash; - $record = new FS::radius_usergroup { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::radius_usergroup object links an account (see L) with a -RADIUS group. FS::radius_usergroup inherits from FS::Record. The following -fields are currently supported: - -=over 4 - -=item usergroupnum - primary key - -=item svcnum - Account (see L). - -=item groupname - group name - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new record. To add the record to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'radius_usergroup'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -#inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -#inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -#inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid record. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - - $self->ut_numbern('usergroupnum') - || $self->ut_number('svcnum') - || $self->ut_foreign_key('svcnum','svc_acct','svcnum') - || $self->ut_text('groupname') - ; -} - -=item svc_acct - -Returns the account associated with this record (see L). - -=cut - -sub svc_acct { - my $self = shift; - qsearchs('svc_acct', { svcnum => $self->svcnum } ); -} - -=back - -=head1 BUGS - -Don't let 'em get you down. - -=head1 SEE ALSO - -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/session.pm b/FS/FS/session.pm deleted file mode 100644 index de0f2a76a..000000000 --- a/FS/FS/session.pm +++ /dev/null @@ -1,269 +0,0 @@ -package FS::session; - -use strict; -use vars qw( @ISA $conf $start $stop ); -use FS::UID qw( dbh ); -use FS::Record qw( qsearchs ); -use FS::svc_acct; -use FS::port; -use FS::nas; - -@ISA = qw(FS::Record); - -$FS::UID::callback{'FS::session'} = sub { - $conf = new FS::Conf; - $start = $conf->exists('session-start') ? $conf->config('session-start') : ''; - $stop = $conf->exists('session-stop') ? $conf->config('session-stop') : ''; -}; - -=head1 NAME - -FS::session - Object methods for session records - -=head1 SYNOPSIS - - use FS::session; - - $record = new FS::session \%hash; - $record = new FS::session { - 'portnum' => 1, - 'svcnum' => 2, - 'login' => $timestamp, - 'logout' => $timestamp, - }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->nas_heartbeat($timestamp); - -=head1 DESCRIPTION - -An FS::session object represents an user login session. FS::session inherits -from FS::Record. The following fields are currently supported: - -=over 4 - -=item sessionnum - primary key - -=item portnum - NAS port for this session - see L - -=item svcnum - User for this session - see L - -=item login - timestamp indicating the beginning of this user session. - -=item logout - timestamp indicating the end of this user session. May be null, - which indicates a currently open session. - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new session. To add the session to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'session'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. If the `login' field is empty, it is replaced with -the current time. - -=cut - -sub insert { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - $error = $self->check; - return $error if $error; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - if ( qsearchs('session', { 'portnum' => $self->portnum, 'logout' => '' } ) ) { - $dbh->rollback if $oldAutoCommit; - return "a session on that port is already open!"; - } - - $self->setfield('login', time()) unless $self->getfield('login'); - - $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $self->nas_heartbeat($self->getfield('login')); - - #session-starting callback - #redundant with heartbeat, yuck - my $port = qsearchs('port',{'portnum'=>$self->portnum}); - my $nas = qsearchs('nas',{'nasnum'=>$port->nasnum}); - #kcuy - my( $ip, $nasip, $nasfqdn ) = ( $port->ip, $nas->nasip, $nas->nasfqdn ); - system( eval qq("$start") ) if $start; - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; - -} - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. If the `logout' field is empty, -it is replaced with the current time. - -=cut - -sub replace { - my($self, $old) = @_; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $error = $self->check; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $self->setfield('logout', time()) unless $self->getfield('logout'); - - $error = $self->SUPER::replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $self->nas_heartbeat($self->getfield('logout')); - - #session-ending callback - #redundant with heartbeat, yuck - my $port = qsearchs('port',{'portnum'=>$self->portnum}); - my $nas = qsearchs('nas',{'nasnum'=>$port->nasnum}); - #kcuy - my( $ip, $nasip, $nasfqdn ) = ( $port->ip, $nas->nasip, $nas->nasfqdn ); - system( eval qq("$stop") ) if $stop; - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -=item check - -Checks all fields to make sure this is a valid session. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - my $error = - $self->ut_numbern('sessionnum') - || $self->ut_number('portnum') - || $self->ut_number('svcnum') - || $self->ut_numbern('login') - || $self->ut_numbern('logout') - ; - return $error if $error; - return "Unknown svcnum" - unless qsearchs('svc_acct', { 'svcnum' => $self->svcnum } ); - ''; -} - -=item nas_heartbeat - -Heartbeats the nas associated with this session (see L). - -=cut - -sub nas_heartbeat { - my $self = shift; - my $port = qsearchs('port',{'portnum'=>$self->portnum}); - my $nas = qsearchs('nas',{'nasnum'=>$port->nasnum}); - $nas->heartbeat(shift); -} - -=item svc_acct - -Returns the svc_acct record associated with this session (see L). - -=cut - -sub svc_acct { - my $self = shift; - qsearchs('svc_acct', { 'svcnum' => $self->svcnum } ); -} - -=back - -=head1 VERSION - -$Id: session.pm,v 1.7 2001-04-15 13:35:12 ivan Exp $ - -=head1 BUGS - -Maybe you shouldn't be able to insert a session if there's currently an open -session on that port. Or maybe the open session on that port should be flagged -as problematic? autoclosed? *sigh* - -Hmm, sessions refer to current svc_acct records... probably need to constrain -deletions to svc_acct records such that no svc_acct records are deleted which -have a session (even if long-closed). - -=head1 SEE ALSO - -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm deleted file mode 100644 index 87b6097aa..000000000 --- a/FS/FS/svc_Common.pm +++ /dev/null @@ -1,381 +0,0 @@ -package FS::svc_Common; - -use strict; -use vars qw( @ISA $noexport_hack ); -use FS::Record qw( qsearchs fields dbh ); -use FS::cust_svc; -use FS::part_svc; -use FS::queue; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::svc_Common - Object method for all svc_ records - -=head1 SYNOPSIS - -use FS::svc_Common; - -@ISA = qw( FS::svc_Common ); - -=head1 DESCRIPTION - -FS::svc_Common is intended as a base class for table-specific classes to -inherit from, i.e. FS::svc_acct. FS::svc_Common inherits from FS::Record. - -=head1 METHODS - -=over 4 - -=item insert [ JOBNUM_ARRAYREF ] - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -The additional fields pkgnum and svcpart (see L) should be -defined. An FS::cust_svc record will be created and inserted. - -If an arrayref is passed as parameter, the Bs of any export jobs will -be added to the array. - -=cut - -sub insert { - my $self = shift; - local $FS::queue::jobnums = shift if @_; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $error = $self->check; - return $error if $error; - - my $svcnum = $self->svcnum; - my $cust_svc; - unless ( $svcnum ) { - $cust_svc = new FS::cust_svc ( { - #hua?# 'svcnum' => $svcnum, - 'pkgnum' => $self->pkgnum, - 'svcpart' => $self->svcpart, - } ); - $error = $cust_svc->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - $svcnum = $self->svcnum($cust_svc->svcnum); - } else { - $cust_svc = qsearchs('cust_svc',{'svcnum'=>$self->svcnum}); - unless ( $cust_svc ) { - $dbh->rollback if $oldAutoCommit; - return "no cust_svc record found for svcnum ". $self->svcnum; - } - $self->pkgnum($cust_svc->pkgnum); - $self->svcpart($cust_svc->svcpart); - } - - $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - #new-style exports! - unless ( $noexport_hack ) { - foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { - my $error = $part_export->export_insert($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "exporting to ". $part_export->exporttype. - " (transaction rolled back): $error"; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -=item delete - -Deletes this account from the database. If there is an error, returns the -error, otherwise returns false. - -The corresponding FS::cust_svc record will be deleted as well. - -=cut - -sub delete { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $svcnum = $self->svcnum; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $error = $self->SUPER::delete; - return $error if $error; - - #new-style exports! - unless ( $noexport_hack ) { - foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { - my $error = $part_export->export_delete($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "exporting to ". $part_export->exporttype. - " (transaction rolled back): $error"; - } - } - } - - return $error if $error; - - my $cust_svc = $self->cust_svc; - $error = $cust_svc->delete; - return $error if $error; - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - ''; -} - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one. If there is an error, returns the error, -otherwise returns false. - -=cut - -sub replace { - my ($new, $old) = (shift, shift); - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $new->SUPER::replace($old); - if ($error) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - #new-style exports! - unless ( $noexport_hack ) { - foreach my $part_export ( $new->cust_svc->part_svc->part_export ) { - my $error = $part_export->export_replace($new,$old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error exporting to ". $part_export->exporttype. - " (transaction rolled back): $error"; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; -} - - -=item setfixed - -Sets any fixed fields for this service (see L). If there is an -error, returns the error, otherwise returns the FS::part_svc object (use ref() -to test the return). Usually called by the check method. - -=cut - -sub setfixed { - my $self = shift; - $self->setx('F'); -} - -=item setdefault - -Sets all fields to their defaults (see L), overriding their -current values. If there is an error, returns the error, otherwise returns -the FS::part_svc object (use ref() to test the return). - -=cut - -sub setdefault { - my $self = shift; - $self->setx('D'); -} - -sub setx { - my $self = shift; - my $x = shift; - - my $error; - - $error = - $self->ut_numbern('svcnum') - ; - return $error if $error; - - #get part_svc - my $svcpart; - if ( $self->svcnum ) { - my $cust_svc = $self->cust_svc; - return "Unknown svcnum" unless $cust_svc; - $svcpart = $cust_svc->svcpart; - } else { - $svcpart = $self->getfield('svcpart'); - } - my $part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } ); - return "Unkonwn svcpart" unless $part_svc; - - #set default/fixed/whatever fields from part_svc - my $table = $self->table; - foreach my $field ( grep { $_ ne 'svcnum' } fields($table) ) { - my $part_svc_column = $part_svc->part_svc_column($field); - if ( $part_svc_column->columnflag eq $x ) { - $self->setfield( $field, $part_svc_column->columnvalue ); - } - } - - $part_svc; - -} - -=item cust_svc - -Returns the cust_svc record associated with this svc_ record, as a FS::cust_svc -object (see L). - -=cut - -sub cust_svc { - my $self = shift; - qsearchs('cust_svc', { 'svcnum' => $self->svcnum } ); -} - -=item suspend - -Runs export_suspend callbacks. - -=cut - -sub suspend { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - #new-style exports! - unless ( $noexport_hack ) { - foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { - my $error = $part_export->export_suspend($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error exporting to ". $part_export->exporttype. - " (transaction rolled back): $error"; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; - -} - -=item unsuspend - -Runs export_unsuspend callbacks. - -=cut - -sub unsuspend { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - #new-style exports! - unless ( $noexport_hack ) { - foreach my $part_export ( $self->cust_svc->part_svc->part_export ) { - my $error = $part_export->export_unsuspend($self); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error exporting to ". $part_export->exporttype. - " (transaction rolled back): $error"; - } - } - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; - -} - -=item cancel - -Stub - returns false (no error) so derived classes don't need to define these -methods. Called by the cancel method of FS::cust_pkg (see L). - -=cut - -sub cancel { ''; } - -=back - -=head1 VERSION - -$Id: svc_Common.pm,v 1.12 2002-06-14 11:22:53 ivan Exp $ - -=head1 BUGS - -The setfixed method return value. - -=head1 SEE ALSO - -L, L, L, L, schema.html -from the base documentation. - -=cut - -1; - diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm deleted file mode 100644 index c95df94cf..000000000 --- a/FS/FS/svc_acct.pm +++ /dev/null @@ -1,1150 +0,0 @@ -package FS::svc_acct; - -use strict; -use vars qw( @ISA $noexport_hack $conf - $dir_prefix @shells $usernamemin - $usernamemax $passwordmin $passwordmax - $username_ampersand $username_letter $username_letterfirst - $username_noperiod $username_nounderscore $username_nodash - $username_uppercase - $mydomain - $welcome_template $welcome_from $welcome_subject $welcome_mimetype - $smtpmachine - $dirhash - @saltset @pw_set ); -use Carp; -use Fcntl qw(:flock); -use FS::UID qw( datasrc ); -use FS::Conf; -use FS::Record qw( qsearch qsearchs fields dbh ); -use FS::svc_Common; -use Net::SSH; -use FS::cust_svc; -use FS::part_svc; -use FS::svc_acct_pop; -use FS::svc_acct_sm; -use FS::cust_main_invoice; -use FS::svc_domain; -use FS::raddb; -use FS::queue; -use FS::radius_usergroup; -use FS::export_svc; -use FS::part_export; -use FS::Msgcat qw(gettext); - -@ISA = qw( FS::svc_Common ); - -#ask FS::UID to run this stuff for us later -$FS::UID::callback{'FS::svc_acct'} = sub { - $conf = new FS::Conf; - $dir_prefix = $conf->config('home'); - @shells = $conf->config('shells'); - $usernamemin = $conf->config('usernamemin') || 2; - $usernamemax = $conf->config('usernamemax'); - $passwordmin = $conf->config('passwordmin') || 6; - $passwordmax = $conf->config('passwordmax') || 8; - $username_letter = $conf->exists('username-letter'); - $username_letterfirst = $conf->exists('username-letterfirst'); - $username_noperiod = $conf->exists('username-noperiod'); - $username_nounderscore = $conf->exists('username-nounderscore'); - $username_nodash = $conf->exists('username-nodash'); - $username_uppercase = $conf->exists('username-uppercase'); - $username_ampersand = $conf->exists('username-ampersand'); - $mydomain = $conf->config('domain'); - $dirhash = $conf->config('dirhash') || 0; - if ( $conf->exists('welcome_email') ) { - $welcome_template = new Text::Template ( - TYPE => 'ARRAY', - SOURCE => [ map "$_\n", $conf->config('welcome_email') ] - ) or warn "can't create welcome email template: $Text::Template::ERROR"; - $welcome_from = $conf->config('welcome_email-from'); # || 'your-isp-is-dum' - $welcome_subject = $conf->config('welcome_email-subject') || 'Welcome'; - $welcome_mimetype = $conf->config('welcome_email-mimetype') || 'text/plain'; - } else { - $welcome_template = ''; - } - $smtpmachine = $conf->config('smtpmachine'); -}; - -@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); -@pw_set = ( 'a'..'z', 'A'..'Z', '0'..'9', '(', ')', '#', '!', '.', ',' ); - -sub _cache { - my $self = shift; - my ( $hashref, $cache ) = @_; - if ( $hashref->{'svc_acct_svcnum'} ) { - $self->{'_domsvc'} = FS::svc_domain->new( { - 'svcnum' => $hashref->{'domsvc'}, - 'domain' => $hashref->{'svc_acct_domain'}, - 'catchall' => $hashref->{'svc_acct_catchall'}, - } ); - } -} - -=head1 NAME - -FS::svc_acct - Object methods for svc_acct records - -=head1 SYNOPSIS - - use FS::svc_acct; - - $record = new FS::svc_acct \%hash; - $record = new FS::svc_acct { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $error = $record->cancel; - - %hash = $record->radius; - - %hash = $record->radius_reply; - - %hash = $record->radius_check; - - $domain = $record->domain; - - $svc_domain = $record->svc_domain; - - $email = $record->email; - - $seconds_since = $record->seconds_since($timestamp); - -=head1 DESCRIPTION - -An FS::svc_acct object represents an account. FS::svc_acct inherits from -FS::svc_Common. The following fields are currently supported: - -=over 4 - -=item svcnum - primary key (assigned automatcially for new accounts) - -=item username - -=item _password - generated if blank - -=item sec_phrase - security phrase - -=item popnum - Point of presence (see L) - -=item uid - -=item gid - -=item finger - GECOS - -=item dir - set automatically if blank (and uid is not) - -=item shell - -=item quota - (unimplementd) - -=item slipip - IP address - -=item seconds - - -=item domsvc - svcnum from svc_domain - -=item radius_I - I - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new account. To add the account to the database, see L<"insert">. - -=cut - -sub table { 'svc_acct'; } - -=item insert - -Adds this account to the database. If there is an error, returns the error, -otherwise returns false. - -The additional fields pkgnum and svcpart (see L) should be -defined. An FS::cust_svc record will be created and inserted. - -The additional field I can optionally be defined; if so it should -contain an arrayref of group names. See L. (used in -sqlradius export only) - -(TODOC: L and L) - -(TODOC: new exports! $noexport_hack) - -=cut - -sub insert { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $error = $self->check; - return $error if $error; - - #no, duplicate checking just got a whole lot more complicated - #(perhaps keep this check with a config option to turn on?) - - #return gettext('username_in_use'). ": ". $self->username - # if qsearchs( 'svc_acct', { 'username' => $self->username, - # 'domsvc' => $self->domsvc, - # } ); - - if ( $self->svcnum ) { - my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$self->svcnum}); - unless ( $cust_svc ) { - $dbh->rollback if $oldAutoCommit; - return "no cust_svc record found for svcnum ". $self->svcnum; - } - $self->pkgnum($cust_svc->pkgnum); - $self->svcpart($cust_svc->svcpart); - } - - #new duplicate username checking - - my $part_svc = qsearchs('part_svc', { 'svcpart' => $self->svcpart } ); - unless ( $part_svc ) { - $dbh->rollback if $oldAutoCommit; - return 'unknown svcpart '. $self->svcpart; - } - - my @dup_user = qsearch( 'svc_acct', { 'username' => $self->username } ); - my @dup_userdomain = qsearch( 'svc_acct', { 'username' => $self->username, - 'domsvc' => $self->domsvc } ); - my @dup_uid; - if ( $part_svc->part_svc_column('uid')->columnflag ne 'F' - && $self->username !~ /^(toor|(hyla)?fax)$/ ) { - @dup_uid = qsearch( 'svc_acct', { 'uid' => $self->uid } ); - } else { - @dup_uid = (); - } - - if ( @dup_user || @dup_userdomain || @dup_uid ) { - my $exports = FS::part_export::export_info('svc_acct'); - my( %conflict_user_svcpart, %conflict_userdomain_svcpart ); - - foreach my $part_export ( $part_svc->part_export ) { - - #this will catch to the same exact export - my @svcparts = map { $_->svcpart } - qsearch('export_svc', { 'exportnum' => $part_export->exportnum }); - - #this will catch to exports w/same exporthost+type ??? - #my @other_part_export = qsearch('part_export', { - # 'machine' => $part_export->machine, - # 'exporttype' => $part_export->exporttype, - #} ); - #foreach my $other_part_export ( @other_part_export ) { - # push @svcparts, map { $_->svcpart } - # qsearch('export_svc', { 'exportnum' => $part_export->exportnum }); - #} - - my $nodomain = $exports->{$part_export->exporttype}{'nodomain'}; - if ( $nodomain =~ /^Y/i ) { - $conflict_user_svcpart{$_} = $part_export->exportnum - foreach @svcparts; - } else { - $conflict_userdomain_svcpart{$_} = $part_export->exportnum - foreach @svcparts; - } - } - - foreach my $dup_user ( @dup_user ) { - my $dup_svcpart = $dup_user->cust_svc->svcpart; - if ( exists($conflict_user_svcpart{$dup_svcpart}) ) { - $dbh->rollback if $oldAutoCommit; - return "duplicate username: conflicts with svcnum ". $dup_user->svcnum. - " via exportnum ". $conflict_user_svcpart{$dup_svcpart}; - } - } - - foreach my $dup_userdomain ( @dup_userdomain ) { - my $dup_svcpart = $dup_userdomain->cust_svc->svcpart; - if ( exists($conflict_userdomain_svcpart{$dup_svcpart}) ) { - $dbh->rollback if $oldAutoCommit; - return "duplicate username\@domain: conflicts with svcnum ". - $dup_userdomain->svcnum. " via exportnum ". - $conflict_userdomain_svcpart{$dup_svcpart}; - } - } - - foreach my $dup_uid ( @dup_uid ) { - my $dup_svcpart = $dup_uid->cust_svc->svcpart; - if ( exists($conflict_user_svcpart{$dup_svcpart}) - || exists($conflict_userdomain_svcpart{$dup_svcpart}) ) { - $dbh->rollback if $oldAutoCommit; - return "duplicate uid: conflicts with svcnum". $dup_uid->svcnum. - "via exportnum ". $conflict_user_svcpart{$dup_svcpart} - || $conflict_userdomain_svcpart{$dup_svcpart}; - } - } - - } - - #see? i told you it was more complicated - - my @jobnums; - $error = $self->SUPER::insert(\@jobnums); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - if ( $self->usergroup ) { - foreach my $groupname ( @{$self->usergroup} ) { - my $radius_usergroup = new FS::radius_usergroup ( { - svcnum => $self->svcnum, - groupname => $groupname, - } ); - my $error = $radius_usergroup->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - } - - #false laziness with sub replace (and cust_main) - my $queue = new FS::queue { - 'svcnum' => $self->svcnum, - 'job' => 'FS::svc_acct::append_fuzzyfiles' - }; - $error = $queue->insert($self->username); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing job (transaction rolled back): $error"; - } - - #welcome email - my $cust_pkg = $self->cust_svc->cust_pkg; - my( $cust_main, $to ) = ( '', '' ); - if ( $welcome_template && $cust_pkg ) { - my $cust_main = $cust_pkg->cust_main; - my $to = join(', ', grep { $_ ne 'POST' } $cust_main->invoicing_list ); - if ( $to ) { - my $wqueue = new FS::queue { - 'svcnum' => $self->svcnum, - 'job' => 'FS::svc_acct::send_email' - }; - warn "attempting to queue email to $to"; - my $error = $wqueue->insert( - 'to' => $to, - 'from' => $welcome_from, - 'subject' => $welcome_subject, - 'mimetype' => $welcome_mimetype, - 'body' => $welcome_template->fill_in( HASH => { - 'username' => $self->username, - 'password' => $self->_password, - 'first' => $cust_main->first, - 'last' => $cust_main->getfield('last'), - 'pkg' => $cust_pkg->part_pkg->pkg, - } ), - ); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queuing welcome email: $error"; - } - - foreach my $jobnum ( @jobnums ) { - my $error = $wqueue->depend_insert($jobnum); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queuing welcome email job dependancy: $error"; - } - } - - } - - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; #no error -} - -=item delete - -Deletes this account from the database. If there is an error, returns the -error, otherwise returns false. - -The corresponding FS::cust_svc record will be deleted as well. - -(TODOC: new exports! $noexport_hack) - -=cut - -sub delete { - my $self = shift; - - if ( defined( $FS::Record::dbdef->table('svc_acct_sm') ) ) { - return "Can't delete an account which has (svc_acct_sm) mail aliases!" - if $self->uid && qsearch( 'svc_acct_sm', { 'domuid' => $self->uid } ); - } - - return "Can't delete an account which is a (svc_forward) source!" - if qsearch( 'svc_forward', { 'srcsvc' => $self->svcnum } ); - - return "Can't delete an account which is a (svc_forward) destination!" - if qsearch( 'svc_forward', { 'dstsvc' => $self->svcnum } ); - - return "Can't delete an account with (svc_www) web service!" - if qsearch( 'svc_www', { 'usersvc' => $self->usersvc } ); - - # what about records in session ? (they should refer to history table) - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - foreach my $cust_main_invoice ( - qsearch( 'cust_main_invoice', { 'dest' => $self->svcnum } ) - ) { - unless ( defined($cust_main_invoice) ) { - warn "WARNING: something's wrong with qsearch"; - next; - } - my %hash = $cust_main_invoice->hash; - $hash{'dest'} = $self->email; - my $new = new FS::cust_main_invoice \%hash; - my $error = $new->replace($cust_main_invoice); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - foreach my $svc_domain ( - qsearch( 'svc_domain', { 'catchall' => $self->svcnum } ) - ) { - my %hash = new FS::svc_domain->hash; - $hash{'catchall'} = ''; - my $new = new FS::svc_domain \%hash; - my $error = $new->replace($svc_domain); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - foreach my $radius_usergroup ( - qsearch('radius_usergroup', { 'svcnum' => $self->svcnum } ) - ) { - my $error = $radius_usergroup->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; -} - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -The additional field I can optionally be defined; if so it should -contain an arrayref of group names. See L. (used in -sqlradius export only) - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - my $error; - - return "Username in use" - if $old->username ne $new->username && - qsearchs( 'svc_acct', { 'username' => $new->username, - 'domsvc' => $new->domsvc, - } ); - { - #no warnings 'numeric'; #alas, a 5.006-ism - local($^W) = 0; - return "Can't change uid!" if $old->uid != $new->uid; - } - - #change homdir when we change username - $new->setfield('dir', '') if $old->username ne $new->username; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $old->usergroup( [ $old->radius_groups ] ); - if ( $new->usergroup ) { - #(sorta) false laziness with FS::part_export::sqlradius::_export_replace - my @newgroups = @{$new->usergroup}; - foreach my $oldgroup ( @{$old->usergroup} ) { - if ( grep { $oldgroup eq $_ } @newgroups ) { - @newgroups = grep { $oldgroup ne $_ } @newgroups; - next; - } - my $radius_usergroup = qsearchs('radius_usergroup', { - svcnum => $old->svcnum, - groupname => $oldgroup, - } ); - my $error = $radius_usergroup->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error deleting radius_usergroup $oldgroup: $error"; - } - } - - foreach my $newgroup ( @newgroups ) { - my $radius_usergroup = new FS::radius_usergroup ( { - svcnum => $new->svcnum, - groupname => $newgroup, - } ); - my $error = $radius_usergroup->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "error adding radius_usergroup $newgroup: $error"; - } - } - - } - - $error = $new->SUPER::replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error if $error; - } - - #false laziness with sub insert (and cust_main) - my $queue = new FS::queue { - 'svcnum' => $new->svcnum, - 'job' => 'FS::svc_acct::append_fuzzyfiles' - }; - $error = $queue->insert($new->username); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing job (transaction rolled back): $error"; - } - - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; #no error -} - -=item suspend - -Suspends this account by prefixing *SUSPENDED* to the password. If there is an -error, returns the error, otherwise returns false. - -Called by the suspend method of FS::cust_pkg (see L). - -=cut - -sub suspend { - my $self = shift; - my %hash = $self->hash; - unless ( $hash{_password} =~ /^\*SUSPENDED\* / - || $hash{_password} eq '*' - ) { - $hash{_password} = '*SUSPENDED* '.$hash{_password}; - my $new = new FS::svc_acct ( \%hash ); - my $error = $new->replace($self); - return $error if $error; - } - - $self->SUPER::suspend; -} - -=item unsuspend - -Unsuspends this account by removing *SUSPENDED* from the password. If there is -an error, returns the error, otherwise returns false. - -Called by the unsuspend method of FS::cust_pkg (see L). - -=cut - -sub unsuspend { - my $self = shift; - my %hash = $self->hash; - if ( $hash{_password} =~ /^\*SUSPENDED\* (.*)$/ ) { - $hash{_password} = $1; - my $new = new FS::svc_acct ( \%hash ); - my $error = $new->replace($self); - return $error if $error; - } - - $self->SUPER::unsuspend; -} - -=item cancel - -Just returns false (no error) for now. - -Called by the cancel method of FS::cust_pkg (see L). - -=item check - -Checks all fields to make sure this is a valid service. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. - -Sets any fixed values; see L. - -=cut - -sub check { - my $self = shift; - - my($recref) = $self->hashref; - - my $x = $self->setfixed; - return $x unless ref($x); - my $part_svc = $x; - - if ( $part_svc->part_svc_column('usergroup')->columnflag eq "F" ) { - $self->usergroup( - [ split(',', $part_svc->part_svc_column('usergroup')->columnvalue) ] ); - } - - my $error = $self->ut_numbern('svcnum') - || $self->ut_number('domsvc') - || $self->ut_textn('sec_phrase') - ; - return $error if $error; - - my $ulen = $usernamemax || $self->dbdef_table->column('username')->length; - if ( $username_uppercase ) { - $recref->{username} =~ /^([a-z0-9_\-\.\&]{$usernamemin,$ulen})$/i - or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username}; - $recref->{username} = $1; - } else { - $recref->{username} =~ /^([a-z0-9_\-\.\&]{$usernamemin,$ulen})$/ - or return gettext('illegal_username'). " ($usernamemin-$ulen): ". $recref->{username}; - $recref->{username} = $1; - } - - if ( $username_letterfirst ) { - $recref->{username} =~ /^[a-z]/ or return gettext('illegal_username'); - } elsif ( $username_letter ) { - $recref->{username} =~ /[a-z]/ or return gettext('illegal_username'); - } - if ( $username_noperiod ) { - $recref->{username} =~ /\./ and return gettext('illegal_username'); - } - if ( $username_nounderscore ) { - $recref->{username} =~ /_/ and return gettext('illegal_username'); - } - if ( $username_nodash ) { - $recref->{username} =~ /\-/ and return gettext('illegal_username'); - } - unless ( $username_ampersand ) { - $recref->{username} =~ /\&/ and return gettext('illegal_username'); - } - - $recref->{popnum} =~ /^(\d*)$/ or return "Illegal popnum: ".$recref->{popnum}; - $recref->{popnum} = $1; - return "Unknown popnum" unless - ! $recref->{popnum} || - qsearchs('svc_acct_pop',{'popnum'=> $recref->{popnum} } ); - - unless ( $part_svc->part_svc_column('uid')->columnflag eq 'F' ) { - - $recref->{uid} =~ /^(\d*)$/ or return "Illegal uid"; - $recref->{uid} = $1 eq '' ? $self->unique('uid') : $1; - - $recref->{gid} =~ /^(\d*)$/ or return "Illegal gid"; - $recref->{gid} = $1 eq '' ? $recref->{uid} : $1; - #not all systems use gid=uid - #you can set a fixed gid in part_svc - - return "Only root can have uid 0" - if $recref->{uid} == 0 - && $recref->{username} ne 'root' - && $recref->{username} ne 'toor'; - -# $error = $self->ut_textn('finger'); -# return $error if $error; - $self->getfield('finger') =~ - /^([\w \t\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\*\<\>]*)$/ - or return "Illegal finger: ". $self->getfield('finger'); - $self->setfield('finger', $1); - - $recref->{dir} =~ /^([\/\w\-\.\&]*)$/ - or return "Illegal directory"; - $recref->{dir} = $1; - return "Illegal directory" - if $recref->{dir} =~ /(^|\/)\.+(\/|$)/; #no .. component - return "Illegal directory" - if $recref->{dir} =~ /\&/ && ! $username_ampersand; - unless ( $recref->{dir} ) { - $recref->{dir} = $dir_prefix . '/'; - if ( $dirhash > 0 ) { - for my $h ( 1 .. $dirhash ) { - $recref->{dir} .= substr($recref->{username}, $h-1, 1). '/'; - } - } elsif ( $dirhash < 0 ) { - for my $h ( reverse $dirhash .. -1 ) { - $recref->{dir} .= substr($recref->{username}, $h, 1). '/'; - } - } - $recref->{dir} .= $recref->{username}; - ; - } - - unless ( $recref->{username} eq 'sync' ) { - if ( grep $_ eq $recref->{shell}, @shells ) { - $recref->{shell} = (grep $_ eq $recref->{shell}, @shells)[0]; - } else { - return "Illegal shell \`". $self->shell. "\'; ". - $conf->dir. "/shells contains: @shells"; - } - } else { - $recref->{shell} = '/bin/sync'; - } - - $recref->{quota} =~ /^(\d*)$/ or return "Illegal quota (unimplemented)"; - $recref->{quota} = $1; - - } else { - $recref->{gid} ne '' ? - return "Can't have gid without uid" : ( $recref->{gid}='' ); - $recref->{finger} ne '' ? - return "Can't have finger-name without uid" : ( $recref->{finger}='' ); - $recref->{dir} ne '' ? - return "Can't have directory without uid" : ( $recref->{dir}='' ); - $recref->{shell} ne '' ? - return "Can't have shell without uid" : ( $recref->{shell}='' ); - $recref->{quota} ne '' ? - return "Can't have quota without uid" : ( $recref->{quota}='' ); - } - - unless ( $part_svc->part_svc_column('slipip')->columnflag eq 'F' ) { - unless ( $recref->{slipip} eq '0e0' ) { - $recref->{slipip} =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ - or return "Illegal slipip". $self->slipip; - $recref->{slipip} = $1; - } else { - $recref->{slipip} = '0e0'; - } - - } - - #arbitrary RADIUS stuff; allow ut_textn for now - foreach ( grep /^radius_/, fields('svc_acct') ) { - $self->ut_textn($_); - } - - #generate a password if it is blank - $recref->{_password} = join('',map($pw_set[ int(rand $#pw_set) ], (0..7) ) ) - unless ( $recref->{_password} ); - - #if ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([^\t\n]{4,16})$/ ) { - if ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([^\t\n]{$passwordmin,$passwordmax})$/ ) { - $recref->{_password} = $1.$3; - #uncomment this to encrypt password immediately upon entry, or run - #bin/crypt_pw in cron to give new users a window during which their - #password is available to techs, for faxing, etc. (also be aware of - #radius issues!) - #$recref->{password} = $1. - # crypt($3,$saltset[int(rand(64))].$saltset[int(rand(64))] - #; - } elsif ( $recref->{_password} =~ /^((\*SUSPENDED\* )?)([\w\.\/\$]{13,34})$/ ) { - $recref->{_password} = $1.$3; - } elsif ( $recref->{_password} eq '*' ) { - $recref->{_password} = '*'; - } elsif ( $recref->{_password} eq '!!' ) { - $recref->{_password} = '!!'; - } else { - #return "Illegal password"; - return gettext('illegal_password'). " $passwordmin-$passwordmax ". - FS::Msgcat::_gettext('illegal_password_characters'). - ": ". $recref->{_password}; - } - - ''; #no error -} - -=item radius - -Depriciated, use radius_reply instead. - -=cut - -sub radius { - carp "FS::svc_acct::radius depriciated, use radius_reply"; - $_[0]->radius_reply; -} - -=item radius_reply - -Returns key/value pairs, suitable for assigning to a hash, for any RADIUS -reply attributes of this record. - -Note that this is now the preferred method for reading RADIUS attributes - -accessing the columns directly is discouraged, as the column names are -expected to change in the future. - -=cut - -sub radius_reply { - my $self = shift; - my %reply = - map { - /^(radius_(.*))$/; - my($column, $attrib) = ($1, $2); - #$attrib =~ s/_/\-/g; - ( $FS::raddb::attrib{lc($attrib)}, $self->getfield($column) ); - } grep { /^radius_/ && $self->getfield($_) } fields( $self->table ); - if ( $self->slipip && $self->slipip ne '0e0' ) { - $reply{'Framed-IP-Address'} = $self->slipip; - } - %reply; -} - -=item radius_check - -Returns key/value pairs, suitable for assigning to a hash, for any RADIUS -check attributes of this record. - -Note that this is now the preferred method for reading RADIUS attributes - -accessing the columns directly is discouraged, as the column names are -expected to change in the future. - -=cut - -sub radius_check { - my $self = shift; - ( 'Password' => $self->_password, - map { - /^(rc_(.*))$/; - my($column, $attrib) = ($1, $2); - #$attrib =~ s/_/\-/g; - ( $FS::raddb::attrib{lc($attrib)}, $self->getfield($column) ); - } grep { /^rc_/ && $self->getfield($_) } fields( $self->table ) - ); -} - -=item domain - -Returns the domain associated with this account. - -=cut - -sub domain { - my $self = shift; - if ( $self->domsvc ) { - #$self->svc_domain->domain; - my $svc_domain = $self->svc_domain - or die "no svc_domain.svcnum for svc_acct.domsvc ". $self->domsvc; - $svc_domain->domain; - } else { - $mydomain or die "svc_acct.domsvc is null and no legacy domain config file"; - } -} - -=item svc_domain - -Returns the FS::svc_domain record for this account's domain (see -L). - -=cut - -sub svc_domain { - my $self = shift; - $self->{'_domsvc'} - ? $self->{'_domsvc'} - : qsearchs( 'svc_domain', { 'svcnum' => $self->domsvc } ); -} - -=item cust_svc - -Returns the FS::cust_svc record for this account (see L). - -sub cust_svc { - my $self = shift; - qsearchs( 'cust_svc', { 'svcnum' => $self->svcnum } ); -} - -=item email - -Returns an email address associated with the account. - -=cut - -sub email { - my $self = shift; - $self->username. '@'. $self->domain; -} - -=item seconds_since TIMESTAMP - -Returns the number of seconds this account has been online since TIMESTAMP. -See L - -TIMESTAMP is specified as a UNIX timestamp; see L. Also see -L and L for conversion functions. - -=cut - -#note: POD here, implementation in FS::cust_svc -sub seconds_since { - my $self = shift; - $self->cust_svc->seconds_since(@_); -} - -=item radius_groups - -Returns all RADIUS groups for this account (see L). - -=cut - -sub radius_groups { - my $self = shift; - if ( $self->usergroup ) { - #when provisioning records, export callback runs in svc_Common.pm before - #radius_usergroup records can be inserted... - @{$self->usergroup}; - } else { - map { $_->groupname } - qsearch('radius_usergroup', { 'svcnum' => $self->svcnum } ); - } -} - -=back - -=head1 SUBROUTINES - -=over 4 - -=item send_email - -=cut - -sub send_email { - my %opt = @_; - - use Date::Format; - use Mail::Internet 1.44; - use Mail::Header; - - $opt{mimetype} ||= 'text/plain'; - $opt{mimetype} .= '; charset="iso-8859-1"' unless $opt{mimetype} =~ /charset/; - - $ENV{MAILADDRESS} = $opt{from}; - my $header = new Mail::Header ( [ - "From: $opt{from}", - "To: $opt{to}", - "Sender: $opt{from}", - "Reply-To: $opt{from}", - "Date: ". time2str("%a, %d %b %Y %X %z", time), - "Subject: $opt{subject}", - "Content-Type: $opt{mimetype}", - ] ); - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ map "$_\n", split("\n", $opt{body}) ], - ); - $!=0; - $message->smtpsend( Host => $smtpmachine ) - or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or die "can't send email to $opt{to} via $smtpmachine with SMTP: $!"; -} - -=item check_and_rebuild_fuzzyfiles - -=cut - -sub check_and_rebuild_fuzzyfiles { - my $dir = $FS::UID::conf_dir. "cache.". $FS::UID::datasrc; - -e "$dir/svc_acct.username" - or &rebuild_fuzzyfiles; -} - -=item rebuild_fuzzyfiles - -=cut - -sub rebuild_fuzzyfiles { - - use Fcntl qw(:flock); - - my $dir = $FS::UID::conf_dir. "cache.". $FS::UID::datasrc; - - #username - - open(USERNAMELOCK,">>$dir/svc_acct.username") - or die "can't open $dir/svc_acct.username: $!"; - flock(USERNAMELOCK,LOCK_EX) - or die "can't lock $dir/svc_acct.username: $!"; - - my @all_username = map $_->getfield('username'), qsearch('svc_acct', {}); - - open (USERNAMECACHE,">$dir/svc_acct.username.tmp") - or die "can't open $dir/svc_acct.username.tmp: $!"; - print USERNAMECACHE join("\n", @all_username), "\n"; - close USERNAMECACHE or die "can't close $dir/svc_acct.username.tmp: $!"; - - rename "$dir/svc_acct.username.tmp", "$dir/svc_acct.username"; - close USERNAMELOCK; - -} - -=item all_username - -=cut - -sub all_username { - my $dir = $FS::UID::conf_dir. "cache.". $FS::UID::datasrc; - open(USERNAMECACHE,"<$dir/svc_acct.username") - or die "can't open $dir/svc_acct.username: $!"; - my @array = map { chomp; $_; } ; - close USERNAMECACHE; - \@array; -} - -=item append_fuzzyfiles USERNAME - -=cut - -sub append_fuzzyfiles { - my $username = shift; - - &check_and_rebuild_fuzzyfiles; - - use Fcntl qw(:flock); - - my $dir = $FS::UID::conf_dir. "cache.". $FS::UID::datasrc; - - open(USERNAME,">>$dir/svc_acct.username") - or die "can't open $dir/svc_acct.username: $!"; - flock(USERNAME,LOCK_EX) - or die "can't lock $dir/svc_acct.username: $!"; - - print USERNAME "$username\n"; - - flock(USERNAME,LOCK_UN) - or die "can't unlock $dir/svc_acct.username: $!"; - close USERNAME; - - 1; -} - - - -=item radius_usergroup_selector GROUPS_ARRAYREF [ SELECTNAME ] - -=cut - -sub radius_usergroup_selector { - my $sel_groups = shift; - my %sel_groups = map { $_=>1 } @$sel_groups; - - my $selectname = shift || 'radius_usergroup'; - - my $dbh = dbh; - my $sth = $dbh->prepare( - 'SELECT DISTINCT(groupname) FROM radius_usergroup ORDER BY groupname' - ) or die $dbh->errstr; - $sth->execute() or die $sth->errstr; - my @all_groups = map { $_->[0] } @{$sth->fetchall_arrayref}; - - my $html = < - function ${selectname}_doadd(object) { - var myvalue = object.${selectname}_add.value; - var optionName = new Option(myvalue,myvalue,false,true); - var length = object.$selectname.length; - object.$selectname.options[length] = optionName; - object.${selectname}_add.value = ""; - } - - !. - qq!!; - - $html; -} - -=back - -=head1 BUGS - -The $recref stuff in sub check should be cleaned up. - -The suspend, unsuspend and cancel methods update the database, but not the -current object. This is probably a bug as it's unexpected and -counterintuitive. - -radius_usergroup_selector? putting web ui components in here? they should -probably live somewhere else... - -=head1 SEE ALSO - -L, edit/part_svc.cgi from an installed web interface, -export.html from the base documentation, L, L, -L, L, L, L, -L), L, L, L, -schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/svc_acct_pop.pm b/FS/FS/svc_acct_pop.pm deleted file mode 100644 index 3c9ea0130..000000000 --- a/FS/FS/svc_acct_pop.pm +++ /dev/null @@ -1,204 +0,0 @@ -package FS::svc_acct_pop; - -use strict; -use vars qw( @ISA @EXPORT_OK @svc_acct_pop %svc_acct_pop ); -use FS::Record qw( qsearch qsearchs ); - -@ISA = qw( FS::Record Exporter ); -@EXPORT_OK = qw( popselector ); - -=head1 NAME - -FS::svc_acct_pop - Object methods for svc_acct_pop records - -=head1 SYNOPSIS - - use FS::svc_acct_pop; - - $record = new FS::svc_acct_pop \%hash; - $record = new FS::svc_acct_pop { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $html = FS::svc_acct_pop::popselector( $popnum, $state ); - -=head1 DESCRIPTION - -An FS::svc_acct object represents an point of presence. FS::svc_acct_pop -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item popnum - primary key (assigned automatically for new accounts) - -=item city - -=item state - -=item ac - area code - -=item exch - exchange - -=item loc - rest of number - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new point of presence (if only it were that easy!). To add the -point of presence to the database, see L<"insert">. - -=cut - -sub table { 'svc_acct_pop'; } - -=item insert - -Adds this point of presence to the database. If there is an error, returns the -error, otherwise returns false. - -=item delete - -Removes this point of presence from the database. - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=item check - -Checks all fields to make sure this is a valid point of presence. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -sub check { - my $self = shift; - - $self->ut_numbern('popnum') - or $self->ut_text('city') - or $self->ut_text('state') - or $self->ut_number('ac') - or $self->ut_number('exch') - or $self->ut_numbern('loc') - ; - -} - -=item text - -Returns: - -"$city, $state ($ac)/$exch" - -=cut - -sub text { - my $self = shift; - $self->city. ', '. $self->state. - ' ('. $self->ac. ')/'. $self->exch. '-'. $self->loc; -} - -=back - -=head1 SUBROUTINES - -=over 4 - -=item popselector [ POPNUM [ STATE ] ] - -=cut - -#horrible false laziness with signup.cgi (pull special-case for 0 & 1 -# pop code out from signup.cgi??) -sub popselector { - my( $popnum, $state ) = @_; - - unless ( @svc_acct_pop ) { #cache pop list - @svc_acct_pop = qsearch('svc_acct_pop', {} ); - %svc_acct_pop = (); - push @{$svc_acct_pop{$_->state}}, $_ foreach @svc_acct_pop; - } - - my $text = < - function opt(what,href,text) { - var optionName = new Option(text, href, false, false) - var length = what.length; - what.options[length] = optionName; - } - - function popstate_changed(what) { - state = what.options[what.selectedIndex].text; - for (var i = what.form.popnum.length;i > 0;i--) - what.form.popnum.options[i] = null; - what.form.popnum.options[0] = new Option("", "", false, true); -END - - foreach my $popstate ( sort { $a cmp $b } keys %svc_acct_pop ) { - $text .= "\nif ( state == \"$popstate\" ) {\n"; - - foreach my $pop ( @{$svc_acct_pop{$popstate}}) { - my $o_popnum = $pop->popnum; - my $poptext = $pop->text; - $text .= "opt(what.form.popnum, \"$o_popnum\", \"$poptext\");\n" - } - $text .= "}\n"; - } - - $text .= "}\n\n"; - - $text .= - qq!'; #callback? return 3 html pieces? #''; - - $text .= qq!'; - - $text; - -} - -=back - -=head1 VERSION - -$Id: svc_acct_pop.pm,v 1.7 2002-04-10 13:42:48 ivan Exp $ - -=head1 BUGS - -It should be renamed to part_pop. - -popselector? putting web ui components in here? they should probably live -somewhere else... - -popselector: pull special-case for 0 & 1 pop code out from signup.cgi - -=head1 SEE ALSO - -L, L, L, schema.html from the -base documentation. - -=cut - -1; - diff --git a/FS/FS/svc_acct_sm.pm b/FS/FS/svc_acct_sm.pm deleted file mode 100644 index c92f1421f..000000000 --- a/FS/FS/svc_acct_sm.pm +++ /dev/null @@ -1,260 +0,0 @@ -package FS::svc_acct_sm; - -use strict; -use vars qw( @ISA $nossh_hack $conf $shellmachine @qmailmachines ); -use FS::Record qw( fields qsearch qsearchs ); -use FS::svc_Common; -use FS::cust_svc; -use Net::SSH qw(ssh); -use FS::Conf; -use FS::svc_acct; -use FS::svc_domain; - -@ISA = qw( FS::svc_Common ); - -#ask FS::UID to run this stuff for us later -#$FS::UID::callback{'FS::svc_acct_sm'} = sub { -# $conf = new FS::Conf; -# $shellmachine = $conf->exists('qmailmachines') -# ? $conf->config('shellmachine') -# : ''; -#}; - -=head1 NAME - -FS::svc_acct_sm - Object methods for svc_acct_sm records - -=head1 SYNOPSIS - - use FS::svc_acct_sm; - - $record = new FS::svc_acct_sm \%hash; - $record = new FS::svc_acct_sm { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $error = $record->cancel; - -=head1 WARNING - -FS::svc_acct_sm is B. This class is only included for migration -purposes. See L. - -=head1 DESCRIPTION - -An FS::svc_acct_sm object represents a virtual mail alias. FS::svc_acct_sm -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item svcnum - primary key (assigned automatcially for new accounts) - -=item domsvc - svcnum of the virtual domain (see L) - -=item domuid - uid of the target account (see L) - -=item domuser - virtual username - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new virtual mail alias. To add the virtual mail alias to the -database, see L<"insert">. - -=cut - -sub table { 'svc_acct_sm'; } - -=item insert - -Adds this virtual mail alias to the database. If there is an error, returns -the error, otherwise returns false. - -The additional fields pkgnum and svcpart (see L) should be -defined. An FS::cust_svc record will be created and inserted. - - #If the configuration values (see L) shellmachine and qmailmachines - #exist, and domuser is `*' (meaning a catch-all mailbox), the command: - # - # [ -e $dir/.qmail-$qdomain-default ] || { - # touch $dir/.qmail-$qdomain-default; - # chown $uid:$gid $dir/.qmail-$qdomain-default; - # } - # - #is executed on shellmachine via ssh (see L). - #This behaviour can be surpressed by setting $FS::svc_acct_sm::nossh_hack true. - -=cut - -sub insert { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - $error=$self->check; - return $error if $error; - - return "Domain username (domuser) in use for this domain (domsvc)" - if qsearchs('svc_acct_sm',{ 'domuser'=> $self->domuser, - 'domsvc' => $self->domsvc, - } ); - - return "First domain username (domuser) for domain (domsvc) must be " . - qq='*' (catch-all)!= - if $self->domuser ne '*' - && ! qsearch('svc_acct_sm',{ 'domsvc' => $self->domsvc } ) - && ! $conf->exists('maildisablecatchall'); - - $error = $self->SUPER::insert; - return $error if $error; - - #my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $self->domsvc } ); - #my $svc_acct = qsearchs( 'svc_acct', { 'uid' => $self->domuid } ); - #my ( $uid, $gid, $dir, $domain ) = ( - # $svc_acct->uid, - # $svc_acct->gid, - # $svc_acct->dir, - # $svc_domain->domain, - #); - #my $qdomain = $domain; - #$qdomain =~ s/\./:/g; #see manpage for 'dot-qmail': EXTENSION ADDRESSES - #ssh("root\@$shellmachine","[ -e $dir/.qmail-$qdomain-default ] || { touch $dir/.qmail-$qdomain-default; chown $uid:$gid $dir/.qmail-$qdomain-default; }") - # if ( ! $nossh_hack && $shellmachine && $dir && $self->domuser eq '*' ); - - ''; #no error - -} - -=item delete - -Deletes this virtual mail alias from the database. If there is an error, -returns the error, otherwise returns false. - -The corresponding FS::cust_svc record will be deleted as well. - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - my $error; - - return "Domain username (domuser) in use for this domain (domsvc)" - if ( $old->domuser ne $new->domuser - || $old->domsvc != $new->domsvc - ) && qsearchs('svc_acct_sm',{ - 'domuser'=> $new->domuser, - 'domsvc' => $new->domsvc, - } ) - ; - - $new->SUPER::replace($old); - -} - -=item suspend - -Just returns false (no error) for now. - -Called by the suspend method of FS::cust_pkg (see L). - -=item unsuspend - -Just returns false (no error) for now. - -Called by the unsuspend method of FS::cust_pkg (see L). - -=item cancel - -Just returns false (no error) for now. - -Called by the cancel method of FS::cust_pkg (see L). - -=item check - -Checks all fields to make sure this is a valid virtual mail alias. If there is -an error, returns the error, otherwise returns false. Called by the insert and -replace methods. - -Sets any fixed values; see L. - -=cut - -sub check { - my $self = shift; - my $error; - - my $x = $self->setfixed; - return $x unless ref($x); - #my $part_svc = $x; - - my($recref) = $self->hashref; - - $recref->{domuser} =~ /^(\*|[a-z0-9_\-]{2,32})$/ - or return "Illegal domain username (domuser)"; - $recref->{domuser} = $1; - - $recref->{domsvc} =~ /^(\d+)$/ or return "Illegal domsvc"; - $recref->{domsvc} = $1; - my($svc_domain); - return "Unknown domsvc" unless - $svc_domain=qsearchs('svc_domain',{'svcnum'=> $recref->{domsvc} } ); - - $recref->{domuid} =~ /^(\d+)$/ or return "Illegal uid"; - $recref->{domuid} = $1; - my($svc_acct); - return "Unknown uid" unless - $svc_acct=qsearchs('svc_acct',{'uid'=> $recref->{domuid} } ); - - ''; #no error -} - -=back - -=head1 VERSION - -$Id: svc_acct_sm.pm,v 1.5 2001-09-06 20:41:59 ivan Exp $ - -=head1 BUGS - -The remote commands should be configurable. - -The $recref stuff in sub check should be cleaned up. - -=head1 SEE ALSO - -L - -L, L, L, L, L, -L, L, L, L, L, -schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm deleted file mode 100644 index b06d03013..000000000 --- a/FS/FS/svc_domain.pm +++ /dev/null @@ -1,478 +0,0 @@ -package FS::svc_domain; - -use strict; -use vars qw( @ISA $whois_hack $conf $smtpmachine - @defaultrecords $soadefaultttl $soaemail $soaexpire $soamachine - $soarefresh $soaretry $qshellmachine $nossh_hack -); -use Carp; -use Mail::Internet 1.44; -use Mail::Header; -use Date::Format; -use Net::Whois 1.0; -use Net::SSH; -use FS::Record qw(fields qsearch qsearchs dbh); -use FS::Conf; -use FS::svc_Common; -use FS::cust_svc; -use FS::svc_acct; -use FS::cust_pkg; -use FS::cust_main; -use FS::domain_record; -use FS::queue; - -@ISA = qw( FS::svc_Common ); - -#ask FS::UID to run this stuff for us later -$FS::UID::callback{'FS::domain'} = sub { - $conf = new FS::Conf; - - $smtpmachine = $conf->config('smtpmachine'); - - @defaultrecords = $conf->config('defaultrecords'); - $soadefaultttl = $conf->config('soadefaultttl'); - $soaemail = $conf->config('soaemail'); - $soaexpire = $conf->config('soaexpire'); - $soamachine = $conf->config('soamachine'); - $soarefresh = $conf->config('soarefresh'); - $soaretry = $conf->config('soaretry'); - - $qshellmachine = $conf->exists('qmailmachines') - ? $conf->config('shellmachine') - : ''; -}; - -=head1 NAME - -FS::svc_domain - Object methods for svc_domain records - -=head1 SYNOPSIS - - use FS::svc_domain; - - $record = new FS::svc_domain \%hash; - $record = new FS::svc_domain { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $error = $record->cancel; - -=head1 DESCRIPTION - -An FS::svc_domain object represents a domain. FS::svc_domain inherits from -FS::svc_Common. The following fields are currently supported: - -=over 4 - -=item svcnum - primary key (assigned automatically for new accounts) - -=item domain - -=item catchall - optional svcnum of an svc_acct record, designating an email catchall account. - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new domain. To add the domain to the database, see L<"insert">. - -=cut - -sub table { 'svc_domain'; } - -=item insert - -Adds this domain to the database. If there is an error, returns the error, -otherwise returns false. - -The additional fields I and I (see L) should be -defined. An FS::cust_svc record will be created and inserted. - -The additional field I should be set to I for new domains or I -for transfers. - -A registration or transfer email will be submitted unless -$FS::svc_domain::whois_hack is true. - -The additional field I can be used to manually set the admin contact -email address on this email. Otherwise, the svc_acct records for this package -(see L) are searched. If there is exactly one svc_acct record -in the same package, it is automatically used. Otherwise an error is returned. - -If any I configuration file exists, an SOA record is added to -the domain_record table (see ). - -If any records are defined in the I configuration file, -appropriate records are added to the domain_record table (see -L). - -If a machine is defined in the I configuration value, the -I configuration file exists, and the I field points -to an an account with a home directory (see L), the command: - - [ -e $dir/.qmail-$qdomain-defualt ] || { - touch $dir/.qmail-$qdomain-default; - chown $uid:$gid $dir/.qmail-$qdomain-default; - } - -is executed on shellmachine via ssh (see L). -This behaviour can be supressed by setting $FS::svc_domain::nossh_hack true. - -a machine is defined -in the - -=cut - -sub insert { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $error = $self->check; - return $error if $error; - - return "Domain in use (here)" - if qsearchs( 'svc_domain', { 'domain' => $self->domain } ); - - my $whois = $self->whois; - if ( $self->action eq "N" && ! $whois_hack && $whois ) { - $dbh->rollback if $oldAutoCommit; - return "Domain in use (see whois)"; - } - if ( $self->action eq "M" && ! $whois ) { - $dbh->rollback if $oldAutoCommit; - return "Domain not found (see whois)"; - } - - $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $self->submit_internic unless $whois_hack; - - if ( $soamachine ) { - my $soa = new FS::domain_record { - 'svcnum' => $self->svcnum, - 'reczone' => '@', - 'recaf' => 'IN', - 'rectype' => 'SOA', - 'recdata' => "$soamachine $soaemail ( ". time2str("%Y%m%d", time). "00 ". - "$soarefresh $soaretry $soaexpire $soadefaultttl )" - }; - $error = $soa->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "couldn't insert SOA record for new domain: $error"; - } - - foreach my $record ( @defaultrecords ) { - my($zone,$af,$type,$data) = split(/\s+/,$record,4); - my $domain_record = new FS::domain_record { - 'svcnum' => $self->svcnum, - 'reczone' => $zone, - 'recaf' => $af, - 'rectype' => $type, - 'recdata' => $data, - }; - my $error = $domain_record->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "couldn't insert record for new domain: $error"; - } - } - - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - - if ( $qshellmachine && $self->catchall && ! $nossh_hack ) { - - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $self->catchall } ) - or warn "WARNING: inserted unknown catchall: ". $self->catchall; - if ( $svc_acct && $svc_acct->dir ) { - my $qdomain = $self->domain; - $qdomain =~ s/\./:/g; #see manpage for 'dot-qmail': EXTENSION ADDRESSES - my ( $uid, $gid, $dir ) = ( - $svc_acct->uid, - $svc_acct->gid, - $svc_acct->dir, - ); - - my $queue = new FS::queue { - 'svcnum' => $self->svcnum, - 'job' => 'Net::SSH::ssh_cmd', - }; - $error = $queue->insert("root\@$qshellmachine", "[ -e $dir/.qmail-$qdomain-default ] || { touch $dir/.qmail-$qdomain-default; chown $uid:$gid $dir/.qmail-$qdomain-default; }" ); - - } - } - - ''; #no error -} - -=item delete - -Deletes this domain from the database. If there is an error, returns the -error, otherwise returns false. - -The corresponding FS::cust_svc record will be deleted as well. - -=cut - -sub delete { - my $self = shift; - - return "Can't delete a domain which has accounts!" - if qsearch( 'svc_acct', { 'domsvc' => $self->svcnum } ); - - return "Can't delete a domain with (svc_acct_sm) mail aliases!" - if defined( $FS::Record::dbdef->table('svc_acct_sm') ) - && qsearch('svc_acct_sm', { 'domsvc' => $self->svcnum } ); - - #return "Can't delete a domain with (domain_record) zone entries!" - # if qsearch('domain_record', { 'svcnum' => $self->svcnum } ); - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - foreach my $domain_record ( reverse $self->domain_record ) { - my $error = $domain_record->delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - } - $dbh->commit or die $dbh->errstr if $oldAutoCommit; -} - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - - return "Can't change domain - reorder." - if $old->getfield('domain') ne $new->getfield('domain'); - - my $error = $new->SUPER::replace($old); - return $error if $error; -} - -=item suspend - -Just returns false (no error) for now. - -Called by the suspend method of FS::cust_pkg (see L). - -=item unsuspend - -Just returns false (no error) for now. - -Called by the unsuspend method of FS::cust_pkg (see L). - -=item cancel - -Just returns false (no error) for now. - -Called by the cancel method of FS::cust_pkg (see L). - -=item check - -Checks all fields to make sure this is a valid domain. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. - -Sets any fixed values; see L. - -=cut - -sub check { - my $self = shift; - - my $x = $self->setfixed; - return $x unless ref($x); - #my $part_svc = $x; - - my $error = $self->ut_numbern('svcnum') - || $self->ut_numbern('catchall') - ; - return $error if $error; - - #hmm - my $pkgnum; - if ( $self->svcnum ) { - my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $self->svcnum } ); - $pkgnum = $cust_svc->pkgnum; - } else { - $pkgnum = $self->pkgnum; - } - - my($recref) = $self->hashref; - - unless ( $whois_hack ) { - unless ( $self->email ) { #find out an email address - my @svc_acct; - foreach ( qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } ) ) { - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $_->svcnum } ); - push @svc_acct, $svc_acct if $svc_acct; - } - - if ( scalar(@svc_acct) == 0 ) { - return "Must order an account in package ". $pkgnum. " first"; - } elsif ( scalar(@svc_acct) > 1 ) { - return "More than one account in package ". $pkgnum. ": specify admin contact email"; - } else { - $self->email($svc_acct[0]->email ); - } - } - } - - #if ( $recref->{domain} =~ /^([\w\-\.]{1,22})\.(com|net|org|edu)$/ ) { - if ( $recref->{domain} =~ /^([\w\-]{1,22})\.(com|net|org|edu)$/ ) { - $recref->{domain} = "$1.$2"; - # hmmmmmmmm. - } elsif ( $whois_hack && $recref->{domain} =~ /^([\w\-\.]+)$/ ) { - $recref->{domain} = $1; - } else { - return "Illegal domain ". $recref->{domain}. - " (or unknown registry - try \$whois_hack)"; - } - - $recref->{action} =~ /^(M|N)$/ or return "Illegal action"; - $recref->{action} = $1; - - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $recref->{catchall} } ); - return "Unknown catchall" unless $svc_acct || ! $recref->{catchall}; - - $self->ut_textn('purpose'); - -} - -=item domain_record - -=cut - -sub domain_record { - my $self = shift; - - my %order = ( - SOA => 1, - NS => 2, - MX => 3, - CNAME => 4, - A => 5, - ); - - sort { $order{$a->rectype} <=> $order{$b->rectype} } - qsearch('domain_record', { svcnum => $self->svcnum } ); - -} - -=item whois - -Returns the Net::Whois::Domain object (see L) for this domain, or -undef if the domain is not found in whois. - -(If $FS::svc_domain::whois_hack is true, returns that in all cases instead.) - -=cut - -sub whois { - $whois_hack or new Net::Whois::Domain $_[0]->domain; -} - -=item _whois - -Depriciated. - -=cut - -sub _whois { - die "_whois depriciated"; -} - -=item submit_internic - -Submits a registration email for this domain. - -=cut - -sub submit_internic { - #my $self = shift; - carp "submit_internic depreciated"; -} - -=back - -=head1 VERSION - -$Id: svc_domain.pm,v 1.31 2002-06-10 02:52:48 ivan Exp $ - -=head1 BUGS - -All BIND/DNS fields should be included (and exported). - -Delete doesn't send a registration template. - -All registries should be supported. - -Should change action to a real field. - -The $recref stuff in sub check should be cleaned up. - -=head1 SEE ALSO - -L, L, L, L, -L, L, L, L, -L, schema.html from the base documentation, config.html from the -base documentation. - -=cut - -1; - - diff --git a/FS/FS/svc_forward.pm b/FS/FS/svc_forward.pm deleted file mode 100644 index 1c5b5c40d..000000000 --- a/FS/FS/svc_forward.pm +++ /dev/null @@ -1,470 +0,0 @@ -package FS::svc_forward; - -use strict; -use vars qw( @ISA $nossh_hack $conf $shellmachine @qmailmachines - @vpopmailmachines ); -use Net::SSH qw(ssh); -use FS::Conf; -use FS::Record qw( fields qsearch qsearchs dbh ); -use FS::svc_Common; -use FS::cust_svc; -use FS::svc_acct; -use FS::svc_domain; - -@ISA = qw( FS::svc_Common ); - -#ask FS::UID to run this stuff for us later -$FS::UID::callback{'FS::svc_forward'} = sub { - $conf = new FS::Conf; - if ( $conf->exists('qmailmachines') ) { - $shellmachine = $conf->config('shellmachine') - } else { - $shellmachine = ''; - } - if ( $conf->exists('vpopmailmachines') ) { - @vpopmailmachines = $conf->config('vpopmailmachines'); - } else { - @vpopmailmachines = (); - } -}; - -=head1 NAME - -FS::svc_forward - Object methods for svc_forward records - -=head1 SYNOPSIS - - use FS::svc_forward; - - $record = new FS::svc_forward \%hash; - $record = new FS::svc_forward { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $error = $record->cancel; - -=head1 DESCRIPTION - -An FS::svc_forward object represents a mail forwarding alias. FS::svc_forward -inherits from FS::Record. The following fields are currently supported: - -=over 4 - -=item svcnum - primary key (assigned automatcially for new accounts) - -=item srcsvc - svcnum of the source of the forward (see L) - -=item dstsvc - svcnum of the destination of the forward (see L) - -=item dst - foreign destination (email address) - forward not local to freeside - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new mail forwarding alias. To add the mail forwarding alias to the -database, see L<"insert">. - -=cut - -sub table { 'svc_forward'; } - -=item insert - -Adds this mail forwarding alias to the database. If there is an error, returns -the error, otherwise returns false. - -The additional fields pkgnum and svcpart (see L) should be -defined. An FS::cust_svc record will be created and inserted. - -If the configuration value (see L) vpopmailmachines exists, then -the command: - - [ -d $vpopdir/domains/$domain/$source ] && { - echo "$destination" >> $vpopdir/domains/$domain/$username/.$qmail - chown $vpopuid:$vpopgid $vpopdir/domains/$domain/$username/.$qmail - } - -is executed on each vpopmailmachine via ssh (see the vpopmail documentation). -This behaviour can be supressed by setting $FS::svc_forward::nossh_hack true. - -=cut - -sub insert { - my $self = shift; - my $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - $error = $self->check; - return $error if $error; - - $error = $self->SUPER::insert; - if ($error) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $self->srcsvc } ); - my $username = $svc_acct->username; - my $domain = $svc_acct->domain; - my $destination; - if ($self->dstsvc) { - $destination = $self->dstsvc_acct->email; - } else { - $destination = $self->dst; - } - - foreach my $vpopmailmachine ( @vpopmailmachines ) { - my($machine, $vpopdir, $vpopuid, $vpopgid) = split(/\s+/, $vpopmailmachine); - my $queue = new FS::queue { - 'svcnum' => $self->svcnum, - 'job' => 'Net::SSH::ssh_cmd', - }; - # should be neater - my $error = $queue->insert("root\@$machine","[ -d $vpopdir/domains/$domain/$username ] && { echo \"$destination\" >> $vpopdir/domains/$domain/$username/.qmail; chown $vpopuid:$vpopgid $vpopdir/domains/$domain/$username/.qmail; }") - unless $nossh_hack; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing job (transaction rolled back): $error"; - } - - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; #no error - -} - -=item delete - -Deletes this mail forwarding alias from the database. If there is an error, -returns the error, otherwise returns false. - -The corresponding FS::cust_svc record will be deleted as well. - -If the configuration value vpopmailmachines exists, then the command: - - { sed -e '/^$destination/d' < - $vpopdir/domains/$srcdomain/$srcusername/.qmail > - $vpopdir/domains/$srcdomain/$srcusername/.qmail.temp; - mv $vpopdir/domains/$srcdomain/$srcusername/.qmail.temp - $vpopdir/domains/$srcdomain/$srcusername/.qmail; - chown $vpopuid.$vpopgid $vpopdir/domains/$srcdomain/$srcusername/.qmail; } - - -is executed on each vpopmailmachine via ssh. This behaviour can be supressed -by setting $FS::svc_forward_nossh_hack true. - -=cut - -sub delete { - my $self = shift; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::Autocommit = 0; - my $dbh = dbh; - - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - my $svc_acct = $self->srcsvc_acct; - my $username = $svc_acct->username; - my $domain = $svc_acct->domain; - my $destination; - if ($self->dstsvc) { - $destination = $self->dstsvc_acct->email; - } else { - $destination = $self->dst; - } - foreach my $vpopmailmachine ( @vpopmailmachines ) { - my($machine, $vpopdir, $vpopuid, $vpopgid) = - split(/\s+/, $vpopmailmachine); - my $queue = new FS::queue { 'job' => 'Net::SSH::ssh_cmd' }; - # should be neater - my $error = $queue->insert("root\@$machine", - "sed -e '/^$destination/d' " . - "< $vpopdir/domains/$domain/$username/.qmail" . - "> $vpopdir/domains/$domain/$username/.qmail.temp; " . - "mv $vpopdir/domains/$domain/$username/.qmail.temp " . - "$vpopdir/domains/$domain/$username/.qmail; " . - "chown $vpopuid.$vpopgid $vpopdir/domains/$domain/$username/.qmail;" - ) - unless $nossh_hack; - - if ($error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing job (transaction rolled back): $error"; - } - - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; -} - - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -If the configuration value vpopmailmachines exists, then the command: - - { sed -e '/^$destination/d' < - $vpopdir/domains/$srcdomain/$srcusername/.qmail > - $vpopdir/domains/$srcdomain/$srcusername/.qmail.temp; - mv $vpopdir/domains/$srcdomain/$srcusername/.qmail.temp - $vpopdir/domains/$srcdomain/$srcusername/.qmail; - chown $vpopuid.$vpopgid $vpopdir/domains/$srcdomain/$srcusername/.qmail; } - - -is executed on each vpopmailmachine via ssh. This behaviour can be supressed -by setting $FS::svc_forward_nossh_hack true. - -Also, if the configuration value vpopmailmachines exists, then the command: - - [ -d $vpopdir/domains/$domain/$source ] && { - echo "$destination" >> $vpopdir/domains/$domain/$username/.$qmail - chown $vpopuid:$vpopgid $vpopdir/domains/$domain/$username/.$qmail - } - -is executed on each vpopmailmachine via ssh. This behaviour can be supressed -by setting $FS::svc_forward_nossh_hack true. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - - if ( $new->srcsvc != $old->srcsvc - && ( $new->dstsvc != $old->dstsvc - || ! $new->dstsvc && $new->dst ne $old->dst - ) - ) { - return "Can't change both source and destination of a mail forward!" - } - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $error = $new->SUPER::replace($old); - if ($error) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - my $old_svc_acct = $old->srcsvc_acct; - my $old_username = $old_svc_acct->username; - my $old_domain = $old_svc_acct->domain; - my $destination; - if ($old->dstsvc) { - $destination = $old->dstsvc_acct->email; - } else { - $destination = $old->dst; - } - foreach my $vpopmailmachine ( @vpopmailmachines ) { - my($machine, $vpopdir, $vpopuid, $vpopgid) = - split(/\s+/, $vpopmailmachine); - my $queue = new FS::queue { - 'svcnum' => $new->svcnum, - 'job' => 'Net::SSH::ssh_cmd', - }; - # should be neater - my $error = $queue->insert("root\@$machine", - "sed -e '/^$destination/d' " . - "< $vpopdir/domains/$old_domain/$old_username/.qmail" . - "> $vpopdir/domains/$old_domain/$old_username/.qmail.temp; " . - "mv $vpopdir/domains/$old_domain/$old_username/.qmail.temp " . - "$vpopdir/domains/$old_domain/$old_username/.qmail; " . - "chown $vpopuid.$vpopgid " . - "$vpopdir/domains/$old_domain/$old_username/.qmail;" - ) - unless $nossh_hack; - - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing job (transaction rolled back): $error"; - } - } - - #false laziness with stuff in insert, should subroutine - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $new->srcsvc } ); - my $username = $svc_acct->username; - my $domain = $svc_acct->domain; - if ($new->dstsvc) { - $destination = $new->dstsvc_acct->email; - } else { - $destination = $new->dst; - } - - foreach my $vpopmailmachine ( @vpopmailmachines ) { - my($machine, $vpopdir, $vpopuid, $vpopgid) = split(/\s+/, $vpopmailmachine); - my $queue = new FS::queue { - 'svcnum' => $new->svcnum, - 'job' => 'Net::SSH::ssh_cmd', - }; - # should be neater - my $error = $queue->insert("root\@$machine","[ -d $vpopdir/domains/$domain/$username ] && { echo \"$destination\" >> $vpopdir/domains/$domain/$username/.qmail; chown $vpopuid:$vpopgid $vpopdir/domains/$domain/$username/.qmail; }") - unless $nossh_hack; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return "queueing job (transaction rolled back): $error"; - } - } - #end subroutinable bits - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; -} - -=item suspend - -Just returns false (no error) for now. - -Called by the suspend method of FS::cust_pkg (see L). - -=item unsuspend - -Just returns false (no error) for now. - -Called by the unsuspend method of FS::cust_pkg (see L). - -=item cancel - -Just returns false (no error) for now. - -Called by the cancel method of FS::cust_pkg (see L). - -=item check - -Checks all fields to make sure this is a valid mail forwarding alias. If there -is an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -Sets any fixed values; see L. - -=cut - -sub check { - my $self = shift; - - my $x = $self->setfixed; - return $x unless ref($x); - #my $part_svc = $x; - - my $error = $self->ut_numbern('svcnum') - || $self->ut_number('srcsvc') - || $self->ut_numbern('dstsvc') - ; - return $error if $error; - - return "Unknown srcsvc" unless $self->srcsvc_acct; - - return "Both dstsvc and dst were defined; only one can be specified" - if $self->dstsvc && $self->dst; - - return "one of dstsvc or dst is required" - unless $self->dstsvc || $self->dst; - - #return "Unknown dstsvc: $dstsvc" unless $self->dstsvc_acct || ! $self->dstsvc; - return "Unknown dstsvc" - unless qsearchs('svc_acct', { 'svcnum' => $self->dstsvc } ) - || ! $self->dstsvc; - - - if ( $self->dst ) { - $self->dst =~ /^([\w\.\-]+)\@(([\w\-]+\.)+\w+)$/ - or return "Illegal dst: ". $self->dst; - $self->dst("$1\@$2"); - } else { - $self->dst(''); - } - - ''; #no error -} - -=item srcsvc_acct - -Returns the FS::svc_acct object referenced by the srcsvc column. - -=cut - -sub srcsvc_acct { - my $self = shift; - qsearchs('svc_acct', { 'svcnum' => $self->srcsvc } ); -} - -=item dstsvc_acct - -Returns the FS::svc_acct object referenced by the srcsvc column, or false for -forwards not local to freeside. - -=cut - -sub dstsvc_acct { - my $self = shift; - qsearchs('svc_acct', { 'svcnum' => $self->dstsvc } ); -} - -=back - -=head1 VERSION - -$Id: svc_forward.pm,v 1.12 2002-05-31 17:50:37 ivan Exp $ - -=head1 BUGS - -The remote commands should be configurable. - -=head1 SEE ALSO - -L, L, L, L, L, -L, L, L, L, L, -schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/svc_www.pm b/FS/FS/svc_www.pm deleted file mode 100644 index d7a42c8ae..000000000 --- a/FS/FS/svc_www.pm +++ /dev/null @@ -1,276 +0,0 @@ -package FS::svc_www; - -use strict; -use vars qw(@ISA $conf $apacheip); -#use FS::Record qw( qsearch qsearchs ); -use FS::Record qw( qsearchs dbh ); -use FS::svc_Common; -use FS::cust_svc; -use FS::domain_record; -use FS::svc_acct; -use FS::svc_domain; - -@ISA = qw( FS::svc_Common ); - -#ask FS::UID to run this stuff for us later -$FS::UID::callback{'FS::svc_www'} = sub { - $conf = new FS::Conf; - $apacheip = $conf->config('apacheip'); -}; - -=head1 NAME - -FS::svc_www - Object methods for svc_www records - -=head1 SYNOPSIS - - use FS::svc_www; - - $record = new FS::svc_www \%hash; - $record = new FS::svc_www { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $error = $record->cancel; - -=head1 DESCRIPTION - -An FS::svc_www object represents an web virtual host. FS::svc_www inherits -from FS::svc_Common. The following fields are currently supported: - -=over 4 - -=item svcnum - primary key - -=item recnum - DNS `A' record corresponding to this web virtual host. (see L) - -=item usersvc - account (see L) corresponding to this web virtual host. - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new web virtual host. To add the record to the database, see -L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -sub table { 'svc_www'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -The additional fields pkgnum and svcpart (see L) should be -defined. An FS::cust_svc record will be created and inserted. - -=cut - -sub insert { - my $self = shift; - - my $error = $self->check; - return $error if $error; - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - #if ( $self->recnum =~ /^([\w\-]+|\@)\.(([\w\.\-]+\.)+\w+)$/ ) { - if ( $self->recnum =~ /^([\w\-]+|\@)\.(\d+)$/ ) { - my( $reczone, $domain_svcnum ) = ( $1, $2 ); - unless ( $apacheip ) { - $dbh->rollback if $oldAutoCommit; - return "Configuration option apacheip not set; can't autocreate A record"; - #"for $reczone". $svc_domain->domain; - } - my $domain_record = new FS::domain_record { - 'svcnum' => $domain_svcnum, - 'reczone' => $reczone, - 'recaf' => 'IN', - 'rectype' => 'A', - 'recdata' => $apacheip, - }; - $error = $domain_record->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - $self->recnum($domain_record->recnum); - } - - $error = $self->SUPER::insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - - $dbh->commit or die $dbh->errstr if $oldAutoCommit; - ''; -} - -=item delete - -Delete this record from the database. - -=cut - -sub delete { - my $self = shift; - my $error; - - $error = $self->SUPER::delete; - return $error if $error; - - ''; -} - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - my $error; - - $error = $new->SUPER::replace($old); - return $error if $error; - - ''; -} - -=item suspend - -Called by the suspend method of FS::cust_pkg (see L). - -=item unsuspend - -Called by the unsuspend method of FS::cust_pkg (see L). - -=item cancel - -Called by the cancel method of FS::cust_pkg (see L). - -=item check - -Checks all fields to make sure this is a valid web virtual host. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. - -=cut - -sub check { - my $self = shift; - - my $x = $self->setfixed; - return $x unless ref($x); - #my $part_svc = $x; - - my $error = - $self->ut_numbern('svcnum') -# || $self->ut_number('recnum') - || $self->ut_number('usersvc') - ; - return $error if $error; - - if ( $self->recnum =~ /^(\d+)$/ ) { - - $self->recnum($1); - return "Unknown recnum: ". $self->recnum - unless qsearchs('domain_record', { 'recnum' => $self->recnum } ); - - } elsif ( $self->recnum =~ /^([\w\-]+|\@)\.(([\w\.\-]+\.)+\w+)$/ ) { - - my( $reczone, $domain ) = ( $1, $2 ); - - my $svc_domain = qsearchs( 'svc_domain', { 'domain' => $domain } ) - or return "unknown domain $domain (recnum $1.$2)"; - - my $domain_record = qsearchs( 'domain_record', { - 'reczone' => $reczone, - 'svcnum' => $svc_domain->svcnum, - }); - - if ( $domain_record ) { - $self->recnum($domain_record->recnum); - } else { - #insert will create it - #$self->recnum("$reczone.$domain"); - $self->recnum("$reczone.". $svc_domain->svcnum); - } - - } else { - return "Illegal recnum: ". $self->recnum; - } - - return "Unknown usersvc (svc_acct.svcnum): ". $self->usersvc - unless qsearchs('svc_acct', { 'svcnum' => $self->usersvc } ); - - ''; #no error -} - -=item domain_record - -Returns the FS::domain_record record for this web virtual host's zone (see -L). - -=cut - -sub domain_record { - my $self = shift; - qsearchs('domain_record', { 'recnum' => $self->recnum } ); -} - -=item svc_acct - -Returns the FS::svc_acct record for this web virtual host's owner (see -L). - -=cut - -sub svc_acct { - my $self = shift; - qsearchs('svc_acct', { 'svcnum' => $self->usersvc } ); -} - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L, L, L, L, -L, L, schema.html from the base documentation. - -=cut - -1; - diff --git a/FS/FS/type_pkgs.pm b/FS/FS/type_pkgs.pm deleted file mode 100644 index 8e0d4ef56..000000000 --- a/FS/FS/type_pkgs.pm +++ /dev/null @@ -1,113 +0,0 @@ -package FS::type_pkgs; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearchs ); -use FS::agent_type; -use FS::part_pkg; - -@ISA = qw( FS::Record ); - -=head1 NAME - -FS::type_pkgs - Object methods for type_pkgs records - -=head1 SYNOPSIS - - use FS::type_pkgs; - - $record = new FS::type_pkgs \%hash; - $record = new FS::type_pkgs { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::type_pkgs record links an agent type (see L) to a -billing item definition (see L). FS::type_pkgs inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item typenum - Agent type, see L - -=item pkgpart - Billing item definition, see L - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Create a new record. To add the record to the database, see L<"insert">. - -=cut - -sub table { 'type_pkgs'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=item delete - -Deletes this record from the database. If there is an error, returns the -error, otherwise returns false. - -=item replace OLD_RECORD - -Replaces OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=item check - -Checks all fields to make sure this is a valid record. If there is an error, -returns the error, otherwise returns false. Called by the insert and replace -methods. - -=cut - -sub check { - my $self = shift; - - my $error = - $self->ut_number('typenum') - || $self->ut_number('pkgpart') - ; - return $error if $error; - - return "Unknown typenum" - unless qsearchs( 'agent_type', { 'typenum' => $self->typenum } ); - - return "Unknown pkgpart" - unless qsearchs( 'part_pkg', { 'pkgpart' => $self->pkgpart } ); - - ''; #no error -} - -=back - -=head1 VERSION - -$Id: type_pkgs.pm,v 1.1 1999-08-04 09:03:53 ivan Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L, L, L, schema.html from the base -documentation. - -=cut - -1; - diff --git a/FS/MANIFEST b/FS/MANIFEST deleted file mode 100644 index 8355e40fb..000000000 --- a/FS/MANIFEST +++ /dev/null @@ -1,168 +0,0 @@ -Changes -MANIFEST -MANIFEST.SKIP -Makefile.PL -README -bin/freeside-bill -bin/freeside-daily -bin/freeside-email -bin/freeside-queued -bin/freeside-apply-credits -bin/freeside-adduser -bin/freeside-setinvoice -bin/freeside-overdue -bin/freeside-receivables-report -bin/freeside-tax-report -bin/freeside-cc-receipts-report -bin/freeside-credit-report -bin/freeside-expiration-alerter -bin/freeside-reexport -FS.pm -FS/CGI.pm -FS/InitHandler.pm -FS/ClientAPI.pm -FS/ClientAPI/passwd.pm -FS/ClientAPI/MyAccount.pm -FS/Conf.pm -FS/ConfItem.pm -FS/Record.pm -FS/SearchCache.pm -FS/UI/Base.pm -FS/UI/CGI.pm -FS/UI/Gtk.pm -FS/UI/agent.pm -FS/UID.pm -FS/Msgcat.pm -FS/agent.pm -FS/agent_type.pm -FS/cust_bill.pm -FS/cust_bill_pkg.pm -FS/cust_credit.pm -FS/cust_credit_bill.pm -FS/cust_main.pm -FS/cust_main_county.pm -FS/cust_main_invoice.pm -FS/cust_pay.pm -FS/cust_bill_event.pm -FS/cust_bill_pay.pm -FS/cust_pay_batch.pm -FS/cust_pkg.pm -FS/cust_refund.pm -FS/cust_credit_refund.pm -FS/cust_svc.pm -FS/part_bill_event.pm -FS/export_svc.pm -FS/part_export.pm -FS/part_export_option.pm -FS/part_export/bind.pm -FS/part_export/bind_slave.pm -FS/part_export/bsdshell.pm -FS/part_export/cp.pm -FS/part_export/cyrus.pm -FS/part_export/http.pm -FS/part_export/infostreet.pm -FS/part_export/null.pm -FS/part_export/shellcommands.pm -FS/part_export/shellcommands_withdomain.pm -FS/part_export/sqlmail.pm -FS/part_export/sqlradius.pm -FS/part_export/sysvshell.pm -FS/part_export/textradius.pm -FS/part_export/vpopmail.pm -FS/part_export/www_shellcommands.pm -FS/part_pkg.pm -FS/part_pop_local.pm -FS/part_referral.pm -FS/part_svc.pm -FS/part_svc_column.pm -FS/pkg_svc.pm -FS/svc_Common.pm -FS/svc_acct.pm -FS/svc_acct_pop.pm -FS/svc_acct_sm.pm -FS/svc_domain.pm -FS/type_pkgs.pm -FS/nas.pm -FS/port.pm -FS/session.pm -FS/domain_record.pm -FS/prepay_credit.pm -FS/svc_www.pm -FS/svc_forward.pm -FS/raddb.pm -FS/radius_usergroup.pm -FS/queue.pm -FS/queue_arg.pm -FS/queue_depend.pm -FS/msgcat.pm -FS/cust_tax_exempt.pm -t/agent.t -t/agent_type.t -t/CGI.t -t/InitHandler.t -t/ClientAPI.t -t/Conf.t -t/ConfItem.t -t/Record.t -t/UID.t -t/Msgcat.t -t/cust_bill.t -t/cust_bill_event.t -t/cust_bill_pay.t -t/cust_bill_pkg.t -t/cust_credit.t -t/cust_credit_bill.t -t/cust_credit_refund.t -t/cust_main.t -t/cust_main_county.t -t/cust_main_invoice.t -t/cust_pay.t -t/cust_pay_batch.t -t/cust_pkg.t -t/cust_refund.t -t/cust_svc.t -t/domain_record.t -t/nas.t -t/part_bill_event.t -t/export_svc.t -t/part_export.t -t/part_export_option.t -t/part_export-bind.t -t/part_export-bind_slave.t -t/part_export-bsdshell.t -t/part_export-cp.t -t/part_export-cyrus.t -t/part_export-http.t -t/part_export-infostreet.t -t/part_export-null.t -t/part_export-shellcommands.t -t/part_export-shellcommands_withdomain.t -t/part_export-sqlmail.t -t/part_export-sqlradius.t -t/part_export-sysvshell.t -t/part_export-textradius.t -t/part_export-vpopmail.t -t/part_export-www_shellcommands.t -t/part_pkg.t -t/part_pop_local.t -t/part_referral.t -t/part_svc.t -t/part_svc_column.t -t/pkg_svc.t -t/port.t -t/prepay_credit.t -t/radius_usergroup.t -t/session.t -t/svc_acct.t -t/svc_acct_pop.t -t/svc_acct_sm.t -t/svc_Common.t -t/svc_domain.t -t/svc_forward.t -t/svc_www.t -t/type_pkgs.t -t/queue.t -t/queue_arg.t -t/msgcat.t -t/raddb.t -t/cust_tax_exempt.t diff --git a/FS/MANIFEST.SKIP b/FS/MANIFEST.SKIP deleted file mode 100644 index ae335e78a..000000000 --- a/FS/MANIFEST.SKIP +++ /dev/null @@ -1 +0,0 @@ -CVS/ diff --git a/FS/Makefile.PL b/FS/Makefile.PL deleted file mode 100644 index ab4c2281b..000000000 --- a/FS/Makefile.PL +++ /dev/null @@ -1,8 +0,0 @@ -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'FS', - 'VERSION_FROM' => 'FS.pm', # finds $VERSION - 'EXE_FILES' => [ glob 'bin/*' ], -); diff --git a/FS/README b/FS/README deleted file mode 100644 index d4c35acb4..000000000 --- a/FS/README +++ /dev/null @@ -1,6 +0,0 @@ -This is the Perl module section of Freeside. - -perl Makefile.PL -make -make test -make install diff --git a/FS/bin/freeside-adduser b/FS/bin/freeside-adduser deleted file mode 100644 index 9d424634b..000000000 --- a/FS/bin/freeside-adduser +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id: freeside-adduser,v 1.4 2002-02-06 14:58:05 ivan Exp $ - -use strict; -use vars qw($opt_h $opt_c $opt_s); -use Getopt::Std; - -my $FREESIDE_CONF = "/usr/local/etc/freeside"; - -getopts("ch:s:"); -die &usage if $opt_c && ! $opt_h; -my $user = shift or die &usage; - -if ( $opt_h ) { - my @args = ( 'htpasswd' ); - push @args, '-c' if $opt_c; - push @args, $opt_h, $user; - system(@args) == 0 or die "htpasswd failed: $?"; -} - -my $secretfile = $opt_s || 'secrets'; - -open(MAPSECRETS,">>$FREESIDE_CONF/mapsecrets") - or die "can't open $FREESIDE_CONF/mapsecrets: $!"; -print MAPSECRETS "$user $secretfile\n"; -close MAPSECRETS or die "can't close $FREESIDE_CONF/mapsecrets: $!"; - -sub usage { - die "Usage:\n\n freeside-adduser [ -h htpasswd_file [ -c ] ] [ -s secretfile ] username" -} - -=head1 NAME - -freeside-adduser - Command line interface to add (freeside) users. - -=head1 SYNOPSIS - - freeside-adduser [ -h htpasswd_file [ -c ] ] [ -s secretfile ] username - -=head1 DESCRIPTION - -Adds a user to the Freeside billing system. This is for adding users (internal -sales/tech folks) to the web interface, not for adding customer accounts. - - -h: Also call htpasswd for this user with the given filename - - -c: Passed to htpasswd - - -s: Specify an alternate secret file - -=head1 SEE ALSO - -L, base Freeside documentation - -=cut - diff --git a/FS/bin/freeside-apply-credits b/FS/bin/freeside-apply-credits deleted file mode 100755 index ea6a7bdd0..000000000 --- a/FS/bin/freeside-apply-credits +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use vars qw( $user $cust_main @customers ); -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_main; - -$user = shift or die &usage; -&adminsuidsetup( $user ); - -my @customers = qsearch('cust_main', {} ); -die "No customers" unless (scalar(@customers) > 0); - -foreach $cust_main (@customers) { - print "Applying credits for customer #". $cust_main->custnum; - $cust_main->apply_credits; -} - - - diff --git a/FS/bin/freeside-bill b/FS/bin/freeside-bill deleted file mode 100755 index 49ad4a768..000000000 --- a/FS/bin/freeside-bill +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/perl -w -# don't take any world-facing input -#!/usr/bin/perl -Tw - -use strict; -use Fcntl qw(:flock); -use Date::Parse; -use Getopt::Std; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::cust_main; - -&untaint_argv; #what it sounds like (eww) -use vars qw($opt_a $opt_c $opt_d $opt_p); -getopts("acd:p"); -my $user = shift or die &usage; - -adminsuidsetup $user; - -my %bill_only = map { $_ => 1 } ( - @ARGV ? @ARGV : ( map $_->custnum, qsearch('cust_main', {} ) ) -); - -#we're at now now (and later). -my($time)= $opt_d ? str2time($opt_d) : $^T; - -# find packages w/ bill < time && cancel != '', and create corresponding -# customer objects - -my($cust_main,%saw); -foreach $cust_main ( - map { - unless ( exists $saw{ $_->custnum } && defined $saw{ $_->custnum} ) { - $saw{ $_->custnum } = 0; # to avoid 'use of uninitialized value' errors - } - if ( - ( $opt_a || ( ( $_->getfield('bill') || 0 ) <= $time ) ) - && $bill_only{ $_->custnum } - && !$saw{ $_->custnum }++ - ) { - qsearchs('cust_main',{'custnum'=> $_->custnum } ); - } else { - (); - } - } ( qsearch('cust_pkg', { 'cancel' => '' }), - qsearch('cust_pkg', { 'cancel' => 0 }), - ) -) { - - # and bill them - - print "Billing customer #" . $cust_main->getfield('custnum') . "\n"; - - my($error); - - $error=$cust_main->bill('time'=>$time); - warn "Error billing, customer #" . $cust_main->getfield('custnum') . - ":" . $error if $error; - - if ($opt_p) { - $cust_main->apply_payments; - $cust_main->apply_credits; - } - - if ($opt_c) { - $error=$cust_main->collect( 'invoice_time' => $time); - warn "Error collecting from customer #" . $cust_main->custnum. ":$error" - if $error; - - #sleep 1; - } - -} - -# subroutines - -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - # Date::Parse - $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-bill [ -c [ -p ] ] [ -d 'date' ] user [ custnum custnum ... ]\n"; -} - -=head1 NAME - -freeside-bill - Command line (crontab, script) interface to customer billing. - -=head1 SYNOPSIS - - freeside-bill [ -c [ -p ] [ -a ] ] [ -d 'date' ] user [ custnum custnum ... ] - -=head1 DESCRIPTION - -This script is deprecated in 1.4.0. You should use freeside-daily instead. - -Bills customers. Searches for customers who are due for billing and calls -the bill and collect methods of a cust_main object. See L. - - -c: Turn on collecting (you probably want this). - - -p: Apply unapplied payments and credits before collecting (you probably want - this too) - - -a: Call collect even if there isn't a new invoice (probably a bad idea for - daily use) - - -d: Pretend it's 'date'. Date is in any format Date::Parse is happy with, - but be careful. - -user: From the mapsecrets file - see config.html from the base documentation - -custnum: if one or more customer numbers are specified, only bills those -customers. Otherwise, bills all customers. - -=head1 BUGS - -=head1 SEE ALSO - -L, L, config.html from the base documentation - -=cut - diff --git a/FS/bin/freeside-cc-receipts-report b/FS/bin/freeside-cc-receipts-report deleted file mode 100755 index 06e3aba81..000000000 --- a/FS/bin/freeside-cc-receipts-report +++ /dev/null @@ -1,270 +0,0 @@ -#!/usr/bin/perl -Tw - - -use strict; -use Date::Parse; -use Time::Local; -use Getopt::Std; -use Text::Template; -use Net::SMTP; -use Mail::Header; -use Mail::Internet; -use FS::Conf; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::cust_pay; -use FS::cust_pay_batch; - - -&untaint_argv; #what it sounds like (eww) -use vars qw($opt_v $opt_p $opt_m $opt_e $opt_t $opt_s $opt_f $report_lines $report_template @buf $header); -getopts("vpmef:s:"); #switches - -#we're at now now (and later). -my($_finishdate)= $opt_f ? str2time($main::opt_f) : $^T; -my($_startdate)= $opt_s ? str2time($main::opt_s) : $^T; - -# Get the current month -my ($ssec,$smin,$shour,$smday,$smon,$syear) = - (localtime($_startdate) )[0,1,2,3,4,5]; -$smon++; -$syear += 1900; - -# Get the current month -my ($fsec,$fmin,$fhour,$fmday,$fmon,$fyear) = - (localtime($_finishdate) )[0,1,2,3,4,5]; -$fmon++; -$fyear += 1900; - -# Login to the database -my $user = shift or die &usage; -adminsuidsetup $user; - -# Get the needed configuration files -my $conf = new FS::Conf; -my $lpr = $conf->config('lpr'); -my $email = $conf->config('email'); -my $smtpmachine = $conf->config('smtpmachine'); -my $mail_sender = $conf->exists('invoice_from') ? $conf->config('invoice_from') : - 'postmaster'; -my @report_template = $conf->config('report_template') - or die "cannot load config file report_template"; -$report_lines = 0; -foreach ( grep /report_lines\(\d+\)/, @report_template ) { #kludgy :/ - /report_lines\((\d+)\)/; - $report_lines += $1; -} -die "no report_lines() functions in template?" unless $report_lines; -$report_template = new Text::Template ( - TYPE => 'ARRAY', - SOURCE => [ map "$_\n", @report_template ], -) or die "can't create new Text::Template object: $Text::Template::ERROR"; - - -my(@cust_pays)=qsearch('cust_pay',{}); -if (scalar(@cust_pays) == 0) -{ - exit 1; -} - -# Open print and email pipes -# $lpr and opt_p for printing -# $email and opt_m for email - -if ($lpr && $main::opt_p) -{ - open(LPR, "|$lpr"); -} - -if ($email && $main::opt_m) -{ - $ENV{MAILADDRESS} = $mail_sender; - $header = new Mail::Header ( [ - "From: Account Processor", - "To: $email", - "Sender: $mail_sender", - "Reply-To: $mail_sender", - "Subject: Credit Card Receipts", - ] ); -} - -my $uninvoiced = 0; -my $total = 0; -my $taxed = 0; -my $untaxed = 0; -my $total_tax = 0; - -# Now I can start looping -foreach my $cust_pay (@cust_pays) -{ - my $_date = $cust_pay->getfield('_date'); - my $invnum = $cust_pay->getfield('invnum'); - my $paid = $cust_pay->getfield('paid'); - my $payby = $cust_pay->getfield('payby'); - - - if ($_date >= $_startdate && $_date <= $_finishdate && $payby =~ 'CARD') { - $total += $paid; - - $uninvoiced += $cust_pay->unapplied; - my @cust_bill_pays = $cust_pay->cust_bill_pay; - foreach my $cust_bill_pay (@cust_bill_pays) { - my $invoice_amt =0; - my $invoice_tax =0; - my(@cust_bill_pkgs)= $cust_bill_pay->cust_bill->cust_bill_pkg; - foreach my $cust_bill_pkg (@cust_bill_pkgs) { - - my $recur = $cust_bill_pkg->getfield('recur'); - my $setup = $cust_bill_pkg->getfield('setup'); - my $pkgnum = $cust_bill_pkg->getfield('pkgnum'); - - if ($pkgnum == 0) { - $invoice_tax += $recur; - $invoice_tax += $setup; - } else { - $invoice_amt += $recur; - $invoice_amt += $setup; - } - - } - - if ($invoice_tax > 0) { - if ($invoice_amt != $paid) { - # attempt to prorate partially paid invoices - $total_tax += $paid / ($invoice_amt + $invoice_tax) * $invoice_tax; - $taxed += $paid / ($invoice_amt + $invoice_tax) * $invoice_amt; - } else { - $total_tax += $invoice_tax; - $taxed += $invoice_amt; - } - } else { - $untaxed += $paid; - } - - } - - } - -} - -push @buf, sprintf(qq{\n%25s%14.2f\n}, "Uninvoiced", $uninvoiced); -push @buf, sprintf(qq{%25s%14.2f\n}, "Untaxed", $untaxed); -push @buf, sprintf(qq{%25s%14.2f\n}, "Taxed", $taxed); -push @buf, sprintf(qq{%25s%14.2f\n}, "Tax", $total_tax); -push @buf, sprintf(qq{\n%39s\n%39.2f\n}, "=========", $total); - -sub FS::cc_receipts_report::_template::report_lines { - my $lines = shift; - map { - scalar(@buf) ? shift @buf : '' ; - } - ( 1 .. $lines ); -} - -$FS::cc_receipts_report::_template::title = qq~CREDIT CARD RECEIPTS for period $smon/$smday/$syear through $fmon/$fmday/$fyear~; -$FS::cc_receipts_report::_template::title = $opt_t if $opt_t; -$FS::cc_receipts_report::_template::page = 1; -$FS::cc_receipts_report::_template::date = $^T; -$FS::cc_receipts_report::_template::date = $^T; -$FS::cc_receipts_report::_template::fdate = $_finishdate; -$FS::cc_receipts_report::_template::fdate = $_finishdate; -$FS::cc_receipts_report::_template::sdate = $_startdate; -$FS::cc_receipts_report::_template::sdate = $_startdate; -$FS::cc_receipts_report::_template::total_pages = - int( scalar(@buf) / $report_lines); -$FS::cc_receipts_report::_template::total_pages++ if scalar(@buf) % $report_lines; - -my @report; -while (@buf) { - push @report, split("\n", - $report_template->fill_in( PACKAGE => 'FS::cc_receipts_report::_template' ) - ); - $FS::cc_receipts_report::_template::page++; -} - -if ($opt_v) { - print map "$_\n", @report; -} -if($lpr && $opt_p) -{ - print LPR map "$_\n", @report; - print LPR "\f" if $opt_e; - close LPR || die "Could not close printer: $lpr\n"; -} -if($email && $opt_m) -{ - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ (@report) ], - ); - $!=0; - $message->smtpsend( Host => "$smtpmachine" ) - or die "can't send report to $email via $smtpmachine: $!"; -} - - -# subroutines -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - $ARGV[$_] =~ /^([\w\-\/ :]*)$/ || die "Illegal argument \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-cc-receipts-report [-v] [-p] [-e] user\n"; -} - -=head1 NAME - -freeside-cc-receipts-report - Prints or emails total credit card receipts in a given period. - -=head1 SYNOPSIS - - freeside-cc-receipts-report [-v] [-p] [-m] [-e] [-t "title"] [-s date] [-f date] user - -=head1 DESCRIPTION - -Prints or emails sales taxes invoiced in a given period. - --v: Verbose - Prints records to STDOUT. - --p: Print to printer lpr as found in the conf directory. - --m: Email output to user found in the Conf email file. - --e: Print a final form feed to the printer. - --t: supply a title for the top of each page. - --s: starting date for inclusion - --f: final date for inclusion - -user: From the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -$Id: freeside-cc-receipts-report,v 1.4 2002-03-07 19:50:23 jeff Exp $ - -=head1 BUGS - -Yes..... Use at your own risk. No guarantees or warrantees of any -kind apply to this program. Parts of this program are hacked from -other GNU licensed software created mainly by Ivan Kohler. - -This is released under the GNU Public License. See www.gnu.org -for more information regarding this license. - -=head1 SEE ALSO - -L, config.html from the base documentation - -=head1 AUTHOR - -Jeff Finucane - -based on print-batch by Joel Griffiths - -=cut - diff --git a/FS/bin/freeside-credit-report b/FS/bin/freeside-credit-report deleted file mode 100755 index 7699daf4d..000000000 --- a/FS/bin/freeside-credit-report +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/perl -Tw - - -use strict; -use Date::Parse; -use Time::Local; -use Getopt::Std; -use Text::Template; -use Net::SMTP; -use Mail::Header; -use Mail::Internet; -use FS::Conf; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_credit; - - -&untaint_argv; #what it sounds like (eww) -use vars qw($opt_v $opt_p $opt_m $opt_e $opt_t $opt_s $opt_f $report_lines $report_template @buf $header); -getopts("vpmef:s:"); #switches - -#we're at now now (and later). -my($_finishdate)= $opt_f ? str2time($main::opt_f) : $^T; -my($_startdate)= $opt_s ? str2time($main::opt_s) : $^T; - -# Get the current month -my ($ssec,$smin,$shour,$smday,$smon,$syear) = - (localtime($_startdate) )[0,1,2,3,4,5]; -$smon++; -$syear += 1900; - -# Get the current month -my ($fsec,$fmin,$fhour,$fmday,$fmon,$fyear) = - (localtime($_finishdate) )[0,1,2,3,4,5]; -$fmon++; -$fyear += 1900; - -# Login to the database -my $user = shift or die &usage; -adminsuidsetup $user; - -# Get the needed configuration files -my $conf = new FS::Conf; -my $lpr = $conf->config('lpr'); -my $email = $conf->config('email'); -my $smtpmachine = $conf->config('smtpmachine'); -my $mail_sender = $conf->exists('invoice_from') ? $conf->config('invoice_from') : - 'postmaster'; -my @report_template = $conf->config('report_template') - or die "cannot load config file report_template"; -$report_lines = 0; -foreach ( grep /report_lines\(\d+\)/, @report_template ) { #kludgy :/ - /report_lines\((\d+)\)/; - $report_lines += $1; -} -die "no report_lines() functions in template?" unless $report_lines; -$report_template = new Text::Template ( - TYPE => 'ARRAY', - SOURCE => [ map "$_\n", @report_template ], -) or die "can't create new Text::Template object: $Text::Template::ERROR"; - - -my(@cust_credits)=qsearch('cust_credit',{}); -if (scalar(@cust_credits) == 0) -{ - exit 1; -} - -# Open print and email pipes -# $lpr and opt_p for printing -# $email and opt_m for email - -if ($lpr && $main::opt_p) -{ - open(LPR, "|$lpr"); -} - -if ($email && $main::opt_m) -{ - $ENV{MAILADDRESS} = $mail_sender; - $header = new Mail::Header ( [ - "From: Account Processor", - "To: $email", - "Sender: $mail_sender", - "Reply-To: $mail_sender", - "Subject: In House Credits", - ] ); -} - -my $uninvoiced = 0; -my $total = 0; -my $taxed = 0; -my $untaxed = 0; -my $total_tax = 0; - -# Now I can start looping -foreach my $cust_credit (@cust_credits) -{ - my $_date = $cust_credit->getfield('_date'); - my $amount = $cust_credit->getfield('amount'); - - if ($_date >= $_startdate && $_date <= $_finishdate) { - $total += $amount; - } -} - -push @buf, sprintf(qq{\n%25s%14.2f\n}, "Credits Offered", $total); -push @buf, sprintf(qq{\n%39s\n%39.2f\n}, "=========", $total); - -sub FS::credit_report::_template::report_lines { - my $lines = shift; - map { - scalar(@buf) ? shift @buf : '' ; - } - ( 1 .. $lines ); -} - -$FS::credit_report::_template::title = qq~IN HOUSE CREDITS for $smon/$smday/$syear through $fmon/$fmday/$fyear~; -$FS::credit_report::_template::title = $opt_t if $opt_t; -$FS::credit_report::_template::page = 1; -$FS::credit_report::_template::date = $^T; -$FS::credit_report::_template::date = $^T; -$FS::credit_report::_template::fdate = $_finishdate; -$FS::credit_report::_template::fdate = $_finishdate; -$FS::credit_report::_template::sdate = $_startdate; -$FS::credit_report::_template::sdate = $_startdate; -$FS::credit_report::_template::total_pages = - int( scalar(@buf) / $report_lines); -$FS::credit_report::_template::total_pages++ if scalar(@buf) % $report_lines; - -my @report; -while (@buf) { - push @report, split("\n", - $report_template->fill_in( PACKAGE => 'FS::credit_report::_template' ) - ); - $FS::credit_report::_template::page++; -} - -if ($opt_v) { - print map "$_\n", @report; -} -if($lpr && $opt_p) -{ - print LPR map "$_\n", @report; - print LPR "\f" if $opt_e; - close LPR || die "Could not close printer: $lpr\n"; -} -if($email && $opt_m) -{ - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ (@report) ], - ); - $!=0; - $message->smtpsend( Host => "$smtpmachine" ) - or die "can't send report to $email via $smtpmachine: $!"; -} - - -# subroutines -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - $ARGV[$_] =~ /^([\w\-\/ :]*)$/ || die "Illegal argument \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-credit-report [-v] [-p] [-e] user\n"; -} - -=head1 NAME - -freeside-credit-report - Prints or emails total credit memos in a given period. - -=head1 SYNOPSIS - - freeside-credit-report [-v] [-p] [-m] [-e] [-t "title"] [-s date] [-f date] user - -=head1 DESCRIPTION - -Prints or emails total credit memos in a given period. - --v: Verbose - Prints records to STDOUT. - --p: Print to printer lpr as found in the conf directory. - --m: Email output to user found in the Conf email file. - --e: Print a final form feed to the printer. - --t: supply a title for the top of each page. - --s: starting date for inclusion - --f: final date for inclusion - -user: From the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -$Id: freeside-credit-report,v 1.4 2002-03-07 19:50:24 jeff Exp $ - -=head1 BUGS - -Yes..... Use at your own risk. No guarantees or warrantees of any -kind apply to this program. Parts of this program are hacked from -other GNU licensed software created mainly by Ivan Kohler. - -This is released under the GNU Public License. See www.gnu.org -for more information regarding this license. - -=head1 SEE ALSO - -L, config.html from the base documentation - -=head1 AUTHOR - -Jeff Finucane - -based on print-batch by Joel Griffiths - -=cut - diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily deleted file mode 100755 index 142b0c73a..000000000 --- a/FS/bin/freeside-daily +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use Fcntl qw(:flock); -use Date::Parse; -use Getopt::Std; -use FS::UID qw(adminsuidsetup driver_name dbh); -use FS::Record qw(qsearch qsearchs); -use FS::cust_main; - -&untaint_argv; #what it sounds like (eww) -use vars qw($opt_d $opt_v); -getopts("d:v"); -my $user = shift or die &usage; - -adminsuidsetup $user; - -$FS::cust_main::Debug = 1 if $opt_v; - -my @cust_main = @ARGV - ? map { qsearchs('cust_main', { custnum => $_ } ) } @ARGV - : qsearch('cust_main', {} ) -; - -#we're at now now (and later). -my($time)= $opt_d ? str2time($opt_d) : $^T; - -my($cust_main,%saw); -foreach $cust_main ( @cust_main ) { - - my $error; - - $error = $cust_main->bill( 'time' => $time ); - warn "Error billing, custnum ". $cust_main->custnum. ": $error" if $error; - - $cust_main->apply_payments; - $cust_main->apply_credits; - - $error=$cust_main->collect( 'invoice_time' => $time ); - warn "Error collecting, custnum". $cust_main->custnum. ": $error" if $error; - -} - -if ( driver_name eq 'Pg' ) { - foreach my $statement ( 'vacuum', 'vacuum analyze' ) { - my $sth = dbh->prepare($statement) or die dbh->errstr; - $sth->execute or die $sth->errstr; - } -} - -# subroutines - -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - # Date::Parse - $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-daily [ -d 'date' ] user [ custnum custnum ... ]\n"; -} - -=head1 NAME - -freeside-daily - Run daily billing and invoice collection events. - -=head1 SYNOPSIS - - freeside-daily [ -d 'date' ] user [ custnum custnum ... ] - -=head1 DESCRIPTION - -Bills customers and runs invoice collection events. Should be run from -crontab daily. - -This script replaces freeside-bill from 1.3.1. - -Bills customers. Searches for customers who are due for billing and calls -the bill and collect methods of a cust_main object. See L. - - -d: Pretend it's 'date'. Date is in any format Date::Parse is happy with, - but be careful. - -user: From the mapsecrets file - see config.html from the base documentation - -custnum: if one or more customer numbers are specified, only bills those -customers. Otherwise, bills all customers. - -=head1 BUGS - -=head1 SEE ALSO - -L, config.html from the base documentation - -=cut - diff --git a/FS/bin/freeside-email b/FS/bin/freeside-email deleted file mode 100755 index c7ff41114..000000000 --- a/FS/bin/freeside-email +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Conf; -use FS::Record qw(qsearch); -use FS::svc_acct; - -&untaint_argv; #what it sounds like (eww) -my $user = shift or die &usage; - -adminsuidsetup $user; - -my $conf = new FS::Conf; -my $domain = $conf->config('domain'); - -my @svc_acct = qsearch('svc_acct', {}); -my @usernames = map $_->username, @svc_acct; -my @emails = map "$_\@$domain", @usernames; - -print join("\n", @emails), "\n"; - -# subroutines - -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - # Date::Parse - $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-email user\n"; -} - -=head1 NAME - -freeside-email - Prints email addresses of all users on STDOUT - -=head1 SYNOPSIS - - freeside-email user - -=head1 DESCRIPTION - -Prints the email addresses of all customers on STDOUT, separated by newlines. - -user: From the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -$Id: freeside-email,v 1.1 2001-05-15 07:52:34 ivan Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -=cut - diff --git a/FS/bin/freeside-expiration-alerter b/FS/bin/freeside-expiration-alerter deleted file mode 100755 index ee3c1fb92..000000000 --- a/FS/bin/freeside-expiration-alerter +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use Date::Format; -use Time::Local; -use Text::Template; -use Getopt::Std; -use Net::SMTP; -use Mail::Header; -use Mail::Internet; -use FS::Conf; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_main; - -use vars qw($smtpmachine @body); - -#hush, perl! -$FS::alerter::_template::first = ""; -$FS::alerter::_template::last = ""; -$FS::alerter::_template::company = ""; -$FS::alerter::_template::payby = ""; -$FS::alerter::_template::expdate = ""; - -# Set the mail program and other variables -my $mail_sender = "billing\@mydomain.tld"; # or invoice_from if available -my $failure_recipient = "postmaster"; # or invoice_from if available -my $warning_time = 30 * 24 * 60 * 60; -my $urgent_time = 15 * 24 * 60 * 60; -my $panic_time = 5 * 24 * 60 * 60; -my $window_time = 24 * 60 * 60; - -&untaint_argv; #what it sounds like (eww) - -#we're at now now (and later). -my($_date)= $^T; - -# Get the current month -my ($sec,$min,$hour,$mday,$mon,$year) = - (localtime($_date) )[0,1,2,3,4,5]; -$mon++; - -# Login to the database -my $user = shift or die &usage; -adminsuidsetup $user; - -# Get the needed configuration files -my $conf = new FS::Conf; -$smtpmachine = $conf->config('smtpmachine'); -$mail_sender = $conf->config('invoice_from') - if $conf->exists('invoice_from'); -$failure_recipient = $conf->config('invoice_from') - if $conf->exists('invoice_from'); - - -my(@customers)=qsearch('cust_main',{}); -if (scalar(@customers) == 0) -{ - exit 1; -} - -# Prepare for sending email - -$ENV{MAILADDRESS} = $mail_sender; -my $header = new Mail::Header ( [ - "From: Account Processor", - "To: $failure_recipient", - "Sender: $mail_sender", - "Reply-To: $mail_sender", - "Subject: Unnotified Billing Arrangement Expirations", -] ); - -my @alerter_template = $conf->config('alerter_template') - or die "cannot load config file alerter_template"; - -my $alerter = new Text::Template (TYPE => 'ARRAY', SOURCE => [ map "$_\n", @alerter_template ]) - or die "can't create new Text::Template object: Text::Template::ERROR"; -$alerter->compile() or die "can't compile template: Text::Template::ERROR"; - -# Now I can start looping -foreach my $customer (@customers) -{ - my $custnum = $customer->getfield('custnum'); - my $first = $customer->getfield('first'); - my $last = $customer->getfield('last'); - my $company = $customer->getfield('company'); - my $payby = $customer->getfield('payby'); - my $payinfo = $customer->getfield('payinfo'); - my $paydate = $customer->getfield('paydate'); - my $daytime = $customer->getfield('daytime'); - my $night = $customer->getfield('night'); - - my ($payyear,$paymonth,$payday) = split (/-/,$paydate); - - my $expire_time = timelocal(0,0,0,$payday,--$paymonth,$payyear); - - #credit cards expire at the end of the month/year of their exp date - if ($payby eq 'CARD') { - ($paymonth < 11) ? $paymonth++ : ($paymonth=0, $payyear++); - $expire_time = timelocal(0,0,0,$payday,$paymonth,$payyear); - $expire_time--; - } - - if (($expire_time < $_date + $warning_time && - $expire_time > $_date + $warning_time - $window_time) || - ($expire_time < $_date + $urgent_time && - $expire_time > $_date + $urgent_time - $window_time) || - ($expire_time < $_date + $panic_time && - $expire_time > $_date + $panic_time - $window_time)) { - - - - my @packages = $customer->ncancelled_pkgs; - if (scalar(@packages) != 0) { - my @invoicing_list = $customer->invoicing_list; - if ( grep { $_ ne 'POST' } @invoicing_list ) { - my $header = new Mail::Header ( [ - "From: $mail_sender", - "To: ". join(', ', grep { $_ ne 'POST' } @invoicing_list ), - "Sender: $mail_sender", - "Reply-To: $mail_sender", - "Date: ". time2str("%a, %d %b %Y %X %z", time), - "Subject: Billing Arrangement Expiration", - ] ); - $FS::alerter::_template::first = $first; - $FS::alerter::_template::last = $last; - $FS::alerter::_template::company = $company; - if ($payby eq 'CARD') { - $FS::alerter::_template::payby = "credit card (" . - substr($payinfo, 0, 2) . "xxxxxxxxxx" . - substr($payinfo, -4) . ")"; - }elsif ($payby eq 'COMP') { - $FS::alerter::_template::payby = "complimentary account"; - }else{ - $FS::alerter::_template::payby = "current method"; - } - $FS::alerter::_template::expdate = $expire_time; - - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ $alerter->fill_in( PACKAGE => 'FS::alerter::_template' ) ], - ); - $!=0; - $message->smtpsend( Host => $smtpmachine ) - or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or die "Can't send expiration email: $!"; - - } elsif ( ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list ) { - push @body, sprintf(qq{%5d %-32.32s %4s %10s %12s %12s}, - $custnum, - $first . " " . $last . " " . $company, - $payby, - $paydate, - $daytime, - $night); - } - } - } -} - -# Now I need to send EMAIL -if (scalar(@body)) { - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ (@body) ], - ); - $!=0; - $message->smtpsend( Host => $smtpmachine ) - or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or die "can't send alerter failure email to $failure_recipient". - " via server $smtpmachine with SMTP: $!"; -} - -# subroutines -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - $ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal argument \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-expiration-alerter user\n"; -} - -=head1 NAME - -freeside-expiration-alerter - Emails notifications of credit card expirations. - -=head1 SYNOPSIS - - freeside-expiration-alerter user - -=head1 DESCRIPTION - -Emails customers notice that their credit card or other billing arrangement -is about to expire. Usually run as a cron job. - -user: From the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -$Id: freeside-expiration-alerter,v 1.3 2002-04-16 09:38:19 ivan Exp $ - -=head1 BUGS - -Yes..... Use at your own risk. No guarantees or warrantees of any -kind apply to this program. Parts of this program are hacked from -other GNU licensed software created mainly by Ivan Kohler. - -This is released under the GNU Public License. See www.gnu.org -for more information regarding this license. - -=head1 SEE ALSO - -L, config.html from the base documentation - -=head1 AUTHOR - -Jeff Finucane - -=cut - - diff --git a/FS/bin/freeside-overdue b/FS/bin/freeside-overdue deleted file mode 100755 index 116245f9c..000000000 --- a/FS/bin/freeside-overdue +++ /dev/null @@ -1,196 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use vars qw( $days_to_pay $cust_main $cust_pkg - $cust_svc $svc_acct ); -use Getopt::Std; -use FS::cust_main; -use FS::cust_pkg; -use FS::cust_svc; -use FS::svc_acct; -use FS::Record qw(qsearch qsearchs); -use FS::UID qw(adminsuidsetup); - -&untaint_argv; -my %opt; -getopts('ed:qpl:scbyoi', \%opt); -my $user = shift or die &usage; - -adminsuidsetup $user; - -my $now = time; #eventually take a time option like freeside-bill -my ($sec,$min,$hour,$mday,$mon,$year) = - (localtime($now) )[0,1,2,3,4,5]; -$mon++; -$year += 1900; - -foreach $cust_main ( qsearch('cust_main',{} ) ) { - - my ( $eyear, $emon, $eday ) = ( 2037, 12, 31 ); - if ( $cust_main->paydate =~ /^(\d{4})\-(\d{1,2})\-(\d{1,2})$/ - && $cust_main->payby eq 'BILL') { - ( $eyear, $emon, $eday ) = ( $1, $2, $3 ); - } - - if ( ( $opt{d} - && $cust_main->balance_date(time - $opt{d} * 86400) > 0 - && qsearchs( 'cust_pkg', { 'custnum' => $cust_main->custnum, - 'susp' => "" } ) ) - || ( $opt{e} - && $cust_main->payby eq 'BILL' - && ( $eyear < $year - || ( $eyear == $year && $emon < $mon ) ) ) - ) { - - unless ( $opt{q} ) { - print $cust_main->custnum, "\t", - $cust_main->last, "\t", $cust_main->first, "\t", - $cust_main->balance_date(time-$opt{d} * 86400); - } - - if ( $opt{p} && ! grep { $_ eq 'POST' } $cust_main->invoicing_list ) { - print "\n\tAdding postal invoicing" unless $opt{q}; - my @invoicing_list = $cust_main->invoicing_list; - push @invoicing_list, 'POST'; - $cust_main->invoicing_list(\@invoicing_list); - } - - if ( $opt{l} ) { - print "\n\tCharging late fee of \$$opt{l}" unless $opt{q}; - my $error = $cust_main->charge($opt{l}, 'Late fee'); - # comment or plandata with info so we don't redo the same late fee every - # day - } - - foreach $cust_pkg ( qsearch( 'cust_pkg', - { 'custnum' => $cust_main->custnum } ) ) { - - if ($opt{s}) { - print "\n\tSuspending pkgnum " . $cust_pkg->pkgnum unless $opt{q}; - $cust_pkg->suspend; - } - - if ($opt{c}) { - print "\n\tCancelling pkgnum " . $cust_pkg->pkgnum unless $opt{q}; - $cust_pkg->cancel; - } - - } - - if ( $opt{b} ) { - print "\n\tBilling" unless $opt{q}; - my $error = $cust_main->bill('time'=>$now); - warn "Error billing, customer #" . $cust_main->custnum . - ":" . $error if $error; - } - - if ( $opt{y} ) { - print "\n\tApplying outstanding payments and credits" unless $opt{q}; - $cust_main->apply_payments; - $cust_main->apply_credits; - } - - if ( $opt{o} ) { - print "\n\tCollecting" unless $opt{q}; - my $error = $cust_main->collect( - 'invoice_time' => $now, - 'batch_card' => $opt{i} ? 'no' : 'yes', - 'force_print' => 'yes', - ); - warn "Error collecting from customer #" . $cust_main->custnum. ":$error" - if $error; - } - - print "\n" unless $opt{q}; - - } - -} - -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { - $ARGV[$_] =~ /^([\w\-\/\.]*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-overdue [ -e ] [ -d days ] [ -q ] [ -p ] [ -l amount ] [ -s ] [ -c ] [ -b ] [ -y ] [ -o [ -i ] ] user\n"; -} - - -=head1 NAME - -freeside-overdue - Perform actions on overdue and/or expired accounts. - -=head1 SYNOPSIS - - freeside-overdue [ -e ] [ -d days ] [ -q ] [ -p ] [ -l amount ] [ -s ] [ -c ] [ -b ] [ -y ] [ -o [ -i ] ] user - -=head1 DESCRIPTION - -This script is deprecated in 1.4.0. You should use freeside-daily and invoice -events instead. - -Performs actions on overdue and/or expired accounts. - -Selection options (at least one selection option is required): - - -d: Customers with a balance due on invoices older than the supplied number - of days. Requires an integer argument. - - -e: Customers with a billing expiration date in the past. - -Action options: - - -q: Be quiet (by default, selected accounts are printed). - - -p: Add postal invoicing to the relevant customers. - - -l: Add a charge of the given amount to the relevant customers. - - -s: Suspend accounts. - - -c: Cancel accounts. - - -b: Bill customers (create invoices) - - -y: Apply unapplied payments and credits - - -o: Collect from customers (charge cards, print invoices) - - -i: real-time billing (as opposed to batch billing). only relevant - for credit cards. - - user: From the mapsecrets file - see config.html from the base documentation - -=head1 CRONTAB - -Example crontab entries: - -# suspend expired accounts -20 4 * * * freeside-overdue -e -s user - -# quietly add postal invoicing to customers over 30 days past due -20 4 * * * freeside-overdue -d 30 -p -q user - -# suspend accounts and charge a $10.23 fee for customers over 60 days past due -20 4 * * * freeside-overdue -d 60 -s -l 10.23 user - -# cancel accounts over 90 days past due -20 4 * * * freeside-overdue -d 90 -c user - -=head1 ORIGINAL AUTHORS - -Original disable-overdue version by mw/kwh: Mark W.? and Kristian Hoffmann ? - -Ivan seems to be turning it into the "do-everything" CLI. - -=head1 BUGS - -Hell now that this is the do-everything CLI it should have --longoptions - -=cut - -1; - diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued deleted file mode 100644 index 83074b9e4..000000000 --- a/FS/bin/freeside-queued +++ /dev/null @@ -1,254 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use vars qw( $log_file $sigterm $sigint $kids $max_kids ); -use subs qw( _die _logmsg ); -use Fcntl qw(:flock); -use POSIX qw(setsid); -use Date::Format; -use IO::File; -use FS::UID qw(adminsuidsetup forksuidsetup driver_name dbh); -use FS::Record qw(qsearch qsearchs); -use FS::queue; -use FS::queue_depend; - -# no autoloading just yet -use FS::cust_main; -use FS::svc_acct; -use Net::SSH 0.06; -use FS::part_export; - -$max_kids = '10'; #guess it should be a config file... -$kids = 0; - -my $user = shift or die &usage; - -#my $pid_file = "/var/run/freeside-queued.$user.pid"; -my $pid_file = "/var/run/freeside-queued.pid"; - -&daemonize1; - -sub REAPER { my $pid = wait; $SIG{CHLD} = \&REAPER; $kids--; } -$SIG{CHLD} = \&REAPER; - -$sigterm = 0; -$sigint = 0; -$SIG{INT} = sub { warn "SIGINT received; shutting down\n"; $sigint++; }; -$SIG{TERM} = sub { warn "SIGTERM received; shutting down\n"; $sigterm++; }; - -my $freeside_gid = scalar(getgrnam('freeside')) - or die "can't setgid to freeside group\n"; -$) = $freeside_gid; -$( = $freeside_gid; -#if freebsd can't setuid(), presumably it can't setgid() either. grr fleabsd -($(,$)) = ($),$(); -$) = $freeside_gid; - -$> = $FS::UID::freeside_uid; -$< = $FS::UID::freeside_uid; -#freebsd is sofa king broken, won't setuid() -($<,$>) = ($>,$<); -$> = $FS::UID::freeside_uid; - -$ENV{HOME} = (getpwuid($>))[7]; #for ssh -adminsuidsetup $user; - -$log_file = "/usr/local/etc/freeside/queuelog.". $FS::UID::datasrc; - -&daemonize2; - -$SIG{__DIE__} = \&_die; -$SIG{__WARN__} = \&_logmsg; - -warn "freeside-queued starting\n"; - -my $warnkids=0; -while (1) { - - #prevent runaway forking - if ( $kids >= $max_kids ) { - warn "WARNING: maximum $kids children reached\n" unless $warnkids++; - sleep 1; #waiting for signals is cheap - next; - } - $warnkids=0; - - my $nodepend = driver_name eq 'mysql' - ? '' - : 'AND 0 = ( SELECT COUNT(*) FROM queue_depend'. - ' WHERE queue_depend.jobnum = queue.jobnum ) '; - - #my($job, $ljob); - #{ - # my $oldAutoCommit = $FS::UID::AutoCommit; - # local $FS::UID::AutoCommit = 0; - $FS::UID::AutoCommit = 0; - my $dbh = dbh; - - my $job = qsearchs( - 'queue', - { 'status' => 'new' }, - '', - driver_name eq 'mysql' - ? "$nodepend ORDER BY jobnum LIMIT 1 FOR UPDATE" - : "$nodepend ORDER BY jobnum FOR UPDATE LIMIT 1" - ) or do { - $dbh->commit or die $dbh->errstr; #if $oldAutoCommit; - sleep 5; #connecting to db is expensive - next; - }; - - if ( driver_name eq 'mysql' - && qsearch('queue_depend', { 'jobnum' => $job->jobnum } ) ) { - $dbh->commit or die $dbh->errstr; #if $oldAutoCommit; - sleep 5; #would be better if mysql could do everything in query above - next; - } - - my %hash = $job->hash; - $hash{'status'} = 'locked'; - my $ljob = new FS::queue ( \%hash ); - my $error = $ljob->replace($job); - die $error if $error; - - $dbh->commit or die $dbh->errstr; #if $oldAutoCommit; - - $FS::UID::AutoCommit = 1; - #} - - my @args = $ljob->args; - - defined( my $pid = fork ) or do { - warn "WARNING: can't fork: $!\n"; - my %hash = $job->hash; - $hash{'status'} = 'failed'; - $hash{'statustext'} = "[freeside-queued] can't fork: $!"; - my $ljob = new FS::queue ( \%hash ); - my $error = $ljob->replace($job); - die $error if $error; - next; #don't increment the kid counter - }; - - if ( $pid ) { - $kids++; - } else { #kid time - - #get new db handle - $FS::UID::dbh->{InactiveDestroy} = 1; - - forksuidsetup($user); - - #auto-use export classes... - if ( $ljob->job =~ /(FS::part_export::\w+)::/ ) { - my $class = $1; - eval "use $class;"; - if ( $@ ) { - warn "job use $class failed"; - my %hash = $ljob->hash; - $hash{'status'} = 'failed'; - $hash{'statustext'} = $@; - my $fjob = new FS::queue( \%hash ); - my $error = $fjob->replace($ljob); - die $error if $error; - exit; #end-of-kid - }; - } - - my $eval = "&". $ljob->job. '(@args);'; - warn "running $eval"; - eval $eval; #throw away return value? suppose so - if ( $@ ) { - warn "job $eval failed"; - my %hash = $ljob->hash; - $hash{'status'} = 'failed'; - $hash{'statustext'} = $@; - my $fjob = new FS::queue( \%hash ); - my $error = $fjob->replace($ljob); - die $error if $error; - } else { - $ljob->delete; - } - - exit; - #end-of-kid - } - -} continue { - if ( $sigterm ) { - warn "received TERM signal; exiting\n"; - exit; - } - if ( $sigint ) { - warn "received INT signal; exiting\n"; - exit; - } -} - -sub usage { - die "Usage:\n\n freeside-queued user\n"; -} - -sub _die { - my $msg = shift; - unlink $pid_file if -e $pid_file; - _logmsg($msg); -} - -sub _logmsg { - chomp( my $msg = shift ); - my $log = new IO::File ">>$log_file"; - flock($log, LOCK_EX); - seek($log, 0, 2); - print $log "[". time2str("%a %b %e %T %Y",time). "] [$$] $msg\n"; - flock($log, LOCK_UN); - close $log; -} - -sub daemonize1 { - - chdir "/" or die "Can't chdir to /: $!"; - open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - if ( $pid ) { - print "freeside-queued started with pid $pid\n"; #logging to $log_file\n"; - exit unless $pid_file; - my $pidfh = new IO::File ">$pid_file" or exit; - print $pidfh "$pid\n"; - exit; - } - #open STDOUT, '>/dev/null' - # or die "Can't write to /dev/null: $!"; - #setsid or die "Can't start a new session: $!"; - #open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; - -} - -sub daemonize2 { - open STDOUT, '>/dev/null' - or die "Can't write to /dev/null: $!"; - setsid or die "Can't start a new session: $!"; - open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; -} - -=head1 NAME - -freeside-queued - Job queue daemon - -=head1 SYNOPSIS - - freeside-queued user - -=head1 DESCRIPTION - -Job queue daemon. Should be running at all times. - -user: from the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -=head1 BUGS - -=head1 SEE ALSO - -=cut - diff --git a/FS/bin/freeside-receivables-report b/FS/bin/freeside-receivables-report deleted file mode 100755 index b5a49031e..000000000 --- a/FS/bin/freeside-receivables-report +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use Date::Parse; -use Time::Local; -use Getopt::Std; -use Text::Template; -use Net::SMTP; -use Mail::Header; -use Mail::Internet; -use FS::Conf; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_main; - - -&untaint_argv; #what it sounds like (eww) -use vars qw($opt_v $opt_p $opt_m $opt_e $opt_t $report_lines $report_template @buf $header); -getopts("vpmet:"); #switches - -#we're at now now (and later). -my($_date)= $^T; - -# Get the current month -my ($sec,$min,$hour,$mday,$mon,$year) = - (localtime($_date) )[0,1,2,3,4,5]; -$mon++; -$year += 1900; - -# Login to the database -my $user = shift or die &usage; -adminsuidsetup $user; - -# Get the needed configuration files -my $conf = new FS::Conf; -my $lpr = $conf->config('lpr'); -my $email = $conf->config('email'); -my $smtpmachine = $conf->config('smtpmachine'); -my $mail_sender = $conf->exists('invoice_from') ? $conf->config('invoice_from') : - 'postmaster'; -my @report_template = $conf->config('report_template') - or die "cannot load config file report_template"; -$report_lines = 0; - foreach ( grep /report_lines\(\d+\)/, @report_template ) { #kludgy :/ - /report_lines\((\d+)\)/; - $report_lines += $1; -} -die "no report_lines() functions in template?" unless $report_lines; -$report_template = new Text::Template ( - TYPE => 'ARRAY', - SOURCE => [ map "$_\n", @report_template ], -) or die "can't create new Text::Template object: $Text::Template::ERROR"; - - -my(@customers)=qsearch('cust_main',{}); -if (scalar(@customers) == 0) -{ - exit 1; -} - -# Open print and email pipes -# $lpr and opt_p for printing -# $email and opt_m for email - -if ($lpr && $opt_p) -{ - open(LPR, "|$lpr"); -} - -if ($email && $opt_m) -{ - $ENV{MAILADDRESS} = $mail_sender; - $header = new Mail::Header ( [ - "From: Account Processor", - "To: $email", - "Sender: $mail_sender", - "Reply-To: $mail_sender", - "Subject: Receivables", - ] ); -} - -my $total = 0; - - -# Now I can start looping -foreach my $customer (@customers) -{ - my $custnum = $customer->getfield('custnum'); - my $first = $customer->getfield('first'); - my $last = $customer->getfield('last'); - my $company = $customer->getfield('company'); - my $daytime = $customer->getfield('daytime'); - my $balance = $customer->balance; - - - if ($balance != 0) { - $total += $balance; - push @buf, sprintf(qq{%8d %-32.32s %12s %9.2f}, - $custnum, - $first . " " . $last . " " . $company, - $daytime, - $balance); - - } - -} - -push @buf, ('', sprintf(qq{%61s}, "========="), sprintf(qq{%61.2f}, $total)); - -sub FS::receivables_report::_template::report_lines { - my $lines = shift; - map { - scalar(@buf) ? shift @buf : '' ; - } - ( 1 .. $lines ); -} - -$FS::receivables_report::_template::title = " R E C E I V A B L E S "; -$FS::receivables_report::_template::title = $opt_t if $opt_t; -$FS::receivables_report::_template::page = 1; -$FS::receivables_report::_template::date = $_date; -$FS::receivables_report::_template::date = $_date; -$FS::receivables_report::_template::total_pages = - int( scalar(@buf) / $report_lines); -$FS::receivables_report::_template::total_pages++ if scalar(@buf) % $report_lines; - -my @report; -while (@buf) { - push @report, split("\n", - $report_template->fill_in( PACKAGE => 'FS::receivables_report::_template' ) - ); - $FS::receivables_report::_template::page++; -} - -if ($opt_v) { - print map "$_\n", @report; -} -if($lpr && $opt_p) -{ - print LPR map "$_\n", @report; - print LPR "\f" if $opt_e; - close LPR || die "Could not close printer: $lpr\n"; -} -if($email && $opt_m) -{ - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ (@report) ], - ); - $!=0; - $message->smtpsend( Host => "$smtpmachine" ) - or die "can't send report to $email via $smtpmachine: $!"; -} - - -# subroutines - -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - $ARGV[$_] =~ /^([\w\-\/ ]*)$/ || die "Illegal argument \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-receivables-report [-v] [-p] [-e] user\n"; -} - -=head1 NAME - -freeside-receivables-report - Prints or emails outstanding receivables. - -=head1 SYNOPSIS - - freeside-receivables-report [-v] [-p] [-m] [-e] [-t "title"] user - -=head1 DESCRIPTION - -Prints or emails outstanding receivables - -B<-v>: Verbose - Prints records to STDOUT. - -B<-p>: Print to printer lpr as found in the conf directory. - -B<-m>: Mail output to user found in the Conf email file. - -B<-e>: Print a final form feed to the printer. - -B<-t>: supply a title for the top of each page. - -user: From the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -$Id: freeside-receivables-report,v 1.5 2002-03-07 19:50:24 jeff Exp $ - -=head1 BUGS - -Yes..... Use at your own risk. No guarantees or warrantees of any -kind apply to this program. Parts of this program are hacked from -other GNU licensed software created mainly by Ivan Kohler. - -This is released under the GNU Public License. See www.gnu.org -for more information regarding this license. - -=head1 SEE ALSO - -L, config.html from the base documentation - -=head1 AUTHOR - -Jeff Finucane - -based on print-batch by Joel Griffiths - -=cut - diff --git a/FS/bin/freeside-reexport b/FS/bin/freeside-reexport deleted file mode 100644 index b5c50a422..000000000 --- a/FS/bin/freeside-reexport +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::part_export; -use FS::svc_acct; -use FS::cust_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -my $export_x = shift or die &usage; -my @part_export; -if ( $export_x =~ /^(\d+)$/ ) { - @part_export = qsearchs('part_export', { exportnum=>$1 } ) - or die "exportnum $export_x not found\n"; -} else { - @part_export = qsearch('part_export', { exporttype=>$export_x } ) - or die "no exports of type $export_x found\n"; -} - -my $svc_something = shift or die &usage; -my $svc_x; -if ( $svc_something =~ /^(\d+)$/ ) { - my $cust_svc = qsearchs('cust_svc', { svcnum=>$1 } ) - or die "svcnum $svc_something not found\n"; - $svc_x = $cust_svc->svc_x; -} else { - $svc_x = qsearchs('svc_acct', { username=>$svc_something } ) - or die "username $svc_something not found\n"; -} - -foreach my $part_export ( @part_export ) { - my $error = $part_export->export_insert($svc_x); - die $error if $error; -} - - -sub usage { - die "Usage:\n\n freeside-reexport user exportnum|exporttype svcnum|username\n"; -} - -=head1 NAME - -freeside-reexport - Command line tool to re-trigger export jobs for existing services - -=head1 SYNOPSIS - - freeside-reexport user exportnum|exporttype svcnum|username - -=head1 DESCRIPTION - - Re-queues the export job for the specified exportnum or exporttype(s) and - specified service (selected by svcnum or username). - -=head1 SEE ALSO - -L, L - -=cut - diff --git a/FS/bin/freeside-setinvoice b/FS/bin/freeside-setinvoice deleted file mode 100644 index 708e2fa30..000000000 --- a/FS/bin/freeside-setinvoice +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Conf; -use FS::Record qw(qsearch qsearchs); -use FS::cust_main; -use FS::svc_acct; - -&untaint_argv; #what it sounds like (eww) -my $user = shift or die &usage; - -adminsuidsetup $user; - -foreach my $cust_main ( - grep { ! scalar($_->invoicing_list) } - qsearch( 'cust_main', {} ) -) { - my @dest; - my @cust_pkg = $cust_main->ncancelled_pkgs; - foreach my $cust_pkg ( @cust_pkg ) { - foreach my $cust_svc ( $cust_pkg->cust_svc ) { - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $cust_svc->svcnum } ); - push @dest, $svc_acct->svcnum if $svc_acct; - } - } - push @dest, 'POST' unless @dest; - $cust_main->invoicing_list(\@dest); -} - -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-setinvoice user\n"; -} - - diff --git a/FS/bin/freeside-sqlradius-reset b/FS/bin/freeside-sqlradius-reset deleted file mode 100755 index 9d3a6a700..000000000 --- a/FS/bin/freeside-sqlradius-reset +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch qsearchs); -use FS::part_export; -use FS::svc_acct; -use FS::cust_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -#my $machine = shift or die &usage; - -my @exports = qsearch('part_export', { 'exporttype' => 'sqlradius' } ); - -foreach my $export ( @exports ) { - my $icradius_dbh = DBI->connect( - map { $export->option($_) } qw( datasrc username password ) - ) or die $DBI::errstr; - for my $table (qw( radcheck radreply usergroup )) { - my $sth = $icradius_dbh->prepare("DELETE FROM $table"); - $sth->execute or die "Can't reset $table table: ". $sth->errstr; - } - $icradius_dbh->disconnect; -} - -foreach my $export ( @exports ) { - - #my @svcparts = map { $_->svcpart } $export->export_svc; - - my @svc_acct = - map { qsearchs('svc_acct', { 'svcnum' => $_->svcnum } ) } - map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - $export->export_svc; - - foreach my $svc_acct ( @svc_acct ) { - - #false laziness with FS::svc_acct::insert (like it matters) - my $error = $export->export_insert($svc_acct); - die $error if $error; - - } -} - -sub usage { - #die "Usage:\n\n sqlradius_reset user machine\n"; - die "Usage:\n\n freeside-sqlradius-reset user\n"; -} - -=head1 NAME - -freeside-sqlradius-reset - Command line interface to reset and recreate RADIUS SQL tables - -=head1 SYNOPSIS - - freeside-sqlradius-reset username - -=head1 DESCRIPTION - -Deletes the radcheck, radreply and usergroup tables and repopulates them from -the Freeside database, for all sqlradius exports. - -B is a username added by freeside-adduser. - -=head1 SEE ALSO - -L, L, L - -=cut - - - diff --git a/FS/bin/freeside-tax-report b/FS/bin/freeside-tax-report deleted file mode 100755 index 8d5021358..000000000 --- a/FS/bin/freeside-tax-report +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/perl -Tw - - -use strict; -use Date::Parse; -use Time::Local; -use Getopt::Std; -use Text::Template; -use Net::SMTP; -use Mail::Header; -use Mail::Internet; -use FS::Conf; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_bill; -use FS::cust_bill_pay; -use FS::cust_pay; - - -&untaint_argv; #what it sounds like (eww) -use vars qw($opt_v $opt_p $opt_m $opt_e $opt_t $opt_s $opt_f $report_lines $report_template @buf $header); -getopts("vpmef:s:"); #switches - -#we're at now now (and later). -my($_finishdate)= $opt_f ? str2time($main::opt_f) : $^T; -my($_startdate)= $opt_s ? str2time($main::opt_s) : $^T; - -# Get the current month -my ($ssec,$smin,$shour,$smday,$smon,$syear) = - (localtime($_startdate) )[0,1,2,3,4,5]; -$smon++; -$syear += 1900; - -# Get the current month -my ($fsec,$fmin,$fhour,$fmday,$fmon,$fyear) = - (localtime($_finishdate) )[0,1,2,3,4,5]; -$fmon++; -$fyear += 1900; - -# Login to the database -my $user = shift or die &usage; -adminsuidsetup $user; - -# Get the needed configuration files -my $conf = new FS::Conf; -my $lpr = $conf->config('lpr'); -my $email = $conf->config('email'); -my $smtpmachine = $conf->config('smtpmachine'); -my $mail_sender = $conf->exists('invoice_from') ? $conf->config('invoice_from') : - 'postmaster'; -my @report_template = $conf->config('report_template') - or die "cannot load config file report_template"; -$report_lines = 0; -foreach ( grep /report_lines\(\d+\)/, @report_template ) { #kludgy :/ - /report_lines\((\d+)\)/; - $report_lines += $1; -} -die "no report_lines() functions in template?" unless $report_lines; -$report_template = new Text::Template ( - TYPE => 'ARRAY', - SOURCE => [ map "$_\n", @report_template ], -) or die "can't create new Text::Template object: $Text::Template::ERROR"; - - -my(@cust_bills)=qsearch('cust_bill',{}); -if (scalar(@cust_bills) == 0) -{ - exit 1; -} - -# Open print and email pipes -# $lpr and opt_p for printing -# $email and opt_m for email - -if ($lpr && $main::opt_p) -{ - open(LPR, "|$lpr"); -} - -if ($email && $main::opt_m) -{ - $ENV{MAILADDRESS} = $mail_sender; - $header = new Mail::Header ( [ - "From: Account Processor", - "To: $email", - "Sender: $mail_sender", - "Reply-To: $mail_sender", - "Subject: Sales Taxes Invoiced", - ] ); -} - -my $comped = 0; -my $comped_tax = 0; -my $other = 0; -my $other_tax = 0; -my $total = 0; -my $taxed = 0; -my $untaxed = 0; -my $total_tax = 0; - -# Now I can start looping -foreach my $cust_bill (@cust_bills) -{ - my $_date = $cust_bill->getfield('_date'); - my $invnum = $cust_bill->getfield('invnum'); - my $charged = $cust_bill->getfield('charged'); - - if ($_date >= $_startdate && $_date <= $_finishdate) { - $total += $charged; - - # The following lines were used to produce rather verbose reports - #my ($sec,$min,$hour,$mday,$mon,$year) = - # (localtime($_date) )[0,1,2,3,4,5]; - #$mon++; - #$year -= 100 if $year >= 100; - #$year = "0" . $year if $year < 10; - - my $invoice_amt =0; - my $invoice_tax =0; - my $invoice_comped =0; - my(@cust_bill_pkgs)= $cust_bill->cust_bill_pkg; - foreach my $cust_bill_pkg (@cust_bill_pkgs) { - - my $recur = $cust_bill_pkg->getfield('recur'); - my $setup = $cust_bill_pkg->getfield('setup'); - my $pkgnum = $cust_bill_pkg->getfield('pkgnum'); - - if ($pkgnum == 0) { - # The following line was used to produce rather verbose reports - # push @buf, ('', sprintf(qq{%10s%15s%14.2f}, "$mon/$mday/$year", "Tax $invnum", $recur+$setup)); - $invoice_tax += $recur; - $invoice_tax += $setup; - } else { - # The following line was used to produce rather verbose reports - # push @buf, ('', sprintf(qq{%10s%15s%14.2f}, "$mon/$mday/$year", "Inv $invnum", $recur+$setup)); - $invoice_amt += $recur; - $invoice_amt += $setup; - } - - } - - my(@cust_bill_pays)= $cust_bill->cust_bill_pay; - foreach my $cust_bill_pay (@cust_bill_pays) { - my $payby = $cust_bill_pay->cust_pay->payby; - my $paid = $cust_bill_pay->getfield('amount'); - if ($payby =~ 'COMP') { - $invoice_comped += $paid; - } - } - - if (abs($invoice_comped - ($invoice_amt + $invoice_tax)) < 0.0001){ - $comped += $invoice_amt; - $comped_tax += $invoice_tax; - } elsif ($invoice_comped > 0) { - push @buf, sprintf(qq{\nInvoice %10d has inexpliciable complimentary payments of %14.9f\n}, $invnum, $invoice_comped); - $other += $invoice_amt; - $other_tax += $invoice_tax; - } elsif ($invoice_tax > 0) { - $total_tax += $invoice_tax; - $taxed += $invoice_amt; - } else { - $untaxed += $invoice_amt; - } - - } - -} - -push @buf, ('', sprintf(qq{%25s%14.2f}, "Complimentary", $comped)); -push @buf, sprintf(qq{%25s%14.2f}, "Complimentary Tax", $comped_tax); -push @buf, sprintf(qq{%25s%14.2f}, "Other", $other); -push @buf, sprintf(qq{%25s%14.2f}, "Other Tax", $other_tax); -push @buf, sprintf(qq{%25s%14.2f}, "Untaxed", $untaxed); -push @buf, sprintf(qq{%25s%14.2f}, "Taxed", $taxed); -push @buf, sprintf(qq{%25s%14.2f}, "Tax", $total_tax); -push @buf, ('', sprintf(qq{%39s}, "========="), sprintf(qq{%39.2f}, $total)); - -sub FS::tax_report::_template::report_lines { - my $lines = shift; - map { - scalar(@buf) ? shift @buf : '' ; - } - ( 1 .. $lines ); -} - -$FS::tax_report::_template::title = qq~SALES TAXES INVOICED for $smon/$smday/$syear through $fmon/$fmday/$fyear~; -$FS::tax_report::_template::title = $opt_t if $opt_t; -$FS::tax_report::_template::page = 1; -$FS::tax_report::_template::date = $^T; -$FS::tax_report::_template::date = $^T; -$FS::tax_report::_template::fdate = $_finishdate; -$FS::tax_report::_template::fdate = $_finishdate; -$FS::tax_report::_template::sdate = $_startdate; -$FS::tax_report::_template::sdate = $_startdate; -$FS::tax_report::_template::total_pages = - int( scalar(@buf) / $report_lines); -$FS::tax_report::_template::total_pages++ if scalar(@buf) % $report_lines; - -my @report; -while (@buf) { - push @report, split("\n", - $report_template->fill_in( PACKAGE => 'FS::tax_report::_template' ) - ); - $FS::tax_report::_template::page++; -} - -if ($opt_v) { - print map "$_\n", @report; -} -if($lpr && $opt_p) -{ - print LPR map "$_\n", @report; - print LPR "\f" if $opt_e; - close LPR || die "Could not close printer: $lpr\n"; -} -if($email && $opt_m) -{ - my $message = new Mail::Internet ( - 'Header' => $header, - 'Body' => [ (@report) ], - ); - $!=0; - $message->smtpsend( Host => "$smtpmachine" ) - or die "can't send report to $email via $smtpmachine: $!"; -} - - -# subroutines -sub untaint_argv { - foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV - $ARGV[$_] =~ /^([\w\-\/ :]*)$/ || die "Illegal argument \"$ARGV[$_]\""; - $ARGV[$_]=$1; - } -} - -sub usage { - die "Usage:\n\n freeside-tax-report [-v] [-p] [-e] user\n"; -} - -=head1 NAME - -freeside-tax-report - Prints or emails sales taxes invoiced in a given period. - -=head1 SYNOPSIS - - freeside-tax-report [-v] [-p] [-m] [-e] [-t "title"] [-s date] [-f date] user - -=head1 DESCRIPTION - -Prints or emails sales taxes invoiced in a given period. - --v: Verbose - Prints records to STDOUT. - --p: Print to printer lpr as found in the conf directory. - --m: Email output to user found in the Conf email file. - --e: Print a final form feed to the printer. - --t: supply a title for the top of each page. - --s: starting date for inclusion - --f: final date for inclusion - -user: From the mapsecrets file - see config.html from the base documentation - -=head1 VERSION - -$Id: freeside-tax-report,v 1.4 2002-03-07 19:50:24 jeff Exp $ - -=head1 BUGS - -Yes..... Use at your own risk. No guarantees or warrantees of any -kind apply to this program. Parts of this program are hacked from -other GNU licensed software created mainly by Ivan Kohler. - -This is released under the GNU Public License. See www.gnu.org -for more information regarding this license. - -=head1 SEE ALSO - -L, config.html from the base documentation - -=head1 AUTHOR - -Jeff Finucane - -based on print-batch by Joel Griffiths - -=cut - diff --git a/FS/t/CGI.t b/FS/t/CGI.t deleted file mode 100644 index 1b4e238b6..000000000 --- a/FS/t/CGI.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::CGI; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/ClientAPI.t b/FS/t/ClientAPI.t deleted file mode 100644 index 973d8dada..000000000 --- a/FS/t/ClientAPI.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::ClientAPI; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/Conf.t b/FS/t/Conf.t deleted file mode 100644 index a9f7653b3..000000000 --- a/FS/t/Conf.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::Conf; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/ConfItem.t b/FS/t/ConfItem.t deleted file mode 100644 index c7932d7e3..000000000 --- a/FS/t/ConfItem.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::ConfItem; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/InitHandler.t b/FS/t/InitHandler.t deleted file mode 100644 index 0ce60c833..000000000 --- a/FS/t/InitHandler.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::InitHandler; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/Msgcat.t b/FS/t/Msgcat.t deleted file mode 100644 index 29e71b33c..000000000 --- a/FS/t/Msgcat.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::Msgcat; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/Record.t b/FS/t/Record.t deleted file mode 100644 index 00de1eda3..000000000 --- a/FS/t/Record.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::Record; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/SearchCache.t b/FS/t/SearchCache.t deleted file mode 100644 index 3c26f3528..000000000 --- a/FS/t/SearchCache.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::SearchCache; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/UID.t b/FS/t/UID.t deleted file mode 100644 index 9f7da4e89..000000000 --- a/FS/t/UID.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::UID; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/agent.t b/FS/t/agent.t deleted file mode 100644 index 769cce254..000000000 --- a/FS/t/agent.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::agent; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/agent_type.t b/FS/t/agent_type.t deleted file mode 100644 index 99c66a151..000000000 --- a/FS/t/agent_type.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::agent_type; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_bill.t b/FS/t/cust_bill.t deleted file mode 100644 index b43f08ee2..000000000 --- a/FS/t/cust_bill.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_bill; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_bill_event.t b/FS/t/cust_bill_event.t deleted file mode 100644 index 0e2ca3e24..000000000 --- a/FS/t/cust_bill_event.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_bill_event; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_bill_pay.t b/FS/t/cust_bill_pay.t deleted file mode 100644 index 001eed01e..000000000 --- a/FS/t/cust_bill_pay.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_bill_pay; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_bill_pkg.t b/FS/t/cust_bill_pkg.t deleted file mode 100644 index 0e45bdb0c..000000000 --- a/FS/t/cust_bill_pkg.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_bill_pkg; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_credit.t b/FS/t/cust_credit.t deleted file mode 100644 index cddf75cff..000000000 --- a/FS/t/cust_credit.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_credit; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_credit_bill.t b/FS/t/cust_credit_bill.t deleted file mode 100644 index 0ef54c3f1..000000000 --- a/FS/t/cust_credit_bill.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_credit_bill; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_credit_refund.t b/FS/t/cust_credit_refund.t deleted file mode 100644 index 6b2b599f3..000000000 --- a/FS/t/cust_credit_refund.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_credit_refund; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_main.t b/FS/t/cust_main.t deleted file mode 100644 index b0ffbdb32..000000000 --- a/FS/t/cust_main.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_main; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_main_county.t b/FS/t/cust_main_county.t deleted file mode 100644 index dd6119911..000000000 --- a/FS/t/cust_main_county.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_main_county; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_main_invoice.t b/FS/t/cust_main_invoice.t deleted file mode 100644 index 9661620e0..000000000 --- a/FS/t/cust_main_invoice.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_main_invoice; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_pay.t b/FS/t/cust_pay.t deleted file mode 100644 index f6d0b7571..000000000 --- a/FS/t/cust_pay.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_pay; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_pay_batch.t b/FS/t/cust_pay_batch.t deleted file mode 100644 index 02b572c15..000000000 --- a/FS/t/cust_pay_batch.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_pay_batch; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_pkg.t b/FS/t/cust_pkg.t deleted file mode 100644 index c6a686061..000000000 --- a/FS/t/cust_pkg.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_pkg; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_refund.t b/FS/t/cust_refund.t deleted file mode 100644 index 91583da28..000000000 --- a/FS/t/cust_refund.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_refund; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_svc.t b/FS/t/cust_svc.t deleted file mode 100644 index 267d731db..000000000 --- a/FS/t/cust_svc.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_svc; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_tax_exempt.pm b/FS/t/cust_tax_exempt.pm deleted file mode 100644 index 8af13e3aa..000000000 --- a/FS/t/cust_tax_exempt.pm +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_tax_exempt; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/cust_tax_exempt.t b/FS/t/cust_tax_exempt.t deleted file mode 100644 index 8af13e3aa..000000000 --- a/FS/t/cust_tax_exempt.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::cust_tax_exempt; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/domain_record.t b/FS/t/domain_record.t deleted file mode 100644 index 794518ccf..000000000 --- a/FS/t/domain_record.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::domain_record; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/export_svc.t b/FS/t/export_svc.t deleted file mode 100644 index 773c5dea7..000000000 --- a/FS/t/export_svc.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::export_svc; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/msgcat.t b/FS/t/msgcat.t deleted file mode 100644 index c38c63935..000000000 --- a/FS/t/msgcat.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::msgcat; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/nas.t b/FS/t/nas.t deleted file mode 100644 index 6f8ae36d2..000000000 --- a/FS/t/nas.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::nas; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_bill_event.t b/FS/t/part_bill_event.t deleted file mode 100644 index 5626a9f97..000000000 --- a/FS/t/part_bill_event.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_bill_event; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-bind.t b/FS/t/part_export-bind.t deleted file mode 100644 index d0c96be40..000000000 --- a/FS/t/part_export-bind.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::bind; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-bind_slave.t b/FS/t/part_export-bind_slave.t deleted file mode 100644 index c6a038610..000000000 --- a/FS/t/part_export-bind_slave.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::bind_slave; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-bsdshell.t b/FS/t/part_export-bsdshell.t deleted file mode 100644 index eaf417a70..000000000 --- a/FS/t/part_export-bsdshell.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::bsdshell; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-cp.t b/FS/t/part_export-cp.t deleted file mode 100644 index bbefa6c1b..000000000 --- a/FS/t/part_export-cp.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::cp; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-cyrus.t b/FS/t/part_export-cyrus.t deleted file mode 100644 index e0b3f350e..000000000 --- a/FS/t/part_export-cyrus.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::cyrus; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-http.t b/FS/t/part_export-http.t deleted file mode 100644 index ea41b939f..000000000 --- a/FS/t/part_export-http.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::http; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-infostreet.t b/FS/t/part_export-infostreet.t deleted file mode 100644 index 1b3341825..000000000 --- a/FS/t/part_export-infostreet.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::infostreet; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-null.t b/FS/t/part_export-null.t deleted file mode 100644 index 055cdcee6..000000000 --- a/FS/t/part_export-null.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::null; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-shellcommands.t b/FS/t/part_export-shellcommands.t deleted file mode 100644 index 7bb47d3f8..000000000 --- a/FS/t/part_export-shellcommands.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::shellcommands; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-shellcommands_withdomain.t b/FS/t/part_export-shellcommands_withdomain.t deleted file mode 100644 index c0bd1bbb0..000000000 --- a/FS/t/part_export-shellcommands_withdomain.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::shellcommands_withdomain; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-sqlmail.t b/FS/t/part_export-sqlmail.t deleted file mode 100644 index b048a75a5..000000000 --- a/FS/t/part_export-sqlmail.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::sqlmail; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-sqlradius.t b/FS/t/part_export-sqlradius.t deleted file mode 100644 index 5fb23a5a6..000000000 --- a/FS/t/part_export-sqlradius.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::sqlradius; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-sysvshell.t b/FS/t/part_export-sysvshell.t deleted file mode 100644 index 7fc24acb1..000000000 --- a/FS/t/part_export-sysvshell.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::sysvshell; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-textradius.t b/FS/t/part_export-textradius.t deleted file mode 100644 index d8a48a0c8..000000000 --- a/FS/t/part_export-textradius.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::textradius; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-vpopmail.t b/FS/t/part_export-vpopmail.t deleted file mode 100644 index 2e37114a2..000000000 --- a/FS/t/part_export-vpopmail.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::vpopmail; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export-www_shellcommands.t b/FS/t/part_export-www_shellcommands.t deleted file mode 100644 index 2ea79cf97..000000000 --- a/FS/t/part_export-www_shellcommands.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export::www_shellcommands; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export.t b/FS/t/part_export.t deleted file mode 100644 index 26b398791..000000000 --- a/FS/t/part_export.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_export_option.t b/FS/t/part_export_option.t deleted file mode 100644 index 13200c213..000000000 --- a/FS/t/part_export_option.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_export_option; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_pkg.t b/FS/t/part_pkg.t deleted file mode 100644 index fd96073f9..000000000 --- a/FS/t/part_pkg.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_pkg; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_pop_local.t b/FS/t/part_pop_local.t deleted file mode 100644 index 4e4ad17f5..000000000 --- a/FS/t/part_pop_local.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_pop_local; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_referral.t b/FS/t/part_referral.t deleted file mode 100644 index d20b97930..000000000 --- a/FS/t/part_referral.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_referral; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_svc.t b/FS/t/part_svc.t deleted file mode 100644 index bdb2a7aca..000000000 --- a/FS/t/part_svc.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_svc; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/part_svc_column.t b/FS/t/part_svc_column.t deleted file mode 100644 index 467025c1e..000000000 --- a/FS/t/part_svc_column.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::part_svc_column; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/pkg_svc.t b/FS/t/pkg_svc.t deleted file mode 100644 index 77d34295a..000000000 --- a/FS/t/pkg_svc.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::pkg_svc; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/port.t b/FS/t/port.t deleted file mode 100644 index 46377aaf9..000000000 --- a/FS/t/port.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::port; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/prepay_credit.t b/FS/t/prepay_credit.t deleted file mode 100644 index e7626bdf1..000000000 --- a/FS/t/prepay_credit.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::prepay_credit; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/queue.t b/FS/t/queue.t deleted file mode 100644 index 43e33730e..000000000 --- a/FS/t/queue.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::queue; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/queue_arg.t b/FS/t/queue_arg.t deleted file mode 100644 index cf3f91dfe..000000000 --- a/FS/t/queue_arg.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::queue_arg; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/queue_depend.t b/FS/t/queue_depend.t deleted file mode 100644 index 8eaa2cdb3..000000000 --- a/FS/t/queue_depend.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::queue_depend; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/raddb.t b/FS/t/raddb.t deleted file mode 100644 index ac28d0798..000000000 --- a/FS/t/raddb.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::raddb; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/radius_usergroup.t b/FS/t/radius_usergroup.t deleted file mode 100644 index 325742cf5..000000000 --- a/FS/t/radius_usergroup.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::radius_usergroup; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/session.t b/FS/t/session.t deleted file mode 100644 index c4b714ea4..000000000 --- a/FS/t/session.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::session; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_Common.t b/FS/t/svc_Common.t deleted file mode 100644 index ed49e1e49..000000000 --- a/FS/t/svc_Common.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_Common; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_acct.t b/FS/t/svc_acct.t deleted file mode 100644 index 9ca78c9d1..000000000 --- a/FS/t/svc_acct.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_acct; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_acct_pop.t b/FS/t/svc_acct_pop.t deleted file mode 100644 index e612c40af..000000000 --- a/FS/t/svc_acct_pop.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_acct_pop; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_acct_sm.t b/FS/t/svc_acct_sm.t deleted file mode 100644 index 1082f2cdb..000000000 --- a/FS/t/svc_acct_sm.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_acct_sm; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_domain.t b/FS/t/svc_domain.t deleted file mode 100644 index 4d91898ac..000000000 --- a/FS/t/svc_domain.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_domain; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_forward.t b/FS/t/svc_forward.t deleted file mode 100644 index d653d34ef..000000000 --- a/FS/t/svc_forward.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_forward; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/svc_www.t b/FS/t/svc_www.t deleted file mode 100644 index eb4e83fbc..000000000 --- a/FS/t/svc_www.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::svc_www; -$loaded=1; -print "ok 1\n"; diff --git a/FS/t/type_pkgs.t b/FS/t/type_pkgs.t deleted file mode 100644 index 98401805c..000000000 --- a/FS/t/type_pkgs.t +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN { $| = 1; print "1..1\n" } -END {print "not ok 1\n" unless $loaded;} -use FS::type_pkgs; -$loaded=1; -print "ok 1\n"; diff --git a/GPL b/GPL deleted file mode 100644 index e77696ae8..000000000 --- a/GPL +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 4b9b0853c..000000000 --- a/INSTALL +++ /dev/null @@ -1 +0,0 @@ -See httemplate/docs/index.html diff --git a/Makefile b/Makefile deleted file mode 100644 index a3f61585a..000000000 --- a/Makefile +++ /dev/null @@ -1,180 +0,0 @@ -#!/usr/bin/make - -DATASOURCE = DBI:Pg:host=localhost;dbname=freeside -#DATASOURCE=DBI:mysql:freeside - -DB_USER = freeside -DB_PASSWORD= - -TEMPLATE = asp -#TEMPLATE = mason - -ASP_GLOBAL = /usr/local/etc/freeside/asp-global - -FREESIDE_DOCUMENT_ROOT = /var/www/freeside - -INIT_FILE = /etc/init.d/freeside - -HTTPD_RESTART = /etc/init.d/apache restart -FREESIDE_RESTART = /etc/init.d/freeside restart - -INSTALLGROUP = root - -#edit the stuff below to have the daemons start - -QUEUED_USER=ivan - -#eventually this shouldn't be needed -FREESIDE_PATH = `pwd` - -PASSWD_USER = nostart -PASSWD_MACHINE = localhost - -SIGNUP_USER = nostart -SIGNUP_MACHINE = localhost -SIGNUP_AGENTNUM = 2 -SIGNUP_REFNUM = 2 - -#--- - -#not changable yet -FREESIDE_CONF = /usr/local/etc/freeside - -VERSION=1.4.0 -TAG=freeside_1_4_0 - -help: - @echo "supported targets: aspdocs masondocs alldocs docs install-docs" - @echo " htmlman" - @echo " perl-modules install-perl-modules" - @echo " install deploy" - @echo " create-database" - @echo " clean" - -aspdocs: htmlman httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/* httemplate/*/*/*/*/* - rm -rf aspdocs - cp -pr httemplate aspdocs - touch aspdocs - -masondocs: htmlman httemplate/* httemplate/*/* httemplate/*/*/* httemplate/*/*/*/* httemplate/*/*/*/*/* - rm -rf masondocs - cp -pr httemplate masondocs - ( cd masondocs; \ - ../bin/masonize; \ - ) - touch masondocs - -alldocs: aspdocs masondocs - -docs: - make ${TEMPLATE}docs - -htmlman: - [ -e ./httemplate/docs/man ] || mkdir httemplate/docs/man - [ -e ./httemplate/docs/man/bin ] || mkdir httemplate/docs/man/bin - [ -e ./httemplate/docs/man/FS ] || mkdir httemplate/docs/man/FS - [ -e ./httemplate/docs/man/FS/UI ] || mkdir httemplate/docs/man/FS/UI - [ -e ./httemplate/docs/man/FS/part_export ] || mkdir httemplate/docs/man/FS/part_export - [ -e DONT_REBUILD_DOCS ] || bin/pod2x - -forcehtmlman: - [ -e ./httemplate/docs/man ] || mkdir httemplate/docs/man - [ -e ./httemplate/docs/man/bin ] || mkdir httemplate/docs/man/bin - [ -e ./httemplate/docs/man/FS ] || mkdir httemplate/docs/man/FS - [ -e ./httemplate/docs/man/FS/UI ] || mkdir httemplate/docs/man/FS/UI - [ -e ./httemplate/docs/man/FS/part_export ] || mkdir httemplate/docs/man/FS/part_export - bin/pod2x - -install-docs: docs - [ -e ${FREESIDE_DOCUMENT_ROOT} ] && mv ${FREESIDE_DOCUMENT_ROOT} ${FREESIDE_DOCUMENT_ROOT}.`date +%Y%m%d%H%M%S` || true - cp -r ${TEMPLATE}docs ${FREESIDE_DOCUMENT_ROOT} - [ "${TEMPLATE}" = "asp" -a ! -e ${ASP_GLOBAL} ] && mkdir ${ASP_GLOBAL} || true - [ "${TEMPLATE}" = "asp" ] && chown -R freeside ${ASP_GLOBAL} || true - [ "${TEMPLATE}" = "asp" ] && cp htetc/global.asa ${ASP_GLOBAL} || true - -perl-modules: - cd FS; \ - [ -e Makefile ] || perl Makefile.PL; \ - make - -install-perl-modules: perl-modules - cd FS; \ - make install UNINST=1 - -install-init: - #[ -e ${INIT_FILE} ] || install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE} - install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE} - perl -p -i -e "\ - s/%%%QUEUED_USER%%%/${QUEUED_USER}/g;\ - s'%%%FREESIDE_PATH%%%'${FREESIDE_PATH}'g;\ - s/%%%PASSWD_USER%%%/${PASSWD_USER}/g;\ - s/%%%PASSWD_MACHINE%%%/${PASSWD_MACHINE}/g;\ - s/%%%SIGNUP_USER%%%/${SIGNUP_USER}/g;\ - s/%%%SIGNUP_MACHINE%%%/${SIGNUP_MACHINE}/g;\ - s/%%%SIGNUP_AGENTNUM%%%/${SIGNUP_AGENTNUM}/g;\ - s/%%%SIGNUP_REFNUM%%%/${SIGNUP_REFNUM}/g;\ - " ${INIT_FILE} - -install: install-perl-modules install-docs install-init - -deploy: install - ${HTTPD_RESTART} - ${FREESIDE_RESTART} - -create-database: - perl -e 'use DBIx::DataSource qw( create_database ); create_database( "${DATASOURCE}", "${DB_USER}", "${DB_PASSWORD}" ) or die $$DBIx::DataSource::errstr;' - -create-config: install-perl-modules - [ -e ${FREESIDE_CONF} ] && mv ${FREESIDE_CONF} ${FREESIDE_CONF}.`date +%Y%m%d%H%M%S` || true - mkdir ${FREESIDE_CONF} - chown freeside ${FREESIDE_CONF} - - touch ${FREESIDE_CONF}/secrets - chown freeside ${FREESIDE_CONF}/secrets - chmod 600 ${FREESIDE_CONF}/secrets - - echo -e "${DATASOURCE}\n${DB_USER}\n${DB_PASSWORD}" >${FREESIDE_CONF}/secrets - chmod 600 ${FREESIDE_CONF}/secrets - chown freeside ${FREESIDE_CONF}/secrets - - mkdir "${FREESIDE_CONF}/conf.${DATASOURCE}" - cp conf/[a-z]* "${FREESIDE_CONF}/conf.${DATASOURCE}" - chown -R freeside "${FREESIDE_CONF}/conf.${DATASOURCE}" - - mkdir "${FREESIDE_CONF}/counters.${DATASOURCE}" - chown freeside "${FREESIDE_CONF}/counters.${DATASOURCE}" - - mkdir "${FREESIDE_CONF}/cache.${DATASOURCE}" - chown freeside "${FREESIDE_CONF}/cache.${DATASOURCE}" - - mkdir "${FREESIDE_CONF}/export.${DATASOURCE}" - chown freeside "${FREESIDE_CONF}/export.${DATASOURCE}" - -clean: - rm -rf aspdocs masondocs - cd FS; \ - make clean - -#these are probably only useful if you're me... - -upload-docs: forcehtmlman - ssh cleanwhisker.420.am rm -rf /var/www/www.sisd.com/freeside/devdocs - scp -pr httemplate/docs cleanwhisker.420.am:/var/www/www.sisd.com/freeside/devdocs - -release: upload-docs - cd /home/ivan/freeside_current - #cvs tag ${TAG} - cvs tag -F ${TAG} - - #cd /home/ivan - cvs export -r ${TAG} -d freeside-${VERSION} freeside - tar czvf freeside-${VERSION}.tar.gz freeside-${VERSION} - - scp freeside-${VERSION}.tar.gz ivan@cleanwhisker.420.am:/var/www/sisd.420.am/freeside/ - mv freeside-${VERSION} freeside-${VERSION}.tar.gz .. - -update-webdemo: - ssh ivan@pouncequick.420.am '( cd freeside; cvs update -d -P )' - #ssh root@pouncequick.420.am '( cd /home/ivan/freeside; make clean; make deploy )' - ssh root@pouncequick.420.am '( cd /home/ivan/freeside; make deploy )' - diff --git a/README b/README deleted file mode 100644 index 91e625386..000000000 --- a/README +++ /dev/null @@ -1,49 +0,0 @@ -Freeside 1.4.0 - -Copyright (C) 2000,2001 Ivan Kohler -Copyright (C) 1999 Silicon Interactive Software Design -All rights reserved - - This program is free software; you can redistribute it and/or modify - it under the terms of either: - - a) the GNU General Public License as published by the Free - Software Foundation; either version 2, or (at your option) any - later version, or - - b) the "Artistic License" - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the - GNU General Public License or the Artistic License for more details. - - You should have received a copy of the GNU General Public - License along with this program, in the file `GPL'; if not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite - 330, Boston, MA 02111-1307, USA. - - You should have received a copy of the Artistic License along with - this program, in the file `Artistic'; if not, download it from - http://www.perl.com/CPAN/doc/misc/license/Artistic - -Freeside is a billing and administration package for Internet Service -Providers. - -The Freeside home page is at `http://www.sisd.com/freeside'. - -The documentation is in `httemplate/docs'. - -A mailing list for users is available. Send a blank message to - to subscribe. - -A mailing list for developers is available. It is intended to be lower volume -and higher SNR than the users list. Send a blank message to - to subscribe. - -Commercial support is available from Ivan Kohler . Requests for -free support sent to me directly will be ignored. Please subscribe to the the -user mailing list to request free support! - -Ivan Kohler - diff --git a/TODO b/TODO deleted file mode 100644 index 4c582c9d7..000000000 --- a/TODO +++ /dev/null @@ -1,9 +0,0 @@ -$Id: TODO,v 1.68 2002-02-16 18:14:23 ivan Exp $ - -The TODO list / bug-tracking is now kept in a database. See -http://pouncequick.420.am/rt/ - -If you are interested in helping with any of these, please join the -*development* mailing list (send a blank message to -ivan-freeside-devel-subscribe@sisd.com) to avoid duplication of effort. - diff --git a/bin/bind.export b/bin/bind.export deleted file mode 100755 index 7d1452dc6..000000000 --- a/bin/bind.export +++ /dev/null @@ -1,182 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use File::Path; -use File::Rsync; -use Net::SSH qw(ssh); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch qsearchs); -use FS::part_export; -use FS::cust_pkg; -use FS::cust_svc; -use FS::svc_domain; - -my $user = shift or die &usage; -adminsuidsetup $user; - -my $spooldir = "/usr/local/etc/freeside/export.". datasrc. "/bind"; -mkdir $spooldir, 0700 unless -d $spooldir; - -my @exports = qsearch('part_export', { 'exporttype' => 'bind' } ); -my @sexports = qsearch('part_export', { 'exporttype' => 'bind_slave' } ); - -my $rsync = File::Rsync->new({ - rsh => 'ssh', -# dry_run => 1, -}); - -foreach my $export ( @exports ) { - - my $machine = $export->machine; - my $prefix = "$spooldir/$machine"; - - #prevent old domain files from piling up - #rmtree "$prefix" or die "can't rmtree $prefix.db: $!"; - - mkdir $prefix, 0700 unless -d $prefix; - - open(NAMED_CONF,">$prefix/named.conf") - or die "can't open $prefix/named.conf: $!"; - - open(CONF_HEADER,"<$prefix/named.conf.HEADER"); #or die - while () { print NAMED_CONF $_; } - close CONF_HEADER; - - my $zonepath = $export->option('zonepath'); - $zonepath =~ s/\/$//; - - #false laziness with freeside-sqlradius-reset and shell.export - my @svc_domain = - map { qsearchs('svc_domain', { 'svcnum' => $_->svcnum } ) } - map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - $export->export_svc; - - foreach my $svc_domain ( @svc_domain ) { - my $domain = $svc_domain->domain; - my @masters = qsearch('domain_record', { - 'svcnum' => $svc_domain->svcnum, - 'rectype' => '_mstr', - } ); - if ( @masters ) { - my $masters = join('; ', map { $_->recdata } @masters ); - - print NAMED_CONF <$prefix/db.$domain") - or die "can't open $prefix/db.$domain: $!"; - - my @domain_records = - qsearch('domain_record', { 'svcnum' => $svc_domain->svcnum } ); - foreach my $domain_record ( - sort { $b->rectype cmp $a->rectype } @domain_records - ) { - #if ( $domain_record->rectype eq 'SOA' ) { - # print DB_MASTER join("\t", $domain_record-> reczone - #} else { - print DB_MASTER join("\t", - map { $domain_record->getfield($_) } - qw( reczone recaf rectype recdata ) - ), "\n"; - #} - } - - close DB_MASTER; - - } - - } - - $rsync->exec( { - src => "$prefix/", - recursive => 1, - dest => "root\@$machine:$zonepath/", - exclude => [qw( *.import named.conf.HEADER named.conf )], - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); - # warn $rsync->out; - - $rsync->exec( { - src => "$prefix/named.conf", - dest => "root\@$machine:". $export->option('named_conf'), - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); -# warn $rsync->out; - - ssh("root\@$machine", 'ndc reload'); - -} - -close NAMED_CONF; - -foreach my $sexport ( @sexports ) { #false laziness with above - - my $machine = $sexport->machine; - my $prefix = "$spooldir/$machine"; - - #prevent old domain files from piling up - #rmtree "$prefix" or die "can't rmtree $prefix.db: $!"; - - mkdir $prefix, 0700 unless -d $prefix; - - open(NAMED_CONF,">$prefix/named.conf") - or die "can't open $prefix/named.conf: $!"; - - open(CONF_HEADER,"<$prefix/named.conf.HEADER"); #or die - while () { print NAMED_CONF $_; } - close CONF_HEADER; - - my $masters = $sexport->option('master'); - - #false laziness with freeside-sqlradius-reset - my @svc_domain = - map { qsearchs('svc_domain', { 'svcnum' => $_->svcnum } ) } - map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - $sexport->export_svc; - - foreach my $svc_domain ( @svc_domain ) { - my $domain = $svc_domain->domain; - print NAMED_CONF <exec( { - src => "$prefix/named.conf", - dest => "root\@$machine:". $sexport->option('named_conf'), - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); -# warn $rsync->out; - - ssh("root\@$machine", 'ndc reload'); - -} -close NAMED_CONF; - -# ----- - -sub usage { - die "Usage:\n bind.export user\n"; -} - diff --git a/bin/bind.import b/bin/bind.import deleted file mode 100755 index 57eca2b63..000000000 --- a/bin/bind.import +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id: bind.import,v 1.3 2002-07-15 01:44:23 ivan Exp $ - -#need to manually put header in /usr/local/etc/freeside/export./named.conf.HEADER - -use strict; -use vars qw( %d_part_svc ); -use Term::Query qw(query); -#use BIND::Conf_Parser; -#use DNS::ZoneParse 0.81; - -#use Net::SCP qw(iscp); -use Net::SCP qw(scp); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch); #qsearchs); -#use FS::svc_acct_sm; -use FS::svc_domain; -use FS::domain_record; -#use FS::svc_acct; -#use FS::part_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -$FS::svc_Common::noexport_hack = 1; -$FS::domain_record::noserial_hack = 1; - -use vars qw($spooldir); -$spooldir = "/usr/local/etc/freeside/export.". datasrc. "/bind"; -mkdir $spooldir unless -d $spooldir; - -%d_part_svc = - map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_domain'}); - -print "\n\n", - ( join "\n", map "$_: ".$d_part_svc{$_}->svc, sort keys %d_part_svc ), - "\n\n"; -use vars qw($domain_svcpart); -$^W=0; #Term::Query isn't -w-safe -$domain_svcpart = - query "Enter part number for domains: ", 'irk', [ keys %d_part_svc ]; -$^W=1; - -print "\n\n", <new; -$p->parse_file("$prefix/named.conf.import"); - -print "\nBIND import completed.\n"; - -## - -sub usage { - die "Usage:\n\n svc_domain.import user\n"; -} - -######## -BEGIN { - - package Parser; - use BIND::Conf_Parser; - use vars qw(@ISA $named_dir); - @ISA = qw(BIND::Conf_Parser); - - sub handle_option { - my($self, $option, $argument) = @_; - return unless $option eq "directory"; - $named_dir = $argument; - } - - sub handle_zone { - my($self, $name, $class, $type, $options) = @_; - return unless $class eq 'in'; - return if grep { $name eq $_ } - ( qw( . localhost 127.in-addr.arpa 0.in-addr.arpa 255.in-addr.arpa ) ); - - my $domain = new FS::svc_domain( { - svcpart => $main::domain_svcpart, - domain => $name, - action => 'N', - } ); - my $error = $domain->insert; - die $error if $error; - - if ( $type eq 'slave' ) { - - #use Data::Dumper; - #print Dumper($options); - #exit; - - foreach my $master ( @{ $options->{masters} } ) { - my $domain_record = new FS::domain_record( { - 'svcnum' => $domain->svcnum, - 'reczone' => '@', - 'recaf' => 'IN', - 'rectype' => '_mstr', - 'recdata' => $master, - } ); - my $error = $domain_record->insert; - die $error if $error; - } - - } elsif ( $type eq 'master' ) { - - my $file = $options->{file}; - - use File::Basename; - my $basefile = basename($file); - my $sourcefile = $file; - $sourcefile = "$named_dir/$sourcefile" unless $file =~ /^\//; - use Net::SCP qw(iscp scp); - scp("root\@$main::named_machine:$sourcefile", - "$main::prefix/$basefile.import"); - - use DNS::ZoneParse 0.81; - my $zone = DNS::ZoneParse->new("$main::prefix/$basefile.import"); - - my $dump = $zone->Dump; - - #use Data::Dumper; - #print "$name: ". Dumper($dump); - #exit; - - foreach my $rectype ( keys %$dump ) { - if ( $rectype =~ /^SOA$/i ) { - my $rec = $dump->{$rectype}; - my $domain_record = new FS::domain_record( { - 'svcnum' => $domain->svcnum, - 'reczone' => $rec->{origin}, - 'recaf' => 'IN', - 'rectype' => $rectype, - 'recdata' => - $rec->{primary}. ' '. $rec->{email}. ' ( '. - join(' ', map $rec->{$_}, - qw( serial refresh retry expire minimumTTL ) ). - ' )', - } ); - my $error = $domain_record->insert; - die $error if $error; - } else { - #die $dump->{$rectype}; - foreach my $rec ( @{ $dump->{$rectype} } ) { - my $domain_record = new FS::domain_record( { - 'svcnum' => $domain->svcnum, - 'reczone' => $rec->{name}, - 'recaf' => $rec->{class}, - 'rectype' => $rectype, - 'recdata' => ( $rectype =~ /^MX$/i - ? $rec->{priority}. ' '. $rec->{host} - : $rec->{host} ), - } ); - my $error = $domain_record->insert; - die $error if $error; - } - } - } - - } - - } - -} -######### - diff --git a/bin/bsdshell.export b/bin/bsdshell.export deleted file mode 100755 index 10c27671e..000000000 --- a/bin/bsdshell.export +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl -w - -# bsdshell export - -use strict; -use File::Rsync; -use Net::SSH qw(ssh); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch qsearchs); -use FS::part_export; -use FS::cust_svc; -use FS::svc_acct; - -my @saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -my $user = shift or die &usage; -adminsuidsetup $user; - -my $spooldir = "/usr/local/etc/freeside/export.". datasrc; -#my $spooldir = "/usr/local/etc/freeside/export.". datasrc. "/shell"; - -my @bsd_exports = qsearch('part_export', { 'exporttype' => 'bsdshell' } ); - -my $rsync = File::Rsync->new({ - rsh => 'ssh', -# dry_run => 1, -}); - -foreach my $export ( @bsd_exports ) { - my $machine = $export->machine; - my $prefix = "$spooldir/$machine"; - mkdir $prefix, 0700 unless -d $prefix; - - #LOCKING!!! - - ( open(MASTER,">$prefix/master.passwd") - #!!! and flock(MASTER,LOCK_EX|LOCK_NB) - ) or die "Can't open $prefix/master.passwd: $!"; - ( open(PASSWD,">$prefix/passwd") - #!!! and flock(PASSWD,LOCK_EX|LOCK_NB) - ) or die "Can't open $prefix/passwd: $!"; - - chmod 0644, "$prefix/passwd"; - chmod 0600, "$prefix/master.passwd"; - - #false laziness with freeside-sqlradius-reset and bind.export - my @svc_acct = - map { qsearchs('svc_acct', { 'svcnum' => $_->svcnum } ) } - map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - $export->export_svc; - - next unless @svc_acct; - - foreach my $svc_acct ( sort { $a->uid <=> $b->uid } @svc_acct ) { - - my $password = $svc_acct->_password; - my $cpassword; - #if ( ( length($password) <= 8 ) - if ( ( length($password) <= 12 ) - && ( $password ne '*' ) - && ( $password ne '!!' ) - && ( $password ne '' ) - ) { - $cpassword=crypt($password, - $saltset[int(rand(64))].$saltset[int(rand(64))] - ); - # MD5 !!!! - } else { - $cpassword=$password; - } - - ### - # FORMAT OF THE PASSWD FILE HERE - print PASSWD join(":", - $svc_acct->username, - 'x', # "##". $username, - $svc_acct->uid, - $svc_acct->gid, - $svc_acct->finger, - $svc_acct->dir, - $svc_acct->shell, - ), "\n"; - - ### - # FORMAT OF FreeBSD MASTER PASSWD FILE HERE - print MASTER join(":", - $svc_acct->username, # User name - $cpassword, # Encrypted password - $svc_acct->uid, # User ID - $svc_acct->gid, # Group ID - "", # Login Class - "0", # Password Change Time - "0", # Password Expiration Time - $svc_acct->finger, # Users name - $svc_acct->dir, # Users home directory - $svc_acct->shell, # shell - ), "\n" ; - - } - - #!!! flock(MASTER,LOCK_UN); - #!!! flock(PASSWD,LOCK_UN); - close MASTER; - close PASSWD; - - $rsync->exec( { - src => "$prefix/passwd", - dest => "root\@$machine:/etc/passwd" - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); - - $rsync->exec( { - src => "$prefix/master.passwd", - dest => "root\@$machine:/etc/master.passwd.new" - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); - ssh("root\@$machine", "pwd_mkdb /etc/master.passwd.new"); - - # UNLOCK!! -} diff --git a/bin/create-history-tables b/bin/create-history-tables deleted file mode 100755 index d37d682d8..000000000 --- a/bin/create-history-tables +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use DBI; -use DBIx::DBSchema 0.20; -use DBIx::DBSchema::Table; -use DBIx::DBSchema::Column; -use DBIx::DBSchema::ColGroup::Unique; -use DBIx::DBSchema::ColGroup::Index; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(dbdef); - -my $user = shift or die &usage; -my $dbh = adminsuidsetup $user; - -my $schema = dbdef(); - -#false laziness w/fs-setup -my @tables = scalar(@ARGV) - ? @ARGV - : grep { ! /^h_/ } $schema->tables; -foreach my $table ( @tables ) { - warn "creating history table for $table\n"; - my $tableobj = $schema->table($table) - or die "unknown table $table (did you run dbdef-create?)\n"; - my $h_tableobj = DBIx::DBSchema::Table->new( { - name => "h_$table", - primary_key => 'historynum', - unique => DBIx::DBSchema::ColGroup::Unique->new( [] ), - 'index' => DBIx::DBSchema::ColGroup::Index->new( [ - @{$tableobj->unique->lol_ref}, - @{$tableobj->index->lol_ref} - ] ), - columns => [ - DBIx::DBSchema::Column->new( { - 'name' => 'historynum', - 'type' => 'serial', - 'null' => 'NOT NULL', - 'length' => '', - 'default' => '', - 'local' => '', - } ), - DBIx::DBSchema::Column->new( { - 'name' => 'history_date', - 'type' => 'int', - 'null' => 'NULL', - 'length' => '', - 'default' => '', - 'local' => '', - } ), - DBIx::DBSchema::Column->new( { - 'name' => 'history_user', - 'type' => 'varchar', - 'null' => 'NOT NULL', - 'length' => '80', - 'default' => '', - 'local' => '', - } ), - DBIx::DBSchema::Column->new( { - 'name' => 'history_action', - 'type' => 'varchar', - 'null' => 'NOT NULL', - 'length' => '80', - 'default' => '', - 'local' => '', - } ), - map { $tableobj->column($_) } $tableobj->columns - ], - } ); - foreach my $statement ( $h_tableobj->sql_create_table($dbh) ) { - $dbh->do( $statement ) - or die "CREATE error: ". $dbh->errstr. "\ndoing statement: $statement"; - } - -} - -$dbh->commit or die $dbh->errstr; -$dbh->disconnect or die $dbh->errstr; - -sub usage { - die "Usage:\n create-history-tables user [ table table ... ] \n"; -} - diff --git a/bin/dbdef-create b/bin/dbdef-create deleted file mode 100755 index 0b297b9e6..000000000 --- a/bin/dbdef-create +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: dbdef-create,v 1.5 2001-08-21 02:43:18 ivan Exp $ - -use strict; -use DBI; -use DBIx::DBSchema; -use FS::UID qw(adminsuidsetup datasrc driver_name); - -my $user = shift or die &usage; - -my($dbh)=adminsuidsetup $user; - -#needs to match FS::Record -my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc; - -my $dbdef = new_native DBIx::DBSchema $dbh; - -#print $dbdef->pretty_print; - -#important -$dbdef->save($dbdef_file); - -sub usage { - die "Usage:\n dbdef-create user\n"; -} diff --git a/bin/freeside-init b/bin/freeside-init deleted file mode 100755 index fe12931fc..000000000 --- a/bin/freeside-init +++ /dev/null @@ -1,60 +0,0 @@ -#! /bin/sh -# -# start the freeside job queue daemon - -#PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/local/bin/freeside-queued -NAME=freeside-queued -DESC="freeside job queue daemon" -USER="ivan" - -test -f $DAEMON || exit 0 - -set -e - -case "$1" in - start) - echo -n "Starting $DESC: " -# start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid -b -m\ -# --exec $DAEMON - $DAEMON $USER & - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON - echo "$NAME." - rm /var/run/$NAME.pid - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - $0 stop - sleep 1 - $0 start - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/bin/freeside-session-kill b/bin/freeside-session-kill deleted file mode 100755 index d5fd703f6..000000000 --- a/bin/freeside-session-kill +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use vars qw($conf); -use Fcntl qw(:flock); -use FS::UID qw(adminsuidsetup datasrc dbh); -use FS::Record qw(dbdef qsearch fields); -use FS::session; -use FS::svc_acct; - -my $user = shift or die &usage; -adminsuidsetup $user; - -my $sessionlock = "/usr/local/etc/freeside/session-kill.lock.". datasrc; - -open(LOCK,"+>>$sessionlock") or die "Can't open $sessionlock: $!"; -select(LOCK); $|=1; select(STDOUT); -unless ( flock(LOCK,LOCK_EX|LOCK_NB) ) { - seek(LOCK,0,0); - my($pid)=; - chop($pid); - #no reason to start loct of blocking processes - die "Is another session kill process running under pid $pid?\n"; -} -seek(LOCK,0,0); -print LOCK $$,"\n"; - -$FS::UID::AutoCommit = 0; - -my $now = time; - -#uhhhhh - -use DBIx::DBSchema; -use DBIx::DBSchema::Table; #down this path lies madness -use DBIx::DBSchema::Column; - -my $dbdef = dbdef or die; -#warn $dbdef; -#warn $dbdef->{'tables'}; -#warn keys %{$dbdef->{'tables'}}; -my $session_table = $dbdef->table('session') or die; -my $svc_acct_table = $dbdef->table('svc_acct') or die; - -my $session_svc_acct = new DBIx::DBSchema::Table ( 'session,svc_acct', '', '', '', - map( DBIx::DBSchema::Column->new( "session.$_", - $session_table->column($_)->type, - $session_table->column($_)->null, - $session_table->column($_)->length, - ), $session_table->columns() ), - map( DBIx::DBSchema::Column->new( "svc_acct.$_", - $svc_acct_table->column($_)->type, - $svc_acct_table->column($_)->null, - $svc_acct_table->column($_)->length, - ), $svc_acct_table->columns ), -# map("svc_acct.$_", $svc_acct_table->columns), -); - -$dbdef->addtable($session_svc_acct); #madness, i tell you - -$FS::Record::DEBUG = 1; -my @session = qsearch('session,svc_acct', {}, '', ' WHERE '. join(' AND ', - 'svc_acct.svcnum = session.svcnum', - '( session.logout IS NULL OR session.logout = 0 )', - "( $now - session.login ) >= svc_acct.seconds" -). " FOR UPDATE" ); - -my $dbh = dbh; - -foreach my $join ( @session ) { - - my $session = new FS::session ( { - map { $_ => $join->{'Hash'}{"session.$_"} } fields('session') - } ); #see no evil - - my $svc_acct = new FS::svc_acct ( { - map { $_ => $join->{'Hash'}{"svc_acct.$_"} } fields('svc_acct') - } ); - - #false laziness w/ fs_session_server - my $nsession = new FS::session ( { $session->hash } ); - my $error = $nsession->replace($session); - if ( $error ) { - $dbh->rollback; - die $error; - } - my $time = $nsession->logout - $nsession->login; - my $new_svc_acct = new FS::svc_acct ( { $svc_acct->hash } ); - my $seconds = $new_svc_acct->seconds; - $seconds -= $time; - $seconds = 0 if $seconds < 0; - $new_svc_acct->seconds( $seconds ); - $error = $new_svc_acct->replace( $svc_acct ); - warn "can't debit time from ". $svc_acct->username. ": $error\n"; #don't want to rollback, though - #ssenizal eslaf - -} - -$dbh->commit or die $dbh->errstr; - -sub usage { - die "Usage:\n\n freeside-session-kill user\n"; -} diff --git a/bin/fs-migrate-part_svc b/bin/fs-migrate-part_svc deleted file mode 100755 index b0f3ac57e..000000000 --- a/bin/fs-migrate-part_svc +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/perl - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch fields); -use FS::part_svc; - -my $user = shift or die &usage; -my $dbh = adminsuidsetup $user; - -my $oldAutoCommit = $FS::UID::AutoCommit; -local $FS::UID::AutoCommit = 0; - -foreach my $part_svc ( qsearch('part_svc', {} ) ) { - foreach my $field ( - grep { defined($part_svc->getfield($part_svc->svcdb.'__'.$_.'_flag') ) } - fields($part_svc->svcdb) - ) { - my $flag = $part_svc->getfield($part_svc->svcdb.'__'.$field.'_flag'); - if ( uc($flag) =~ /^([DF])$/ ) { - my $part_svc_column = new FS::part_svc_column { - 'svcpart' => $part_svc->svcpart, - 'columnname' => $field, - 'columnflag' => $1, - 'columnvalue' => $part_svc->getfield($part_svc->svcdb.'__'.$field), - }; - my $error = $part_svc_column->insert; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - die $error; - } - } - } -} - -$dbh->commit or die $dbh->errstr; - -sub usage { - die "Usage:\n fs-migrate-part_svc user\n"; -} - diff --git a/bin/fs-migrate-payref b/bin/fs-migrate-payref deleted file mode 100755 index 158419706..000000000 --- a/bin/fs-migrate-payref +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/perl - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::cust_pay; -use FS::cust_refund; - -my $user = shift or die &usage; -my $dbh = adminsuidsetup $user; - -# apply payments to invoices - -foreach my $cust_pay ( qsearch('cust_pay', {} ) ) { - my $error = $cust_pay->upgrade_replace; - warn $error if $error; -} - -# apply refunds to credits - -foreach my $cust_refund ( qsearch('cust_refund') ) { - my $error = $cust_refund->upgrade_replace; - warn $error if $error; -} - -# ? apply credits to invoices - -sub usage { - die "Usage:\n fs-migrate-payref user\n"; -} - diff --git a/bin/fs-migrate-svc_acct_sm b/bin/fs-migrate-svc_acct_sm deleted file mode 100755 index e34b23596..000000000 --- a/bin/fs-migrate-svc_acct_sm +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: fs-migrate-svc_acct_sm,v 1.4 2002-06-21 09:13:16 ivan Exp $ -# -# jeff@cmh.net 01-Jul-20 - -#to delay loading dbdef until we're ready -#BEGIN { $FS::Record::setup_hack = 1; } - -use strict; -use Term::Query qw(query); -#use DBI; -#use DBIx::DBSchema; -#use DBIx::DBSchema::Table; -#use DBIx::DBSchema::Column; -#use DBIx::DBSchema::ColGroup::Unique; -#use DBIx::DBSchema::ColGroup::Index; -use FS::Conf; -use FS::UID qw(adminsuidsetup datasrc checkeuid getsecrets); -use FS::Record qw(qsearch qsearchs); -use FS::svc_domain; -use FS::svc_forward; -use vars qw( $conf $old_default_domain %part_domain_svc %part_acct_svc %part_forward_svc $svc_acct $svc_acct_sm $error); - -die "Not running uid freeside!" unless checkeuid(); - -my $user = shift or die &usage; -getsecrets($user); - -$conf = new FS::Conf; -$old_default_domain = $conf->config('domain'); - -#needs to match FS::Record -#my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc; - -### -# This section would be the appropriate place to manipulate -# the schema & tables. -### - -## we need to add the domsvc to svc_acct -## we must add a svc_forward record.... -## I am thinking that the fields svcnum (int), destsvc (int), and -## dest (varchar (80)) are appropriate, with destsvc/dest an either/or -## much in the spirit of cust_main_invoice - -### -# massage the data -### - -my($dbh)=adminsuidsetup $user; - -$|=1; - -$FS::svc_Common::noexport_hack = 1; -$FS::svc_domain::whois_hack = 1; - -%part_domain_svc=map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_domain'}); -%part_acct_svc=map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_acct'}); -%part_forward_svc=map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_forward'}); - -die "No services with svcdb svc_domain!\n" unless %part_domain_svc; -die "No services with svcdb svc_acct!\n" unless %part_acct_svc; -die "No services with svcdb svc_forward!\n" unless %part_forward_svc; - -my($svc_domain) = qsearchs('svc_domain', { 'domain' => $old_default_domain }); -if (! $svc_domain || $svc_domain->domain != $old_default_domain) { - print <); - chop $response; - if ($response =~ /^[yY]/) { - print "\n\n", &menu_domain_svc, "\n", < $old_default_domain, - 'svcpart' => $domain_svcpart, - 'action' => 'M', - }; -# $error=$svc_domain->insert && die "Error adding domain $old_default_domain: $error"; - $error=$svc_domain->insert; - die "Error adding domain $old_default_domain: $error" if $error; - }else{ - print <svc, sort keys %part_domain_svc ). "\n"; -} -sub menu_acct_svc { - ( join "\n", map "$_: ".$part_acct_svc{$_}->svc, sort keys %part_acct_svc ). "\n"; -} -sub menu_forward_svc { - ( join "\n", map "$_: ".$part_forward_svc{$_}->svc, sort keys %part_forward_svc ). "\n"; -} -sub getdomainpart { - $^W=0; # Term::Query isn't -w-safe - my $return = query "Enter part number:", 'irk', [ keys %part_domain_svc ]; - $^W=1; - $return; -} -sub getacctpart { - $^W=0; # Term::Query isn't -w-safe - my $return = query "Enter part number:", 'irk', [ keys %part_acct_svc ]; - $^W=1; - $return; -} -sub getforwardpart { - $^W=0; # Term::Query isn't -w-safe - my $return = query "Enter part number:", 'irk', [ keys %part_forward_svc ]; - $^W=1; - $return; -} - - -#migrate data - -my(@svc_accts) = qsearch('svc_acct', {}); -foreach $svc_acct (@svc_accts) { - my(@svc_acct_sms) = qsearch('svc_acct_sm', { - domuid => $svc_acct->getfield('uid'), - } - ); - - # Ok.. we've got the svc_acct record, and an array of svc_acct_sm's - # What do we do from here? - - # The intuitive: - # plop the svc_acct into the 'default domain' - # and then represent the svc_acct_sm's with svc_forwards - # they can be gussied up manually, later - # - # Perhaps better: - # when no svc_acct_sm exists, place svc_acct in 'default domain' - # when one svc_acct_sm exists, place svc_acct in corresponding - # domain & possibly create a svc_forward in 'default domain' - # when multiple svc_acct_sm's exists (in different domains) we'd - # better use the 'intuitive' approach. - # - # Specific way: - # as 'perhaps better,' but we may be able to guess which domain - # is correct by comparing the svcnum of domains to the username - # of the svc_acct - # - - # The intuitive way: - - my $def_acct = new FS::svc_acct ( { $svc_acct->hash } ); - $def_acct->setfield('domsvc' => $svc_domain->getfield('svcnum')); - $error = $def_acct->replace($svc_acct); - die "Error replacing svc_acct for " . $def_acct->username . " : $error" if $error; - - foreach $svc_acct_sm (@svc_acct_sms) { - - my($domrec)=qsearchs('svc_domain', { - svcnum => $svc_acct_sm->getfield('domsvc'), - }) || die "svc_acct_sm references invalid domsvc $svc_acct_sm->getfield('domsvc')\n"; - - if ($svc_acct_sm->getfield('domuser') =~ /^\*$/) { - - my($newdom) = new FS::svc_domain ( { $domrec->hash } ); - $newdom->setfield('catchall', $svc_acct->svcnum); - $newdom->setfield('action', "M"); - $error = $newdom->replace($domrec); - die "Error replacing svc_domain for (anything)@" . $domrec->domain . " : $error" if $error; - - } else { - - my($newacct) = new FS::svc_acct { - 'svcpart' => $pop_svcpart, - 'username' => $svc_acct_sm->getfield('domuser'), - 'domsvc' => $svc_acct_sm->getfield('domsvc'), - 'dir' => '/dev/null', - }; - $error = $newacct->insert; - die "Error adding svc_acct for " . $newacct->username . " : $error" if $error; - - my($newforward) = new FS::svc_forward { - 'svcpart' => $forward_svcpart, - 'srcsvc' => $newacct->getfield('svcnum'), - 'dstsvc' => $def_acct->getfield('svcnum'), - }; - $error = $newforward->insert; - die "Error adding svc_forward for " . $newacct->username ." : $error" if $error; - } - - $error = $svc_acct_sm->delete; - die "Error deleting svc_acct_sm for " . $svc_acct_sm->domuser ." : $error" if $error; - - }; - -}; - - -$dbh->commit or die $dbh->errstr; -$dbh->disconnect or die $dbh->errstr; - -print "svc_acct_sm records sucessfully migrated\n"; - -sub usage { - die "Usage:\n fs-migrate-svc_acct_sm user\n"; -} - diff --git a/bin/fs-radius-add-check b/bin/fs-radius-add-check deleted file mode 100755 index 4e4769e58..000000000 --- a/bin/fs-radius-add-check +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -Tw - -# quick'n'dirty hack of fs-setup to add radius attributes - -use strict; -use DBI; -use FS::UID qw(adminsuidsetup checkeuid getsecrets); -use FS::raddb; - -die "Not running uid freeside!" unless checkeuid(); - -my %attrib2db = - map { lc($FS::raddb::attrib{$_}) => $_ } keys %FS::raddb::attrib; - -my $user = shift or die &usage; -getsecrets($user); - -my $dbh = adminsuidsetup $user; - -### - -print "\n\n", <); - chop $x; - $x; -} - -### - -my($char_d) = 80; #default maxlength for text fields - -### - -foreach my $attribute ( @attributes ) { - - my $statement = - "ALTER TABLE svc_acct ADD COLUMN rc_$attribute varchar($char_d) NULL"; - my $sth = $dbh->prepare( $statement ) - or warn "Error preparing $statement: ". $dbh->errstr; - my $rc = $sth->execute - or warn "Error executing $statement: ". $sth->errstr; - - $statement = - "ALTER TABLE h_svc_acct ADD COLUMN rc_$attribute varchar($char_d) NULL"; - $sth = $dbh->prepare( $statement ) - or warn "Error preparing $statement: ". $dbh->errstr; - $rc = $sth->execute - or warn "Error executing $statement: ". $sth->errstr; - -} - -$dbh->commit or die $dbh->errstr; - -$dbh->disconnect or die $dbh->errstr; - -print "\n\n", "Now you must run dbdef-create.\n\n"; - -sub usage { - die "Usage:\n fs-radius-add-check user\n"; -} - diff --git a/bin/fs-radius-add-reply b/bin/fs-radius-add-reply deleted file mode 100755 index 3de01374f..000000000 --- a/bin/fs-radius-add-reply +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/perl -Tw - -# quick'n'dirty hack of fs-setup to add radius attributes - -use strict; -use DBI; -use FS::UID qw(adminsuidsetup checkeuid getsecrets); -use FS::raddb; - -die "Not running uid freeside!" unless checkeuid(); - -my %attrib2db = - map { lc($FS::raddb::attrib{$_}) => $_ } keys %FS::raddb::attrib; - -my $user = shift or die &usage; -getsecrets($user); - -my $dbh = adminsuidsetup $user; - -### - -print "\n\n", <); - chop $x; - $x; -} - -### - -my($char_d) = 80; #default maxlength for text fields - -### - -foreach my $attribute ( @attributes ) { - - my $statement = - "ALTER TABLE svc_acct ADD COLUMN radius_$attribute varchar($char_d) NULL"; - my $sth = $dbh->prepare( $statement ) - or warn "Error preparing $statement: ". $dbh->errstr; - my $rc = $sth->execute - or warn "Error executing $statement: ". $sth->errstr; - - $statement = - "ALTER TABLE h_svc_acct ADD COLUMN radius_$attribute varchar($char_d) NULL"; - $sth = $dbh->prepare( $statement ) - or warn "Error preparing $statement: ". $dbh->errstr; - $rc = $sth->execute - or warn "Error executing $statement: ". $sth->errstr; - -} - -$dbh->commit or die $dbh->errstr; - -$dbh->disconnect or die $dbh->errstr; - -print "\n\n", "Now you must run dbdef-create.\n\n"; - -sub usage { - die "Usage:\n fs-radius-add-reply user\n"; -} - - diff --git a/bin/fs-setup b/bin/fs-setup deleted file mode 100755 index 9522ce370..000000000 --- a/bin/fs-setup +++ /dev/null @@ -1,1033 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: fs-setup,v 1.96 2002-07-06 12:13:49 ivan Exp $ - -#to delay loading dbdef until we're ready -BEGIN { $FS::Record::setup_hack = 1; } - -use strict; -use DBI; -use DBIx::DBSchema 0.20; -use DBIx::DBSchema::Table; -use DBIx::DBSchema::Column; -use DBIx::DBSchema::ColGroup::Unique; -use DBIx::DBSchema::ColGroup::Index; -use FS::UID qw(adminsuidsetup datasrc checkeuid getsecrets); -use FS::Record; -use FS::cust_main_county; -use FS::raddb; -use FS::part_bill_event; - -die "Not running uid freeside!" unless checkeuid(); - -my %attrib2db = - map { lc($FS::raddb::attrib{$_}) => $_ } keys %FS::raddb::attrib; - -my $user = shift or die &usage; -getsecrets($user); - -#needs to match FS::Record -my($dbdef_file) = "/usr/local/etc/freeside/dbdef.". datasrc; - -### - -#print "\nEnter the maximum username length: "; -#my($username_len)=&getvalue; -my $username_len = 32; #usernamemax config file - -print "\n\n", <); - chop $x; - $x; -} - -sub _yesno { - print " [y/N]:"; - my $x = scalar(); - $x =~ /^y/i; -} - -### - -my($char_d) = 80; #default maxlength for text fields - -#my(@date_type) = ( 'timestamp', '', '' ); -my(@date_type) = ( 'int', 'NULL', '' ); -my(@perl_type) = ( 'text', 'NULL', '' ); -my @money_type = ( 'decimal', '', '10,2' ); - -### -# create a dbdef object from the old data structure -### - -my(%tables)=&tables_hash_hack; - -#turn it into objects -my($dbdef) = new DBIx::DBSchema ( map { - my(@columns); - while (@{$tables{$_}{'columns'}}) { - my($name,$type,$null,$length)=splice @{$tables{$_}{'columns'}}, 0, 4; - push @columns, new DBIx::DBSchema::Column ( $name,$type,$null,$length ); - } - DBIx::DBSchema::Table->new( - $_, - $tables{$_}{'primary_key'}, - DBIx::DBSchema::ColGroup::Unique->new($tables{$_}{'unique'}), - DBIx::DBSchema::ColGroup::Index->new($tables{$_}{'index'}), - @columns, - ); -} (keys %tables) ); - -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'] ) -} - -#add radius attributes to svc_acct - -my($svc_acct)=$dbdef->table('svc_acct'); - -my($attribute); -foreach $attribute (@attributes) { - $svc_acct->addcolumn ( new DBIx::DBSchema::Column ( - 'radius_'. $attribute, - 'varchar', - 'NULL', - $char_d, - )); -} - -foreach $attribute (@check_attributes) { - $svc_acct->addcolumn( new DBIx::DBSchema::Column ( - 'rc_'. $attribute, - 'varchar', - 'NULL', - $char_d, - )); -} - -##make part_svc table (but now as object) -# -#my($part_svc)=$dbdef->table('part_svc'); -# -##because of svc_acct_pop -##foreach (grep /^svc_/, $dbdef->tables) { -##foreach (qw(svc_acct svc_acct_sm svc_charge svc_domain svc_wo)) { -#foreach (qw(svc_acct svc_domain svc_forward svc_www)) { -# my($table)=$dbdef->table($_); -# my($col); -# foreach $col ( $table->columns ) { -# next if $col =~ /^svcnum$/; -# $part_svc->addcolumn( new DBIx::DBSchema::Column ( -# $table->name. '__' . $table->column($col)->name, -# 'varchar', #$table->column($col)->type, -# 'NULL', -# $char_d, #$table->column($col)->length, -# )); -# $part_svc->addcolumn ( new DBIx::DBSchema::Column ( -# $table->name. '__'. $table->column($col)->name . "_flag", -# 'char', -# 'NULL', -# 1, -# )); -# } -#} - -#create history tables (false laziness w/create-history-tables) -foreach my $table ( grep { ! /^h_/ } $dbdef->tables ) { - my $tableobj = $dbdef->table($table) - or die "unknown table $table"; - - die "unique->lol_ref undefined for $table" - unless defined $tableobj->unique->lol_ref; - die "index->lol_ref undefined for $table" - unless defined $tableobj->index->lol_ref; - - my $h_tableobj = DBIx::DBSchema::Table->new( { - name => "h_$table", - primary_key => 'historynum', - unique => DBIx::DBSchema::ColGroup::Unique->new( [] ), - 'index' => DBIx::DBSchema::ColGroup::Index->new( [ - @{$tableobj->unique->lol_ref}, - @{$tableobj->index->lol_ref} - ] ), - columns => [ - DBIx::DBSchema::Column->new( { - 'name' => 'historynum', - 'type' => 'serial', - 'null' => 'NOT NULL', - 'length' => '', - 'default' => '', - 'local' => '', - } ), - DBIx::DBSchema::Column->new( { - 'name' => 'history_date', - 'type' => 'int', - 'null' => 'NULL', - 'length' => '', - 'default' => '', - 'local' => '', - } ), - DBIx::DBSchema::Column->new( { - 'name' => 'history_user', - 'type' => 'varchar', - 'null' => 'NOT NULL', - 'length' => '80', - 'default' => '', - 'local' => '', - } ), - DBIx::DBSchema::Column->new( { - 'name' => 'history_action', - 'type' => 'varchar', - 'null' => 'NOT NULL', - 'length' => '80', - 'default' => '', - 'local' => '', - } ), - map { $tableobj->column($_) } $tableobj->columns - ], - } ); - $dbdef->addtable($h_tableobj); -} - -#important -$dbdef->save($dbdef_file); -&FS::Record::reload_dbdef($dbdef_file); - -### -# create 'em -### - -my($dbh)=adminsuidsetup $user; - -#create tables -$|=1; - -foreach my $statement ( $dbdef->sql($dbh) ) { - $dbh->do( $statement ) - or die "CREATE error: ". $dbh->errstr. "\ndoing statement: $statement"; -} - -#not really sample data (and shouldn't default to US) - -#cust_main_county - -#USPS state codes -foreach ( qw( -AL AK AS AZ AR CA CO CT DC DE FM FL GA GU HI ID IL IN IA KS KY LA -ME MH MD MA MI MN MS MO MT NC ND NE NH NJ NM NV NY MP OH OK OR PA PW PR RI -SC SD TN TX UT VT VI VA WA WV WI WY AE AA AP -) ) { - my($cust_main_county)=new FS::cust_main_county({ - 'state' => $_, - 'tax' => 0, - 'country' => 'US', - }); - my($error); - $error=$cust_main_county->insert; - die $error if $error; -} - -#AU "offical" state codes ala mark.williamson@ebbs.com.au (Mark Williamson) -foreach ( qw( -VIC NSW NT QLD TAS ACT WA SA -) ) { - my($cust_main_county)=new FS::cust_main_county({ - 'state' => $_, - 'tax' => 0, - 'country' => 'AU', - }); - my($error); - $error=$cust_main_county->insert; - die $error if $error; -} - -#ISO 2-letter country codes (same as country TLDs) except US and AU -foreach ( qw( -AF AL DZ AS AD AO AI AQ AG AR AM AW AT AZ BS BH BD BB BY BE BZ BJ BM BT BO -BA BW BV BR IO BN BG BF BI KH CM CA CV KY CF TD CL CN CX CC CO KM CG CK CR CI -HR CU CY CZ DK DJ DM DO TP EC EG SV GQ ER EE ET FK FO FJ FI FR FX GF PF TF GA -GM GE DE GH GI GR GL GD GP GU GT GN GW GY HT HM HN HK HU IS IN ID IR IQ IE IL -IT JM JP JO KZ KE KI KP KR KW KG LA LV LB LS LR LY LI LT LU MO MK MG MW MY MV -ML MT MH MQ MR MU YT MX FM MD MC MN MS MA MZ MM NA NR NP NL AN NC NZ NI NE NG -NU NF MP NO OM PK PW PA PG PY PE PH PN PL PT PR QA RE RO RU RW KN LC VC WS SM -ST SA SN SC SL SG SK SI SB SO ZA GS ES LK SH PM SD SR SJ SZ SE CH SY TW TJ TZ -TH TG TK TO TT TN TR TM TC TV UG UA AE GB UM UY UZ VU VA VE VN VG VI WF EH -YE YU ZR ZM ZW -) ) { - my($cust_main_county)=new FS::cust_main_county({ - 'tax' => 0, - 'country' => $_, - }); - my($error); - $error=$cust_main_county->insert; - die $error if $error; -} - -#billing events -foreach my $aref ( - [ 'COMP', 'Comp invoice', '$cust_bill->comp();', 30, 'comp' ], - [ 'CARD', 'Batch card', '$cust_bill->batch_card();', 40, 'batch-card' ], - [ 'BILL', 'Send invoice', '$cust_bill->send();', 50, 'send' ], -) { - - my $part_bill_event = new FS::part_bill_event({ - 'payby' => $aref->[0], - 'event' => $aref->[1], - 'eventcode' => $aref->[2], - 'seconds' => 0, - 'weight' => $aref->[3], - 'plan' => $aref->[4], - }); - my($error); - $error=$part_bill_event->insert; - die $error if $error; - -} - -$dbh->commit or die $dbh->errstr; -$dbh->disconnect or die $dbh->errstr; - -print "Freeside database initialized sucessfully\n"; - -sub usage { - die "Usage:\n fs-setup user\n"; -} - -### -# Now it becomes an object. much better. -### -sub tables_hash_hack { - - #note that s/(date|change)/_$1/; to avoid keyword conflict. - #put a kludge in FS::Record to catch this or? (pry need some date-handling - #stuff anyway also) - - my(%tables)=( #yech.} - - 'agent' => { - 'columns' => [ - 'agentnum', 'int', '', '', - 'agent', 'varchar', '', $char_d, - 'typenum', 'int', '', '', - 'freq', 'int', 'NULL', '', - 'prog', @perl_type, - ], - 'primary_key' => 'agentnum', - 'unique' => [], - 'index' => [ ['typenum'] ], - }, - - 'agent_type' => { - 'columns' => [ - 'typenum', 'int', '', '', - 'atype', 'varchar', '', $char_d, - ], - 'primary_key' => 'typenum', - 'unique' => [], - 'index' => [], - }, - - 'type_pkgs' => { - 'columns' => [ - 'typenum', 'int', '', '', - 'pkgpart', 'int', '', '', - ], - 'primary_key' => '', - 'unique' => [ ['typenum', 'pkgpart'] ], - 'index' => [ ['typenum'] ], - }, - - 'cust_bill' => { - 'columns' => [ - 'invnum', 'int', '', '', - 'custnum', 'int', '', '', - '_date', @date_type, - 'charged', @money_type, - 'printed', 'int', '', '', - 'closed', 'char', 'NULL', 1, - ], - 'primary_key' => 'invnum', - 'unique' => [], - 'index' => [ ['custnum'] ], - }, - - 'cust_bill_event' => { - 'columns' => [ - 'eventnum', 'int', '', '', - 'invnum', 'int', '', '', - 'eventpart', 'int', '', '', - '_date', @date_type, - 'status', 'varchar', '', $char_d, - 'statustext', 'text', 'NULL', '', - ], - 'primary_key' => 'eventnum', - #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ], - 'unique' => [], - 'index' => [ ['invnum'], ['status'] ], - }, - - 'part_bill_event' => { - 'columns' => [ - 'eventpart', 'int', '', '', - 'payby', 'char', '', 4, - 'event', 'varchar', '', $char_d, - 'eventcode', @perl_type, - 'seconds', 'int', 'NULL', '', - 'weight', 'int', '', '', - 'plan', 'varchar', 'NULL', $char_d, - 'plandata', 'text', 'NULL', '', - 'disabled', 'char', 'NULL', 1, - ], - 'primary_key' => 'eventpart', - 'unique' => [], - 'index' => [ ['payby'] ], - }, - - 'cust_bill_pkg' => { - 'columns' => [ - 'pkgnum', 'int', '', '', - 'invnum', 'int', '', '', - 'setup', @money_type, - 'recur', @money_type, - 'sdate', @date_type, - 'edate', @date_type, - ], - 'primary_key' => '', - 'unique' => [ ['pkgnum', 'invnum'] ], - 'index' => [ ['invnum'] ], - }, - - 'cust_credit' => { - 'columns' => [ - 'crednum', 'int', '', '', - 'custnum', 'int', '', '', - '_date', @date_type, - 'amount', @money_type, - 'otaker', 'varchar', '', 8, - 'reason', 'text', 'NULL', '', - 'closed', 'char', 'NULL', 1, - ], - 'primary_key' => 'crednum', - 'unique' => [], - 'index' => [ ['custnum'] ], - }, - - 'cust_credit_bill' => { - 'columns' => [ - 'creditbillnum', 'int', '', '', - 'crednum', 'int', '', '', - 'invnum', 'int', '', '', - '_date', @date_type, - 'amount', @money_type, - ], - 'primary_key' => 'creditbillnum', - 'unique' => [], - 'index' => [ ['crednum'], ['invnum'] ], - }, - - 'cust_main' => { - 'columns' => [ - 'custnum', 'int', '', '', - 'agentnum', 'int', '', '', -# 'titlenum', 'int', 'NULL', '', - 'last', 'varchar', '', $char_d, -# 'middle', 'varchar', 'NULL', $char_d, - 'first', 'varchar', '', $char_d, - 'ss', 'char', 'NULL', 11, - 'company', 'varchar', 'NULL', $char_d, - 'address1', 'varchar', '', $char_d, - 'address2', 'varchar', 'NULL', $char_d, - 'city', 'varchar', '', $char_d, - 'county', 'varchar', 'NULL', $char_d, - 'state', 'varchar', 'NULL', $char_d, - 'zip', 'varchar', '', 10, - 'country', 'char', '', 2, - 'daytime', 'varchar', 'NULL', 20, - 'night', 'varchar', 'NULL', 20, - 'fax', 'varchar', 'NULL', 12, - 'ship_last', 'varchar', 'NULL', $char_d, -# 'ship_middle', 'varchar', 'NULL', $char_d, - 'ship_first', 'varchar', 'NULL', $char_d, - 'ship_company', 'varchar', 'NULL', $char_d, - 'ship_address1', 'varchar', 'NULL', $char_d, - 'ship_address2', 'varchar', 'NULL', $char_d, - 'ship_city', 'varchar', 'NULL', $char_d, - 'ship_county', 'varchar', 'NULL', $char_d, - 'ship_state', 'varchar', 'NULL', $char_d, - 'ship_zip', 'varchar', 'NULL', 10, - 'ship_country', 'char', 'NULL', 2, - 'ship_daytime', 'varchar', 'NULL', 20, - 'ship_night', 'varchar', 'NULL', 20, - 'ship_fax', 'varchar', 'NULL', 12, - 'payby', 'char', '', 4, - 'payinfo', 'varchar', 'NULL', $char_d, - #'paydate', @date_type, - 'paydate', 'varchar', 'NULL', 10, - 'payname', 'varchar', 'NULL', $char_d, - 'tax', 'char', 'NULL', 1, - 'otaker', 'varchar', '', 8, - 'refnum', 'int', '', '', - 'referral_custnum', 'int', 'NULL', '', - 'comments', 'text', 'NULL', '', - ], - 'primary_key' => 'custnum', - 'unique' => [], - #'index' => [ ['last'], ['company'] ], - 'index' => [ ['last'], [ 'company' ], [ 'referral_custnum' ] ], - }, - - 'cust_main_invoice' => { - 'columns' => [ - 'destnum', 'int', '', '', - 'custnum', 'int', '', '', - 'dest', 'varchar', '', $char_d, - ], - 'primary_key' => 'destnum', - 'unique' => [], - 'index' => [ ['custnum'], ], - }, - - 'cust_main_county' => { #county+state+country are checked off the - #cust_main_county for validation and to provide - # a tax rate. - 'columns' => [ - 'taxnum', 'int', '', '', - 'state', 'varchar', 'NULL', $char_d, - 'county', 'varchar', 'NULL', $char_d, - 'country', 'char', '', 2, - 'taxclass', 'varchar', 'NULL', $char_d, - 'exempt_amount', @money_type, - 'tax', 'real', '', '', #tax % - ], - 'primary_key' => 'taxnum', - 'unique' => [], - # 'unique' => [ ['taxnum'], ['state', 'county'] ], - 'index' => [], - }, - - 'cust_pay' => { - 'columns' => [ - 'paynum', 'int', '', '', - #now cust_bill_pay #'invnum', 'int', '', '', - 'custnum', 'int', '', '', - 'paid', @money_type, - '_date', @date_type, - 'payby', 'char', '', 4, # CARD/BILL/COMP, should be index into - # payment type table. - 'payinfo', 'varchar', 'NULL', 16, #see cust_main above - 'paybatch', 'varchar', 'NULL', $char_d, #for auditing purposes. - 'closed', 'char', 'NULL', 1, - ], - 'primary_key' => 'paynum', - 'unique' => [], - 'index' => [ [ 'custnum' ], [ 'paybatch' ] ], - }, - - 'cust_bill_pay' => { - 'columns' => [ - 'billpaynum', 'int', '', '', - 'invnum', 'int', '', '', - 'paynum', 'int', '', '', - 'amount', @money_type, - '_date', @date_type - ], - 'primary_key' => 'billpaynum', - 'unique' => [], - 'index' => [ [ 'paynum' ], [ 'invnum' ] ], - }, - - 'cust_pay_batch' => { #what's this used for again? list of customers - #in current CARD batch? (necessarily CARD?) - 'columns' => [ - 'paybatchnum', 'int', '', '', - 'invnum', 'int', '', '', - 'custnum', 'int', '', '', - 'last', 'varchar', '', $char_d, - 'first', 'varchar', '', $char_d, - 'address1', 'varchar', '', $char_d, - 'address2', 'varchar', 'NULL', $char_d, - 'city', 'varchar', '', $char_d, - 'state', 'varchar', 'NULL', $char_d, - 'zip', 'varchar', '', 10, - 'country', 'char', '', 2, -# 'trancode', 'int', '', '', - 'cardnum', 'varchar', '', 16, - #'exp', @date_type, - 'exp', 'varchar', '', 11, - 'payname', 'varchar', 'NULL', $char_d, - 'amount', @money_type, - ], - 'primary_key' => 'paybatchnum', - 'unique' => [], - 'index' => [ ['invnum'], ['custnum'] ], - }, - - 'cust_pkg' => { - 'columns' => [ - 'pkgnum', 'int', '', '', - 'custnum', 'int', '', '', - 'pkgpart', 'int', '', '', - 'otaker', 'varchar', '', 8, - 'setup', @date_type, - 'bill', @date_type, - 'susp', @date_type, - 'cancel', @date_type, - 'expire', @date_type, - 'manual_flag', 'char', 'NULL', 1, - ], - 'primary_key' => 'pkgnum', - 'unique' => [], - 'index' => [ ['custnum'] ], - }, - - 'cust_refund' => { - 'columns' => [ - 'refundnum', 'int', '', '', - #now cust_credit_refund #'crednum', 'int', '', '', - 'custnum', 'int', '', '', - '_date', @date_type, - 'refund', @money_type, - 'otaker', 'varchar', '', 8, - 'reason', 'varchar', '', $char_d, - 'payby', 'char', '', 4, # CARD/BILL/COMP, should be index - # into payment type table. - 'payinfo', 'varchar', 'NULL', 16, #see cust_main above - 'paybatch', 'varchar', 'NULL', $char_d, - 'closed', 'char', 'NULL', 1, - ], - 'primary_key' => 'refundnum', - 'unique' => [], - 'index' => [], - }, - - 'cust_credit_refund' => { - 'columns' => [ - 'creditrefundnum', 'int', '', '', - 'crednum', 'int', '', '', - 'refundnum', 'int', '', '', - 'amount', @money_type, - '_date', @date_type - ], - 'primary_key' => 'creditrefundnum', - 'unique' => [], - 'index' => [ [ 'crednum', 'refundnum' ] ], - }, - - - 'cust_svc' => { - 'columns' => [ - 'svcnum', 'int', '', '', - 'pkgnum', 'int', 'NULL', '', - 'svcpart', 'int', '', '', - ], - 'primary_key' => 'svcnum', - 'unique' => [], - 'index' => [ ['svcnum'], ['pkgnum'], ['svcpart'] ], - }, - - 'part_pkg' => { - 'columns' => [ - 'pkgpart', 'int', '', '', - 'pkg', 'varchar', '', $char_d, - 'comment', 'varchar', '', $char_d, - 'setup', @perl_type, - 'freq', 'int', '', '', #billing frequency (months) - 'recur', @perl_type, - 'setuptax', 'char', 'NULL', 1, - 'recurtax', 'char', 'NULL', 1, - 'plan', 'varchar', 'NULL', $char_d, - 'plandata', 'text', 'NULL', '', - 'disabled', 'char', 'NULL', 1, - 'taxclass', 'varchar', 'NULL', $char_d, - ], - 'primary_key' => 'pkgpart', - 'unique' => [], - 'index' => [], - }, - -# 'part_title' => { -# 'columns' => [ -# 'titlenum', 'int', '', '', -# 'title', 'varchar', '', $char_d, -# ], -# 'primary_key' => 'titlenum', -# 'unique' => [ [] ], -# 'index' => [ [] ], -# }, - - 'pkg_svc' => { - 'columns' => [ - 'pkgpart', 'int', '', '', - 'svcpart', 'int', '', '', - 'quantity', 'int', '', '', - ], - 'primary_key' => '', - 'unique' => [ ['pkgpart', 'svcpart'] ], - 'index' => [ ['pkgpart'] ], - }, - - 'part_referral' => { - 'columns' => [ - 'refnum', 'int', '', '', - 'referral', 'varchar', '', $char_d, - ], - 'primary_key' => 'refnum', - 'unique' => [], - 'index' => [], - }, - - 'part_svc' => { - 'columns' => [ - 'svcpart', 'int', '', '', - 'svc', 'varchar', '', $char_d, - 'svcdb', 'varchar', '', $char_d, - 'disabled', 'char', 'NULL', 1, - ], - 'primary_key' => 'svcpart', - 'unique' => [], - 'index' => [], - }, - - 'part_svc_column' => { - 'columns' => [ - 'columnnum', 'int', '', '', - 'svcpart', 'int', '', '', - 'columnname', 'varchar', '', 64, - 'columnvalue', 'varchar', 'NULL', $char_d, - 'columnflag', 'char', 'NULL', 1, - ], - 'primary_key' => 'columnnum', - 'unique' => [ [ 'svcpart', 'columnname' ] ], - 'index' => [ [ 'svcpart' ] ], - }, - - #(this should be renamed to part_pop) - 'svc_acct_pop' => { - 'columns' => [ - 'popnum', 'int', '', '', - 'city', 'varchar', '', $char_d, - 'state', 'varchar', '', $char_d, - 'ac', 'char', '', 3, - 'exch', 'char', '', 3, - 'loc', 'char', 'NULL', 4, #NULL for legacy purposes - ], - 'primary_key' => 'popnum', - 'unique' => [], - 'index' => [ [ 'state' ] ], - }, - - 'part_pop_local' => { - 'columns' => [ - 'localnum', 'int', '', '', - 'popnum', 'int', '', '', - 'city', 'varchar', 'NULL', $char_d, - 'state', 'char', 'NULL', 2, - 'npa', 'char', '', 3, - 'nxx', 'char', '', 3, - ], - 'primary_key' => 'localnum', - 'unique' => [], - 'index' => [ [ 'npa', 'nxx' ], [ 'popnum' ] ], - }, - - 'svc_acct' => { - 'columns' => [ - 'svcnum', 'int', '', '', - 'username', 'varchar', '', $username_len, #unique (& remove dup code) - '_password', 'varchar', '', 50, #13 for encryped pw's plus ' *SUSPENDED* (mp5 passwords can be 34) - 'sec_phrase', 'varchar', 'NULL', $char_d, - 'popnum', 'int', 'NULL', '', - 'uid', 'int', 'NULL', '', - 'gid', 'int', 'NULL', '', - 'finger', 'varchar', 'NULL', $char_d, - 'dir', 'varchar', 'NULL', $char_d, - 'shell', 'varchar', 'NULL', $char_d, - 'quota', 'varchar', 'NULL', $char_d, - 'slipip', 'varchar', 'NULL', 15, #four TINYINTs, bah. - 'seconds', 'int', 'NULL', '', #uhhhh - 'domsvc', 'int', '', '', - ], - 'primary_key' => 'svcnum', - #'unique' => [ [ 'username', 'domsvc' ] ], - 'unique' => [], - 'index' => [ ['username'], ['domsvc'] ], - }, - -# 'svc_acct_sm' => { -# 'columns' => [ -# 'svcnum', 'int', '', '', -# 'domsvc', 'int', '', '', -# 'domuid', 'int', '', '', -# 'domuser', 'varchar', '', $char_d, -# ], -# 'primary_key' => 'svcnum', -# 'unique' => [ [] ], -# 'index' => [ ['domsvc'], ['domuid'] ], -# }, - - #'svc_charge' => { - # 'columns' => [ - # 'svcnum', 'int', '', '', - # 'amount', @money_type, - # ], - # 'primary_key' => 'svcnum', - # 'unique' => [ [] ], - # 'index' => [ [] ], - #}, - - 'svc_domain' => { - 'columns' => [ - 'svcnum', 'int', '', '', - 'domain', 'varchar', '', $char_d, - 'catchall', 'int', 'NULL', '', - ], - 'primary_key' => 'svcnum', - 'unique' => [ ['domain'] ], - 'index' => [], - }, - - 'domain_record' => { - 'columns' => [ - 'recnum', 'int', '', '', - 'svcnum', 'int', '', '', - 'reczone', 'varchar', '', $char_d, - 'recaf', 'char', '', 2, - 'rectype', 'char', '', 5, - 'recdata', 'varchar', '', $char_d, - ], - 'primary_key' => 'recnum', - 'unique' => [], - 'index' => [ ['svcnum'] ], - }, - - 'svc_forward' => { - 'columns' => [ - 'svcnum', 'int', '', '', - 'srcsvc', 'int', '', '', - 'dstsvc', 'int', '', '', - 'dst', 'varchar', 'NULL', $char_d, - ], - 'primary_key' => 'svcnum', - 'unique' => [], - 'index' => [ ['srcsvc'], ['dstsvc'] ], - }, - - 'svc_www' => { - 'columns' => [ - 'svcnum', 'int', '', '', - 'recnum', 'int', '', '', - 'usersvc', 'int', '', '', - ], - 'primary_key' => 'svcnum', - 'unique' => [], - 'index' => [], - }, - - #'svc_wo' => { - # 'columns' => [ - # 'svcnum', 'int', '', '', - # 'svcnum', 'int', '', '', - # 'svcnum', 'int', '', '', - # 'worker', 'varchar', '', $char_d, - # '_date', @date_type, - # ], - # 'primary_key' => 'svcnum', - # 'unique' => [ [] ], - # 'index' => [ [] ], - #}, - - 'prepay_credit' => { - 'columns' => [ - 'prepaynum', 'int', '', '', - 'identifier', 'varchar', '', $char_d, - 'amount', @money_type, - 'seconds', 'int', 'NULL', '', - ], - 'primary_key' => 'prepaynum', - 'unique' => [ ['identifier'] ], - 'index' => [], - }, - - 'port' => { - 'columns' => [ - 'portnum', 'int', '', '', - 'ip', 'varchar', 'NULL', 15, - 'nasport', 'int', 'NULL', '', - 'nasnum', 'int', '', '', - ], - 'primary_key' => 'portnum', - 'unique' => [], - 'index' => [], - }, - - 'nas' => { - 'columns' => [ - 'nasnum', 'int', '', '', - 'nas', 'varchar', '', $char_d, - 'nasip', 'varchar', '', 15, - 'nasfqdn', 'varchar', '', $char_d, - 'last', 'int', '', '', - ], - 'primary_key' => 'nasnum', - 'unique' => [ [ 'nas' ], [ 'nasip' ] ], - 'index' => [ [ 'last' ] ], - }, - - 'session' => { - 'columns' => [ - 'sessionnum', 'int', '', '', - 'portnum', 'int', '', '', - 'svcnum', 'int', '', '', - 'login', @date_type, - 'logout', @date_type, - ], - 'primary_key' => 'sessionnum', - 'unique' => [], - 'index' => [ [ 'portnum' ] ], - }, - - 'queue' => { - 'columns' => [ - 'jobnum', 'int', '', '', - 'job', 'text', '', '', - '_date', 'int', '', '', - 'status', 'varchar', '', $char_d, - 'statustext', 'text', 'NULL', '', - 'svcnum', 'int', 'NULL', '', - ], - 'primary_key' => 'jobnum', - 'unique' => [], - 'index' => [ [ 'svcnum' ], [ 'status' ] ], - }, - - 'queue_arg' => { - 'columns' => [ - 'argnum', 'int', '', '', - 'jobnum', 'int', '', '', - 'arg', 'text', 'NULL', '', - ], - 'primary_key' => 'argnum', - 'unique' => [], - 'index' => [ [ 'jobnum' ] ], - }, - - 'queue_depend' => { - 'columns' => [ - 'dependnum', 'int', '', '', - 'jobnum', 'int', '', '', - 'depend_jobnum', 'int', '', '', - ], - 'primary_key' => 'dependnum', - 'unique' => [], - 'index' => [ [ 'jobnum' ], [ 'depend_jobnum' ] ], - }, - - 'export_svc' => { - 'columns' => [ - 'exportsvcnum' => 'int', '', '', - 'exportnum' => 'int', '', '', - 'svcpart' => 'int', '', '', - ], - 'primary_key' => 'exportsvcnum', - 'unique' => [ [ 'exportnum', 'svcpart' ] ], - 'index' => [ [ 'exportnum' ], [ 'svcpart' ] ], - }, - - 'part_export' => { - 'columns' => [ - 'exportnum', 'int', '', '', - #'svcpart', 'int', '', '', - 'machine', 'varchar', '', $char_d, - 'exporttype', 'varchar', '', $char_d, - 'nodomain', 'char', 'NULL', 1, - ], - 'primary_key' => 'exportnum', - 'unique' => [], - 'index' => [ [ 'machine' ], [ 'exporttype' ] ], - }, - - 'part_export_option' => { - 'columns' => [ - 'optionnum', 'int', '', '', - 'exportnum', 'int', '', '', - 'optionname', 'varchar', '', $char_d, - 'optionvalue', 'text', 'NULL', '', - ], - 'primary_key' => 'optionnum', - 'unique' => [], - 'index' => [ [ 'exportnum' ], [ 'optionname' ] ], - }, - - 'radius_usergroup' => { - 'columns' => [ - 'usergroupnum', 'int', '', '', - 'svcnum', 'int', '', '', - 'groupname', 'varchar', '', $char_d, - ], - 'primary_key' => 'usergroupnum', - 'unique' => [], - 'index' => [ [ 'svcnum' ], [ 'groupname' ] ], - }, - - 'msgcat' => { - 'columns' => [ - 'msgnum', 'int', '', '', - 'msgcode', 'varchar', '', $char_d, - 'locale', 'varchar', '', 16, - 'msg', 'text', '', '', - ], - 'primary_key' => 'msgnum', - 'unique' => [ [ 'msgcode', 'locale' ] ], - 'index' => [], - }, - - 'cust_tax_exempt' => { - 'columns' => [ - 'exemptnum', 'int', '', '', - 'custnum', 'int', '', '', - 'taxnum', 'int', '', '', - 'year', 'int', '', '', - 'month', 'int', '', '', - 'amount', @money_type, - ], - 'primary_key' => 'exemptnum', - 'unique' => [ [ 'custnum', 'taxnum', 'year', 'month' ] ], - 'index' => [], - }, - - - - ); - - %tables; - -} - diff --git a/bin/generate-prepay b/bin/generate-prepay deleted file mode 100755 index cb4ba7fc6..000000000 --- a/bin/generate-prepay +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::prepay_credit; - -require 5.004; #srand(time|$$); - -my $user = shift or die &usage; -&adminsuidsetup( $user ); - -my $amount = shift or die &usage; - -my $seconds = shift or die &usage; - -my $num_digits = shift or die &usage; - -my $num_entries = shift or die &usage; - -for ( 1 .. $num_entries ) { - my $identifier = join( '', map int(rand(10)), ( 1 .. $num_digits ) ); - my $prepay_credit = new FS::prepay_credit { - 'identifier' => $identifier, - 'amount' => $amount, - 'seconds' => $seconds, - }; - my $error = $prepay_credit->insert; - die $error if $error; - print "$identifier\n"; -} - -sub usage { - die "Usage:\n\n generate-prepay user amount seconds num_digits num_entries"; -} - diff --git a/bin/generate-raddb b/bin/generate-raddb deleted file mode 100755 index 1d0053a2b..000000000 --- a/bin/generate-raddb +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -# usage: generate-raddb radius-server/raddb/dictionary* >raddb.pm -# i.e.: generate-raddb ~/src/freeradius-0.2/raddb/dictionary* >FS/raddb.pm - -print <) { - next if /^(#|\s*$|\$INCLUDE\s+)/; - next if /^(VALUE|VENDOR|BEGIN\-VENDOR|END\-VENDOR)\s+/; - /^(ATTRIBUTE|ATTRIB_NMC)\s+([\w\-]+)\s+/ or die $_; - $attrib = $2; - $dbname = lc($2); - $dbname =~ s/\-/_/g; - $hash{$dbname} = $attrib; - #print "$2\n"; -} - -foreach ( keys %hash ) { -# print "$_\n" if length($_)>24; -# print substr($_,0,24),"\n" if length($_)>24; -# $max = length($_) if length($_)>$max; -#everything >24 is still unique, at least with freeradius comprehensive dataset - print " '". substr($_,0,24). "' => '$hash{$_}',\n"; -} - -print <t/$f"); - print "t/$f\n"; - print TEST - 'BEGIN { $| = 1; print "1..1\n" }'. "\n". - 'END {print "not ok 1\n" unless $loaded;}'. "\n". - "use FS::$m;\n". - '$loaded=1;'. "\n". - 'print "ok 1\n";'. "\n" - ; - close TEST; -} diff --git a/bin/masonize b/bin/masonize deleted file mode 100755 index 475c9a6bf..000000000 --- a/bin/masonize +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/perl - -foreach $file ( split(/\n/, `find . -depth -print | grep cgi\$`) ) { - open(F,$file) or die "can't open $file for reading: $!"; - @file = ; - #print "$file ". scalar(@file). "\n"; - close $file; - system("chmod u+w $file"); - open(W,">$file") or die "can't open $file for writing: $!"; - select W; $| = 1; select STDOUT; - $all = join('',@file); - - $mode = 'html'; - while ( length($all) ) { - - if ( $mode eq 'html' ) { - - if ( $all =~ /^(.+?)(<%=?.*)$/s && $1 !~ /<%/s ) { - print W $1; - $all = $2; - next; - } elsif ( $all =~ /^<%=(.*)$/s ) { - print W '<%'; - $all = $1; - $mode = 'perlv'; - #die; - next; - } elsif ( $all =~ /^<%(.*)$/s ) { - print W "\n"; - $all = $1; - $mode = 'perlc'; - next; - } elsif ( $all !~ /<%/s ) { - print W $all; - last; - } else { - warn length($all); die; - } - die; - - } elsif ( $mode eq 'perlv' ) { - - if ( $all =~ /^(.*?%>)(.*)$/s ) { - print W $1; - $all=$2; - $mode = 'html'; - next; - } - die 'unterminated <%= ???'; - - } elsif ( $mode eq 'perlc' ) { - - if ( $all =~ /^([^\n]*?)%>(.*)$/s ) { - print W "%$1\n"; - $all=$2; - $mode='html'; - next; - } - if ( $all =~ /^([^\n]*)\n(.*)$/s ) { - print W "%$1\n"; - $all=$2; - next; - } - - } else { die }; - - } - - close W; -} diff --git a/bin/passwd.import b/bin/passwd.import deleted file mode 100755 index fbf27370f..000000000 --- a/bin/passwd.import +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/perl -Tw -# $Id: passwd.import,v 1.5 2002-06-21 09:57:05 ivan Exp $ - -use strict; -use vars qw(%part_svc); -use Date::Parse; -use Term::Query qw(query); -use Net::SCP qw(iscp); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch qsearchs); -use FS::svc_acct; -use FS::part_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -push @FS::svc_acct::shells, qw(/bin/sync /sbin/shuddown /bin/halt); #others? - -my($spooldir)="/usr/local/etc/freeside/export.". datasrc; - -#$FS::svc_acct::nossh_hack = 1; -$FS::svc_Common::noexport_hack = 1; - -### - -%part_svc=map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_acct'}); - -die "No services with svcdb svc_acct!\n" unless %part_svc; - -print "\n\n", &menu_svc, "\n", <svc, sort keys %part_svc ). "\n"; -} -sub getpart { - $^W=0; # Term::Query isn't -w-safe - my $return = query "Enter part number:", 'irk', [ keys %part_svc ]; - $^W=1; - $return; -} -sub getvalue { - my $prompt = shift; - $^W=0; # Term::Query isn't -w-safe - my $return = query $prompt, ''; - $^W=1; - $return; -} - -print "\n\n"; - -### - -open(PASSWD,"<$spooldir/passwd.import"); -open(SHADOW,"<$spooldir/shadow.import"); - -my(%password); -while () { - chop; - my($username,$password)=split(/:/); - #$password =~ s/^\!$/\*/; - #$password =~ s/\!+/\*SUSPENDED\* /; - $password{$username}=$password; -} - -while () { - chop; - my($username,$x,$uid,$gid,$finger,$dir,$shell) = split(/:/); - my $password = $password{$username}; - - my $svcpart = $shell_svcpart; - - #if ( qsearchs('svc_acct', { 'username' => $username } ) ) { - # warn "warning: $username already exists; skipping\n"; - # next; - #} - - my($svc_acct) = new FS::svc_acct ({ - 'svcpart' => $svcpart, - 'username' => $username, - '_password' => $password, - 'uid' => $uid, - 'gid' => $gid, - 'finger' => $finger, - 'dir' => $dir, - 'shell' => $shell, - #%{$allparam{$username}}, - }); - my($error); - $error=$svc_acct->insert; - die $error if $error; - -} - -sub usage { - die "Usage:\n\n passwd.import user\n"; -} - diff --git a/bin/pod2x b/bin/pod2x deleted file mode 100755 index 46ccc7743..000000000 --- a/bin/pod2x +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/perl - -#use Pod::Text; -#$Pod::Text::termcap=1; - -my $site_perl = "./FS"; -#my $catman = "./catman"; -#my $catman = "./htdocs/docs/man"; -#my $html = "./htdocs/docs/man"; -my $html = "./httemplate/docs/man"; - -$|=1; - -die "Can't find $site_perl" unless -d $site_perl; -#die "Can't find $catman" unless -d $catman; -die "Can't find $html" unless -d $html; - -#make some useless links -foreach my $file ( - glob("$site_perl/bin/freeside-*"), -) { - next if $file =~ /\.pod$/; - #symlink $file, "$file.pod"; # or die "link $file to $file.pod: $!"; - system("cp $file $file.pod"); -} - -foreach my $file ( - glob("$site_perl/*.pm"), - glob("$site_perl/*/*.pm"), - glob("$site_perl/*/*/*.pm"), - glob("$site_perl/bin/*.pod"), - glob("./fs_sesmon/FS-SessionClient/*.pm"), - glob("./fs_signup/FS-SignupClient/*.pm"), - glob("./fs_selfadmin/FS-MailAdminServer/*.pm"), -) { - next if $file =~ /(^|\/)blib\//; - #$file =~ /\/([\w\-]+)\.pm$/ or die "oops file $file"; - my $name; - if ( $file =~ /fs_\w+\/FS\-\w+\/(.*)\.pm$/ ) { - $name = "FS/$1"; - } elsif ( $file =~ /$site_perl\/(.*)\.(pm|pod)$/ ) { - $name = $1; - } else { - die "oops file $file"; - } - print "$name\n"; - my $htmlroot = join('/', map '..',1..(scalar($file =~ tr/\///)-2)) || '.'; -# system "pod2text $file >$catman/$name.txt"; - system "pod2html --podroot=$site_perl --podpath=./FS:./FS/UI:.:./bin --norecurse --htmlroot=$htmlroot $file >$html/$name.html"; - #system "pod2html --podroot=$site_perl --htmlroot=$htmlroot $file >$html/$name.html"; -# system "pod2html $file >$html/$name.html"; -} - -#remove the useless links -unlink glob("$site_perl/bin/*.pod"); - diff --git a/bin/populate-msgcat b/bin/populate-msgcat deleted file mode 100755 index f8e23cfa0..000000000 --- a/bin/populate-msgcat +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearch); -use FS::msgcat; - -my $user = shift or die &usage; -adminsuidsetup $user; - -foreach my $del_msgcat ( qsearch('msgcat', {}) ) { - my $error = $del_msgcat->delete; - die $error if $error; -} - -my %messages = messages(); - -foreach my $msgcode ( keys %messages ) { - foreach my $locale ( keys %{$messages{$msgcode}} ) { - my $msgcat = new FS::msgcat( { - 'msgcode' => $msgcode, - 'locale' => $locale, - 'msg' => $messages{$msgcode}{$locale}, - }); - my $error = $msgcat->insert; - die $error if $error; - } -} - -print "Message catalog initialized sucessfully\n"; - -sub messages { - - # 'msgcode' => { - # 'en_US' => 'Message', - # }, - - ( - - 'passwords_dont_match' => { - 'en_US' => "Passwords don't match", - }, - - 'invalid_card' => { - 'en_US' => 'Invalid credit card number', - }, - - 'unknown_card_type' => { - 'en_US' => 'Unknown card type', - }, - - 'not_a' => { - 'en_US' => 'Not a ', - }, - - 'empty_password' => { - 'en_US' => 'Empty password', - }, - - 'no_access_number_selected' => { - 'en_US' => 'No access number selected', - }, - - 'illegal_text' => { - 'en_US' => 'Illegal (text)', - #'en_US' => 'Only letters, numbers, spaces, and the following punctuation symbols are permitted: ! @ # $ % & ( ) - + ; : \' " , . ? / in field', - }, - - 'illegal_or_empty_text' => { - 'en_US' => 'Illegal or empty (text)', - #'en_US' => 'Only letters, numbers, spaces, and the following punctuation symbols are permitted: ! @ # $ % & ( ) - + ; : \' " , . ? / in required field', - }, - - 'illegal_username' => { - 'en_US' => 'Illegal username', - }, - - 'illegal_password' => { - 'en_US' => 'Illegal password (', - }, - - 'illegal_password_characters' => { - 'en_US' => ' characters)', - }, - - 'username_in_use' => { - 'en_US' => 'Username in use', - }, - - 'illegal_email_invoice_address' => { - 'en_US' => 'Illegal email invoice address', - }, - - 'illegal_name' => { - 'en_US' => 'Illegal (name)', - #'en_US' => 'Only letters, numbers, spaces and the following punctuation symbols are permitted: , . - \' in field', - }, - - 'illegal_phone' => { - 'en_US' => 'Illegal (phone)', - #'en_US' => '', - }, - - 'illegal_zip' => { - 'en_US' => 'Illegal (zip)', - #'en_US' => '', - }, - - 'expired_card' => { - 'en_US' => 'Expired card', - }, - - ); -} - -sub usage { - die "Usage:\n\n populate-msgcat user\n"; -} - diff --git a/bin/svc_acct.export b/bin/svc_acct.export deleted file mode 100755 index 0bc370fc0..000000000 --- a/bin/svc_acct.export +++ /dev/null @@ -1,641 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id: svc_acct.export,v 1.36 2002-05-16 14:28:35 ivan Exp $ -# -# Create and export password, radius and vpopmail password files: -# passwd, passwd.adjunct, shadow, acp_passwd, acp_userinfo, acp_dialup -# users/assign, domains/vdomain/vpasswd -# Also export sendmail and qmail config files. - -use strict; -use vars qw($conf); -use Fcntl qw(:flock); -use File::Path; -use IO::Handle; -use FS::Conf; -use Net::SSH qw(ssh); -use Net::SCP qw(scp); -use FS::UID qw(adminsuidsetup datasrc dbh); -use FS::Record qw(qsearch qsearchs fields); -use FS::svc_acct; -use FS::svc_domain; -use FS::svc_forward; - -my $ssh='ssh'; -my $rsync='rsync'; - -my $user = shift or die &usage; -adminsuidsetup $user; - -$conf = new FS::Conf; - -my $userpolicy = $conf->config('username_policy') - if $conf->exists('username_policy'); - -my @shellmachines = $conf->config('shellmachines') - if $conf->exists('shellmachines'); - -my @bsdshellmachines = $conf->config('bsdshellmachines') - if $conf->exists('bsdshellmachines'); - -my @nismachines = $conf->config('nismachines') - if $conf->exists('nismachines'); - -my @erpcdmachines = $conf->config('erpcdmachines') - if $conf->exists('erpcdmachines'); - -my @radiusmachines = $conf->config('radiusmachines') - if $conf->exists('radiusmachines'); - -my $textradiusprepend = - $conf->exists('textradiusprepend') - ? $conf->config('textradiusprepend') - : ''; - -warn "using depriciated textradiusprepend file" if $textradiusprepend; - - -my $radiusprepend = - $conf->exists('radiusprepend') - ? join("\n", $conf->config('radiusprepend')) - : ''; - -my @vpopmailmachines = $conf->config('vpopmailmachines') - if $conf->exists('vpopmailmachines'); -my $vpopmailrestart = ''; -$vpopmailrestart = $conf->config('vpopmailrestart') - if $conf->exists('vpopmailrestart'); - -my ($machine, $vpopdir, $vpopuid, $vpopgid) = split (/\s+/, $vpopmailmachines[0]) if $vpopmailmachines[0]; - -my($shellmachine, @qmailmachines); -if ( $conf->exists('qmailmachines') ) { - $shellmachine = $conf->config('shellmachine'); - @qmailmachines = $conf->config('qmailmachines'); -} - -my(@sendmailmachines, $sendmailconfigpath, $sendmailrestart); -if ( $conf->exists('sendmailmachines') ) { - @sendmailmachines = $conf->config('sendmailmachines'); - $sendmailconfigpath = $conf->config('sendmailconfigpath') || '/etc'; - $sendmailrestart = $conf->config('sendmailrestart'); -} - -my $mydomain = $conf->config('domain') if $conf->exists('domain'); - - - - -my(@saltset)= ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); -require 5.004; #srand(time|$$); - -my $spooldir = "/usr/local/etc/freeside/export.". datasrc; -my $spoollock = "/usr/local/etc/freeside/svc_acct.export.lock.". datasrc; - -open(EXPORT,"+>>$spoollock") or die "Can't open $spoollock: $!"; -select(EXPORT); $|=1; select(STDOUT); -unless ( flock(EXPORT,LOCK_EX|LOCK_NB) ) { - seek(EXPORT,0,0); - my($pid)=; - chop($pid); - #no reason to start lots of blocking processes - die "Is another export process running under pid $pid?\n"; -} -seek(EXPORT,0,0); -print EXPORT $$,"\n"; - -my(@svc_domain)=qsearch('svc_domain',{}); - -( open(MASTER,">$spooldir/master.passwd") - and flock(MASTER,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/.master.passwd: $!"; -( open(PASSWD,">$spooldir/passwd") - and flock(PASSWD,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/passwd: $!"; -( open(SHADOW,">$spooldir/shadow") - and flock(SHADOW,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/shadow: $!"; -( open(ACP_PASSWD,">$spooldir/acp_passwd") - and flock(ACP_PASSWD,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/acp_passwd: $!"; -( open(ACP_DIALUP,">$spooldir/acp_dialup") - and flock(ACP_DIALUP,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/acp_dialup: $!"; -( open(USERS,">$spooldir/users") - and flock(USERS,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/users: $!"; - -( open(ASSIGN,">$spooldir/assign") - and flock(ASSIGN,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/assign: $!"; -( open(RCPTHOSTS,">$spooldir/rcpthosts") - and flock(RCPTHOSTS,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/rcpthosts: $!"; -( open(VPOPRCPTHOSTS,">$spooldir/vpoprcpthosts") - and flock(VPOPRCPTHOSTS,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/rcpthosts: $!"; -( open(RECIPIENTMAP,">$spooldir/recipientmap") - and flock(RECIPIENTMAP,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/recipientmap: $!"; -( open(VIRTUALDOMAINS,">$spooldir/virtualdomains") - and flock(VIRTUALDOMAINS,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/virtualdomains: $!"; -( open(VPOPVIRTUALDOMAINS,">$spooldir/vpopvirtualdomains") - and flock(VPOPVIRTUALDOMAINS,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/virtualdomains: $!"; -( open(VIRTUSERTABLE,">$spooldir/virtusertable") - and flock(VIRTUSERTABLE,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/virtusertable: $!"; -( open(SENDMAIL_CW,">$spooldir/sendmail.cw") - and flock(SENDMAIL_CW,LOCK_EX|LOCK_NB) -) or die "Can't open $spooldir/sendmail.cw: $!"; - - - -chmod 0644, "$spooldir/passwd", - "$spooldir/acp_dialup", - "$spooldir/assign", - "$spooldir/sendmail.cw", - "$spooldir/virtusertable", - "$spooldir/rcpthosts", - "$spooldir/vpoprcpthosts", - "$spooldir/recipientmap", - "$spooldir/virtualdomains", - "$spooldir/vpopvirtualdomains", - -; -chmod 0600, "$spooldir/master.passwd", - "$spooldir/acp_passwd", - "$spooldir/shadow", - "$spooldir/users", -; - -rmtree"$spooldir/domains", 0, 1; -mkdir "$spooldir/domains", 0700; - -setpriority(0,0,10); - -print USERS "$radiusprepend\n"; - -my %usernames; ## this hack helps keep the passwd files sane -my @sendmail; - -my $svc_domain; -foreach $svc_domain (sort {$a->domain cmp $b->domain} @svc_domain) { - - my($domain)=$svc_domain->domain; - print RCPTHOSTS "$domain\n.$domain\n"; - print VPOPRCPTHOSTS "$domain\n"; - print SENDMAIL_CW "$domain\n"; - - ### - # FORMAT OF THE ASSIGN/USERS FILE HERE - print ASSIGN join(":", - "+" . $domain . "-", - $domain, - $vpopuid, - $vpopgid, - $vpopdir . "/domains/" . $domain, - "-", - "", - "", - ), "\n" if $vpopmailmachines[0]; - - (mkdir "$spooldir/domains/" . $domain, 0700) - or die "Can't create $spooldir/domains/" . $domain .": $!"; - - ( open(QMAILDEFAULT,">$spooldir/domains/" . $domain . "/.qmail-default") - and flock(QMAILDEFAULT,LOCK_EX|LOCK_NB) - ) or die "Can't open $spooldir/domains/" . $domain . "/.qmail-default: $!"; - - ( open(VPASSWD,">$spooldir/domains/" . $domain . "/vpasswd") - and flock(VPASSWD,LOCK_EX|LOCK_NB) - ) or die "Can't open $spooldir/domains/" . $domain . "/vpasswd: $!"; - - my ($svc_acct); - - if ($svc_domain->getfield('catchall')) { - $svc_acct = qsearchs('svc_acct', {'svcnum' => $svc_domain->catchall}); - die "Cannot find catchall account for domain $domain\n" unless $svc_acct; - - my $username = $svc_acct->username; - push @sendmail, "\@$domain\t$username\n"; - print VIRTUALDOMAINS "$domain:$username-$domain\n", - ".$domain:$username-$domain\n", - ; - - ### - # FORMAT OF THE .QMAIL-DEFAULT FILE HERE - print QMAILDEFAULT "| $vpopdir/bin/vdelivermail \"\" " . $svc_acct->email . "\n" - if $vpopmailmachines[0]; - - }else{ - ### - # FORMAT OF THE .QMAIL-DEFAULT FILE HERE - print QMAILDEFAULT "| $vpopdir/bin/vdelivermail \"\" bounce-no-mailbox\n" - if $vpopmailmachines[0]; - } - - print VPOPVIRTUALDOMAINS "$domain:$domain\n"; - - foreach $svc_acct (qsearch('svc_acct', {'domsvc' => $svc_domain->svcnum})) { - my($password)=$svc_acct->getfield('_password'); - my($cpassword,$rpassword); - #if ( ( length($password) <= 8 ) - if ( ( length($password) <= 12 ) - && ( $password ne '*' ) - && ( $password ne '!!' ) - && ( $password ne '' ) - ) { - $cpassword=crypt($password, - $saltset[int(rand(64))].$saltset[int(rand(64))] - ); - $rpassword=$password; - } else { - $cpassword=$password; - $rpassword='UNIX'; - } - - my $username; - - if ($mydomain && ($mydomain eq $svc_domain->domain)) { - $username=$svc_acct->username; - } elsif ($userpolicy =~ /^prepend domsvc$/) { - $username=$svc_acct->domsvc . $svc_acct->username; - } elsif ($userpolicy =~ /^append domsvc$/) { - $username=$svc_acct->username . $svc_acct->domsvc; - } elsif ($userpolicy =~ /^append domain$/) { - $username=$svc_acct->username . $svc_domain->domain; - } elsif ($userpolicy =~ /^append domain$/) { - $username=$svc_acct->username . $svc_domain->domain; - } elsif ($userpolicy =~ /^append \@domain$/) { - $username=$svc_acct->username . '@'. $svc_domain->domain; - } else { - die "Unknown policy in username_policy\n"; - } - - if ($svc_acct->dir ne '/dev/null' || $svc_acct->slipip ne '') { - if ($usernames{$username}++) { - die "Duplicate username detected: $username\n"; - } - } - - if ( $svc_acct->uid =~ /^(\d+)$/ ) { - - die "Non-root user ". $svc_acct->username. " has 0 UID!" - if $svc_acct->uid == 0 && $svc_acct->username ne 'root'; - - if ( $svc_acct->dir ne "/dev/null") { - - ### - # FORMAT OF FreeBSD MASTER PASSWD FILE HERE - print MASTER join(":", - $username, # User name - $cpassword, # Encrypted password - $svc_acct->uid, # User ID - $svc_acct->gid, # Group ID - "", # Login Class - "0", # Password Change Time - "0", # Password Expiration Time - $svc_acct->finger, # Users name - $svc_acct->dir, # Users home directory - $svc_acct->shell, # shell - ), "\n" ; - - - ### - # FORMAT OF THE PASSWD FILE HERE - print PASSWD join(":", - $username, - 'x', # "##". $username, - $svc_acct->uid, - $svc_acct->gid, - $svc_acct->finger, - $svc_acct->dir, - $svc_acct->shell, - ), "\n"; - - ### - # FORMAT OF THE SHADOW FILE HERE - print SHADOW join(":", - $username, - $cpassword, - '', - '', - '', - '', - '', - '', - '', - ), "\n"; - } - } - - ### - # FORMAT OF THE VPASSWD FILE HERE - print VPASSWD join(":", - $svc_acct->username, - $cpassword, - '1', - '0', - $svc_acct->username, - "$vpopdir/domains/" . $svc_domain->domain ."/" . $svc_acct->username, - 'NOQUOTA', - ), "\n"; - - - if ( $svc_acct->slipip ne '' ) { - - ### - # FORMAT OF THE ACP_* FILES HERE - print ACP_PASSWD join(":", - $username, - $cpassword, - "0", - "0", - "", - "", - "", - ), "\n"; - - my($ip)=$svc_acct->slipip; - - unless ( $ip eq '0.0.0.0' || $svc_acct->slipip eq '0e0' ) { - print ACP_DIALUP $username, "\t*\t", $svc_acct->slipip, "\n"; - } - - my %radreply = $svc_acct->radius_reply; - my %radcheck = $svc_acct->radius_check; - - my $radcheck = join ", ", map { qq($_ = "$radcheck{$_}") } keys %radcheck; - $radcheck .= ", " if $radcheck; - - ### - # FORMAT OF THE USERS FILE HERE - print USERS - $username, - qq(\t${textradiusprepend}), - $radcheck, -# qq(Password = "$rpassword"\n\t), - join ",\n\t", map { qq($_ = "$radreply{$_}") } keys %radreply; - - #if ( $ip && $ip ne '0e0' ) { - # #print USERS qq(,\n\tFramed-Address = "$ip"\n\n); - # print USERS qq(,\n\tFramed-IP-Address = "$ip"\n\n); - #} else { - print USERS qq(\n\n); - #} - - } - - ### - # vpopmail directory structure creation - - (mkdir "$spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username, 0700) - or die "Can't create $spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . ": $!"; - (mkdir "$spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . "/Maildir", 0700) - or die "Can't create $spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . " /Maildir: $!"; - (mkdir "$spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . "/Maildir/cur", 0700) - or die "Can't create $spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . " /Maildir/cur: $!"; - (mkdir "$spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . "/Maildir/new", 0700) - or die "Can't create $spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . " /Maildir/new: $!"; - (mkdir "$spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . "/Maildir/tmp", 0700) - or die "Can't create $spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . " /Maildir/tmp: $!"; - - ( open(DOTQMAIL,">$spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . "/.qmail") - and flock(DOTQMAIL,LOCK_EX|LOCK_NB) - ) or die "Can't open $spooldir/domains/" . $svc_domain->domain . "/" . $svc_acct->username . "/.qmail: $!"; - - my($svc_forward); - foreach $svc_forward (qsearch('svc_forward', {'srcsvc' => $svc_acct->svcnum})) { - my($destination); - if ($svc_forward->dstsvc) { - my $dst_acct = qsearchs('svc_acct', {'svcnum' => $svc_forward->dstsvc}); - my $dst_domain = qsearchs('svc_domain', {'svcnum' => $dst_acct->domsvc}); - $destination = $dst_acct->username . '@' . $dst_domain->domain; - - if ($dst_domain->domain eq $mydomain) { - print VIRTUSERTABLE $svc_acct->username . "@" . $svc_domain->domain . - "\t" . $dst_acct->username . "\n"; - print RECIPIENTMAP $svc_acct->username . "@" . $svc_domain->domain . - ":$destination\n"; - } - } else { - $destination = $svc_forward->dst; - } - - ### - # FORMAT OF .QMAIL FILES HERE - print DOTQMAIL "$destination\n"; - } - - flock(DOTQMAIL,LOCK_UN); - close DOTQMAIL; - - } - - flock(VPASSWD,LOCK_UN); - flock(QMAILDEFAULT,LOCK_UN); - close VPASSWD; - close QMAILDEFAULT; - -} - -### -# FORMAT OF THE ASSIGN/USERS FILE FINAL LINE HERE -print ASSIGN ".\n"; - -print VIRTUSERTABLE @sendmail; - -flock(MASTER,LOCK_UN); -flock(PASSWD,LOCK_UN); -flock(SHADOW,LOCK_UN); -flock(ACP_DIALUP,LOCK_UN); -flock(ACP_PASSWD,LOCK_UN); -flock(USERS,LOCK_UN); -flock(ASSIGN,LOCK_UN); -flock(SENDMAIL_CW,LOCK_UN); -flock(VIRTUSERTABLE,LOCK_UN); -flock(RCPTHOSTS,LOCK_UN); -flock(VPOPRCPTHOSTS,LOCK_UN); -flock(RECIPIENTMAP,LOCK_UN); -flock(VPOPVIRTUALDOMAINS,LOCK_UN); - -close MASTER; -close PASSWD; -close SHADOW; -close ACP_DIALUP; -close ACP_PASSWD; -close USERS; -close ASSIGN; -close SENDMAIL_CW; -close VIRTUSERTABLE; -close RCPTHOSTS; -close VPOPRCPTHOSTS; -close RECIPIENTMAP; -close VPOPVIRTUALDOMAINS; - -### -# export stuff -# - -my($ashellmachine); -foreach $ashellmachine (@shellmachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/passwd","root\@$ashellmachine:/etc/passwd.new") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/shadow","root\@$ashellmachine:/etc/shadow.new") - or die "scp error: ". $scp->{errstr}; - ssh("root\@$ashellmachine", - "( ". - "mv /etc/passwd.new /etc/passwd; ". - "mv /etc/shadow.new /etc/shadow; ". - " )" - ) - == 0 or die "ssh error: $!"; -} - -my($bsdshellmachine); -foreach $bsdshellmachine (@bsdshellmachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/passwd","root\@$bsdshellmachine:/etc/passwd.new") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/master.passwd","root\@$bsdshellmachine:/etc/master.passwd.new") - or die "scp error: ". $scp->{errstr}; - ssh("root\@$bsdshellmachine", - "( ". - "mv /etc/passwd.new /etc/passwd; ". - #"mv /etc/master.passwd.new /etc/master.passwd; ". - "pwd_mkdb /etc/master.passwd.new; ". - " )" - ) - == 0 or die "ssh error: $!"; -} - -my($nismachine); -foreach $nismachine (@nismachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/passwd","root\@$nismachine:/etc/global/passwd") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/shadow","root\@$nismachine:/etc/global/shadow") - or die "scp error: ". $scp->{errstr}; - ssh("root\@$nismachine", - "( ". - "cd /var/yp; make; ". - " )" - ) - == 0 or die "ssh error: $!"; -} - -my($erpcdmachine); -foreach $erpcdmachine (@erpcdmachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/acp_passwd","root\@$erpcdmachine:/usr/annex/acp_passwd") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/acp_dialup","root\@$erpcdmachine:/usr/annex/acp_dialup") - or die "scp error: ". $scp->{errstr}; - ssh("root\@$erpcdmachine", - "( ". - "kill -USR1 \`cat /usr/annex/erpcd.pid\'". - " )" - ) - == 0 or die "ssh error: $!"; -} - -my($radiusmachine); -foreach $radiusmachine (@radiusmachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/users","root\@$radiusmachine:/etc/raddb/users") - or die "scp error: ". $scp->{errstr}; - ssh("root\@$radiusmachine", - "( ". - "builddbm". - " )" - ) - == 0 or die "ssh error: $!"; -} - -#my @args = ("/bin/tar", "c", "--force-local", "-C", "$spooldir", "-f", "$spooldir/vpoptarball", "domains"); - -#system {$args[0]} @args; - -my($vpopmailmachine); -foreach $vpopmailmachine (@vpopmailmachines) { - my ($machine, $vpopdir, $vpopuid, $vpopgid) = split (/\s+/, $vpopmailmachine); - my $scp = new Net::SCP; -# $scp->scp("$spooldir/vpoptarball","root\@$machine:vpoptarball") -# or die "scp error: ". $scp->{errstr}; -# ssh("root\@$machine", -# "( ". -# "rm -rf domains; ". -# "tar xf vpoptarball; ". -# "chown -R $vpopuid:$vpopgid domains; ". -# "tar cf vpoptarball domains; ". -# "cd $vpopdir; ". -# "tar xf ~/vpoptarball; ". -# " )" -# ) -# == 0 or die "ssh error: $!"; - - chdir $spooldir; - my @args = ("$rsync", "-rlpt", "-e", "$ssh", "domains/", "vpopmail\@$machine:$vpopdir/domains/"); - - system {$args[0]} @args; - - $scp->scp("$spooldir/assign","root\@$machine:/var/qmail/users/assign") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/vpopvirtualdomains","root\@$machine:/var/qmail/control/virtualdomains") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/vpoprcpthosts","root\@$machine:/var/qmail/control/rcpthosts") - or die "scp error: ". $scp->{errstr}; - - ssh("root\@$machine", - "( ". - $vpopmailrestart . - " )" - ) - == 0 or die "ssh error: $!"; - - -} - -my($sendmailmachine); -foreach $sendmailmachine (@sendmailmachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/sendmail.cw","root\@$sendmailmachine:$sendmailconfigpath/sendmail.cw.new") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/virtusertable","root\@$sendmailmachine:$sendmailconfigpath/virtusertable.new") - or die "scp error: ". $scp->{errstr}; - ssh("root\@$sendmailmachine", - "( ". - "mv $sendmailconfigpath/sendmail.cw.new $sendmailconfigpath/sendmail.cw; ". - "mv $sendmailconfigpath/virtusertable.new $sendmailconfigpath/virtusertable; ". - $sendmailrestart. - " )" - ) - == 0 or die "ssh error: $!"; -} - -my($qmailmachine); -foreach $qmailmachine (@qmailmachines) { - my $scp = new Net::SCP; - $scp->scp("$spooldir/recipientmap","root\@$qmailmachine:/var/qmail/control/recipientmap") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/virtualdomains","root\@$qmailmachine:/var/qmail/control/virtualdomains") - or die "scp error: ". $scp->{errstr}; - $scp->scp("$spooldir/rcpthosts","root\@$qmailmachine:/var/qmail/control/rcpthosts") - or die "scp error: ". $scp->{errstr}; - #ssh("root\@$qmailmachine","/etc/init.d/qmail restart") - # == 0 or die "ssh error: $!"; -} - -unlink $spoollock; -flock(EXPORT,LOCK_UN); -close EXPORT; - -# - -sub usage { - die "Usage:\n\n svc_acct.export user\n"; -} - diff --git a/bin/svc_acct.import b/bin/svc_acct.import deleted file mode 100755 index eb94e1c37..000000000 --- a/bin/svc_acct.import +++ /dev/null @@ -1,238 +0,0 @@ -#!/usr/bin/perl -Tw -# $Id: svc_acct.import,v 1.17 2001-08-19 10:25:44 ivan Exp $ - -use strict; -use vars qw(%part_svc); -use Date::Parse; -use Term::Query qw(query); -use Net::SCP qw(iscp); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch); -use FS::svc_acct; -use FS::part_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -push @FS::svc_acct::shells, qw(/bin/sync /sbin/shuddown /bin/halt); #others? - -my($spooldir)="/usr/local/etc/freeside/export.". datasrc; - -$FS::svc_acct::nossh_hack = 1; - -### - -%part_svc=map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_acct'}); - -die "No services with svcdb svc_acct!\n" unless %part_svc; - -print "\n\n", &menu_svc, "\n", <= 2) -END -my($oisdn_svcpart)=&getpart; - -print "\n\n", &menu_svc, "\n", <svc, sort keys %part_svc ). "\n"; -} -sub getpart { - $^W=0; # Term::Query isn't -w-safe - my $return = query "Enter part number:", 'irk', [ keys %part_svc ]; - $^W=1; - $return; -} -sub getvalue { - my $prompt = shift; - $^W=0; # Term::Query isn't -w-safe - my $return = query $prompt, ''; - $^W=1; - $return; -} - -print "\n\n"; - -### - -open(PASSWD,"<$spooldir/passwd.import"); -open(SHADOW,"<$spooldir/shadow.import"); -open(USERS,"<$spooldir/users.import"); - -my(%upassword,%ip,%allparam); -my(%param,$username); -while () { - chop; - next if /^\s*$/; - next if /^\s*#/; - if ( /^\S/ ) { - /^(\w+)\s+(Auth-Type\s+=\s+Local,\s+)?Password\s+=\s+"([^"]+)"(,\s+Expiration\s+=\s+"([^"]*")\s*)?$/ - or die "1Unexpected line in users.import: $_"; - my($password,$expiration); - ($username,$password,$expiration)=(lc($1),$3,$5); - $password = '' if $password eq 'UNIX'; - $upassword{$username}=$password; - undef %param; - } else { - die "2Unexpected line in users.import: $_"; - } - while () { - chop; - if ( /^\s*$/ ) { - if ( defined $param{'radius_Framed_IP_Address'} ) { - $ip{$username} = $param{'radius_Framed_IP_Address'}; - delete $param{'radius_Framed_IP_Address'}; - } else { - $ip{$username} = '0e0'; - } - $allparam{$username}={ %param }; - last; - } elsif ( /^\s+([\w\-]+)\s=\s"?([\w\.\-\s]+)"?,?\s*$/ ) { - my($attribute,$value)=($1,$2); - $attribute =~ s/\-/_/g; - $param{'radius_'.$attribute}=$value; - } else { - die "3Unexpected line in users.import: $_"; - } - } -} -#? incase there isn't a terminating blank line ? -if ( defined $param{'radius_Framed_IP_Address'} ) { - $ip{$username} = $param{'radius_Framed_IP_Address'}; - delete $param{'radius_Framed_IP_Address'}; -} else { - $ip{$username} = '0e0'; -} -$allparam{$username}={ %param }; - -my(%password); -while () { - chop; - my($username,$password)=split(/:/); - #$password =~ s/^\!$/\*/; - #$password =~ s/\!+/\*SUSPENDED\* /; - $password{$username}=$password; -} - -while () { - chop; - my($username,$x,$uid,$gid,$finger,$dir,$shell)=split(/:/); - my($password)=$upassword{$username} || $password{$username}; - - my($maxb)=${$allparam{$username}}{'radius_Port_Limit'}; - my($svcpart); - if ( exists $upassword{$username} ) { - if ( $maxb >= 2 ) { - $svcpart = $isdn_svcpart - } elsif ( ! $maxb || $maxb == 1 ) { - $svcpart = $ppp_svcpart - } else { - die "Illegal Port-Limit in users ($username)!\n"; - } - } elsif ( $shell eq $pop_shell ) { - $svcpart = $popmail_svcpart; - } else { - $svcpart = $shell_svcpart; - } - - my($svc_acct) = new FS::svc_acct ({ - 'svcpart' => $svcpart, - 'username' => $username, - '_password' => $password, - 'uid' => $uid, - 'gid' => $gid, - 'finger' => $finger, - 'dir' => $dir, - 'shell' => $shell, - 'slipip' => $ip{$username}, - %{$allparam{$username}}, - }); - my($error); - $error=$svc_acct->insert; - die $error if $error; - - delete $allparam{$username}; - delete $upassword{$username}; -} - -#my($username); -foreach $username ( keys %upassword ) { - my($password)=$upassword{$username}; - - my($maxb)=${$allparam{$username}}{'radius_Port_Limit'} || 0; - my($svcpart); - if ( $maxb == 2 ) { - $svcpart = $oisdn_svcpart - } elsif ( ! $maxb || $maxb == 1 ) { - $svcpart = $oppp_svcpart - } else { - die "Illegal Port-Limit in users!\n"; - } - - my($svc_acct) = new FS::svc_acct ({ - 'svcpart' => $svcpart, - 'username' => $username, - '_password' => $password, - 'slipip' => $ip{$username}, - %{$allparam{$username}}, - }); - my($error); - $error=$svc_acct->insert; - die $error, if $error; - - delete $allparam{$username}; - delete $upassword{$username}; -} - -# - -sub usage { - die "Usage:\n\n svc_acct.import user\n"; -} - diff --git a/bin/svc_acct_sm.import b/bin/svc_acct_sm.import deleted file mode 100755 index b668405f5..000000000 --- a/bin/svc_acct_sm.import +++ /dev/null @@ -1,262 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: svc_acct_sm.import,v 1.10 2001-08-21 02:43:18 ivan Exp $ - -use strict; -use vars qw(%d_part_svc %m_part_svc); -use Term::Query qw(query); -use Net::SCP qw(iscp); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch qsearchs); -use FS::svc_acct_sm; -use FS::svc_domain; -use FS::svc_acct; -use FS::part_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -my($spooldir)="/usr/local/etc/freeside/export.". datasrc; - -my(%mta) = ( - 1 => "qmail", - 2 => "sendmail", -); - -### - -%d_part_svc = - map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_domain'}); -%m_part_svc = - map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_acct_sm'}); - -die "No services with svcdb svc_domain!\n" unless %d_part_svc; -die "No services with svcdb svc_svc_acct_sm!\n" unless %m_part_svc; - -print "\n\n", - ( join "\n", map "$_: ".$d_part_svc{$_}->svc, sort keys %d_part_svc ), - "\n\n"; -$^W=0; #Term::Query isn't -w-safe -my $domain_svcpart = - query "Enter part number for domains: ", 'irk', [ keys %d_part_svc ]; -$^W=1; - -print "\n\n", - ( join "\n", map "$_: ".$m_part_svc{$_}->svc, sort keys %m_part_svc ), - "\n\n"; -$^W=0; #Term::Query isn't -w-safe -my $mailalias_svcpart = - query "Enter part number for mail aliases: ", 'irk', [ keys %m_part_svc ]; -$^W=1; - -print "\n\n", <) { - next if /^(#|$)/; - next if $mta{$mta} eq 'sendmail' && /^\s*$/; #blank lines - /^\.?([\w\-\.]+)$/ - #or do { warn "Strange rcpthosts/sendmail.cw line: $_"; next; }; - or die "Strange rcpthosts/sendmail.cw line: $_"; - my $domain = $1; - my($svc_domain); - unless ( $svc_domain = qsearchs('svc_domain', {'domain'=>$domain} ) ) { - $svc_domain = new FS::svc_domain ({ - 'domain' => $domain, - 'svcpart' => $domain_svcpart, - 'action' => 'N', - }); - my $error = $svc_domain->insert; - #warn $error if $error; - die $error if $error; - } - $svcnum{$domain}=$svc_domain->svcnum; -} -close RCPTHOSTS; - -#these two loops have enough similar parts they should probably be merged -if ( $mta{$mta} eq "qmail" ) { - - open(VD_FIX,">$spooldir/virtualdomains.FIX"); - print VD_FIX "#!/usr/bin/perl\n"; - - open(VIRTUALDOMAINS,"<$spooldir/virtualdomains.import") - or die "Can't open $spooldir/virtualdomains.import: $!"; - while () { - next if /^#/; - /^\.?([\w\-\.]+):(\w+)(\-([\w\-\.]+))?$/ - #or do { warn "Strange virtualdomains line: $_"; next; }; - or die "Strange virtualdomains line: $_"; - my($domain,$username,$dash_ext,$extension)=($1,$2,$3,$4); - $dash_ext ||= ''; - $extension ||= ''; - my($svc_acct)=qsearchs('svc_acct',{'username'=>$username}); - unless ( $svc_acct ) { - #warn "Unknown user $username in virtualdomains; skipping\n"; - #die "Unknown user $username in virtualdomains; skipping\n"; - next; - } - if ( $domain ne $extension ) { - #warn "virtualdomains line $domain:$username$dash_ext changed to $domain:$username-$domain\n"; - my($dir)=$svc_acct->dir; - my($qdomain)=$domain; - $qdomain =~ s/\./:/g; #see manpage for 'dot-qmail': EXTENSION ADDRESSES - #example to move .qmail files for virtual domains to their new location - #dry run - #issh("root\@$shellmachine",'perl -e \'foreach $a (<'. $dir. '/.qmail'. $dash_ext. '-*>) { $old=$a; $a =~ s/\\.qmail'. $dash_ext. '\\-/\\.qmail\\-'. $qdomain. '\\-/; print " $old -> $a\n"; }\''); - #the real thing - #issh("root\@$shellmachine",'perl -e \'foreach $a (<'. $dir. '/.qmail'. $dash_ext. '-*>) { $old=$a; $a =~ s/\\.qmail'. $dash_ext. '\\-/\\.qmail\\-'. $qdomain. '\\-/; rename $old, $a; }\''); - print VD_FIX <) { - \$old = \$file; - \$file =~ s/\.qmail$dash_ext\-/\.qmail\-$qdomain\-/; - rename \$old, \$file; -} -END - } - - unless ( exists $svcnum{$domain} ) { - my($svc_domain) = new FS::svc_domain ({ - 'domain' => $domain, - 'svcpart' => $domain_svcpart, - 'action' => 'N', - }); - my $error = $svc_domain->insert; - #warn $error if $error; - die $error if $error; - $svcnum{$domain}=$svc_domain->svcnum; - } - - my($svc_acct_sm)=new FS::svc_acct_sm ({ - 'domsvc' => $svcnum{$domain}, - 'domuid' => $svc_acct->uid, - 'domuser' => '*', - 'svcpart' => $mailalias_svcpart, - }); - my($error)=''; - $error=$svc_acct_sm->insert; - #warn $error if $error; - die $error, ", domain $domain" if $error; - } - close VIRTUALDOMAINS; - close VD_FIX; - -} elsif ( $mta{$mta} eq "sendmail" ) { - - open(VIRTUSERTABLE,"<$spooldir/virtusertable.import") - or die "Can't open $spooldir/virtusertable.import: $!"; - while () { - next if /^#/; #comments? - next if /^\s*$/; #blank lines - /^([\w\-\.]+)?\@([\w\-\.]+)\t+([\w\-\.]+)$/ - #or do { warn "Strange virtusertable line: $_"; next; }; - or die "Strange virtusertable line: $_"; - my($domuser,$domain,$username)=($1,$2,$3); - my($svc_acct)=qsearchs('svc_acct',{'username'=>$username}); - unless ( $svc_acct ) { - #warn "Unknown user $username in virtusertable"; - die "Unknown user $username in virtusertable"; - next; - } - my($svc_acct_sm)=new FS::svc_acct_sm ({ - 'domsvc' => $svcnum{$domain}, - 'domuid' => $svc_acct->uid, - 'domuser' => $domuser || '*', - 'svcpart' => $mailalias_svcpart, - }); - my($error)=''; - $error=$svc_acct_sm->insert; - #warn $error if $error; - die $error if $error; - } - close VIRTUSERTABLE; - -} else { - die "Unknown MTA!\n"; -} - -#open(RECIPIENTMAP,"<$spooldir/recipientmap.import"); -#close RECIPIENTMAP; - -print "\n\n", <delete; - die $error if $error; -} diff --git a/bin/sysvshell.export b/bin/sysvshell.export deleted file mode 100755 index 859766103..000000000 --- a/bin/sysvshell.export +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/perl -w - -# sysvshell export - -use strict; -use File::Rsync; -use Net::SSH qw(ssh); -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(qsearch qsearchs); -use FS::part_export; -use FS::cust_svc; -use FS::svc_acct; - -my @saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -my $user = shift or die &usage; -adminsuidsetup $user; - -my $spooldir = "/usr/local/etc/freeside/export.". datasrc; -#my $spooldir = "/usr/local/etc/freeside/export.". datasrc. "/shell"; - -my @sysv_exports = qsearch('part_export', { 'exporttype' => 'sysvshell' } ); - -my $rsync = File::Rsync->new({ - rsh => 'ssh', -# dry_run => 1, -}); - -foreach my $export ( @sysv_exports ) { - my $machine = $export->machine; - my $prefix = "$spooldir/$machine"; - mkdir $prefix, 0700 unless -d $prefix; - - #LOCKING!!! - - ( open(SHADOW,">$prefix/shadow") - #!!! and flock(SHADOW,LOCK_EX|LOCK_NB) - ) or die "Can't open $prefix/shadow: $!"; - ( open(PASSWD,">$prefix/passwd") - #!!! and flock(PASSWD,LOCK_EX|LOCK_NB) - ) or die "Can't open $prefix/passwd: $!"; - - chmod 0644, "$prefix/passwd"; - chmod 0600, "$prefix/shadow"; - - #false laziness with freeside-sqlradius-reset and bind.export - my @svc_acct = - map { qsearchs('svc_acct', { 'svcnum' => $_->svcnum } ) } - map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) } - $export->export_svc; - - next unless @svc_acct; - - foreach my $svc_acct ( sort { $a->uid <=> $b->uid } @svc_acct ) { - - my $password = $svc_acct->_password; - my $cpassword; - #if ( ( length($password) <= 8 ) - if ( ( length($password) <= 12 ) - && ( $password ne '*' ) - && ( $password ne '!!' ) - && ( $password ne '' ) - ) { - $cpassword=crypt($password, - $saltset[int(rand(64))].$saltset[int(rand(64))] - ); - # MD5 !!!! - } else { - $cpassword=$password; - } - - ### - # FORMAT OF THE PASSWD FILE HERE - print PASSWD join(":", - $svc_acct->username, - 'x', # "##". $username, - $svc_acct->uid, - $svc_acct->gid, - $svc_acct->finger, - $svc_acct->dir, - $svc_acct->shell, - ), "\n"; - - ### - # FORMAT OF THE SHADOW FILE HERE - print SHADOW join(":", - $svc_acct->username, - $cpassword, - '', - '', - '', - '', - '', - '', - '', - ), "\n"; - - } - - #!!! flock(SHADOW,LOCK_UN); - #!!! flock(PASSWD,LOCK_UN); - close SHADOW; - close PASSWD; - - $rsync->exec( { - src => "$prefix/shadow", - dest => "root\@$machine:/etc/shadow" - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); - - $rsync->exec( { - src => "$prefix/passwd", - dest => "root\@$machine:/etc/passwd" - } ) or die "rsync to $machine failed: ". join(" / ", $rsync->err); - - # UNLOCK!! -} diff --git a/conf/agent_defaultpkg b/conf/agent_defaultpkg deleted file mode 100644 index e69de29bb..000000000 diff --git a/conf/alerter_template b/conf/alerter_template deleted file mode 100644 index 4d8a012ef..000000000 --- a/conf/alerter_template +++ /dev/null @@ -1,20 +0,0 @@ - - -Ivan Kohler -1339 Hayes St. -San Francisco, CA 94117 - - -{ $first; } { $last; }: - - We thank you for your continuing patronage. This notice is to remind you -that your { $payby } used to pay SISD.COM for Internet -service will expire on { use Date::Format; time2str("%x", $expdate); }. Please provide us with new billing -information so that we may continue your service uninterrupted. - -Very Truly Yours, - - SISD Service Team - - - diff --git a/conf/declinetemplate b/conf/declinetemplate deleted file mode 100644 index 14b8c60ec..000000000 --- a/conf/declinetemplate +++ /dev/null @@ -1,10 +0,0 @@ -Hi, - -Your credit card could not be processed for the following reason: - { $error } - -Please provide us with new billing information so that we may continue your -service uninterrupted. - -Thanks. - diff --git a/conf/home b/conf/home deleted file mode 100644 index 05280cb02..000000000 --- a/conf/home +++ /dev/null @@ -1 +0,0 @@ -/home diff --git a/conf/invoice_from b/conf/invoice_from deleted file mode 100644 index 110ec8f41..000000000 --- a/conf/invoice_from +++ /dev/null @@ -1 +0,0 @@ -ivan-unconfigured-freeside-installation@420.am diff --git a/conf/invoice_template b/conf/invoice_template deleted file mode 100644 index e226d636f..000000000 --- a/conf/invoice_template +++ /dev/null @@ -1,27 +0,0 @@ - - Invoice - { substr("Page $page of $total_pages ", 0, 19); } { use Date::Format; time2str("%x", $date); } FS-{ $invnum; } - - -Ivan Kohler -1339 Hayes St. -San Francisco, CA 94117 - - -{ $address[0]; } -{ $address[1]; } -{ $address[2]; } -{ $address[3]; } -{ $address[4]; } -{ $address[5]; } - -{ - join("\n", - map { - my ( $desc, $price ) = @{$_}; - " ". substr( $desc. " "x65, 0, 65). " ". substr( $price. " "x11, 0, 11); - } invoice_lines(31) - ); -} - - -=> Freeside - open-source billing for ISPs - http://www.sisd.com/freeside <=- diff --git a/conf/locale b/conf/locale deleted file mode 100644 index 7741b83a3..000000000 --- a/conf/locale +++ /dev/null @@ -1 +0,0 @@ -en_US diff --git a/conf/lpr b/conf/lpr deleted file mode 100644 index fa1c31315..000000000 --- a/conf/lpr +++ /dev/null @@ -1 +0,0 @@ -lpr -h diff --git a/conf/maxsearchrecordsperpage b/conf/maxsearchrecordsperpage deleted file mode 100644 index 29d6383b5..000000000 --- a/conf/maxsearchrecordsperpage +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/conf/report_template b/conf/report_template deleted file mode 100644 index 9c6bb2b4a..000000000 --- a/conf/report_template +++ /dev/null @@ -1,14 +0,0 @@ -{ sprintf("%-19s", "Page $page of $total_pages"); } { - my $spacer = (40 - length($title) > 0) ? 40 - length($title) : 0; - $spacer = int($spacer / 2); - my $titlelen = 40 - $spacer; - sprintf("%*s%-*s", $spacer, " ", $titlelen, $title); - } { use Date::Format; time2str("%x %X", $date); } - - -{ - join("\n", map { $_ } report_lines(57)); -} - - - diff --git a/conf/shells b/conf/shells deleted file mode 100644 index a41fc6209..000000000 --- a/conf/shells +++ /dev/null @@ -1,5 +0,0 @@ - -/bin/sh -/bin/csh -/bin/bash -/bin/false diff --git a/conf/show-msgcat-codes b/conf/show-msgcat-codes deleted file mode 100644 index e69de29bb..000000000 diff --git a/conf/smtpmachine b/conf/smtpmachine deleted file mode 100644 index 2fbb50c4a..000000000 --- a/conf/smtpmachine +++ /dev/null @@ -1 +0,0 @@ -localhost diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index b51eee8d5..000000000 --- a/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -freeside for Debian -------------------- - - - - -- Ivan Kohler , Thu, 12 Apr 2001 15:49:17 -0700 diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 5734b1fc8..000000000 --- a/debian/changelog +++ /dev/null @@ -1,9 +0,0 @@ -freeside (1.3.1-1) unstable; urgency=low - - * Initial Release. - - -- Ivan Kohler Thu, 12 Apr 2001 15:49:17 -0700 - -Local variables: -mode: debian-changelog -End: diff --git a/debian/conffiles.ex b/debian/conffiles.ex deleted file mode 100644 index 8686d2af8..000000000 --- a/debian/conffiles.ex +++ /dev/null @@ -1,7 +0,0 @@ -# -# If you want to use this conffile, remove all comments and put files that -# you want dpkg to process here using their absolute pathnames. -# See section 9.1 of the packaging manual. -# -# for example: -# /etc/freeside/freeside.conf diff --git a/debian/control b/debian/control deleted file mode 100644 index 2f66fd395..000000000 --- a/debian/control +++ /dev/null @@ -1,82 +0,0 @@ -Source: freeside -Section: admin -Priority: optional -Maintainer: Ivan Kohler -Build-Depends: debhelper (>> 3.0.0) -Standards-Version: 3.5.2 - -Package: freeside -Architecture: any -Depends: freeside-lib -Recommends: freeside-doc, freeside-ui-webui, libterm-query-perl -Suggests: freeside-passwd-server, freeside-signup-server, freeside-session-server -Description: Billing and administration package for ISPs. - Freeside is a billing and account administration package for ISPs. It stores - customer information in an SQL database, and will update UNIX passwd and - shadow files, and configuration for sendmail, qmail, BIND and/or Apache. - It is also useful as a central database of accounts/domains/web-space - for a large number of machines. - -Package: freeside-doc -Architecture: all -Description: Documentation for freeside - This package provides the HTML documentation for Freeside, a billing and - account administration package for ISPs. - -Package: freeside-lib -Architecture: all -Depends: libdigest-md5-perl, liburi-perl, libhtml-parser-perl, libnet-perl, liblocale-codes-perl, libnet-whois-perl, libwww-perl, libbusiness-creditcard-perl, mailtools, libtimedate-perl, libdate-manip-perl, libfile-counterfile-perl, libfreezethaw-perl, libtext-template-perl, libdbd-pg-perl -Description: Freeside libraries and extension API - This package contains the libraries which implement the business logic and - backend functions of Freeside, a billing and account administration package - for ISPs. This package also contains the manual pages for the library API. - -Package: freeside-ui-web -Architecture: all -Depends: libstring-approx-perl, freeside-lib, libapache-mod-perl|apache-perl -Suggests: libapache-mod-ssl|apache-ssl -Description: Easy-to-use web interface for Freeside - This package contains the web interface for Freeside, a billing and account - administration package for ISPs. This is what sales or support folks will - typically use to add new accounts, edit exiting accounts and so on. - -Package: freeside-passwd-server -Architecture: all -Depends: freeside-lib -Description: Freeside password server - This component of Freeside, a billing and account administration package for - ISPs, - -Package: freeside-passwd-client -Architecture: all -Depends: -Description: - - -Package: freeside-signup-server -Architecture: all -Depends: freeside-lib -Description: - - -Package: freeside-signup-client -Architecture: all -Depends: -Description: - - -Package: freeside-signup-client-webui -Architecture: all -Depends: freeside-signup-client-lib, httpd -Description: - - -Package: freeside-session-server -Architecture: all -Depends: freeside-lib -Description: - - -Package: freeside-session-client -Architecture: all -Depends: ssh diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index e148fcec5..000000000 --- a/debian/copyright +++ /dev/null @@ -1,10 +0,0 @@ -This package was debianized by Ivan Kohler on -Thu, 12 Apr 2001 15:49:17 -0700. - -It was downloaded from - -Upstream Author(s): - -Copyright: - - diff --git a/debian/cron.d.ex b/debian/cron.d.ex deleted file mode 100644 index 61c074da3..000000000 --- a/debian/cron.d.ex +++ /dev/null @@ -1,4 +0,0 @@ -# -# Regular cron jobs for the freeside package -# -0 4 * * * root freeside_maintenance diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index ca882bbb7..000000000 --- a/debian/dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin -usr/sbin diff --git a/debian/docs b/debian/docs deleted file mode 100644 index 16636bd92..000000000 --- a/debian/docs +++ /dev/null @@ -1,3 +0,0 @@ -INSTALL -README -TODO diff --git a/debian/ex.doc-base.package b/debian/ex.doc-base.package deleted file mode 100644 index 2a055d199..000000000 --- a/debian/ex.doc-base.package +++ /dev/null @@ -1,22 +0,0 @@ -Document: freeside -Title: Debian freeside Manual -Author: -Abstract: This manual describes what freeside is - and how it can be used to - manage online manuals on Debian systems. -Section: unknown - -Format: debiandoc-sgml -Files: /usr/share/doc/freeside/freeside.sgml.gz - -Format: postscript -Files: /usr/share/doc/freeside/freeside.ps.gz - -Format: text -Files: /usr/share/doc/freeside/freeside.text.gz - -Format: HTML -Index: /usr/share/doc/freeside/html/index.html -Files: /usr/share/doc/freeside/html/*.html - - diff --git a/debian/freeside-doc.docs b/debian/freeside-doc.docs deleted file mode 100644 index 299950c58..000000000 --- a/debian/freeside-doc.docs +++ /dev/null @@ -1,2 +0,0 @@ -#DOCS# - diff --git a/debian/freeside-doc.files b/debian/freeside-doc.files deleted file mode 100644 index 299950c58..000000000 --- a/debian/freeside-doc.files +++ /dev/null @@ -1,2 +0,0 @@ -#DOCS# - diff --git a/debian/init.d.ex b/debian/init.d.ex deleted file mode 100644 index 57910493a..000000000 --- a/debian/init.d.ex +++ /dev/null @@ -1,70 +0,0 @@ -#! /bin/sh -# -# skeleton example file to build /etc/init.d/ scripts. -# This file should be used to construct scripts for /etc/init.d. -# -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux -# by Ian Murdock . -# -# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl -# -# This file was automatically customized by dh-make on Thu, 12 Apr 2001 15:49:17 -0700 - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/freeside -NAME=freeside -DESC=freeside - -test -f $DAEMON || exit 0 - -set -e - -case "$1" in - start) - echo -n "Starting $DESC: " - start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ - --exec $DAEMON - echo "$NAME." - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo "Reloading $DESC configuration files." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # /var/run/$NAME.pid --exec $DAEMON - #;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - echo -n "Restarting $DESC: " - start-stop-daemon --stop --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - sleep 1 - start-stop-daemon --start --quiet --pidfile \ - /var/run/$NAME.pid --exec $DAEMON - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/manpage.1.ex b/debian/manpage.1.ex deleted file mode 100644 index ec542bb05..000000000 --- a/debian/manpage.1.ex +++ /dev/null @@ -1,60 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH FREESIDE SECTION "April 12, 2001" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -freeside \- program to do something -.SH SYNOPSIS -.B freeside -.RI [ options ] " files" ... -.br -.B bar -.RI [ options ] " files" ... -.SH DESCRIPTION -This manual page documents briefly the -.B freeside -and -.B bar -commands. -This manual page was written for the Debian GNU/Linux distribution -because the original program does not have a manual page. -Instead, it has documentation in the GNU Info format; see below. -.PP -.\" TeX users may be more comfortable with the \fB\fP and -.\" \fI\fP escape sequences to invode bold face and italics, -.\" respectively. -\fBfreeside\fP is a program that... -.SH OPTIONS -These programs follow the usual GNU command line syntax, with long -options starting with two dashes (`-'). -A summary of options is included below. -For a complete description, see the Info files. -.TP -.B \-h, \-\-help -Show summary of options. -.TP -.B \-v, \-\-version -Show version of program. -.SH SEE ALSO -.BR bar (1), -.BR baz (1). -.br -The programs are documented fully by -.IR "The Rise and Fall of a Fooish Bar" , -available via the Info system. -.SH AUTHOR -This manual page was written by Ivan Kohler , -for the Debian GNU/Linux system (but may be used by others). diff --git a/debian/manpage.sgml.ex b/debian/manpage.sgml.ex deleted file mode 100644 index 9bc3a8663..000000000 --- a/debian/manpage.sgml.ex +++ /dev/null @@ -1,143 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -manpage.1: manpage.sgml - docbook-to-man $< > $@ - --> - - - FIRSTNAME"> - SURNAME"> - - April 12, 2001"> - - SECTION"> - ivan-debian@420.am"> - - FREESIDE"> - - - Debian GNU/Linux"> - GNU"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2001 - &dhusername; - - &dhdate; -
- - &dhucpackage; - - &dhsection; - - - &dhpackage; - - program to do something - - - - &dhpackage; - - - - - - - - DESCRIPTION - - This manual page documents briefly the - &dhpackage; and bar - commands. - - This manual page was written for the &debian; distribution - because the original program does not have a manual page. - Instead, it has documentation in the &gnu; - Info format; see below. - - &dhpackage; is a program that... - - - - OPTIONS - - These programs follow the usual GNU command line syntax, - with long options starting with two dashes (`-'). A summary of - options is included below. For a complete description, see the - Info files. - - - - - - - - Show summary of options. - - - - - - - - Show version of program. - - - - - - SEE ALSO - - bar (1), baz (1). - - The programs are documented fully by The Rise and - Fall of a Fooish Bar available via the - Info system. - - - AUTHOR - - This manual page was written by &dhusername; &dhemail; for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the GNU Free Documentation - License, Version 1.1 or any later version published by the Free - Software Foundation; with no Invariant Sections, no Front-Cover - Texts and no Back-Cover Texts. - - -
- - diff --git a/debian/menu.ex b/debian/menu.ex deleted file mode 100644 index ddc947e9c..000000000 --- a/debian/menu.ex +++ /dev/null @@ -1,2 +0,0 @@ -?package(freeside):needs=X11|text|vc|wm section=Apps/see-menu-manual\ - title="freeside" command="/usr/bin/freeside" diff --git a/debian/postinst.ex b/debian/postinst.ex deleted file mode 100644 index c4d4bfba8..000000000 --- a/debian/postinst.ex +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh -# postinst script for freeside -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see /usr/share/doc/packaging-manual/ -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - -case "$1" in - configure) - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/postrm.ex b/debian/postrm.ex deleted file mode 100644 index bed8abd3d..000000000 --- a/debian/postrm.ex +++ /dev/null @@ -1,36 +0,0 @@ -#! /bin/sh -# postrm script for freeside -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `purge' -# * `upgrade' -# * `failed-upgrade' -# * `abort-install' -# * `abort-install' -# * `abort-upgrade' -# * `disappear' overwrit>r> -# for details, see /usr/share/doc/packaging-manual/ - -case "$1" in - purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - - ;; - - *) - echo "postrm called with unknown argument \`$1'" >&2 - exit 0 - -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - - diff --git a/debian/preinst.ex b/debian/preinst.ex deleted file mode 100644 index 0b42bb28f..000000000 --- a/debian/preinst.ex +++ /dev/null @@ -1,42 +0,0 @@ -#! /bin/sh -# preinst script for freeside -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# -# For details see /usr/share/doc/packaging-manual/ - -case "$1" in - install|upgrade) -# if [ "$1" = "upgrade" ] -# then -# start-stop-daemon --stop --quiet --oknodo \ -# --pidfile /var/run/freeside.pid \ -# --exec /usr/sbin/freeside 2>/dev/null || true -# fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/prerm.ex b/debian/prerm.ex deleted file mode 100644 index ebb87c540..000000000 --- a/debian/prerm.ex +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -# prerm script for freeside -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see /usr/share/doc/packaging-manual/ - -case "$1" in - remove|upgrade|deconfigure) -# install-info --quiet --remove /usr/info/freeside.info.gz - ;; - failed-upgrade) - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - - diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 71016c406..000000000 --- a/debian/rules +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 by Joey Hess. -# -# This version is for a hypothetical package that builds an -# architecture-dependant package, as well as an architecture-independent -# package. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# This is the debhelper compatability version to use. -export DH_COMPAT=3 - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - - - touch configure-stamp - -build: configure-stamp build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - -$(MAKE) clean - - dh_clean - -install: DH_OPTIONS= -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/freeside. - $(MAKE) install DESTDIR=$(CURDIR)/debian/freeside - - dh_movefiles - -# Build architecture-independent files here. -# Pass -i to all debhelper commands in this target to reduce clutter. -binary-indep: build install - dh_testdir -i - dh_testroot -i -# dh_installdebconf -i - dh_installdocs -i - dh_installexamples -i - dh_installmenu -i -# dh_installlogrotate -i -# dh_installemacsen -i -# dh_installpam -i -# dh_installmime -i -# dh_installinit -i - dh_installcron -i -# dh_installman -i - dh_installinfo -i -# dh_undocumented -i - dh_installchangelogs -i - dh_link -i - dh_compress -i - dh_fixperms -i - dh_installdeb -i -# dh_perl -i - dh_gencontrol -i - dh_md5sums -i - dh_builddeb -i - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir -a - dh_testroot -a -# dh_installdebconf -a - dh_installdocs -a - dh_installexamples -a - dh_installmenu -a -# dh_installlogrotate -a -# dh_installemacsen -a -# dh_installpam -a -# dh_installmime -a -# dh_installinit -a - dh_installcron -a -# dh_installman -a - dh_installinfo -a -# dh_undocumented -a - dh_installchangelogs -a - dh_strip -a - dh_link -a - dh_compress -a - dh_fixperms -a -# dh_makeshlibs -a - dh_installdeb -a -# dh_perl -a - dh_shlibdeps -a - dh_gencontrol -a - dh_md5sums -a - dh_builddeb -a - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/debian/watch.ex b/debian/watch.ex deleted file mode 100644 index 3f57ae020..000000000 --- a/debian/watch.ex +++ /dev/null @@ -1,5 +0,0 @@ -# Example watch control file for uscan -# Rename this file to "watch" and then you can run the "uscan" command -# to check for upstream updates and more. -# Site Directory Pattern Version Script -sunsite.unc.edu /pub/Linux/Incoming freeside-(.*)\.tar\.gz debian uupdate diff --git a/eg/TEMPLATE_cust_main.import b/eg/TEMPLATE_cust_main.import deleted file mode 100755 index e91a2f1d2..000000000 --- a/eg/TEMPLATE_cust_main.import +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/perl -w -# -# Template for importing legacy customer data -# -# $Id: TEMPLATE_cust_main.import,v 1.4 2001-08-21 02:44:47 ivan Exp $ - -use strict; -use Date::Parse; -use FS::UID qw(adminsuidsetup datasrc); -use FS::Record qw(fields qsearch qsearchs); -use FS::cust_main; -use FS::cust_pkg; -use FS::cust_svc; -use FS::svc_acct; -use FS::pkg_svc; - -my $user = shift or die &usage; -adminsuidsetup $user; - -# use these for the imported cust_main records (unless you have these in legacy -# data) -my($agentnum)=4; -my($refnum)=5; - -# map from legacy billing data to pkgpart, maps imported field -# LegacyBillingData to pkgpart. your names and pkgparts will be different -my(%pkgpart)=( - 'Employee' => 10, - 'Business' => 11, - 'Individual' => 12, - 'Basic PPP' => 13, - 'Slave' => 14, - 'Co-Located Server' => 15, - 'Virtual Web' => 16, - 'Perk Mail' => 17, - 'Credit Hold' => 18, -); - -my($file)="legacy_file"; - -open(CLIENT,$file) - or die "Can't open $file: $!"; - -# put a tab-separated header atop the file, or define @fields -# (use these names or change them below) -# -# for cust_main -# custnum - unique -# last - (name) -# first - (name) -# company -# address1 -# address2 -# city -# state -# zip -# country -# daytime - (phone) -# night - (phone) -# fax -# payby - CARD, BILL or COMP -# payinfo - Credit card #, P.O. # or COMP authorization -# paydate - Expiration -# tax - 'Y' for tax exempt -# for cust_pkg -# LegacyBillingData - maps via %pkgpart above to a pkgpart -# for svc_acct -# username - -my($header); -$header=; -chop $header; -my(@fields)=map { /^\s*(.*[^\s]+)\s*$/; $1 } split(/\t/,$header); -#print join("\n",@fields); - -my($error); -my($link,$line)=(0,0); -while () { - chop; - next if /^[\s\t]*$/; #skip any blank lines - - #define %svc hash for this record - my(@record)=split(/\t/); - my(%svc); - foreach (@fields) { - $svc{$_}=shift @record; - } - - # might need to massage some data like this - $svc{'payby'} =~ s/^Credit Card$/CARD/io; - $svc{'payby'} =~ s/^Check$/BILL/io; - $svc{'payby'} =~ s/^Cash$/BILL/io; - $svc{'payby'} =~ s/^$/BILL/o; - $svc{'First'} =~ s/&/and/go; - $svc{'Zip'} =~ s/\s+$//go; - - my($cust_main) = new FS::cust_main ( { - 'custnum' => $svc{'custnum'}, - 'agentnum' => $agentnum, - 'last' => $svc{'last'}, - 'first' => $svc{'first'}, - 'company' => $svc{'company'}, - 'address1' => $svc{'address1'}, - 'address2' => $svc{'address2'}, - 'city' => $svc{'city'}, - 'state' => $svc{'state'}, - 'zip' => $svc{'zip'}, - 'country' => $svc{'country'}, - 'daytime' => $svc{'daytime'}, - 'night' => $svc{'night'}, - 'fax' => $svc{'fax'}, - 'payby' => $svc{'payby'}, - 'payinfo' => $svc{'payinfo'}, - 'paydate' => $svc{'paydate'}, - 'payname' => $svc{'payname'}, - 'tax' => $svc{'tax'}, - 'refnum' => $refnum, - } ); - - $error=$cust_main->insert; - - if ( $error ) { - warn $cust_main->_dump; - warn map "$_: ". $svc{$_}. "|\n", keys %svc; - die $error; - } - - my($cust_pkg)=new FS::cust_pkg ( { - 'custnum' => $svc{'custnum'}, - 'pkgpart' => $pkgpart{$svc{'LegacyBillingData'}}, - 'setup' => '', - 'bill' => '', - 'susp' => '', - 'expire' => '', - 'cancel' => '', - } ); - - $error=$cust_pkg->insert; - if ( $error ) { - warn $svc{'LegacyBillingData'}; - die $error; - } - - unless ( $svc{'username'} ) { - warn "Empty login"; - } else { - #find svc_acct record (imported with bin/svc_acct.import) for this username - my($svc_acct)=qsearchs('svc_acct',{'username'=>$svc{'username'}}); - unless ( $svc_acct ) { - warn "username ", $svc{'username'}, " not found\n"; - } else { - #link to the cust_pkg record we created above - - #find cust_svc record for this svc_acct record - my($o_cust_svc)=qsearchs('cust_svc',{ - 'svcnum' => $svc_acct->svcnum, - 'pkgnum' => '', - } ); - unless ( $o_cust_svc ) { - warn "No unlinked cust_svc for svcnum ", $svc_acct->svcnum; - } else { - - #make sure this svcpart is in pkgpart - my($pkg_svc)=qsearchs('pkg_svc',{ - 'pkgpart' => $pkgpart{$svc{'LegacyBillingData'}}, - 'svcpart' => $o_cust_svc->svcpart, - 'quantity' => 1, - }); - unless ( $pkg_svc ) { - warn "login ", $svc{'username'}, ": No svcpart ", $o_cust_svc->svcpart, - " for pkgpart ", $pkgpart{$svc{'Acct. Type'}}, "\n" ; - } else { - - #create new cust_svc record linked to cust_pkg record - my($n_cust_svc) = new FS::cust_svc ({ - 'svcnum' => $o_cust_svc->svcnum, - 'pkgnum' => $cust_pkg->pkgnum, - 'svcpart' => $pkg_svc->svcpart, - }); - my($error) = $n_cust_svc->replace($o_cust_svc); - die $error if $error; - $link++; - } - } - } - } - - $line++; - -} - -warn "\n$link of $line lines linked\n"; - -# --- - -sub usage { - die "Usage:\n\n cust_main.import user\n"; -} diff --git a/eg/export_template.pm b/eg/export_template.pm deleted file mode 100644 index 00942fd12..000000000 --- a/eg/export_template.pm +++ /dev/null @@ -1,50 +0,0 @@ -package FS::part_export::myexport; - -use vars qw(@ISA); -use FS::part_export; - -@ISA = qw(FS::part_export); - -sub rebless { shift; } - -sub _export_insert { - my($self, $svc_something) = (shift, shift); - $err_or_queue = $self->myexport_queue( $svc_something->svcnum, 'insert', - $svc_something->username, $svc_something->_password ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub _export_replace { - my( $self, $new, $old ) = (shift, shift, shift); - #return "can't change username with myexport" - # if $old->username ne $new->username; - #return '' unless $old->_password ne $new->_password; - $err_or_queue = $self->myexport_queue( $new->svcnum, - 'replace', $new->username, $new->_password ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -sub _export_delete { - my( $self, $svc_something ) = (shift, shift); - $err_or_queue = $self->myexport_queue( $svc_something->svcnum, - 'delete', $svc_something->username ); - ref($err_or_queue) ? '' : $err_or_queue; -} - -#a good idea to queue anything that could fail or take any time -sub myexport_queue { - my( $self, $svcnum, $method ) = (shift, shift, shift); - my $queue = new FS::queue { - 'svcnum' => $svcnum, - 'job' => "FS::part_export::myexport::myexport_$method", - }; - $queue->insert( @_ ) or $queue; -} - -sub myexport_insert { #subroutine, not method -} -sub myexport_replace { #subroutine, not method -} -sub myexport_delete { #subroutine, not method -} - diff --git a/eg/table_template-svc.pm b/eg/table_template-svc.pm deleted file mode 100644 index ebf7299d2..000000000 --- a/eg/table_template-svc.pm +++ /dev/null @@ -1,161 +0,0 @@ -package FS::svc_table; - -use strict; -use vars qw(@ISA); -#use FS::Record qw( qsearch qsearchs ); -use FS::svc_Common; -use FS::cust_svc; - -@ISA = qw(svc_Common); - -=head1 NAME - -FS::table_name - Object methods for table_name records - -=head1 SYNOPSIS - - use FS::table_name; - - $record = new FS::table_name \%hash; - $record = new FS::table_name { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - - $error = $record->suspend; - - $error = $record->unsuspend; - - $error = $record->cancel; - -=head1 DESCRIPTION - -An FS::table_name object represents an example. FS::table_name inherits from -FS::svc_Common. The following fields are currently supported: - -=over 4 - -=item field - description - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new example. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -sub table { 'table_name'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -The additional fields pkgnum and svcpart (see L) should be -defined. An FS::cust_svc record will be created and inserted. - -=cut - -sub insert { - my $self = shift; - my $error; - - $error = $self->SUPER::insert; - return $error if $error; - - ''; -} - -=item delete - -Delete this record from the database. - -=cut - -sub delete { - my $self = shift; - my $error; - - $error = $self->SUPER::delete; - return $error if $error; - - ''; -} - - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -sub replace { - my ( $new, $old ) = ( shift, shift ); - my $error; - - $error = $new->SUPER::replace($old); - return $error if $error; - - ''; -} - -=item suspend - -Called by the suspend method of FS::cust_pkg (see L). - -=item unsuspend - -Called by the unsuspend method of FS::cust_pkg (see L). - -=item cancel - -Called by the cancel method of FS::cust_pkg (see L). - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and repalce methods. - -=cut - -sub check { - my $self = shift; - - my $x = $self->setfixed; - return $x unless ref($x); - my $part_svc = $x; - - - ''; #no error -} - -=back - -=head1 BUGS - -The author forgot to customize this manpage. - -=head1 SEE ALSO - -L, L, L, L, -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/eg/table_template.pm b/eg/table_template.pm deleted file mode 100644 index d609bd544..000000000 --- a/eg/table_template.pm +++ /dev/null @@ -1,112 +0,0 @@ -package FS::table_name; - -use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearch qsearchs ); - -@ISA = qw(FS::Record); - -=head1 NAME - -FS::table_name - Object methods for table_name records - -=head1 SYNOPSIS - - use FS::table_name; - - $record = new FS::table_name \%hash; - $record = new FS::table_name { 'column' => 'value' }; - - $error = $record->insert; - - $error = $new_record->replace($old_record); - - $error = $record->delete; - - $error = $record->check; - -=head1 DESCRIPTION - -An FS::table_name object represents an example. FS::table_name inherits from -FS::Record. The following fields are currently supported: - -=over 4 - -=item field - description - -=back - -=head1 METHODS - -=over 4 - -=item new HASHREF - -Creates a new example. To add the example to the database, see L<"insert">. - -Note that this stores the hash reference, not a distinct copy of the hash it -points to. You can ask the object for a copy with the I method. - -=cut - -# the new method can be inherited from FS::Record, if a table method is defined - -sub table { 'table_name'; } - -=item insert - -Adds this record to the database. If there is an error, returns the error, -otherwise returns false. - -=cut - -# the insert method can be inherited from FS::Record - -=item delete - -Delete this record from the database. - -=cut - -# the delete method can be inherited from FS::Record - -=item replace OLD_RECORD - -Replaces the OLD_RECORD with this one in the database. If there is an error, -returns the error, otherwise returns false. - -=cut - -# the replace method can be inherited from FS::Record - -=item check - -Checks all fields to make sure this is a valid example. If there is -an error, returns the error, otherwise returns false. Called by the insert -and replace methods. - -=cut - -# the check method should currently be supplied - FS::Record contains some -# data checking routines - -sub check { - my $self = shift; - - ''; #no error -} - -=back - -=head1 BUGS - -The author forgot to customize this manpage. - -=head1 SEE ALSO - -L, schema.html from the base documentation. - -=cut - -1; - diff --git a/eg/vpopmailrestart b/eg/vpopmailrestart deleted file mode 100755 index c716e2e2b..000000000 --- a/eg/vpopmailrestart +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -for domain in /home/vpopmail/domains/* -do - /home/vpopmail/bin/vmkpasswd `/bin/basename $domain` -done - -/var/qmail/bin/qmail-newu - -killall -HUP qmail-send - diff --git a/etc/acp_logfile-parse b/etc/acp_logfile-parse deleted file mode 100755 index 5e258991b..000000000 --- a/etc/acp_logfile-parse +++ /dev/null @@ -1,197 +0,0 @@ -#!/usr/bin/perl - -### -# WHO WROTE THIS??? -### - -#require "perldb.pl"; - -# Compute SLIP/PPP log times -# Arguments -a Process entire file with totals -# -t Process only totals -# -f File to be processed if not current -# -d processing start date (default is entire file) -# -l to return all totals for dayuse -# -w name of tmp work file for dayuse -# user names - -require "time.pl"; - -$space=' '; - -unless (@ARGV[0]) { - print "Missing Arguments\n"; - print "-a - entire file\n"; - print "-t - totals only\n"; - print "-f - file name to be processed\n"; - print "-d - processing start date (yymmdd)\n"; - print "-l - return totals for dayuse\n"; - print "-w - tmp work file for dayuse\n"; - exit; -} # end if test for missing arguments - -$infile = "/usr/annex/acp_logfile"; -$tmpfile = "/tmp/ppp"; -$n = $#ARGV; -$start_yymmdd = ""; -for ($i = 0; $i <= $n; $i++) { - if ($ARGV[$i] eq "-a") { - $allflag = "true"; - } - elsif ($ARGV[$i] eq "-t") { - $totalflag = "true"; - } - elsif ($ARGV[$i] eq "-f") { - $i++; - $infile = $ARGV[$i]; - } - elsif ($ARGV[$i] eq "-d") { - $i++; - $start_yymmdd = $ARGV[$i]; - } #end start yymmdd - elsif ($ARGV[$i] eq "-l") { - $logflag = "true"; - $totalflag = "true"; - } # end log - elsif ($ARGV[$i] eq "-w") { - $i++; - $tmpfile = $ARGV[$i]; - } # end tmp file - else { - ($arg_user,$arg_yymmdd) = split (/:/, $ARGV[$i]); - $ip_user_date {$arg_user} = $ARGV[$i]; - $userflag = "true"; - } # end else - } # end for 1 = 1 to n - -open (IN,$infile) - || die "Can't open acp_logfile"; - -NEXTUSER: while () { - chop; - ($add,$ether,$port,$date,$time,$type,$action,$user) = split(/:/); - - if ($logflag) { - $start_yymmdd = ''; - if ($ip_user_date{$user}) { - ($ip_user, $start_yymmdd) = - split (/:/, $ip_user_date{$user}); - } # end get date - } # end log flag - if ($start_yymmdd) { - if ($date < $start_yymmdd) { - next NEXTUSER; - } #end date compare - } #end if date - if ($userflag){ - if (!$ip_user_date{$user}) { - next NEXTUSER; - } # end user test - } # end by user or all - if (($totalflag) || - ($allflag) || - ($ip_user_date{$user})) { - if (($type eq 'ppp') || ($type eq 'slip')) { - - if ($action eq 'login') { - $login{$user} = "$time:$date"; - - } - elsif ($action eq 'logout') { - if (!$login{$user}) { - $login{$user} = "010101:$date"; - } #end pad user if carry over - ($stime,$sdate) = split(':',$login{$user}); - $start = &annex2sec($stime); - $end = &annex2sec($time); - - #If we went through midnight, add a day; - if ($end < $start) {$end += 86400;} - $timeon = $end - $start; - - $elapsed{$user} += $timeon; - - if (!$totalflag) { - print (&fmt_user($user), - ' ', &fmt_date($sdate), ' In: ', - &fmt_time($stime),' Out: ', - &fmt_time($time), - ' Elapsed: ', &fmt_sec($timeon), "\n"); - } # end total test - } #end elsif action - } # type = ppp of slip - } # check arguments -} -close IN; - -if ($logflag) { - open (TMPPPP, ">$tmpfile") - || die "Can't open ppp tmp file"; - foreach $user ( sort((keys(%elapsed))) ) { - $log_time = &fmt_sec($elapsed{$user}); - $tmp = join (':', - $user, - $log_time); - print (TMPPPP "$tmp\n"); - } - close (TMPPPP); -} - else { - print "\n\nTotal Time On For Period:\n"; - print "-------------------------\n"; - - foreach $user ( sort((keys(%elapsed))) ) { - print (&fmt_user($user), " ",&fmt_sec($elapsed{$user}), "\n"); - } - } -exit(0); - -#------------------------------------------------------- -#--------------- Subroutines Start Here ---------------- -#------------------------------------------------------- - -sub annex2sec { - local($time) = @_; - return( &time2sec( &break_annex($time) ) ); -} - -sub fmt_date { - local($date) = @_; - - return( substr($date,2,2).'/'.substr($date,4,2).'/'.substr($date,0,2) ); -} - -sub fmt_time { - local($time) = @_; - local($s,$m,$h) = &break_annex($time); - return ("$h:$m:$s"); -} - - -sub break_annex { - local($time) = @_; - local($h,$m,$s); - - $h=substr($time,0,2); - $m=substr($time,2,2); - $s=substr($time,4,2); - - return ($s,$m,$h); -} - -sub fmt_sec { - local(@t) = &sec2time(@_); - @t[2] += (@t[3]*24); - - foreach $a (@t) { - if ($a < 10) {$a = "0$a";} - } - - return ("@t[2]:@t[1]:@t[0]"); -} - -sub fmt_user { - local($user) = @_; - return( $user.substr($space,0,8 - length($user) ).' ' ); -} - diff --git a/etc/countries.txt b/etc/countries.txt deleted file mode 100644 index 73c3975ed..000000000 --- a/etc/countries.txt +++ /dev/null @@ -1,239 +0,0 @@ -AFGHANISTAN AF AFG 004 -ALBANIA AL ALB 008 -ALGERIA DZ DZA 012 -AMERICAN SAMOA AS ASM 016 -ANDORRA AD AND 020 -ANGOLA AO AGO 024 -ANGUILLA AI AIA 660 -ANTARCTICA AQ ATA 010 -ANTIGUA AND BARBUDA AG ATG 028 -ARGENTINA AR ARG 032 -ARMENIA AM ARM 051 -ARUBA AW ABW 533 -AUSTRALIA AU AUS 036 -AUSTRIA AT AUT 040 -AZERBAIJAN AZ AZE 031 -BAHAMAS BS BHS 044 -BAHRAIN BH BHR 048 -BANGLADESH BD BGD 050 -BARBADOS BB BRB 052 -BELARUS BY BLR 112 -BELGIUM BE BEL 056 -BELIZE BZ BLZ 084 -BENIN BJ BEN 204 -BERMUDA BM BMU 060 -BHUTAN BT BTN 064 -BOLIVIA BO BOL 068 -BOSNIA AND HERZEGOWINA BA BIH 070 -BOTSWANA BW BWA 072 -BOUVET ISLAND BV BVT 074 -BRAZIL BR BRA 076 -BRITISH INDIAN OCEAN TERRITORY IO IOT 086 -BRUNEI DARUSSALAM BN BRN 096 -BULGARIA BG BGR 100 -BURKINA FASO BF BFA 854 -BURUNDI BI BDI 108 -CAMBODIA KH KHM 116 -CAMEROON CM CMR 120 -CANADA CA CAN 124 -CAPE VERDE CV CPV 132 -CAYMAN ISLANDS KY CYM 136 -CENTRAL AFRICAN REPUBLIC CF CAF 140 -CHAD TD TCD 148 -CHILE CL CHL 152 -CHINA CN CHN 156 -CHRISTMAS ISLAND CX CXR 162 -COCOS (KEELING) ISLANDS CC CCK 166 -COLOMBIA CO COL 170 -COMOROS KM COM 174 -CONGO CG COG 178 -COOK ISLANDS CK COK 184 -COSTA RICA CR CRI 188 -COTE D'IVOIRE CI CIV 384 -CROATIA (local name: Hrvatska) HR HRV 191 -CUBA CU CUB 192 -CYPRUS CY CYP 196 -CZECH REPUBLIC CZ CZE 203 -DENMARK DK DNK 208 -DJIBOUTI DJ DJI 262 -DOMINICA DM DMA 212 -DOMINICAN REPUBLIC DO DOM 214 -EAST TIMOR TP TMP 626 -ECUADOR EC ECU 218 -EGYPT EG EGY 818 -EL SALVADOR SV SLV 222 -EQUATORIAL GUINEA GQ GNQ 226 -ERITREA ER ERI 232 -ESTONIA EE EST 233 -ETHIOPIA ET ETH 231 -FALKLAND ISLANDS (MALVINAS) FK FLK 238 -FAROE ISLANDS FO FRO 234 -FIJI FJ FJI 242 -FINLAND FI FIN 246 -FRANCE FR FRA 250 -FRANCE, METROPOLITAN FX FXX 249 -FRENCH GUIANA GF GUF 254 -FRENCH POLYNESIA PF PYF 258 -FRENCH SOUTHERN TERRITORIES TF ATF 260 -GABON GA GAB 266 -GAMBIA GM GMB 270 -GEORGIA GE GEO 268 -GERMANY DE DEU 276 -GHANA GH GHA 288 -GIBRALTAR GI GIB 292 -GREECE GR GRC 300 -GREENLAND GL GRL 304 -GRENADA GD GRD 308 -GUADELOUPE GP GLP 312 -GUAM GU GUM 316 -GUATEMALA GT GTM 320 -GUINEA GN GIN 324 -GUINEA-BISSAU GW GNB 624 -GUYANA GY GUY 328 -HAITI HT HTI 332 -HEARD AND MC DONALD ISLANDS HM HMD 334 -HONDURAS HN HND 340 -HONG KONG HK HKG 344 -HUNGARY HU HUN 348 -ICELAND IS ISL 352 -INDIA IN IND 356 -INDONESIA ID IDN 360 -IRAN (ISLAMIC REPUBLIC OF) IR IRN 364 -IRAQ IQ IRQ 368 -IRELAND IE IRL 372 -ISRAEL IL ISR 376 -ITALY IT ITA 380 -JAMAICA JM JAM 388 -JAPAN JP JPN 392 -JORDAN JO JOR 400 -KAZAKHSTAN KZ KAZ 398 -KENYA KE KEN 404 -KIRIBATI KI KIR 296 -KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF KP PRK 408 -KOREA, REPUBLIC OF KR KOR 410 -KUWAIT KW KWT 414 -KYRGYZSTAN KG KGZ 417 -LAO PEOPLE'S DEMOCRATIC REPUBLIC LA LAO 418 -LATVIA LV LVA 428 -LEBANON LB LBN 422 -LESOTHO LS LSO 426 -LIBERIA LR LBR 430 -LIBYAN ARAB JAMAHIRIYA LY LBY 434 -LIECHTENSTEIN LI LIE 438 -LITHUANIA LT LTU 440 -LUXEMBOURG LU LUX 442 -MACAU MO MAC 446 -MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF MK MKD 807 -MADAGASCAR MG MDG 450 -MALAWI MW MWI 454 -MALAYSIA MY MYS 458 -MALDIVES MV MDV 462 -MALI ML MLI 466 -MALTA MT MLT 470 -MARSHALL ISLANDS MH MHL 584 -MARTINIQUE MQ MTQ 474 -MAURITANIA MR MRT 478 -MAURITIUS MU MUS 480 -MAYOTTE YT MYT 175 -MEXICO MX MEX 484 -MICRONESIA, FEDERATED STATES OF FM FSM 583 -MOLDOVA, REPUBLIC OF MD MDA 498 -MONACO MC MCO 492 -MONGOLIA MN MNG 496 -MONTSERRAT MS MSR 500 -MOROCCO MA MAR 504 -MOZAMBIQUE MZ MOZ 508 -MYANMAR MM MMR 104 -NAMIBIA NA NAM 516 -NAURU NR NRU 520 -NEPAL NP NPL 524 -NETHERLANDS NL NLD 528 -NETHERLANDS ANTILLES AN ANT 530 -NEW CALEDONIA NC NCL 540 -NEW ZEALAND NZ NZL 554 -NICARAGUA NI NIC 558 -NIGER NE NER 562 -NIGERIA NG NGA 566 -NIUE NU NIU 570 -NORFOLK ISLAND NF NFK 574 -NORTHERN MARIANA ISLANDS MP MNP 580 -NORWAY NO NOR 578 -OMAN OM OMN 512 -PAKISTAN PK PAK 586 -PALAU PW PLW 585 -PANAMA PA PAN 591 -PAPUA NEW GUINEA PG PNG 598 -PARAGUAY PY PRY 600 -PERU PE PER 604 -PHILIPPINES PH PHL 608 -PITCAIRN PN PCN 612 -POLAND PL POL 616 -PORTUGAL PT PRT 620 -PUERTO RICO PR PRI 630 -QATAR QA QAT 634 -REUNION RE REU 638 -ROMANIA RO ROM 642 -RUSSIAN FEDERATION RU RUS 643 -RWANDA RW RWA 646 -SAINT KITTS AND NEVIS KN KNA 659 -SAINT LUCIA LC LCA 662 -SAINT VINCENT AND THE GRENADINES VC VCT 670 -SAMOA WS WSM 882 -SAN MARINO SM SMR 674 -SAO TOME AND PRINCIPE ST STP 678 -SAUDI ARABIA SA SAU 682 -SENEGAL SN SEN 686 -SEYCHELLES SC SYC 690 -SIERRA LEONE SL SLE 694 -SINGAPORE SG SGP 702 -SLOVAKIA (Slovak Republic) SK SVK 703 -SLOVENIA SI SVN 705 -SOLOMON ISLANDS SB SLB 090 -SOMALIA SO SOM 706 -SOUTH AFRICA ZA ZAF 710 -SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS GS SGS 239 -SPAIN ES ESP 724 -SRI LANKA LK LKA 144 -ST. HELENA SH SHN 654 -ST. PIERRE AND MIQUELON PM SPM 666 -SUDAN SD SDN 736 -SURINAME SR SUR 740 -SVALBARD AND JAN MAYEN ISLANDS SJ SJM 744 -SWAZILAND SZ SWZ 748 -SWEDEN SE SWE 752 -SWITZERLAND CH CHE 756 -SYRIAN ARAB REPUBLIC SY SYR 760 -TAIWAN, PROVINCE OF CHINA TW TWN 158 -TAJIKISTAN TJ TJK 762 -TANZANIA, UNITED REPUBLIC OF TZ TZA 834 -THAILAND TH THA 764 -TOGO TG TGO 768 -TOKELAU TK TKL 772 -TONGA TO TON 776 -TRINIDAD AND TOBAGO TT TTO 780 -TUNISIA TN TUN 788 -TURKEY TR TUR 792 -TURKMENISTAN TM TKM 795 -TURKS AND CAICOS ISLANDS TC TCA 796 -TUVALU TV TUV 798 -UGANDA UG UGA 800 -UKRAINE UA UKR 804 -UNITED ARAB EMIRATES AE ARE 784 -UNITED KINGDOM GB GBR 826 -UNITED STATES US USA 840 -UNITED STATES MINOR OUTLYING ISLANDS UM UMI 581 -URUGUAY UY URY 858 -UZBEKISTAN UZ UZB 860 -VANUATU VU VUT 548 -VATICAN CITY STATE (HOLY SEE) VA VAT 336 -VENEZUELA VE VEN 862 -VIET NAM VN VNM 704 -VIRGIN ISLANDS (BRITISH) VG VGB 092 -VIRGIN ISLANDS (U.S.) VI VIR 850 -WALLIS AND FUTUNA ISLANDS WF WLF 876 -WESTERN SAHARA EH ESH 732 -YEMEN YE YEM 887 -YUGOSLAVIA YU YUG 891 -ZAIRE ZR ZAR 180 -ZAMBIA ZM ZMB 894 -ZIMBABWE ZW ZWE 716 diff --git a/etc/domain-template.txt b/etc/domain-template.txt deleted file mode 100644 index 8e4983ce2..000000000 --- a/etc/domain-template.txt +++ /dev/null @@ -1,231 +0,0 @@ -[ URL ftp://rs.internic.net/templates/domain-template.txt ] [ 03/98 ] - -******* Please DO NOT REMOVE Version Number or Sections A-Q ******** - -Domain Version Number: 4.0 - -******* Email completed agreement to hostmaster@internic.net ******* - - NETWORK SOLUTIONS, INC. - - DOMAIN NAME REGISTRATION AGREEMENT - - -A. Introduction. This domain name registration agreement -("Registration Agreement") is submitted to NETWORK SOLUTIONS, INC. -("NSI") for the purpose of applying for and registering a domain name -on the Internet. If this Registration Agreement is accepted by NSI, -and a domain name is registered in NSI's domain name database and -assigned to the Registrant, Registrant ("Registrant") agrees to be -bound by the terms of this Registration Agreement and the terms of -NSI's Domain Name Dispute Policy ("Dispute Policy") which is -incorporated herein by reference and made a part of this Registration -Agreement. This Registration Agreement shall be accepted at the -offices of NSI. - -B. Fees and Payments. - -1) Registration or renewal (re-registration) date through March 31, 1998: -Registrant agrees to pay a registration fee of One Hundred United States -Dollars (US$100) as consideration for the registration of each new domain -name or Fifty United States Dollars (US$50) to renew (re-register) an -existing registration. -2) Registration or renewal date on and after April 1, 1998: Registrant -agrees to pay a registration fee of Seventy United States Dollars (US$70) -as consideration for the registration of each new domain name or the -applicable renewal (re-registration) fee (currently Thirty-Five United -States Dollars (US$35)) at the time of renewal (re-registration). -3) Period of Service: The non-refundable fee covers a period of two (2) -years for each new registration, and one (1) year for each renewal, -and includes any permitted modification(s) to the domain name record -during the covered period. -4) Payment: Payment is due to Network Solutions within thirty (30) -days from the date of the invoice. - -C. Dispute Policy. Registrant agrees, as a condition to -submitting this Registration Agreement, and if the Registration -Agreement is accepted by NSI, that the Registrant shall be bound by -NSI's current Dispute Policy. The current version of the Dispute -Policy may be found at the InterNIC Registration Services web site: -"http://www.netsol.com/rs/dispute-policy.html". - -D. Dispute Policy Changes or Modifications. Registrant agrees -that NSI, in its sole discretion, may change or modify the Dispute -Policy, incorporated by reference herein, at any time. Registrant -agrees that Registrant's maintaining the registration of a domain name -after changes or modifications to the Dispute Policy become effective -constitutes Registrant's continued acceptance of these changes or -modifications. Registrant agrees that if Registrant considers any such -changes or modifications to be unacceptable, Registrant may request -that the domain name be deleted from the domain name database. - -E. Disputes. Registrant agrees that, if the registration of its -domain name is challenged by any third party, the Registrant will be -subject to the provisions specified in the Dispute Policy. - -F. Agents. Registrant agrees that if this Registration Agreement -is completed by an agent for the Registrant, such as an ISP or -Administrative Contact/Agent, the Registrant is nonetheless bound as a -principal by all terms and conditions herein, including the Dispute -Policy. - -G. Limitation of Liability. Registrant agrees that NSI shall have -no liability to the Registrant for any loss Registrant may incur in -connection with NSI's processing of this Registration Agreement, in -connection with NSI's processing of any authorized modification to the -domain name's record during the covered period, as a result of the -Registrant's ISP's failure to pay either the initial registration fee -or renewal fee, or as a result of the application of the provisions of -the Dispute Policy. Registrant agrees that in no event shall the -maximum liability of NSI under this Agreement for any matter exceed -Five Hundred United States Dollars (US$500). - -H. Indemnity. Registrant agrees, in the event the Registration -Agreement is accepted by NSI and a subsequent dispute arises with any -third party, to indemnify and hold NSI harmless pursuant to the terms -and conditions contained in the Dispute Policy. - -I. Breach. Registrant agrees that failure to abide by any -provision of this Registration Agreement or the Dispute Policy may be -considered by NSI to be a material breach and that NSI may provide a -written notice, describing the breach, to the Registrant. If, within -thirty (30) days of the date of mailing such notice, the Registrant -fails to provide evidence, which is reasonably satisfactory to NSI, -that it has not breached its obligations, then NSI may delete -Registrant's registration of the domain name. Any such breach by a -Registrant shall not be deemed to be excused simply because NSI did -not act earlier in response to that, or any other, breach by the -Registrant. - -J. No Guaranty. Registrant agrees that, by registration of a -domain name, such registration does not confer immunity from objection -to either the registration or use of the domain name. - -K. Warranty. Registrant warrants by submitting this Registration -Agreement that, to the best of Registrant's knowledge and belief, the -information submitted herein is true and correct, and that any future -changes to this information will be provided to NSI in a timely manner -according to the domain name modification procedures in place at that -time. Breach of this warranty will constitute a material breach. - -L. Revocation. Registrant agrees that NSI may delete a -Registrant's domain name if this Registration Agreement, or subsequent -modification(s) thereto, contains false or misleading information, or -conceals or omits any information NSI would likely consider material -to its decision to approve this Registration Agreement. - -M. Right of Refusal. NSI, in its sole discretion, reserves the -right to refuse to approve the Registration Agreement for any -Registrant. Registrant agrees that the submission of this Registration -Agreement does not obligate NSI to accept this Registration Agreement. -Registrant agrees that NSI shall not be liable for loss or damages -that may result from NSI's refusal to accept this Registration -Agreement. - -N. Severability. Registrant agrees that the terms of this -Registration Agreement are severable. If any term or provision is -declared invalid, it shall not affect the remaining terms or -provisions which shall continue to be binding. - -O. Entirety. Registrant agrees that this Registration Agreement -and the Dispute Policy is the complete and exclusive agreement between -Registrant and NSI regarding the registration of Registrant's domain -name. This Registration Agreement and the Dispute Policy supersede all -prior agreements and understandings, whether established by custom, -practice, policy, or precedent. - -P. Governing Law. Registrant agrees that this Registration -Agreement shall be governed in all respects by and construed in -accordance with the laws of the Commonwealth of Virginia, United -States of America. By submitting this Registration Agreement, -Registrant consents to the exclusive jurisdiction and venue of the -United States District Court for the Eastern District of Virginia, -Alexandria Division. If there is no jurisdiction in the United States -District Court for the Eastern District of Virginia, Alexandria -Division, then jurisdiction shall be in the Circuit Court of Fairfax -County, Fairfax, Virginia. - -Q. This is Domain Name Registration Agreement Version -Number 4.0. This Registration Agreement is only for registrations -under top-level domains: COM, ORG, NET, and EDU. By completing -and submitting this Registration Agreement for consideration and -acceptance by NSI, the Registrant agrees that he/she has read and -agrees to be bound by A through P above. - - -Authorization -0a. (N)ew (M)odify (D)elete....:###action### -0b. Auth Scheme................: -0c. Auth Info..................: - -1. Comments...................:###purpose### - -2. Complete Domain Name.......:###domain### - -Organization Using Domain Name - -3a. Organization Name..........:###company### -###LOOP### -3b. Street Address.............:###address### -###ENDLOOP### -3c. City.......................:###city### -3d. State......................:###state### -3e. Postal Code................:###zip### -3f. Country....................:###country### - -Administrative Contact -4a. NIC Handle (if known)......: -4b. (I)ndividual (R)ole........:I -4c. Name (Last, First).........:###last###, ###first### -4d. Organization Name..........:###company### -###LOOP### -4e. Street Address.............:###address### -###ENDLOOP### -4f. City.......................:###city### -4g. State......................:###state### -4h. Postal Code................:###zip### -4i. Country....................:###country### -4j. Phone Number...............:###daytime### -4k. Fax Number.................:###fax### -4l. E-Mailbox..................:###email### - -Technical Contact -5a. NIC Handle (if known)......:###tech_contact### -5b. (I)ndividual (R)ole........: -5c. Name (Last, First).........: -5d. Organization Name..........: -5e. Street Address.............: -5f. City.......................: -5g. State......................: -5h. Postal Code................: -5i. Country....................: -5j. Phone Number...............: -5k. Fax Number.................: -5l. E-Mailbox..................: - -Billing Contact -6a. NIC Handle (if known)......: -6b. (I)ndividual (R)ole........: -6c. Name (Last, First).........: -6d. Organization Name..........: -6e. Street Address.............: -6f. City.......................: -6g. State......................: -6h. Postal Code................: -6i. Country....................: -6j. Phone Number...............: -6k. Fax Number.................: -6l. E-Mailbox..................: - -Prime Name Server -7a. Primary Server Hostname....:###primary### -7b. Primary Server Netaddress..:###primary_ip### - -Secondary Name Server(s) -###LOOP### -8a. Secondary Server Hostname..:###secondary### -8b. Secondary Server Netaddress:###secondary_ip### -###ENDLOOP### - -END OF AGREEMENT - diff --git a/etc/example-direct-cardin b/etc/example-direct-cardin deleted file mode 100755 index 1a4097221..000000000 --- a/etc/example-direct-cardin +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/local/bin/perl - -### -# THIS IS FROM CYBERCASH (is there a newer version?) -### - -$paymentserverhost = 'localhost'; -$paymentserverport = 8000; -$paymentserversecret = 'two-turntables'; -use CCLib qw(sendmserver); - -# first lets fake up some data -# use time of day and pid to give me my pretend -# order number -# you obviously need to get real data from somewhere... - -$oid = "test$$"; #fake order number. -$amount = 'usd 42.42'; -$ramount = 'usd 24.24'; -$pan = '4111111111111111'; -$name = 'John Q. Doe'; -$addr = '17 Richard Rd.'; -$city = 'Ivyland'; -$state = 'PA'; -$zip = '18974'; -$country = 'USA'; -$exp = '7/97'; - - -%result = &sendmserver('mauthcapture', - 'Order-ID', $oid, - 'Amount', $amount, - 'Card-Number', $pan, - 'Card-Name', $name, - 'Card-Address', $addr, - 'Card-City', $city, - 'Card-State', $state, - 'Card-Zip', $zip, - 'Card-Country', $country, - 'Card-Exp', $exp); - -# -# just dump results to stdout. -# you should process them... -# to allow results to affect operation of your fulfillment... -# -foreach (keys(%result)) { - print " $_ ==> $result{$_}\n"; -} - -print "\n"; - -exit; - -$trans=$result{'MTransactionNumber'}; -$code=$result{'MRetrievalCode'}; - -%result = &sendmserver('return', - 'Order-ID', $oid, - 'Return-Amount',$ramount, - 'Amount',$amount, - ); - -foreach (keys(%result)) { - print " $_ ==> $result{$_}\n"; -} - diff --git a/etc/megapop.pl b/etc/megapop.pl deleted file mode 100755 index b250bcdde..000000000 --- a/etc/megapop.pl +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: megapop.pl,v 1.1 1999-04-19 10:32:44 ivan Exp $ -# -# this will break when megapop changes the URL or format of their listing page. -# that's stupid. perhaps they can provide a machine-readable listing? - -use strict; -use LWP::UserAgent; -use FS::UID qw(adminsuidsetup); -use FS::svc_acct_pop; - -my $url = "http://www.megapop.com/location.htm"; - -my $user = shift or die &usage; -adminsuidsetup($user); - -my %state2usps = &state2usps; -$state2usps{'WASHINGTON STATE'} = 'WA'; #megapop's on crack -$state2usps{'CANADA'} = 'CANADA'; #freeside's on crack - -my $ua = new LWP::UserAgent; -my $request = new HTTP::Request('GET', $url); -my $response = $ua->request($request); -die $response->error_as_HTML unless $response->is_success; -my $line; -my $usps = ''; -foreach $line ( split("\n", $response->content) ) { - if ( $line =~ /\W(\w[\w\s]*\w)\s+LOCATIONS/i ) { - $usps = $state2usps{uc($1)} - or warn "warning: unknown state $1\n"; - } elsif ( $line =~ /(\d{3})\-(\d{3})\-(\d{4})\s+(\w[\w\s]*\w)/ ) { - print "$1 $2 $3 $4 $usps\n"; - my $svc_acct_pop = new FS::svc_acct_pop ( { - 'city' => $4, - 'state' => $usps, - 'ac' => $1, - 'exch' => $2, - } ); - my $error = $svc_acct_pop->insert; - die $error if $error; - } -} - -sub usage { - die "Usage:\n $0 user\n"; -} - -sub state2usps{ ( - 'ALABAMA' => 'AL', - 'ALASKA' => 'AK', - 'AMERICAN SAMOA' => 'AS', - 'ARIZONA' => 'AZ', - 'ARKANSAS' => 'AR', - 'CALIFORNIA' => 'CA', - 'COLORADO' => 'CO', - 'CONNECTICUT' => 'CT', - 'DELAWARE' => 'DE', - 'DISTRICT OF COLUMBIA' => 'DC', - 'FEDERATED STATES OF MICRONESIA' => 'FM', - 'FLORIDA' => 'FL', - 'GEORGIA' => 'GA', - 'GUAM' => 'GU', - 'HAWAII' => 'HI', - 'IDAHO' => 'ID', - 'ILLINOIS' => 'IL', - 'INDIANA' => 'IN', - 'IOWA' => 'IA', - 'KANSAS' => 'KS', - 'KENTUCKY' => 'KY', - 'LOUISIANA' => 'LA', - 'MAINE' => 'ME', - 'MARSHALL ISLANDS' => 'MH', - 'MARYLAND' => 'MD', - 'MASSACHUSETTS' => 'MA', - 'MICHIGAN' => 'MI', - 'MINNESOTA' => 'MN', - 'MISSISSIPPI' => 'MS', - 'MISSOURI' => 'MO', - 'MONTANA' => 'MT', - 'NEBRASKA' => 'NE', - 'NEVADA' => 'NV', - 'NEW HAMPSHIRE' => 'NH', - 'NEW JERSEY' => 'NJ', - 'NEW MEXICO' => 'NM', - 'NEW YORK' => 'NY', - 'NORTH CAROLINA' => 'NC', - 'NORTH DAKOTA' => 'ND', - 'NORTHERN MARIANA ISLANDS' => 'MP', - 'OHIO' => 'OH', - 'OKLAHOMA' => 'OK', - 'OREGON' => 'OR', - 'PALAU' => 'PW', - 'PENNSYLVANIA' => 'PA', - 'PUERTO RICO' => 'PR', - 'RHODE ISLAND' => 'RI', - 'SOUTH CAROLINA' => 'SC', - 'SOUTH DAKOTA' => 'SD', - 'TENNESSEE' => 'TN', - 'TEXAS' => 'TX', - 'UTAH' => 'UT', - 'VERMONT' => 'VT', - 'VIRGIN ISLANDS' => 'VI', - 'VIRGINIA' => 'VA', - 'WASHINGTON' => 'WA', - 'WEST VIRGINIA' => 'WV', - 'WISCONSIN' => 'WI', - 'WYOMING' => 'WY', - 'ARMED FORCES AFRICA' => 'AE', - 'ARMED FORCES AMERICAS' => 'AA', - 'ARMED FORCES CANADA' => 'AE', - 'ARMED FORCES EUROPE' => 'AE', - 'ARMED FORCES MIDDLE EAST' => 'AE', - 'ARMED FORCES PACIFIC' => 'AP', -) } - diff --git a/etc/sql-reserved-words.txt b/etc/sql-reserved-words.txt deleted file mode 100644 index dc507cef5..000000000 --- a/etc/sql-reserved-words.txt +++ /dev/null @@ -1,103 +0,0 @@ -From http://epoch.cs.berkeley.edu:8000/sequoia/dba/montage/FAQ/SQL.html - by Jean Anderson (jta@postgres.berkeley.edu) - -What are the SQL reserved words? - -I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3. -SQL3 words are not set in stone, but you'd do well to avoid them. - - From sql1992.txt: - - AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH, - COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF, - EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY, - NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS, - PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF, - REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE, - ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR, - SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE, - UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT - - From sql1992.txt (Annex E): - - ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN, - BIT, BIT - -What are the SQL reserved words? - -I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3. -SQL3 words are not set in stone, but you'd do well to avoid them. - - From sql1992.txt: - - AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH, - COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF, - EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY, - NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS, - PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF, - REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE, - ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR, - SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE, - UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT - - From sql1992.txt (Annex E): - - ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN, - BIT, BIT - -What are the SQL reserved words? - -I grep'd the following list out of the sql docs available via anonymous ftp to speckle.ncsl.nist.gov:/isowg3. -SQL3 words are not set in stone, but you'd do well to avoid them. - - From sql1992.txt: - - AFTER, ALIAS, ASYNC, BEFORE, BOOLEAN, BREADTH, - COMPLETION, CALL, CYCLE, DATA, DEPTH, DICTIONARY, EACH, ELSEIF, - EQUALS, GENERAL, IF, IGNORE, LEAVE, LESS, LIMIT, LOOP, MODIFY, - NEW, NONE, OBJECT, OFF, OID, OLD, OPERATION, OPERATORS, OTHERS, - PARAMETERS, PENDANT, PREORDER, PRIVATE, PROTECTED, RECURSIVE, REF, - REFERENCING, REPLACE, RESIGNAL, RETURN, RETURNS, ROLE, ROUTINE, - ROW, SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SIGNAL, SIMILAR, - SQLEXCEPTION, SQLWARNING, STRUCTURE, TEST, THERE, TRIGGER, TYPE, - UNDER, VARIABLE, VIRTUAL, VISIBLE, WAIT, WHILE, WITHOUT - - From sql1992.txt (Annex E): - - ABSOLUTE, ACTION, ADD, ALLOCATE, ALTER, ARE, ASSERTION, AT, BETWEEN, - BIT, BIT_LENGTH, BOTH, CASCADE, CASCADED, CASE, CAST, CATALOG, - CHAR_LENGTH, CHARACTER_LENGTH, COALESCE, COLLATE, COLLATION, COLUMN, - CONNECT, CONNECTION, CONSTRAINT, CONSTRAINTS, CONVERT, CORRESPONDING, - CROSS, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, - DATE, DAY, DEALLOCATE, DEFERRABLE, DEFERRED, DESCRIBE, DESCRIPTOR, - DIAGNOSTICS, DISCONNECT, DOMAIN, DROP, ELSE, END-EXEC, EXCEPT, - EXCEPTION, EXECUTE, EXTERNAL, EXTRACT, FALSE, FIRST, FULL, GET, - GLOBAL, HOUR, IDENTITY, IMMEDIATE, INITIALLY, INNER, INPUT, - INSENSITIVE, INTERSECT, INTERVAL, ISOLATION, JOIN, LAST, LEADING, - LEFT, LEVEL, LOCAL, LOWER, MATCH, MINUTE, MONTH, NAMES, NATIONAL, - NATURAL, NCHAR, NEXT, NO, NULLIF, OCTET_LENGTH, ONLY, OUTER, OUTPUT, - OVERLAPS, PAD, PARTIAL, POSITION, PREPARE, PRESERVE, PRIOR, READ, - RELATIVE, RESTRICT, REVOKE, RIGHT, ROWS, SCROLL, SECOND, SESSION, - SESSION_USER, SIZE, SPACE, SQLSTATE, SUBSTRING, SYSTEM_USER, - TEMPORARY, THEN, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE, - TRAILING, TRANSACTION, TRANSLATE, TRANSLATION, TRIM, TRUE, UNKNOWN, - UPPER, USAGE, USING, VALUE, VARCHAR, VARYING, WHEN, WRITE, YEAR, ZONE - - From sql3part2.txt (Annex E) - - ACTION, ACTOR, AFTER, ALIAS, ASYNC, ATTRIBUTES, BEFORE, BOOLEAN, - BREADTH, COMPLETION, CURRENT_PATH, CYCLE, DATA, DEPTH, DESTROY, - DICTIONARY, EACH, ELEMENT, ELSEIF, EQUALS, FACTOR, GENERAL, HOLD, - IGNORE, INSTEAD, LESS, LIMIT, LIST, MODIFY, NEW, NEW_TABLE, NO, - NONE, OFF, OID, OLD, OLD_TABLE, OPERATION, OPERATOR, OPERATORS, - PARAMETERS, PATH, PENDANT, POSTFIX, PREFIX, PREORDER, PRIVATE, - PROTECTED, RECURSIVE, REFERENCING, REPLACE, ROLE, ROUTINE, ROW, - SAVEPOINT, SEARCH, SENSITIVE, SEQUENCE, SESSION, SIMILAR, SPACE, - SQLEXCEPTION, SQLWARNING, START, STATE, STRUCTURE, SYMBOL, TERM, - TEST, THERE, TRIGGER, TYPE, UNDER, VARIABLE, VIRTUAL, VISIBLE, - WAIT, WITHOUT - - sql3part4.txt (ANNEX E): - - CALL, DO, ELSEIF, EXCEPTION, IF, LEAVE, LOOP, OTHERS, RESIGNAL, - RETURN, RETURNS, SIGNAL, TUPLE, WHILE diff --git a/fs_passwd/fs_passwd b/fs_passwd/fs_passwd deleted file mode 100755 index 0b467aefc..000000000 --- a/fs_passwd/fs_passwd +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_passwd -# -# portions of this script are copied from the `passwd' script in the original -# (perl 4) camel book, now archived at -# http://www.perl.com/CPAN/scripts/nutshell/ch6/passwd -# -# ivan@sisd.com 98-mar-8 -# -# password lengths 0,255 instead of 6,8 - we'll let the server process -# check the data ivan@sisd.com 98-jul-17 - -use strict; -use Getopt::Std; -use Socket; -use IO::Handle; -use vars qw($opt_f $opt_s); - -my($fs_passwdd_socket)="/usr/local/freeside/fs_passwdd_socket"; -my($freeside_uid)=scalar(getpwnam('freeside')); - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -$SIG{__DIE__}= sub { system '/bin/stty', 'echo'; }; - -die "passwd program isn't running setuid to freeside\n" if $> != $freeside_uid; - -unshift @ARGV, "-f" if $0 =~ /chfn$/; -unshift @ARGV, "-s" if $0 =~ /chsh$/; - -getopts('fs'); - -my($me)=''; -if ( $_ = shift(@ARGV) ) { - /^(\w{2,8})$/; - $me = $1; -} -die "You can't change the password for $me." if $me && $<; -$me = (getpwuid($<))[0] unless $me; - -my($name,$passwd,$uid,$gid,$quota,$comment,$gcos,$dir,$shell)= - getpwnam $me; - -my($old_password,$new_password,$new_gecos,$new_shell); - -if ( $opt_f || $opt_s ) { - system '/bin/stty', '-echo'; - print "Password:"; - $old_password=; - system '/bin/stty', 'echo'; - chop($old_password); - #$old_password =~ /^(.{6,8})$/ or die "\nIllegal password.\n"; - $old_password =~ /^(.{0,255})$/ or die "\nIllegal password.\n"; - $old_password = $1; - - $new_password = ''; - - if ( $opt_f ) { - print "\nChanging gecos for $me.\n"; - print "Gecos [", $gcos, "]: "; - $new_gecos=; - chop($new_gecos); - $new_gecos ||= $gcos; - $new_gecos =~ /^(.{0,255})$/ or die "\nIllegal gecos.\n"; - } else { - $new_gecos = ''; - } - - if ( $opt_s ) { - print "\nChanging shell for $me.\n"; - print "Shell [", $shell, "]: "; - $new_shell=; - chop($new_shell); - $new_shell ||= $shell; - $new_shell =~ /^(.{0,255})$/ or die "\nIllegal shell.\n"; - } else { - $new_shell = ''; - } - -} else { - - print "Changing password for $me.\n"; - print "Old password:"; - system '/bin/stty', '-echo'; - $old_password=; - chop $old_password; - #$old_password =~ /^(.{6,8})$/ or die "\nIllegal password.\n"; - $old_password =~ /^(.{0,255})$/ or die "\nIllegal password.\n"; - $old_password = $1; - print "\nEnter the new password (minimum of 6, maximum of 8 characters)\n"; - print "Please use a combination of upper and lowercase letters and numbers.\n"; - print "New password:"; - $new_password=; - chop($new_password); - #$new_password =~ /^(.{6,8})$/ or die "\nIllegal password.\n"; - $new_password =~ /^(.{0,255})$/ or die "\nIllegal password.\n"; - $new_password = $1; - print "\nRe-enter new password:"; - my($check_new_password); - $check_new_password=; - chop($check_new_password); - die "\nThey don't match; try again.\n" unless $check_new_password eq $new_password; - - $new_gecos=''; - $new_shell=''; -} -print "\n"; - -system '/bin/stty', 'echo'; - -socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; -connect(SOCK, sockaddr_un($fs_passwdd_socket)) or die "connect: $!"; -print SOCK join("\n",$me,$old_password,$new_password,$new_gecos,$new_shell),"\n"; -SOCK->flush; -my($error); -$error = ; -chop $error; - -if ($error) { - print "\nUpdate error: $error\n"; -} else { - print "\nUpdate sucessful.\n"; -} diff --git a/fs_passwd/fs_passwd.cgi b/fs_passwd/fs_passwd.cgi deleted file mode 100755 index 3f676fff3..000000000 --- a/fs_passwd/fs_passwd.cgi +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use Getopt::Std; -use Socket; -use IO::Handle; -use CGI; -use CGI::Carp qw(fatalsToBrowser); - -my $fs_passwdd_socket = "/usr/local/freeside/fs_passwdd_socket"; -my $freeside_uid = scalar(getpwnam('freeside')); - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -die "fs_passwd.cgi isn't running as freeside user\n" if $> != $freeside_uid; - -my $cgi = new CGI; - -$cgi->param('username') =~ /^([^\n]{0,255}$)/ or die "Illegal username"; -my $me = $1; - -$cgi->param('old_password') =~ /^([^\n]{0,255}$)/ or die "Illegal old_password"; -my $old_password = $1; - -$cgi->param('new_password') =~ /^([^\n]{0,255}$)/ or die "Illegal new_password"; -my $new_password = $1; - -die "New passwords don't match" - unless $new_password eq $cgi->param('new_password2'); - -socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; -connect(SOCK, sockaddr_un($fs_passwdd_socket)) or die "connect: $!"; -print SOCK join("\n", $me, $old_password, $new_password, '', ''), "\n"; -SOCK->flush; -my $error = ; -chomp $error; - -if ($error) { - die $error; -} else { - print $cgi->header(), < - - Password changed - - -

Password changed

-
Your password has been changed. - - -END -} diff --git a/fs_passwd/fs_passwd.html b/fs_passwd/fs_passwd.html deleted file mode 100644 index fadc4df8b..000000000 --- a/fs_passwd/fs_passwd.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Change password - - -

Change password

- - - - - - - - - - - - - - -
Username
Current password
New password
Re-enter new password
-
- - - diff --git a/fs_passwd/fs_passwd_server b/fs_passwd/fs_passwd_server deleted file mode 100755 index a29b2c738..000000000 --- a/fs_passwd/fs_passwd_server +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_passwd_server -# -# portions of this script are copied from the `passwd' script in the original -# (perl 4) camel book, now archived at -# http://www.perl.com/CPAN/scripts/nutshell/ch6/passwd -# -# ivan@sisd.com 98-mar-9 -# -# crypt-aware, s/password/_password/; ivan@sisd.com 98-aug-23 - -use strict; -use vars qw($pid); -use subs qw(killssh); -use IO::Handle; -use Net::SSH qw(sshopen2); -use FS::UID qw(adminsuidsetup); -use FS::Record qw(qsearchs); -use FS::svc_acct; - -my $user = shift or die &usage; -adminsuidsetup $user; - -my($shellmachine)=shift or die &usage; - -#causing trouble for some folks -#$SIG{CHLD} = sub { wait() }; - -$SIG{HUP} = \&killssh; -$SIG{INT} = \&killssh; -$SIG{QUIT} = \&killssh; -$SIG{TERM} = \&killssh; -$SIG{PIPE} = \&killssh; - -sub killssh { kill 'TERM', $pid if $pid; exit; }; - -my($fs_passwdd)="/usr/local/sbin/fs_passwdd"; - -while (1) { - my($reader,$writer)=(new IO::Handle, new IO::Handle); - $writer->autoflush(1); - $pid = sshopen2($shellmachine,$reader,$writer,$fs_passwdd); - while (1) { - my($username,$old_password,$new_password,$new_gecos,$new_shell); - defined($username=<$reader>) or last; - defined($old_password=<$reader>) or last; - defined($new_password=<$reader>) or last; - defined($new_gecos=<$reader>) or last; - defined($new_shell=<$reader>) or last; - chop($username); - chop($old_password); - chop($new_password); - chop($new_gecos); - chop($new_shell); - my($svc_acct); - - #need to try both $old_password and encrypted $old_password - #maybe the crypt function in svc_acct.export needs to be a library? - my $salt = substr($old_password,0,2); - my $cold_password = crypt($old_password,$salt); - $svc_acct=qsearchs('svc_acct',{'username'=>$username, - '_password'=>$old_password, - } ) - || qsearchs('svc_acct',{'username'=>$username, - '_password'=>$cold_password, - } ); - unless ( $svc_acct ) { print $writer "Incorrect password.\n"; next; } - - my(%hash)=$svc_acct->hash; - my($new_svc_acct) = new FS::svc_acct ( \%hash ); - $new_svc_acct->setfield('_password',$new_password) - if $new_password && $new_password ne $old_password; - $new_svc_acct->setfield('finger',$new_gecos) if $new_gecos; - $new_svc_acct->setfield('shell',$new_shell) if $new_shell; - my($error)=$new_svc_acct->replace($svc_acct); - print $writer $error,"\n"; - } - close $writer; - close $reader; - sleep 60; - warn "Connection to $shellmachine lost! Reconnecting...\n"; -} - -sub usage { - die "Usage:\n\n fs_passwd_server user shellmachine\n"; -} - diff --git a/fs_passwd/fs_passwdd b/fs_passwd/fs_passwdd deleted file mode 100755 index cce98e787..000000000 --- a/fs_passwd/fs_passwdd +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_passwdd -# -# This is run REMOTELY over ssh by fs_passwd_server. -# -# ivan@sisd.com 98-mar-9 - -use strict; -use Socket; - -my $fs_passwdd_socket = "/usr/local/freeside/fs_passwdd_socket"; -my $pid_file = "$fs_passwdd_socket.pid"; - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -$|=1; - -my $uaddr = sockaddr_un($fs_passwdd_socket); -my $proto = getprotobyname('tcp'); - -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($fs_passwdd_socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -if ( -e $pid_file ) { - open(PIDFILE,"<$pid_file"); - #chomp( my $old_pid = ); - my $old_pid = ; - close PIDFILE; - $old_pid =~ /^(\d+)$/; - kill 'TERM', $1; -} -open(PIDFILE,">$pid_file"); -print PIDFILE "$$\n"; -close PIDFILE; - -my($paddr); -for ( ; $paddr = accept(Client,Server); close Client) { - my($me,$old_password,$new_password,$new_gecos,$new_shell); - - $me=; - $old_password=; - $new_password=; - $new_gecos=; - $new_shell=; - - print $me,$old_password,$new_password,$new_gecos,$new_shell; - my($error); - - $error=; - - print Client $error; - close Client; -} - diff --git a/fs_radlog/fs_radlogd b/fs_radlog/fs_radlogd deleted file mode 100755 index 74c2af361..000000000 --- a/fs_radlog/fs_radlogd +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/perl -Tw -# -# ivan@sisd.com 98-mar-23 - -use strict; -use Date::Parse; #but hopefully not - -$|=1; - -my($file,$pos)=@_; -open(FILE,"<$file") or die "Can't open $file: $!"; -seek(FILE,$pos,0) or die "Can't seek: $!"; - -my($datestr); -my(%param); - -$SIG{'HUP'} = sub { print "EOF\n"; exit; }; - -while (1) { - - while () { - next if /^$/; - if ( /^\S/ ) { - chop($datestr=$_); - undef %param; - } else { - warn "Unexpected line: $_"; - } - while () { - if ( /^$/ ) { - #if ( $param{'Acct-Status-Type'} eq 'Stop' ) { - print join("\t", - tell FILE, - %param, - ),"\n"; - #} - last; - } elsif ( /^\s+([\w\-]+)\s\=\s\"?([\w\.\-]+)\"?\s*$/ ) { - $param{$1}=$2; - } else { - warn "Unexpected line: $_"; - } - - } - - } - sleep 1; - seek(FILE,0,1); -} - - diff --git a/fs_selfadmin/FS-MailAdminServer/MailAdminClient.pm b/fs_selfadmin/FS-MailAdminServer/MailAdminClient.pm deleted file mode 100755 index 46cde4c0d..000000000 --- a/fs_selfadmin/FS-MailAdminServer/MailAdminClient.pm +++ /dev/null @@ -1,541 +0,0 @@ -package FS::MailAdminClient; - -use strict; -use vars qw($VERSION @ISA @EXPORT_OK $fs_mailadmind_socket); -use Exporter; -use Socket; -use FileHandle; -use IO::Handle; - -$VERSION = '0.01'; - -@ISA = qw( Exporter ); -@EXPORT_OK = qw( signup_info authenticate list_packages list_mailboxes delete_mailbox password_mailbox add_mailbox list_forwards list_pkg_forwards delete_forward add_forward new_customer ); - -$fs_mailadmind_socket = "/usr/local/freeside/fs_mailadmind_socket"; - -$ENV{'PATH'} ='/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -my $freeside_uid = scalar(getpwnam('freeside')); -die "not running as the freeside user\n" if $> != $freeside_uid; - -=head1 NAME - -FS::MailAdminClient - Freeside mail administration client API - -=head1 SYNOPSIS - - use FS::MailAdminClient qw( signup_info list_mailboxes new_customer ); - - ( $locales, $packages, $pops ) = signup_info; - - ( $accounts ) = list_mailboxes; - - $error = new_customer ( { - 'first' => $first, - 'last' => $last, - 'ss' => $ss, - 'comapny' => $company, - 'address1' => $address1, - 'address2' => $address2, - 'city' => $city, - 'county' => $county, - 'state' => $state, - 'zip' => $zip, - 'country' => $country, - 'daytime' => $daytime, - 'night' => $night, - 'fax' => $fax, - 'payby' => $payby, - 'payinfo' => $payinfo, - 'paydate' => $paydate, - 'payname' => $payname, - 'invoicing_list' => $invoicing_list, - 'pkgpart' => $pkgpart, - 'username' => $username, - '_password' => $password, - 'popnum' => $popnum, - } ); - -=head1 DESCRIPTION - -This module provides an API for a remote mail administration server. - -It needs to be run as the freeside user. Because of this, the program which -calls these subroutines should be written very carefully. - -=head1 SUBROUTINES - -=over 4 - -=item signup_info - -Returns three array references of hash references. - -The first set of hash references is of allowable locales. Each hash reference -has the following keys: - taxnum - state - county - country - -The second set of hash references is of allowable packages. Each hash -reference has the following keys: - pkgpart - pkg - -The third set of hash references is of allowable POPs (Points Of Presence). -Each hash reference has the following keys: - popnum - city - state - ac - exch - -=cut - -sub signup_info { - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "signup_info\n"; - SOCK->flush; - - chop ( my $n_cust_main_county = ); - my @cust_main_county = map { - chop ( my $taxnum = ); - chop ( my $state = ); - chop ( my $county = ); - chop ( my $country = ); - { - 'taxnum' => $taxnum, - 'state' => $state, - 'county' => $county, - 'country' => $country, - }; - } 1 .. $n_cust_main_county; - - chop ( my $n_part_pkg = ); - my @part_pkg = map { - chop ( my $pkgpart = ); - chop ( my $pkg = ); - { - 'pkgpart' => $pkgpart, - 'pkg' => $pkg, - }; - } 1 .. $n_part_pkg; - - chop ( my $n_svc_acct_pop = ); - my @svc_acct_pop = map { - chop ( my $popnum = ); - chop ( my $city = ); - chop ( my $state = ); - chop ( my $ac = ); - chop ( my $exch = ); - chop ( my $loc = ); - { - 'popnum' => $popnum, - 'city' => $city, - 'state' => $state, - 'ac' => $ac, - 'exch' => $exch, - 'loc' => $loc, - }; - } 1 .. $n_svc_acct_pop; - - close SOCK; - - \@cust_main_county, \@part_pkg, \@svc_acct_pop; -} - -=item authenticate - -Authentictes against a service on the remote Freeside system. Requires a hash -reference as a parameter with the following keys: - authuser - _password - -Returns a scalar error message of the form "authuser OK|FAILED" or an error -message. - -=cut - -sub authenticate { - my $hashref = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "authenticate", "\n"; - SOCK->flush; - - print SOCK join("\n", map { $hashref->{$_} } qw( - authuser _password - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - close SOCK; - - $error; -} - -=item list_packages - -Returns one array reference of hash references. - -The set of hash references is of existing packages. Each hash reference -has the following keys: - pkgnum - domain - account - -=cut - -sub list_packages { - my $user = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "list_packages\n", $user, "\n"; - SOCK->flush; - - chop ( my $n_packages = ); - my @packages = map { - chop ( my $pkgnum = ); - chop ( my $domain = ); - chop ( my $account = ); - { - 'pkgnum' => $pkgnum, - 'domain' => $domain, - 'account' => $account, - }; - } 1 .. $n_packages; - - close SOCK; - - \@packages; -} - -=item list_mailboxes - -Returns one array references of hash references. - -The set of hash references is of existing accounts. Each hash reference -has the following keys: - svcnum - username - _password - -=cut - -sub list_mailboxes { - my ($user, $package) = @_; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "list_mailboxes\n", $user, "\n", $package, "\n"; - SOCK->flush; - - chop ( my $n_svc_acct = ); - my @svc_acct = map { - chop ( my $svcnum = ); - chop ( my $username = ); - chop ( my $_password = ); - { - 'svcnum' => $svcnum, - 'username' => $username, - '_password' => $_password, - }; - } 1 .. $n_svc_acct; - - close SOCK; - - \@svc_acct; -} - -=item delete_mailbox - -Deletes a mailbox service from the remote Freeside system. Requires a hash -reference as a paramater with the following keys: - authuser - account - -Returns a scalar error message, or the empty string for success. - -=cut - -sub delete_mailbox { - my $hashref = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "delete_mailbox", "\n"; - SOCK->flush; - - print SOCK join("\n", map { $hashref->{$_} } qw( - authuser account - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - close SOCK; - - $error; -} - -=item password_mailbox - -Changes the password for a mailbox service on the remote Freeside system. - Requires a hash reference as a paramater with the following keys: - authuser - account - _password - -Returns a scalar error message, or the empty string for success. - -=cut - -sub password_mailbox { - my $hashref = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "password_mailbox", "\n"; - SOCK->flush; - - print SOCK join("\n", map { $hashref->{$_} } qw( - authuser account _password - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - close SOCK; - - $error; -} - -=item add_mailbox - -Creates a mailbox service on the remote Freeside system. Requires a hash -reference as a parameter with the following keys: - authuser - package - account - _password - -Returns a scalar error message, or the empty string for success. - -=cut - -sub add_mailbox { - my $hashref = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "add_mailbox", "\n"; - SOCK->flush; - - print SOCK join("\n", map { $hashref->{$_} } qw( - authuser package account _password - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - close SOCK; - - $error; -} - -=item list_forwards - -Returns one array references of hash references. - -The set of hash references is of existing forwards. Each hash reference -has the following keys: - svcnum - dest - -=cut - -sub list_forwards { - my ($user, $service) = @_; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "list_forwards\n", $user, "\n", $service, "\n"; - SOCK->flush; - - chop ( my $n_svc_forward = ); - my @svc_forward = map { - chop ( my $svcnum = ); - chop ( my $dest = ); - { - 'svcnum' => $svcnum, - 'dest' => $dest, - }; - } 1 .. $n_svc_forward; - - close SOCK; - - \@svc_forward; -} - -=item list_pkg_forwards - -Returns one array references of hash references. - -The set of hash references is of existing forwards. Each hash reference -has the following keys: - svcnum - srcsvc - dest - -=cut - -sub list_pkg_forwards { - my ($user, $package) = @_; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "list_pkg_forwards\n", $user, "\n", $package, "\n"; - SOCK->flush; - - chop ( my $n_svc_forward = ); - my @svc_forward = map { - chop ( my $svcnum = ); - chop ( my $srcsvc = ); - chop ( my $dest = ); - { - 'svcnum' => $svcnum, - 'srcsvc' => $srcsvc, - 'dest' => $dest, - }; - } 1 .. $n_svc_forward; - - close SOCK; - - \@svc_forward; -} - -=item delete_forward - -Deletes a forward service from the remote Freeside system. Requires a hash -reference as a paramater with the following keys: - authuser - svcnum - -Returns a scalar error message, or the empty string for success. - -=cut - -sub delete_forward { - my $hashref = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "delete_forward", "\n"; - SOCK->flush; - - print SOCK join("\n", map { $hashref->{$_} } qw( - authuser svcnum - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - close SOCK; - - $error; -} - -=item add_forward - -Creates a forward service on the remote Freeside system. Requires a hash -reference as a parameter with the following keys: - authuser - package - source - dest - -Returns a scalar error message, or the empty string for success. - -=cut - -sub add_forward { - my $hashref = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "add_forward", "\n"; - SOCK->flush; - - print SOCK join("\n", map { $hashref->{$_} } qw( - authuser package source dest - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - close SOCK; - - $error; -} - -=item new_customer HASHREF - -Adds a customer to the remote Freeside system. Requires a hash reference as -a paramater with the following keys: - first - last - ss - comapny - address1 - address2 - city - county - state - zip - country - daytime - night - fax - payby - payinfo - paydate - payname - invoicing_list - pkgpart - username - _password - popnum - -Returns a scalar error message, or the empty string for success. - -=cut - -sub new_customer { - my $hashref = shift; - - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_mailadmind_socket)) or die "connect: $!"; - print SOCK "new_customer\n"; - - print SOCK join("\n", map { $hashref->{$_} } qw( - first last ss company address1 address2 city county state zip country - daytime night fax payby payinfo paydate payname invoicing_list - pkgpart username _password popnum - ) ), "\n"; - SOCK->flush; - - chop( my $error = ); - $error; -} - -=back - -=head1 VERSION - -$Id: MailAdminClient.pm,v 1.1 2001-10-18 15:04:54 jeff Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L, L, L - -=cut - -1; - diff --git a/fs_selfadmin/FS-MailAdminServer/cgi/mailadmin.cgi b/fs_selfadmin/FS-MailAdminServer/cgi/mailadmin.cgi deleted file mode 100755 index c26c3dc42..000000000 --- a/fs_selfadmin/FS-MailAdminServer/cgi/mailadmin.cgi +++ /dev/null @@ -1,698 +0,0 @@ -#!/usr/bin/perl -######################################################################## -# # -# mailadmin.cgi NCI2000 # -# Jeff Finucane # -# 26 April 2001 # -# # -######################################################################## - -use DBI; -use strict; -use CGI; -use FS::MailAdminClient qw(authenticate list_packages list_mailboxes delete_mailbox password_mailbox add_mailbox list_forwards list_pkg_forwards delete_forward add_forward); - -my $sessionfile = '/usr/local/apache/htdocs/mailadmin/adminsess'; # session file -my $tmpdir = '/usr/local/apache/htdocs/mailadmin/tmp'; # Location to store temp files -my $cookiedomain = ".your.dom"; # domain if THIS server, should prepend with a '.' -my $cookieexpire = '+12h'; # expire the cookie session after this much idle time -my $sessexpire = 43200; # expire session after this long of no use (in seconds) - -my $body = ""; - -#### Should not have to change anything under this line #### -my $printmainpage = 1; -my $i = 0; -my $printheader = 1; -my $query = new CGI; -my $cgi = $query->url(); -my $now = getdatetime(); -my $current_package = 0; -my $current_account = 0; -my $current_domname = ""; - -# if they are trying to login we wont check the session yet -if ($query->param('login') eq '' && $query->param('action') ne 'login') { - checksession(); - printheader(); -} - -if ($query->param('login') ne '') { - - my $username = $query->param('username'); - my $password = $query->param('password'); - - if (!checkuserpass($username, $password)) { - printheader(); - error('not_admin'); - } - - my @alpha = ('A'..'Z', 'a'..'z', 0..9); - my $sessid = ''; - for (my $i = 0; $i < 10; $i++) { - $sessid .= @alpha[rand(@alpha)]; - } - - my $cookie1 = $query->cookie(-name=>'username', - -value=>$username, - -expires=>$cookieexpire, - -domain=>$cookiedomain); - - my $cookie2 = $query->cookie(-name=>'ma_sessionid', - -value=>$sessid, - -expires=>$cookieexpire, - -domain=>$cookiedomain); - - my $now = time(); - open(NEWSESS, ">>$sessionfile") || error('open'); - print NEWSESS "$username $sessid $now 0 0\n"; - close(NEWSESS); - - print $query->header(-COOKIE=>[$cookie1, $cookie2]); - - $printmainpage = 1; - -} elsif ($query->param('action') eq 'blankframe') { - - print "$body\n"; - $printmainpage = 0; - -} elsif ($query->param('action') eq 'list_packages') { - - my $username = $query->cookie(-name=>'username'); # session checked - my $list = list_packages($username); - print "$body\n"; - print "
\n"; - print "\n"; - foreach my $package ( @{$list} ) { - print ""; - print "\n"; - print "\n"; - print ""; - } - print "

Package Number

Description

$package->{'pkgnum'}

$package->{'domain'}

{'pkgnum'}&account=$package->{'account'}&domname=$package->{'domain'}\" target=\"rightmainframe\">select
\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('action') eq 'list_mailboxes') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $list = list_mailboxes($username, $current_package); - my $forwardlist = list_pkg_forwards($username, $current_package); - print "$body\n"; - print "
\n"; - print "\n"; - foreach my $account ( @{$list} ) { - print ""; - print "\n"; - print "\n"; - print ""; - -# my $forwardlist = list_forwards($username, $account->{'svcnum'}); -# foreach my $forward ( @{$forwardlist} ) { -# my $label = qq!=> ! . $forward->{'dest'}; -# print "\n"; -# } - foreach my $forward ( @{$forwardlist} ) { - if ($forward->{'srcsvc'} == $account->{'svcnum'}) { - my $label = qq!=> ! . $forward->{'dest'}; - print "\n"; - } - } - - } - print "

Username

Password

$account->{'username'}

$account->{'_password'}

{'svcnum'}&mailbox=$account->{'username'}\" target=\"rightmainframe\">change

$label

$label

\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('action') eq 'select') { - - my $username = $query->cookie(-name=>'username'); # session checked - $current_package = $query->param('package'); - $current_account = $query->param('account'); - $current_domname = $query->param('domname'); - set_package(); - print "$body\n"; - print "\n"; - print "
\n"; - print "

Selected package $current_package\n"; - print "

\n"; - print "\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('action') eq 'change') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - my $mailbox = $query->param('mailbox'); - my $list = list_forwards($username, $account); - print "$body\n"; - print "
\n"; - print "
\n"; - print "\n"; - print "\n"; - print "\n"; - foreach my $forward ( @{$list} ) { - my $label = qq!=> ! . $forward->{'dest'}; -# print "\n"; - print "\n"; - } - print "\n"; - print "

Username

$mailbox

$label

$label

{'svcnum'}&mailbox=$mailbox&dest=$forward->{'dest'}\" target=\"rightmainframe\">remove

Password

\n"; - print "\n"; - print "\n"; - print "\n"; - print "
\n"; - print "
\n"; - print "
\n"; - print "

You may delete this user and all mailforwarding by pressing Delete This User.\n"; - print "

To set or change the password for this user, type the new password in the box next to Password and press Change The Password.\n"; - print "

If you would like to have mail destined for this user forwarded to another email address then press the Add Forwarding button.\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('deleteaccount') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - my $mailbox = $query->param('mailbox'); - print "$body\n"; - print "

\n"; - print "

Are you certain you want to delete user $mailbox?\n"; - print "

\n"; - print "\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('deleteaccounty') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - - if ( my $error = delete_mailbox ( { - 'authuser' => $username, - 'account' => $account, - } ) ) { - print "$body\n"; - print "

$error\n"; - print "\n"; - - } else { - print "$body\n"; - print "

Deleted\n"; - print "\n"; - } - - $printmainpage=0; - -} elsif ($query->param('changepassword') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - my $_password = $query->param('_password'); - - if ( my $error = password_mailbox ( { - 'authuser' => $username, - 'account' => $account, - '_password' => $_password, - } ) ) { - print "$body\n"; - print "

$error\n"; - print "\n"; - - } else { - print "$body\n"; - print "

Changed\n"; - print "\n"; - } - - $printmainpage=0; - -} elsif ($query->param('action') eq 'newmailbox') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - print "$body\n"; - print "\n"; - print "

\n"; - print "\n"; - print "\n"; - print "

Username

@ " . $current_domname . "

Password

\n"; - print "\n"; - print "
\n"; - print "
\n"; - print "
\n"; - print "

Use this screen to add a new mailbox user. If the domain name of the email address (the part after the @ sign) is not what you expect then you may need to use List Packages to select the package with the correct domain.\n"; - print "

Enter the first portion of the email address in the box adjacent to Username and enter the password for that user in the space next to Password. Then press the button labeled Add The User.\n"; - print "

If you do not want to add a new user at this time then select a choice from the menu at the left, such as List Mailboxes.\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('addmailbox') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - my $_password = $query->param('_password'); - - if ( my $error = add_mailbox ( { - 'authuser' => $username, - 'package' => $current_package, - 'account' => $account, - '_password' => $_password, - } ) ) { - print "$body\n"; - print "

$error\n"; - print "\n"; - - } else { - print "$body\n"; - print "

Created\n"; - print "\n"; - } - - $printmainpage=0; - -} elsif ($query->param('action') eq 'deleteforward') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $svcnum = $query->param('service'); - my $mailbox = $query->param('mailbox'); - my $dest = $query->param('dest'); - print "$body\n"; - print "

\n"; - print "

Are you certain you want to remove the forwarding from $mailbox to $dest?\n"; - print "

\n"; - print "\n"; - print "\n"; - $printmainpage=0; - -} elsif ($query->param('deleteforwardy') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $service = $query->param('service'); - - if ( my $error = delete_forward ( { - 'authuser' => $username, - 'svcnum' => $service, - } ) ) { - print "$body\n"; - print "

$error\n"; - print "\n"; - - } else { - print "$body\n"; - print "

Forwarding Removed\n"; - print "\n"; - } - - $printmainpage=0; - -} elsif ($query->param('addforward') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - my $mailbox = $query->param('mailbox'); - - print "$body\n"; - print "\n"; - print "

\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
Forward mail from

$mailbox:

to

Destination:

\n"; - print "\n"; - print "
\n"; - print "
\n"; - print "
\n"; - print "

If you would like mail originally destined for the above address to be forwarded to a different email address then type that email address in the box next to Destination: and press the Add the Forwarding button.\n"; - print "

If you do not want to add mail forwarding then select a choice from the menu at the left, such as List Accounts.\n"; - - $printmainpage=0; - -} elsif ($query->param('addforwarddst') ne '') { - - my $username = $query->cookie(-name=>'username'); # session checked - select_package($username) unless $current_package; - my $account = $query->param('account'); - my $dest = $query->param('dest'); - - if ( my $error = add_forward ( { - 'authuser' => $username, - 'package' => $current_package, - 'source' => $account, - 'dest' => $dest, - } ) ) { - print "$body\n"; - print "

$error\n"; - print "\n"; - - } else { - print "$body\n"; - print "

Forwarding Created\n"; - print "\n"; - } - - $printmainpage=0; - -} elsif ($query->param('action') eq 'navframe') { - - print "\n"; - print "

NCI2000 MAIL ADMIN Web Interface

\n"; - - print "
Choose Action:

\n"; - print "
\n"; - print "
    \n"; - print "
\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "
  • Log Off
  • List Packages
  • List Accounts
  • Add Account
  • \n"; - - print "


    \n"; - print "\n"; - - $printmainpage = 0; - -} elsif ($query->param('action') eq 'rightmainframe') { - - print "$body\n"; - print "


    \n"; - print "<----- Please choose function on the left menu\n"; - print "

    \n"; - print "

    Choose Log Off when you are finished. This helps prevent unauthorized access to your accounts.\n"; - print "

    Use List Packages when you administer multiple packages. When you have multiple domains at NCI2000 you are likely to have multiple packages. Use of List Packages is not necessary if administer only one package.\n"; - print "

    Use List Accounts to view your current arrangement of mailboxes. From this list you my choose to make changes to existing mailboxes or delete mailboxes. If you would like to modify the forwarding associated with a mailbox then choose it from this list.\n"; - print "

    Use Add Account when you would like an additional mailbox. After you have added the mailbox you may choose to make additional changes from the list provided by List Accounts.\n"; - print "\n"; - - $printmainpage = 0; - -} - - -if ($query->param('action') eq 'login') { - - printheader(); - printlogin(); - -} elsif ($query->param('action') eq 'logout') { - - destroysession(); - printheader(); - printlogin(); - -} elsif ($printmainpage) { - - - print "NCI2000 MAIL ADMIN Web Interface\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - - -} - -sub getdatetime { - my $today = localtime(time()); - my ($day,$mon,$dayofmon,$time,$year) = split(/\s+/,$today); - my @datemonths = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); - - my $numidx = "01"; - my ($nummon); - foreach my $mons (@datemonths) { - if ($mon eq $mons) { - $nummon = $numidx; - } - $numidx++; - } - - return "$year-$nummon-$dayofmon $time"; - -} - -sub error { - - my $error = shift; - my $arg1 = shift; - - printheader(); - - if ($error eq 'not_admin') { - print "Error!\n"; - print "$body\n"; - print "

    Error!

    \n"; - print "Unauthorized attempt to access mail administration.\n"; - print "
    Please login again if you think this is an error.\n"; - print "
    \n"; - print "\n"; - } elsif ($error eq 'exists') { - print "Error!\n"; - print "$body\n"; - print "

    Error!

    \n"; - print "The user you are trying to enter already exists. Please go back and enter a different username\n"; - print "\n"; - } elsif ($error eq 'ingroup') { - print "Error!\n"; - print "$body\n"; - print "

    Error!

    \n"; - print "This user is already in the group $arg1. Please go back and deselect group $arg1 from the list.\n"; - print "
    \n"; - print "\n"; - } elsif ($error eq 'sess_expired') { - print "$body\n"; - print "
    Your session has expired.
    \n"; - print "

    Please login again HERE
    \n"; - print "\n"; - } elsif ($error eq 'open') { - print "$body\n"; - print "
    Unable to open or rename file.
    \n"; - print "

    If this continues, please contact your administrator
    \n"; - print "\n"; - } - - - exit; - -} - - -#print a html header if not printed yet -sub printheader { - - if ($printheader) { - print "Content-Type: text/html\n\n"; - $printheader = 0; - } - -} - - -#verify user can access administration -sub checksession { - - my $username = $query->cookie(-name=>'username'); - my $sessionid = $query->cookie(-name=>'ma_sessionid'); - - if ($sessionid eq '') { - printheader(); - if ($query->param()) { - error('sess_expired'); - } else { - printlogin(); - exit; - } - } - - my $now = time(); - my $founduser = 0; - open(SESSFILE, "$sessionfile") || error('open'); - error('open') if -l "$tmpdir/adminsess.$$"; - open(NEWSESS, ">$tmpdir/adminsess.$$") || error('open'); - while () { - chomp(); - my ($user, $sess, $time, $pkgnum, $svcdomain, $domname) = split(/\s+/); - next if $now - $sessexpire > $time; - if ($username eq $user && !$founduser) { - if ($sess eq $sessionid) { - $founduser = 1; - print NEWSESS "$user $sess $now $pkgnum $svcdomain $domname\n"; - $current_package=$pkgnum; - $current_account=$svcdomain; - $current_domname=$domname; - next; - } - } - print NEWSESS "$user $sess $time $pkgnum $svcdomain $domname\n"; - } - close(SESSFILE); - close(NEWSESS); - system("mv $tmpdir/adminsess.$$ $sessionfile"); - error('sess_expired') unless $founduser; - - my $cookie1 = $query->cookie(-name=>'username', - -value=>$username, - -expires=>$cookieexpire, - -domain=>$cookiedomain); - - my $cookie2 = $query->cookie(-name=>'ma_sessionid', - -value=>$sessionid, - -expires=>$cookieexpire, - -domain=>$cookiedomain); - - print $query->header(-COOKIE=>[$cookie1, $cookie2]); - - $printheader = 0; - - return 0; - -} - -sub destroysession { - - my $username = $query->cookie(-name=>'username'); - my $sessionid = $query->cookie(-name=>'ma_sessionid'); - - if ($sessionid eq '') { - printheader(); - if ($query->param()) { - error('sess_expired'); - } else { - printlogin(); - exit; - } - } - - my $now = time(); - my $founduser = 0; - open(SESSFILE, "$sessionfile") || error('open'); - error('open') if -l "$tmpdir/adminsess.$$"; - open(NEWSESS, ">$tmpdir/adminsess.$$") || error('open'); - while () { - chomp(); - my ($user, $sess, $time, $pkgnum, $svcdomain, $domname) = split(/\s+/); - next if $now - $sessexpire > $time; - if ($username eq $user && !$founduser) { - if ($sess eq $sessionid) { - $founduser = 1; - next; - } - } - print NEWSESS "$user $sess $time $pkgnum $svcdomain $domname\n"; - } - close(SESSFILE); - close(NEWSESS); - system("mv $tmpdir/adminsess.$$ $sessionfile"); - error('sess_expired') unless $founduser; - - $printheader = 0; - - return 0; - -} - -# checks the username and pass against the database -sub checkuserpass { - - my $username = shift; - my $password = shift; - - my $error = authenticate ( { - 'authuser' => $username, - '_password' => $password, - } ); - - if ($error eq "$username OK") { - return 1; - }else{ - return 0; - } - -} - -#printlogin prints a login page -sub printlogin { - - print "$body\n"; - print "
    Please login to access MAIL ADMIN
    \n"; - print "
    \n"; - print "
    Email Address:   \n"; - print "
    Email Password: \n"; - print "
    \n"; - print "
    \n"; - print "\n"; -} - - -#select_package chooses a administrable package if more than one exists -sub select_package { - my $user = shift; - my $packages = list_packages($user); - if (scalar(@{$packages}) eq 1) { - $current_package = @{$packages}[0]->{'pkgnum'}; - set_package(); - } - if (scalar(@{$packages}) > 1) { -# print $query->redirect("$cgi\?action=list_packages"); - print "

    No package selected. You must first select a package.\n"; - exit; - } -} - -sub set_package { - - my $username = $query->cookie(-name=>'username'); - my $sessionid = $query->cookie(-name=>'ma_sessionid'); - - if ($sessionid eq '') { - printheader(); - if ($query->param()) { - error('sess_expired'); - } else { - printlogin(); - exit; - } - } - - my $now = time(); - my $founduser = 0; - open(SESSFILE, "$sessionfile") || error('open'); - error('open') if -l "$tmpdir/adminsess.$$"; - open(NEWSESS, ">$tmpdir/adminsess.$$") || error('open'); - while () { - chomp(); - my ($user, $sess, $time, $pkgnum, $svcdomain, $domname) = split(/\s+/); - next if $now - $sessexpire > $time; - if ($username eq $user && !$founduser) { - if ($sess eq $sessionid) { - $founduser = 1; - print NEWSESS "$user $sess $time $current_package $current_account $current_domname\n"; - next; - } - } - print NEWSESS "$user $sess $time $pkgnum $svcdomain $domname\n"; - } - close(SESSFILE); - close(NEWSESS); - system("mv $tmpdir/adminsess.$$ $sessionfile"); - error('sess_expired') unless $founduser; - - $printheader = 0; - - return 0; - -} - diff --git a/fs_selfadmin/FS-MailAdminServer/fs_mailadmind b/fs_selfadmin/FS-MailAdminServer/fs_mailadmind deleted file mode 100755 index 746d7822e..000000000 --- a/fs_selfadmin/FS-MailAdminServer/fs_mailadmind +++ /dev/null @@ -1,366 +0,0 @@ -#!/usr/bin/perl -Tw - -eval 'exec /usr/bin/perl -Tw -S $0 ${1+"$@"}' - if 0; # not running under some shell -# -# fs_mailadmind -# -# This is run REMOTELY over ssh by fs_mailadmin_server. -# - -use strict; -use Socket; - -use vars qw( $Debug ); - -$Debug = 0; - -my($fs_mailadmind_socket)="/usr/local/freeside/fs_mailadmind_socket"; - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -$|=1; - -warn "[fs_mailadmind] Reading locales...\n" if $Debug; -chomp( my $n_cust_main_county = ); -my @cust_main_county = map { - chomp( my $taxnum = ); - chomp( my $state = ); - chomp( my $county = ); - chomp( my $country = ); - { - 'taxnum' => $taxnum, - 'state' => $state, - 'county' => $county, - 'country' => $country, - }; -} ( 1 .. $n_cust_main_county ); - -warn "[fs_mailadmind] Reading package definitions...\n" if $Debug; -chomp( my $n_part_pkg = ); -my @part_pkg = map { - chomp( my $pkgpart = ); - chomp( my $pkg = ); - { - 'pkgpart' => $pkgpart, - 'pkg' => $pkg, - }; -} ( 1 .. $n_part_pkg ); - -warn "[fs_mailadmind] Reading POPs...\n" if $Debug; -chomp( my $n_svc_acct_pop = ); -my @svc_acct_pop = map { - chomp( my $popnum = ); - chomp( my $city = ); - chomp( my $state = ); - chomp( my $ac = ); - chomp( my $exch = ); - chomp( my $loc = ); - { - 'popnum' => $popnum, - 'city' => $city, - 'state' => $state, - 'ac' => $ac, - 'exch' => $exch, - 'loc' => $loc, - }; -} ( 1 .. $n_svc_acct_pop ); - -warn "[fs_mailadmind] Creating $fs_mailadmind_socket\n" if $Debug; -my $uaddr = sockaddr_un($fs_mailadmind_socket); -my $proto = getprotobyname('tcp'); -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($fs_mailadmind_socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -warn "[fs_mailadmind] Entering main loop...\n" if $Debug; -my $paddr; -for ( ; $paddr = accept(Client,Server); close Client) { - - chop( my $command = ); - - if ( $command eq "signup_info" ) { - warn "[fs_mailadmind] sending signup info...\n" if $Debug; - print Client join("\n", $n_cust_main_county, - map { - $_->{taxnum}, - $_->{state}, - $_->{county}, - $_->{country}, - } @cust_main_county - ), "\n"; - - print Client join("\n", $n_part_pkg, - map { - $_->{pkgpart}, - $_->{pkg}, - } @part_pkg - ), "\n"; - - print Client join("\n", $n_svc_acct_pop, - map { - $_->{popnum}, - $_->{city}, - $_->{state}, - $_->{ac}, - $_->{exch}, - $_->{loc}, - } @svc_acct_pop - ), "\n"; - - } elsif ( $command eq "new_customer" ) { - warn "[fs_mailadmind] reading customer signup...\n" if $Debug; - my( - $first, $last, $ss, $company, $address1, $address2, $city, $county, - $state, $zip, $country, $daytime, $night, $fax, $payby, $payinfo, - $paydate, $payname, $invoicing_list, $pkgpart, $username, $password, - $popnum, - ) = map { scalar() } ( 1 .. 23 ); - - warn "[fs_mailadmind] sending customer data to remote server...\n" if $Debug; - print - $first, $last, $ss, $company, $address1, $address2, $city, $county, - $state, $zip, $country, $daytime, $night, $fax, $payby, $payinfo, - $paydate, $payname, $invoicing_list, $pkgpart, $username, $password, - $popnum, - ; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "authenticate" ) { - warn "[fs_mailadmind] reading user information to auth...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading authentication material...\n" if $Debug; - chop( my $password = ); - warn "[fs_mailadmind] sending information to remote server...\n" if $Debug; - print "authenticate\n", $user, "\n", $password, "\n"; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "list_packages" ) { - warn "[fs_mailadmind] reading user information to list_packages...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] sending user information to remote server...\n" if $Debug; - print "list_packages\n", $user, "\n"; - - warn "[fs_mailadmind] reading data from remote server...\n" if $Debug; - chomp( my $n_packages = ); - my @packages = map { - chomp( my $pkgnum = ); - chomp( my $domain = ); - chomp( my $account = ); - { - 'pkgnum' => $pkgnum, - 'domain' => $domain, - 'account' => $account, - }; - } ( 1 .. $n_packages ); - - warn "[fs_mailadmind] sending data to local client...\n" if $Debug; - - print Client join("\n", $n_packages, - map { - $_->{pkgnum}, - $_->{domain}, - $_->{account}, - } @packages - ), "\n"; - - } elsif ( $command eq "list_mailboxes" ) { - warn "[fs_mailadmind] reading user information to list_mailboxes...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading package number to list_mailboxes...\n" if $Debug; - chop( my $package = ); - warn "[fs_mailadmind] sending user information to remote server...\n" if $Debug; - print "list_mailboxes\n", $user, "\n", $package, "\n"; - - warn "[fs_mailadmind] reading data from remote server...\n" if $Debug; - chomp( my $n_svc_acct = ); - my @svc_acct = map { - chomp( my $svcnum = ); - chomp( my $username = ); - chomp( my $_password = ); - { - 'svcnum' => $svcnum, - 'username' => $username, - '_password' => $_password, - }; - } ( 1 .. $n_svc_acct ); - - warn "[fs_mailadmind] sending data to local client...\n" if $Debug; - - print Client join("\n", $n_svc_acct, - map { - $_->{svcnum}, - $_->{username}, - $_->{_password}, - } @svc_acct - ), "\n"; - - } elsif ( $command eq "delete_mailbox" ) { - warn "[fs_mailadmind] reading user information to auth...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading account information to delete...\n" if $Debug; - chop( my $account = ); - warn "[fs_mailadmind] sending information to remote server...\n" if $Debug; - print "delete_mailbox\n", $user, "\n", $account, "\n"; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "password_mailbox" ) { - warn "[fs_mailadmind] reading user information to auth...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading account information to password...\n" if $Debug; - my( - $account, $_password, - ) = map { scalar() } ( 1 .. 2 ); - - warn "[fs_mailadmind] sending password data to remote server...\n" if $Debug; - print "password_mailbox", "\n"; - print - $user, "\n", $account, $_password, - ; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "add_mailbox" ) { - warn "[fs_mailadmind] reading user information to auth...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading account information to create...\n" if $Debug; - my( - $package, $account, $_password, - ) = map { scalar() } ( 1 .. 3 ); - - warn "[fs_mailadmind] sending service data to remote server...\n" if $Debug; - print "add_mailbox", "\n"; - print - $user, "\n", $package, $account, $_password, - ; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "add_forward" ) { - warn "[fs_mailadmind] reading user information to auth...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading forward information to create...\n" if $Debug; - my( - $package, $source, $dest, - ) = map { scalar() } ( 1 .. 3 ); - - warn "[fs_mailadmind] sending service data to remote server...\n" if $Debug; - print "add_forward", "\n"; - print - $user, "\n", $package, $source, $dest, - ; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "delete_forward" ) { - warn "[fs_mailadmind] reading user information to auth...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading forward information to delete...\n" if $Debug; - chop( my $service = ); - warn "[fs_mailadmind] sending information to remote server...\n" if $Debug; - print "delete_forward\n", $user, "\n", $service, "\n"; - - warn "[fs_mailadmind] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_mailadmind] sending error to local client...\n" if $Debug; - print Client $error; - - } elsif ( $command eq "list_forwards" ) { - warn "[fs_mailadmind] reading user information to list_forwards...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading service number to list_forwards...\n" if $Debug; - chop( my $service = ); - warn "[fs_mailadmind] sending user information to remote server...\n" if $Debug; - print "list_forwards\n", $user, "\n", $service, "\n"; - - warn "[fs_mailadmind] reading data from remote server...\n" if $Debug; - chomp( my $n_svc_forward = ); - my @svc_forward = map { - chomp( my $svcnum = ); - chomp( my $dest = ); - { - 'svcnum' => $svcnum, - 'dest' => $dest, - }; - } ( 1 .. $n_svc_forward ); - - warn "[fs_mailadmind] sending data to local client...\n" if $Debug; - - print Client join("\n", $n_svc_forward, - map { - $_->{svcnum}, - $_->{dest}, - } @svc_forward - ), "\n"; - - } elsif ( $command eq "list_pkg_forwards" ) { - warn "[fs_mailadmind] reading user information to list_pkg_forwards...\n" if $Debug; - chop( my $user = ); - warn "[fs_mailadmind] reading service number to list_forwards...\n" if $Debug; - chop( my $package = ); - warn "[fs_mailadmind] sending user information to remote server...\n" if $Debug; - print "list_pkg_forwards\n", $user, "\n", $package, "\n"; - - warn "[fs_mailadmind] reading data from remote server...\n" if $Debug; - chomp( my $n_svc_forward = ); - my @svc_forward = map { - chomp( my $svcnum = ); - chomp( my $srcsvc = ); - chomp( my $dest = ); - { - 'svcnum' => $svcnum, - 'srcsvc' => $srcsvc, - 'dest' => $dest, - }; - } ( 1 .. $n_svc_forward ); - - warn "[fs_mailadmind] sending data to local client...\n" if $Debug; - - print Client join("\n", $n_svc_forward, - map { - $_->{svcnum}, - $_->{srcsvc}, - $_->{dest}, - } @svc_forward - ), "\n"; - - } else { - die "unexpected command from client: $command"; - } - -} - diff --git a/fs_selfadmin/README b/fs_selfadmin/README deleted file mode 100644 index d9857f054..000000000 --- a/fs_selfadmin/README +++ /dev/null @@ -1,27 +0,0 @@ - -This collection of files implements a 'self-administered mail service.' -Configuration is similar to fs_signupd - -Additionally you will need to modify the database: - -CREATE TABLE svc_acct_admin ( - svcnum int primary key, - adminsvc int not null -); - -creating both as keys might be good - -(and perform the dbdef-create) - - -As it exists now, a package containing one svc_domain, at least one -svc_acct_admin, and other services can have its svc_acct's and svc_forward's -manipulated by the svc_acct referenced by a svc_acct_admin in the package. - -One svc_acct may be referenced as svc_acct_admin for multiple packages. - -fs_mailadmin_server contains hard coded references to service numbers which -will require editing for your system. - -It's not a lot, but it might provide inspiration. - diff --git a/fs_selfadmin/fs_mailadmin_server b/fs_selfadmin/fs_mailadmin_server deleted file mode 100755 index ef4788543..000000000 --- a/fs_selfadmin/fs_mailadmin_server +++ /dev/null @@ -1,642 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_mailadmin_server -# - -use strict; -use IO::Handle; -use FS::SSH qw(sshopen2); -use FS::UID qw(adminsuidsetup); -use FS::Conf; -use FS::Record qw( qsearch qsearchs ); -use FS::cust_main_county; -use FS::cust_main; -use FS::svc_acct_admin; - -use vars qw( $opt $Debug $conf $default_domain ); - -$Debug = 1; - -#my @payby = qw(CARD PREPAY); - -my $user = shift or die &usage; -&adminsuidsetup( $user ); - -$conf = new FS::Conf; -$default_domain = $conf->config('domain'); - -my $machine = shift or die &usage; - -my $agentnum = shift or die &usage; -my $agent = qsearchs( 'agent', { 'agentnum' => $agentnum } ) or die &usage; -my $pkgpart = $agent->pkgpart_hashref; - -my $refnum = shift or die &usage; - -#causing trouble for some folks -#$SIG{CHLD} = sub { wait() }; - -my($fs_mailadmind)=$conf->config('fs_mailadmind'); - -while (1) { - my($reader,$writer)=(new IO::Handle, new IO::Handle); - $writer->autoflush(1); - warn "[fs_mailadmin_server] Connecting to $machine...\n" if $Debug; - sshopen2($machine,$reader,$writer,$fs_mailadmind); - - my $data; - - warn "[fs_mailadmin_server] Sending locales...\n" if $Debug; - my @cust_main_county = qsearch('cust_main_county', {} ); - print $writer $data = join("\n", - ( scalar(@cust_main_county) || die "no tax rates (cust_main_county records)" ), - map { - $_->taxnum, - $_->state, - $_->county, - $_->country, - } @cust_main_county - ),"\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - warn "[fs_mailadmin_server] Sending package definitions...\n" if $Debug; - my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } - qsearch( 'part_pkg', {} ); - print $writer $data = join("\n", - ( scalar(@part_pkg) || die "no usable package definitions, agent $agentnum" ), - map { - $_->pkgpart, - $_->pkg, - } @part_pkg - ), "\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - warn "[fs_mailadmin_server] Sending POPs...\n" if $Debug; - my @svc_acct_pop = qsearch ('svc_acct_pop',{} ); - print $writer $data = join("\n", - ( scalar(@svc_acct_pop) || die "No points of presence (svc_acct_pop records)" ), - map { - $_->popnum, - $_->city, - $_->state, - $_->ac, - $_->exch, - $_->loc, - } @svc_acct_pop - ), "\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - warn "[fs_mailadmin_server] Entering main loop...\n" if $Debug; -COMMAND: while (1) { - warn "[fs_mailadmin_server] Reading (waiting for) command...\n" if $Debug; - chop( my($command, $user) = map { scalar(<$reader>) } ( 1 .. 2 ) ); - my $domain = $default_domain; - $user =~ /^([\w\.\-]+)\@(([\w\-]+\.)+\w+)$/; - ($user, $domain) = ($1, $2); - - if ($command eq 'authenticate'){ - warn "[fs_mailadmin_server] Processing authenticate command for $user \n" if $Debug; - chop( my($password) = map { scalar(<$reader>) } ( 1 .. 1 ) ); - - my $error = ''; - - my @svc_domain = qsearchs('svc_domain', { 'domain' => $domain }); - - if (scalar(@svc_domain) != 1) { - warn "Nonexistant or duplicate service account for \"$domain\""; - next COMMAND; - } - - my @svc_acct = qsearchs('svc_acct', { 'username' => $user, - 'domsvc' => $svc_domain[0]->svcnum }); - if (scalar(@svc_acct) != 1) { - die "Nonexistant or duplicate service account for \"$user\""; - next COMMAND; - } - - if ($svc_acct[0]->_password eq $password) { - $error = "$user\@$domain OK"; - }else{ - $error = "$user\@$domain FAILED"; - } - warn "[fs_mailadmin_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - } - elsif ($command eq 'list_packages'){ - warn "[fs_mailadmin_server] Processing list_packages command for $user \n" if $Debug; - - my $error = ''; - - my @packages = eval {find_administrable_packages( $user, $domain )}; - warn "$@" if $@; - - my %packages; - my %accounts; - - foreach my $package (@packages) { - $packages{my $pkgnum = $package->getfield('pkgnum')} = $default_domain; - $accounts{$pkgnum} = 0; - my @services = qsearch('cust_svc', { 'pkgnum' => $pkgnum }); - foreach my $service (@services) { - if ($service->getfield('svcpart') eq '4'){ - my $account=qsearchs('svc_domain', { 'svcnum' => $service->getfield('svcnum') }); - $packages{$pkgnum}=$account->getfield('domain'); - $accounts{$pkgnum}=$account->getfield('svcnum'); - } - } - } - - print $writer $data = join("\n", - ( scalar(keys(%packages)) ), - map { - $_, - $packages{$_}, - $accounts{$_}, - } keys(%packages) - ), "\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - }elsif ($command eq 'list_mailboxes'){ - - warn "[fs_mailadmin_server] Processing list_mailboxes command for $user" if $Debug; - chop( my($pkgnum) = map { scalar(<$reader>) } ( 1 .. 1 ) ); - warn "package $pkgnum \n" if $Debug; - - my $error = ''; - - my @packages = eval {find_administrable_packages( $user, $domain )}; - warn "$@" if $@; - - my @accounts; - - foreach my $package (@packages) { - next unless ($pkgnum eq $package->getfield('pkgnum')); - my @services = qsearch('cust_svc', { 'pkgnum' => $package->getfield('pkgnum') }); - foreach my $service (@services) { - if ($service->getfield('svcpart') eq '2'){ - my $account=qsearchs('svc_acct', { 'svcnum' => $service->getfield('svcnum') }); -# $accounts[$#accounts+1]=$account->getfield('username'); - $accounts[$#accounts+1]=$account; - } - } - } - - print $writer $data = join("\n", -# ( scalar(@accounts) || die "No accounts (svc_acct records)" ), - ( scalar(@accounts) ), - map { - $_->svcnum, -# $_->username, - $_->email, -# $_->_password, - '*****', - } @accounts - ), "\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - - } elsif ($command eq 'delete_mailbox'){ - warn "[fs_mailadmin_server] Processing delete_mailbox command for $user " if $Debug; - chop( my($account) = map { scalar(<$reader>) } ( 1 .. 1 ) ); - warn "account $account \n" if $Debug; - - my $error = ''; - - my @packages = eval { find_administrable_packages($user, $domain) }; - warn "$@" if $@; - $error ||= "$@" if $@; - - my @svc_acct = qsearchs('svc_acct', { 'svcnum' => $account }) unless $error; - if (scalar(@svc_acct) != 1) { $error ||= 'Nonexistant or duplicate service account for user.' }; - if (! $error && check_administrator(\@packages, $svc_acct[0])){ -# not sure about the next three lines... do we delete? or return error - foreach my $svc_forward (qsearch('svc_forward', { 'dstsvc' => $svc_acct[0]->getfield('svcnum') })) { - $error ||= $svc_forward->delete; - } - foreach my $svc_forward (qsearch('svc_forward', { 'srcsvc' => $svc_acct[0]->getfield('svcnum') })) { - $error ||= $svc_forward->delete; - } - $error ||= $svc_acct[0]->delete; - } else { - $error ||= "Illegal attempt to remove service"; - } - - - warn "[fs_mailadmin_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - - } elsif ($command eq 'password_mailbox'){ - warn "[fs_mailadmin_server] Processing password_mailbox command for $user " if $Debug; - chop( my($account, $_password) = map { scalar(<$reader>) } ( 1 .. 2 ) ); - warn "account $account with password $_password \n" if $Debug; - - my $error = ''; - - my @packages = eval { find_administrable_packages($user, $domain) }; - warn "$@" if $@; - $error ||= "$@" if $@; - - my @svc_acct = qsearchs('svc_acct', { 'svcnum' => $account }) unless $error; - if (scalar(@svc_acct) != 1) { $error ||= 'Nonexistant or duplicate service account.' }; - - if (! $error && check_administrator(\@packages, $svc_acct[0])){ - my $new = new FS::svc_acct ({$svc_acct[0]->hash}); - $new->setfield('_password' => $_password); - $error ||= $new->replace($svc_acct[0]); - } else { - $error ||= "Illegal attempt to change password"; - } - - - warn "[fs_mailadmin_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - - } elsif ($command eq 'add_mailbox'){ - warn "[fs_mailadmin_server] Processing add_mailbox command for $user " if $Debug; - chop( my($target_package, $account, $_password) = map { scalar(<$reader>) } ( 1 .. 3 ) ); - warn "in package $target_package account $account with password $_password \n" if $Debug; - - my $found_package; - my $domainsvc=0; - my $svcpart=2; # this is 'email box' - my $svcpartsm=3; # this is 'domain alias' - my $error = ''; - my $found = 0; - - my @packages = eval { find_administrable_packages($user, $domain) }; - warn "$@" if $@; - $error ||= "$@" if $@; - - foreach my $package (@packages) { - if ($package->getfield('pkgnum') eq $target_package) { - $found = 1; - $found_package=$package; - my @services = qsearch('cust_svc', { 'pkgnum' => $target_package }); - foreach my $service (@services) { - if ($service->getfield('svcpart') eq '4'){ - my @svc_domain=qsearchs('svc_domain', { 'svcnum' => $service->getfield('svcnum') }); - if (scalar(@svc_domain) eq 1) { - $domainsvc=$svc_domain[0]->getfield('svcnum'); - } - } - } - last; - } - } - warn "User $user does not have administration rights to package $target_package\n" unless $found; - $error ||= "User $user does not have administration rights to package $target_package\n" unless $found; - - my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$found_package->getfield('pkgpart')}); - - #list of services this pkgpart includes (although at the moment we only care - # about $svcpart - my $pkg_svc; - my %pkg_svc = (); - foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $found_package->pkgpart }) ) { - $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity; - } - - my @services = qsearch('cust_svc', {'pkgnum' => $found_package->getfield('pkgnum'), - 'svcpart' => $svcpart, - }); - - if (scalar(@services) >= $pkg_svc{$svcpart}) { - $error="Maximum allowed already reached."; - } - - my $svc_acct = new FS::svc_acct ( { - 'pkgnum' => $found_package->pkgnum, - 'svcpart' => $svcpart, - 'username' => $account, - 'domsvc' => $domainsvc, - '_password' => $_password, - } ); - - my $y = $svc_acct->setdefault; # arguably should be in new method - $error ||= $y unless ref($y); - #and just in case you were silly - $svc_acct->pkgnum($found_package->pkgnum); - $svc_acct->svcpart($svcpart); - $svc_acct->username($account); - $svc_acct->domsvc($domainsvc); - $svc_acct->_password($_password); - - $error ||= $svc_acct->check; - - if ( ! $error ) { #in this case, $cust_pkg should always - #be definied, but.... - $error ||= $svc_acct->insert; - warn "WARNING: $error on pre-checked svc_acct record!" if $error; - } - - warn "[fs_mailadmin_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - - }elsif ($command eq 'list_forwards'){ - - warn "[fs_mailadmin_server] Processing list_forwards command for $user" if $Debug; - chop( my($svcnum) = map { scalar(<$reader>) } ( 1 .. 1 ) ); - warn "service $svcnum \n" if $Debug; - - my $error = ''; - - my @packages = eval {find_administrable_packages( $user, $domain )}; - warn "$@" if $@; - - my @forwards; - - foreach my $package (@packages) { -# next unless ($pkgnum eq $package->getfield('pkgnum')); - my @services = qsearch('cust_svc', { 'pkgnum' => $package->getfield('pkgnum') }); - foreach my $service (@services) { - if ($service->getfield('svcpart') eq '10'){ - my $forward=qsearchs('svc_forward', { 'svcnum' => $service->getfield('svcnum') }); - $forwards[$#forwards+1]=$forward if ($forward->getfield('srcsvc') == $svcnum); - } - } - } - - print $writer $data = join("\n", - ( scalar(@forwards) ), - map { - $_->svcnum, - ($_->dstsvc ? qsearchs('svc_acct', {'svcnum' => $_->dstsvc})->email : $_->dst), - } @forwards - ), "\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - - }elsif ($command eq 'list_pkg_forwards'){ - - warn "[fs_mailadmin_server] Processing list_pkg_forwards command for $user" if $Debug; - chop( my($pkgnum) = map { scalar(<$reader>) } ( 1 .. 1 ) ); - warn "package $pkgnum \n" if $Debug; - - my $error = ''; - - my @packages = eval {find_administrable_packages( $user, $domain )}; - warn "$@" if $@; - - my @forwards; - - foreach my $package (@packages) { - next unless ($pkgnum eq $package->getfield('pkgnum')); - my @services = qsearch('cust_svc', { 'pkgnum' => $package->getfield('pkgnum') }); - foreach my $service (@services) { - if ($service->getfield('svcpart') eq '10'){ - my $forward=qsearchs('svc_forward', { 'svcnum' => $service->getfield('svcnum') }); - $forwards[$#forwards+1]=$forward; - } - } - } - - print $writer $data = join("\n", - ( scalar(@forwards) ), - map { - $_->svcnum, - $_->srcsvc, - ($_->dstsvc ? qsearchs('svc_acct', {'svcnum' => $_->dstsvc})->email : $_->dst), - } @forwards - ), "\n"; - warn "[fs_mailadmin_server] $data\n" if $Debug > 2; - - - } elsif ($command eq 'delete_forward'){ - warn "[fs_mailadmin_server] Processing delete_forward command for $user " if $Debug; - chop( my($forward) = map { scalar(<$reader>) } ( 1 .. 1 ) ); - warn "forward $forward \n" if $Debug; - - my $error = ''; - - my @packages = eval { find_administrable_packages($user, $domain) }; - warn "$@" if $@; - $error ||= "$@" if $@; - - my @svc_forward = qsearchs('svc_forward', { 'svcnum' => $forward }) unless $error; - if (scalar(@svc_forward) != 1) { $error ||= 'Nonexistant or duplicate service account for user.' }; - if (! $error && check_administrator(\@packages, $svc_forward[0])){ -# not sure about the next three lines... do we delete? or return error - $error ||= $svc_forward[0]->delete; - } else { - $error ||= "Illegal attempt to remove service"; - } - - - warn "[fs_mailadmin_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - - } elsif ($command eq 'add_forward'){ - warn "[fs_mailadmin_server] Processing add_forward command for $user " if $Debug; - chop( my($target_package, $source, $dest) = map { scalar(<$reader>) } ( 1 .. 3 ) ); - warn "in package $target_package source $source with destination $dest \n" if $Debug; - - my $found_package; - my $domainsvc=0; - my $svcpart=10; # this is 'forward service' - my $error = ''; - my $found = 0; - - my @packages = eval { find_administrable_packages($user, $domain) }; - warn "$@" if $@; - $error ||= "$@" if $@; - - foreach my $package (@packages) { - if ($package->getfield('pkgnum') eq $target_package) { - $found = 1; - $found_package=$package; - last; - } - } - warn "User $user does not have administration rights to package $target_package\n" unless $found; - $error ||= "User $user does not have administration rights to package $target_package\n" unless $found; - - my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $source }); - warn "Forwarding source $source does not exist.\n" unless $svc_acct; - $error ||= "Forwarding source $source does not exist.\n" unless $svc_acct; - - my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $source }); - warn "Forwarding source $source not attached to any account.\n" unless $cust_svc; - $error ||= "Forwarding source $source not attached to any account.\n" unless $cust_svc; - - if ( ! $error ) { - warn "Forwarding source $source is not in package $target_package\n" - unless ($cust_svc->getfield('pkgnum') == $target_package); - $error ||= "Forwarding source $source is not in package $target_package\n" - unless ($cust_svc->getfield('pkgnum') == $target_package); - } - - my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$found_package->getfield('pkgpart')}); - - #list of services this pkgpart includes (although at the moment we only care - # about $svcpart - my $pkg_svc; - my %pkg_svc = (); - foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $found_package->pkgpart }) ) { - $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity; - } - - my @services = qsearch('cust_svc', {'pkgnum' => $found_package->getfield('pkgnum'), - 'svcpart' => $svcpart, - }); - - if (scalar(@services) >= $pkg_svc{$svcpart}) { - $error="Maximum allowed already reached."; - } - - my $svc_forward = new FS::svc_forward ( { - 'pkgnum' => $found_package->pkgnum, - 'svcpart' => $svcpart, - 'srcsvc' => $source, - 'dstsvc' => 0, - 'dst' => $dest, - } ); - - my $y = $svc_forward->setdefault; # arguably should be in new method - $error ||= $y unless ref($y); - #and just in case you were silly - $svc_forward->pkgnum($found_package->pkgnum); - $svc_forward->svcpart($svcpart); - $svc_forward->srcsvc($source); - $svc_forward->dstsvc(0); - $svc_forward->dst($dest); - - $error ||= $svc_forward->check; - - if ( ! $error ) { #in this case, $cust_pkg should always - #be definied, but.... - $error ||= $svc_forward->insert; - warn "WARNING: $error on pre-checked svc_forward record!" if $error; - } - - warn "[fs_mailadmin_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - - } else { - warn "[fs_mailadmin_server] Bad command: $command \n" if $Debug; - print $writer "Bad command \n"; - } - } - close $writer; - close $reader; - warn "connection to $machine lost! waiting 60 seconds...\n"; - sleep 60; - warn "reconnecting...\n"; -} - -sub usage { - die "Usage:\n\n fs_mailadmin_server user machine agentnum refnum\n"; -} - -#sub find_administrable_packages { -# my $user = shift; -# -# my $error = ''; -# -# my @svc_acct = qsearchs('svc_acct', { 'username' => $user }); -# if (scalar(@svc_acct) != 1) { -# die "Nonexistant or duplicate service account for \"$user\""; -# } -# -# my @cust_svc = qsearchs('cust_svc', { 'svcnum' => $svc_acct[0]->getfield('svcnum') }); -# if (scalar(@cust_svc) != 1 ) { -# die "Nonexistant or duplicate customer service for \"$user\""; -# } -# -# my @cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_svc[0]->getfield('pkgnum') }); -# if (scalar(@cust_pkg) != 1) { -# die "Nonexistant or duplicate customer package for \"$user\""; -# } -# -# my @cust_main = qsearchs('cust_main', { 'custnum' => $cust_pkg[0]->getfield('custnum') }); -# if (scalar(@cust_main) != 1 ) { -# die "Nonexistant or duplicate customer for \"$user\""; -# } -# -# my @packages = $cust_main[0]->ncancelled_pkgs; -#} - -sub find_administrable_packages { - my $user = shift; - my $domain = shift; - - my @packages; - my $error = ''; - - my @svc_domain = qsearchs('svc_domain', { 'domain' => $domain }); - - if (scalar(@svc_domain) != 1) { - die "Nonexistant or duplicate service account for \"$domain\""; - } - - my @svc_acct = qsearchs('svc_acct', { 'username' => $user, - 'domsvc' => $svc_domain[0]->svcnum }); - if (scalar(@svc_acct) != 1) { - die "Nonexistant or duplicate service account for \"$user\""; - } - - my @svc_acct_admin = qsearch('svc_acct_admin', {'adminsvc' => $svc_acct[0]->getfield('svcnum') }); - die "Nonexistant or duplicate customer service for \"$user\"" unless scalar(@svc_acct_admin); - - foreach my $svc_acct_admin (@svc_acct_admin) { - my @cust_svc = qsearchs('cust_svc', { 'svcnum' => $svc_acct_admin->getfield('svcnum') }); - if (scalar(@cust_svc) != 1 ) { - die "Nonexistant or duplicate customer service for admin \"$svc_acct_admin->getfield('svcnum')\""; - } - - my @cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_svc[0]->getfield('pkgnum') }); - if (scalar(@cust_pkg) != 1) { - die "Nonexistant or duplicate customer package for admin \"$user\""; - } - - push @packages, $cust_pkg[0] unless $cust_pkg[0]->getfield('cancel'); - - } - (@packages); -} - -sub check_administrator { - my ($allowed_packages_aref, $svc_acct_ref) = @_; - - my $error = ''; - my $found = 0; - - { - my @cust_svc = qsearchs('cust_svc', { 'svcnum' => $svc_acct_ref->getfield('svcnum') }); - if (scalar(@cust_svc) != 1 ) { - warn "Nonexistant or duplicate customer service for \"$svc_acct_ref->getfield('username')\""; - last; - } - - my @cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_svc[0]->getfield('pkgnum') }); - if (scalar(@cust_pkg) != 1) { - warn "Nonexistant or duplicate customer package for \"$svc_acct_ref->getfield('username')\""; - last; - } - - foreach my $package (@$allowed_packages_aref) { - if ($package->getfield('pkgnum') eq $cust_pkg[0]->getfield('pkgnum')) { - $found = 1; - last; - } - } - } - - $found; -} - -sub check_add { - my ($allowed_packages_aref, $target_package) = @_; - - my $error = ''; - my $found = 0; - - foreach my $package (@$allowed_packages_aref) { - if ($package->getfield('pkgnum') eq $target_package) { - $found = 1; - last; - } - } - - $found; -} - diff --git a/fs_selfservice/DEPLOY b/fs_selfservice/DEPLOY deleted file mode 100755 index 7c68e78ec..000000000 --- a/fs_selfservice/DEPLOY +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -( cd ..; make deploy; cd fs_selfservice ) - -cd FS-SelfService -perl Makefile.PL && make && make install - -cd .. -kill `cat /var/run/freeside-selfservice-server.ivan.pid`; sleep 3 -./freeside-selfservice-server ivan localhost - -cp /home/ivan/freeside_current/fs_selfservice/FS-SelfService/cgi/* /var/www/MyAccount -chown freeside /var/www/MyAccount/selfservice.cgi -chmod 4755 /var/www/MyAccount/selfservice.cgi -ln -s /var/www/MyAccount/selfservice.cgi /var/www/MyAccount/index.cgi diff --git a/fs_selfservice/FS-SelfService/Changes b/fs_selfservice/FS-SelfService/Changes deleted file mode 100644 index b9e26b7dc..000000000 --- a/fs_selfservice/FS-SelfService/Changes +++ /dev/null @@ -1,6 +0,0 @@ -Revision history for Perl extension FS::SelfService. - -0.01 Tue May 28 16:49:41 2002 - - original version; created by h2xs 1.21 with options - -A -X -n FS::SelfService - diff --git a/fs_selfservice/FS-SelfService/MANIFEST b/fs_selfservice/FS-SelfService/MANIFEST deleted file mode 100644 index ebd0d3b1a..000000000 --- a/fs_selfservice/FS-SelfService/MANIFEST +++ /dev/null @@ -1,6 +0,0 @@ -Changes -Makefile.PL -MANIFEST -SelfService.pm -test.pl -freeside-selfservice-clientd diff --git a/fs_selfservice/FS-SelfService/Makefile.PL b/fs_selfservice/FS-SelfService/Makefile.PL deleted file mode 100644 index da0a0aa24..000000000 --- a/fs_selfservice/FS-SelfService/Makefile.PL +++ /dev/null @@ -1,15 +0,0 @@ -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'FS::SelfService', - 'VERSION_FROM' => 'SelfService.pm', # finds $VERSION - 'EXE_FILES' => [ 'freeside-selfservice-clientd' ], - 'INSTALLSCRIPT' => '/usr/local/sbin', - 'INSTALLSITEBIN' => '/usr/local/sbin', - 'PERM_RWX' => '750', - 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'SelfService.pm', # retrieve abstract from module - AUTHOR => 'Ivan Kohler ') : ()), -); diff --git a/fs_selfservice/FS-SelfService/SelfService.pm b/fs_selfservice/FS-SelfService/SelfService.pm deleted file mode 100644 index 9019ea4f8..000000000 --- a/fs_selfservice/FS-SelfService/SelfService.pm +++ /dev/null @@ -1,112 +0,0 @@ -package FS::SelfService; - -use strict; -use vars qw($VERSION @ISA @EXPORT_OK $socket %autoload ); -use Exporter; -use Socket; -use FileHandle; -#use IO::Handle; -use IO::Select; -use Storable qw(nstore_fd fd_retrieve); - -$VERSION = '0.03'; - -@ISA = qw( Exporter ); - -$socket = "/usr/local/freeside/selfservice_socket"; - -%autoload = ( - 'passwd' => 'passwd/passwd', - 'chfn' => 'passwd/passwd', - 'chsh' => 'passwd/passwd', - 'login' => 'MyAccount/login', - 'customer_info' => 'MyAccount/customer_info', - 'invoice' => 'MyAccount/invoice', -); -@EXPORT_OK = keys %autoload; - -$ENV{'PATH'} ='/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -my $freeside_uid = scalar(getpwnam('freeside')); -die "not running as the freeside user\n" if $> != $freeside_uid; - -=head1 NAME - -FS::SelfService - Freeside self-service API - -=head1 SYNOPSIS - -=head1 DESCRIPTION - -Use this API to implement your own client "self-service" module. - -If you just want to customize the look of the existing "self-service" module, -see XXXX instead. - -=head1 FUNCTIONS - -=over 4 - -=item passwd - -Returns the empty value on success, or an error message on errors. - -=cut - -foreach my $autoload ( keys %autoload ) { - - my $eval = - "sub $autoload { ". ' - my $param; - if ( ref($_[0]) ) { - $param = shift; - } else { - $param = { @_ }; - } - - $param->{_packet} = \''. $autoload{$autoload}. '\'; - - simple_packet($param); - }'; - - eval $eval; - die $@ if $@; - -} - -sub simple_packet { - my $packet = shift; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($socket)) or die "connect: $!"; - nstore_fd($packet, \*SOCK) or die "can't send packet: $!"; - SOCK->flush; - - #shoudl trap: Magic number checking on storable file failed at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/fd_retrieve.al) line 337, at /usr/local/share/perl/5.6.1/FS/SelfService.pm line 71 - - #block until there is a message on socket -# my $w = new IO::Select; -# $w->add(\*SOCK); -# my @wait = $w->can_read; - my $return = fd_retrieve(\*SOCK) or die "error reading result: $!"; - die $return->{'_error'} if defined $return->{_error} && $return->{_error}; - - $return; -} - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L, L - -=cut - -1; - diff --git a/fs_selfservice/FS-SelfService/cgi/login.html b/fs_selfservice/FS-SelfService/cgi/login.html deleted file mode 100644 index dfbd0137a..000000000 --- a/fs_selfservice/FS-SelfService/cgi/login.html +++ /dev/null @@ -1,23 +0,0 @@ -Login -Login

    -<%= $error %> -

    - - - - - - - - - - - - - - - -
    Username
    Domain
    Password
    -

    -
    - diff --git a/fs_selfservice/FS-SelfService/cgi/myaccount.html b/fs_selfservice/FS-SelfService/cgi/myaccount.html deleted file mode 100644 index f8a916eea..000000000 --- a/fs_selfservice/FS-SelfService/cgi/myaccount.html +++ /dev/null @@ -1,47 +0,0 @@ -MyAccount -MyAccount

    -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -
    -MyAccount
    -SomethingElse
    -
    - -Hello <%= $name %>!

    -Your customer number is <%= $custnum %>

    -Your contact information
    <%= $small_custview %> -Your outstanding balance is $<%= $balance %>

    - -<%= - if ( @open_invoices ) { - $OUT .= ''. - '$td${a}Invoice #". $invoice->{'invnum'}. "$td". - "$td$a". $invoice->{'date'}. "$td". - qq!'. - ''; - $col = $col eq $col1 ? $col2 : $col1; - } - $OUT .= '
    Open Invoices'; - my $link = qq!!; - my $a=qq!'; - $OUT .= - "
    $a\$!. $invoice->{'owed'}. - '
    '; - } else { - $OUT .= 'You have no outstanding invoices.

    '; - } -%> - -
    -
    -small text - - - - diff --git a/fs_selfservice/FS-SelfService/cgi/passwd.html b/fs_selfservice/FS-SelfService/cgi/passwd.html deleted file mode 100644 index fadc4df8b..000000000 --- a/fs_selfservice/FS-SelfService/cgi/passwd.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Change password - - -

    Change password

    -
    - - - - - - - - - - - - - -
    Username
    Current password
    New password
    Re-enter new password
    -
    - - - diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi deleted file mode 100644 index eae373931..000000000 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/perl -Tw - -use strict; -use vars qw($cgi $session_id $form_max $template_dir); -use subs qw(do_template); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use Text::Template; -use FS::SelfService qw(login customer_info invoice); - -$template_dir = '.'; - -$form_max = 255; - -$cgi = new CGI; - -unless ( defined $cgi->param('session') ) { - do_template('login',{}); - exit; -} - -if ( $cgi->param('session') eq 'login' ) { - - $cgi->param('username') =~ /^\s*([a-z0-9_\-\.\&]{0,$form_max})\s*$/i - or die "illegal username"; - my $username = $1; - - $cgi->param('domain') =~ /^\s*([\w\-\.]{0,$form_max})\s*$/ - or die "illegal domain"; - my $domain = $1; - - $cgi->param('password') =~ /^(.{0,$form_max})$/ - or die "illegal password"; - my $password = $1; - - my $rv = login( - 'username' => $username, - 'domain' => $domain, - 'password' => $password, - ); - if ( $rv->{error} ) { - do_template('login', { - 'error' => $rv->{error}, - 'username' => $username, - 'domain' => $domain, - } ); - exit; - } else { - $cgi->param('session' => $rv->{session_id} ); - $cgi->param('action' => 'myaccount' ); - } -} - -$session_id = $cgi->param('session'); - -$cgi->param('action') =~ /^(myaccount|view_invoice)$/ - or die "unknown action ". $cgi->param('action'); -my $action = $1; - -my $result = eval "&$action();"; -die $@ if $@; - -if ( $result->{error} eq "Can't resume session" ) { #ick - do_template('login',{}); - exit; -} - -#warn $result->{'open_invoices'}; -#warn scalar(@{$result->{'open_invoices'}}); - -do_template($action, { - 'session_id' => $session_id, - %{$result} -}); - -#-- - -sub myaccount { customer_info( 'session_id' => $session_id ); } - -sub view_invoice { - - $cgi->param('invnum') =~ /^(\d+)$/ or die "illegal invnum"; - my $invnum = $1; - - invoice( 'session_id' => $session_id, - 'invnum' => $invnum, - ); - -} - -#-- - -sub do_template { - my $name = shift; - my $fill_in = shift; - - $cgi->delete_all(); - $fill_in->{'self_url'} = $cgi->self_url; - - my $template = new Text::Template( TYPE => 'FILE', - SOURCE => "$template_dir/$name.html", - DELIMITERS => [ '<%=', '%>' ], - UNTAINT => 1, ) - or die $Text::Template::ERROR; - - print $cgi->header( '-expires' => 'now' ), - $template->fill_in( HASH => $fill_in ); -} - diff --git a/fs_selfservice/FS-SelfService/cgi/view_invoice.html b/fs_selfservice/FS-SelfService/cgi/view_invoice.html deleted file mode 100644 index 33388de99..000000000 --- a/fs_selfservice/FS-SelfService/cgi/view_invoice.html +++ /dev/null @@ -1,21 +0,0 @@ -MyAccount -MyAccount

    -<%= $url = "$selfurl?session=$session_id;action="; ''; %> -
    -MyAccount
    -SomethingElse
    -
    - -<-- back to MyAccount

    - -
    -<%= $invoice_text %>
    -
    - -
    -
    -small text - - - - diff --git a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd b/fs_selfservice/FS-SelfService/freeside-selfservice-clientd deleted file mode 100644 index 0c25c3407..000000000 --- a/fs_selfservice/FS-SelfService/freeside-selfservice-clientd +++ /dev/null @@ -1,226 +0,0 @@ -#!/usr/bin/perl -w -# -# freeside-selfservice-clientd -# -# This is run REMOTELY over ssh by freeside-selfservice-server - -use strict; -use subs qw(spawn logmsg); -use Fcntl qw(:flock); -use POSIX qw(:sys_wait_h); -use Socket; -use Storable qw(nstore_fd fd_retrieve); -use IO::Handle qw(_IONBF); -use IO::Select; -use IO::File; - -STDOUT->setbuf(''); - -use vars qw( $Debug ); -$Debug = 3; #2 will turn on child logging, 3 will log packet contents, - #including potentially compromising information - -my $socket = "/usr/local/freeside/selfservice_socket"; -my $pid_file = "$socket.pid"; - -my $log_file = "/usr/local/freeside/selfservice.log"; - -#my $me = '[client]'; - -$|=1; - -$SIG{__WARN__} = \&_logmsg; - -#read data to be cached or something -#warn "$me Reading init data\n" if $Debug; -#my $signup_init = - -warn "Creating $socket\n" if $Debug; -my $uaddr = sockaddr_un($socket); -my $proto = getprotobyname('tcp'); -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -if ( -e $pid_file ) { - open(PIDFILE,"<$pid_file"); - my $old_pid = ; - close PIDFILE; - $old_pid =~ /^(\d+)$/; - kill 'TERM', $1; -} -open(PIDFILE,">$pid_file"); -print PIDFILE "$$\n"; -close PIDFILE; - -#my $waitedpid; -#sub REAPER { $waitedpid = wait; $SIG{CHLD} = \&REAPER; } -#$SIG{CHLD} = \&REAPER; - -warn "entering main loop\n" if $Debug; - -my %kids; - -my $s = new IO::Select; -$s->add(\*STDIN); -$s->add(\*Server); - -#for ( $waitedpid = 0; -# accept(Client,Server) || $waitedpid; -# $waitedpid = 0, close Client) -#{ -# next if $waitedpid; - -#$SIG{PIPE} = sub { warn "SIGPIPE received" }; -#$SIG{CHLD} = sub { warn "SIGCHLD received" }; - -#sub REAPER { warn "SIGCHLD received"; my $pid = wait; $SIG{CHLD} = \&REAPER; } -#sub REAPER { my $pid = wait; $SIG{CHLD} = \&REAPER; } -#sub REAPER { my $pid = wait; delete $kids{$pid}; $SIG{CHLD} = \&REAPER; } -#$SIG{CHLD} = \&REAPER; - -my $undisp = 0; -while (1) { - - &reap_kids; - - warn "waiting for connection\n" if $Debug && !$undisp; - - #my @handles = $s->can_read(); - my @handles = $s->can_read(5); - $undisp = !scalar(@handles); - foreach my $handle ( @handles ) { - - if ( $handle == \*STDIN ) { - - warn "receiving packet from server\n" if $Debug; - - my $packet = fd_retrieve(\*STDIN); - my $token = $packet->{'_token'}; - warn "received packet from server with token $token\n". - ( $Debug > 2 - ? join('', map { " $_=>$packet->{$_}\n" } keys %$packet ) - : '' ) - if $Debug; - - if ( exists($kids{$token}) ) { - warn "sending return packet to $token via $kids{$token}\n" - if $Debug; - nstore_fd($packet, $kids{$token}); - warn "flushing to $token\n" if $Debug; - until ( $kids{$token}->flush ) { - warn "WARNING: error flushing: $!"; - sleep 1; - } - #no close or delete here - will block waiting for child - warn "done with $token\n" if $Debug; - } else { - warn "WARNING: unknown token $token, discarding message"; - } - - } elsif ( $handle == \*Server ) { - - until ( accept(Client, Server) ) { - warn "WARNING: accept failed: $!"; - next; - } - - warn "received local connection; forking\n" if $Debug; - - spawn sub { #child - warn "[child-$$] reading packet from local client" if $Debug > 1; - my $packet = fd_retrieve(\*Client); - warn "[child-$$] packet received:\n". - join('', map { " $_=>$packet->{$_}\n" } keys %$packet ) - if $Debug > 2; - my $command = $packet->{'command'}; - #handle some commands weirdly? - $packet->{_token}=$$; - - warn "[child-$$] sending packet to remote server" if $Debug > 1; - flock(STDOUT, LOCK_EX) or die "FATAL: can't lock write stream: $!"; - nstore_fd($packet, \*STDOUT) or die "FATAL: can't send response: $!"; - STDOUT->flush or die "FATAL: can't flush: $!"; - flock(STDOUT, LOCK_UN) or die "FATAL: can't release write lock: $!"; - close STDOUT or die "FATAL: can't close write stream: $!"; #??! - - warn "[child-$$] waiting for response from parent" if $Debug > 1; - my $w = new IO::Select; - $w->add(\*STDIN); - until ( $w->can_read ) { - warn "[child-$$] WARNING: interrupted select: $!\n"; - } - my $rv = fd_retrieve(\*STDIN); - - #close STDIN; - - warn "[child-$$] sending response to local client" if $Debug > 1; - nstore_fd($rv, \*Client); - Client->flush or die "FATAL: can't flush to local client: $!"; - close Client or die "FATAL: can't close connection to local client: $!"; - - warn "[child-$$] child exiting" if $Debug > 1; - exit; - - }; #eo child - - #close Client; - - } else { - die "wtf? $handle"; - } - - } - -} - -sub reap_kids { - #warn "reaping kids\n"; - foreach my $pid ( keys %kids ) { - my $kid = waitpid($pid, WNOHANG); - if ( $kid > 0 ) { - close $kids{$kid}; - delete $kids{$kid}; - } - } - #warn "done reaping\n"; -} - -sub spawn { - my $coderef = shift; - - unless (@_ == 0 && $coderef && ref($coderef) eq 'CODE') { - use Carp; - confess "usage: spawn CODEREF"; - } - - my $pid; - #if (!defined($pid = fork)) { - my $kid = new IO::Handle; - if (!defined($pid = open($kid, '|-'))) { - warn "WARNING: cannot fork: $!"; - return; - } elsif ($pid) { - warn "begat $pid" if $Debug; - $kids{$pid} = $kid; - #$kids{$pid}->autoflush; - return; # I'm the parent - } - # else I'm the child -- go spawn - -# open(STDIN, "<&Client") || die "can't dup client to stdin"; -# open(STDOUT, ">&Client") || die "can't dup client to stdout"; -# open(STDERR, ">&STDOUT") || die "can't dup stdout to stderr"; - exit &$coderef(); -} - -sub _logmsg { - chomp( my $msg = shift ); - my $log = new IO::File ">>$log_file"; - flock($log, LOCK_EX); - seek($log, 0, 2); - print $log "[client] [". scalar(localtime). "] [$$] $msg\n"; - flock($log, LOCK_UN); - close $log; -} diff --git a/fs_selfservice/FS-SelfService/test.pl b/fs_selfservice/FS-SelfService/test.pl deleted file mode 100644 index 7468ea471..000000000 --- a/fs_selfservice/FS-SelfService/test.pl +++ /dev/null @@ -1,17 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### - -# change 'tests => 1' to 'tests => last_test_to_print'; - -use Test; -BEGIN { plan tests => 1 }; -use FS::SelfService; -ok(1); # If we made it this far, we're ok. - -######################### - -# Insert your test code below, the Test module is use()ed here so read -# its man page ( perldoc Test ) for help writing this test script. - diff --git a/fs_selfservice/freeside-selfservice-server b/fs_selfservice/freeside-selfservice-server deleted file mode 100644 index e55ca4984..000000000 --- a/fs_selfservice/freeside-selfservice-server +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/perl -w -# -# freeside-selfservice-server - -# alas, much false laziness with freeside-queued and fs_signup_server. at -# least it is slated to replace fs_{signup,passwd,mailadmin}_server -# should probably generalize the version in here, or better yet use -# Proc::Daemon or somesuch - -use strict; -use vars qw( $Debug %kids $kids $max_kids $shutdown $log_file $ssh_pid ); -use Fcntl qw(:flock); -use POSIX qw(:sys_wait_h setsid); -use IO::Handle; -use IO::Select; -use IO::File; -use Storable qw(nstore_fd fd_retrieve); -use Net::SSH qw(sshopen2); -use FS::UID qw(adminsuidsetup forksuidsetup); -use FS::ClientAPI; - -$Debug = 2; # >= 2 will log packet contents, including potentially compromising - # information - -$shutdown = 0; -$max_kids = '10'; #? -$kids = 0; - -my $user = shift or die &usage; -my $machine = shift or die &usage; -my $pid_file = "/var/run/freeside-selfservice-server.$user.pid"; -#my $pid_file = "/var/run/freeside-selfservice-server.$user.pid"; $FS::UID::datasrc not posible, but should include machine name at least, hmm - -&init($user); - -my $clientd = "/usr/local/sbin/freeside-selfservice-clientd"; #better name? - -my $warnkids=0; -while (1) { - my($writer,$reader,$error) = (new IO::Handle, new IO::Handle, new IO::Handle); - warn "connecting to $machine\n" if $Debug; - - $ssh_pid = sshopen2($machine,$reader,$writer,$clientd); - -# nstore_fd(\*writer, {'hi'=>'there'}); - - warn "entering main loop\n" if $Debug; - my $undisp = 0; - my $s = IO::Select->new( $reader ); - while (1) { - - &reap_kids; - - warn "waiting for packet from client\n" if $Debug && !$undisp; - $undisp = 1; - my @handles = $s->can_read(5); - unless ( @handles ) { - &shutdown if $shutdown; - next; - } - - $undisp = 0; - - warn "receiving packet from client\n" if $Debug; - - my $packet = fd_retrieve($reader); - warn "packet received\n". - join('', map { " $_=>$packet->{$_}\n" } keys %$packet ) - if $Debug > 1; - - #prevent runaway forking - my $warnkids = 0; - while ( $kids >= $max_kids ) { - warn "WARNING: maximum $kids children reached\n" unless $warnkids++; - &reap_kids; - sleep 1; - } - - warn "forking child\n" if $Debug; - defined( my $pid = fork ) or die "can't fork: $!"; - if ( $pid ) { - $kids++; - $kids{$pid} = 1; - warn "child $pid spawned\n" if $Debug; - } else { #kid time - - #get new db handle - $FS::UID::dbh->{InactiveDestroy} = 1; - forksuidsetup($user); - - my $type = $packet->{_packet}; - warn "calling $type handler\n" if $Debug; - my $rv = eval { FS::ClientAPI->dispatch($type, $packet); }; - if ( $@ ) { - warn my $error = "WARNING: error dispatching $type: $@"; - $rv = { _error => $error }; - } - $rv->{_token} = $packet->{_token}; #identifier - - warn "sending response\n" if $Debug; - flock($writer, LOCK_EX) or die "FATAL: can't lock write stream: $!"; - nstore_fd($rv, $writer) or die "FATAL: can't send response: $!"; - $writer->flush or die "FATAL: can't flush: $!"; - flock($writer, LOCK_UN) or die "WARNING: can't release write lock: $!"; - - warn "child exiting\n" if $Debug; - exit; #end-of-kid - } - - } - -} - -### -# utility subroutines -### - -sub reap_kids { - #warn "reaping kids\n"; - foreach my $pid ( keys %kids ) { - my $kid = waitpid($pid, WNOHANG); - if ( $kid > 0 ) { - $kids--; - delete $kids{$kid}; - } - } - #warn "done reaping\n"; -} - -sub init { - my $user = shift; - - chdir "/" or die "Can't chdir to /: $!"; - open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - if ( $pid ) { - print "freeside-selfservice-server to $machine started with pid $pid\n"; #logging to $log_file - exit unless $pid_file; - my $pidfh = new IO::File ">$pid_file" or exit; - print $pidfh "$pid\n"; - exit; - } - -# sub REAPER { my $pid = wait; $SIG{CHLD} = \&REAPER; $kids--; } -# #sub REAPER { my $pid = wait; $kids--; $SIG{CHLD} = \&REAPER; } -# $SIG{CHLD} = \&REAPER; - - $shutdown = 0; - $SIG{HUP} = sub { warn "SIGHUP received; shutting down\n"; $shutdown++; }; - $SIG{INT} = sub { warn "SIGINT received; shutting down\n"; $shutdown++; }; - $SIG{TERM} = sub { warn "SIGTERM received; shutting down\n"; $shutdown++; }; - $SIG{QUIT} = sub { warn "SIGQUIT received; shutting down\n"; $shutdown++; }; - $SIG{PIPE} = sub { warn "SIGPIPE received; shutting down\n"; $shutdown++; }; - - #false laziness w/freeside-queued - my $freeside_gid = scalar(getgrnam('freeside')) - or die "can't setgid to freeside group\n"; - $) = $freeside_gid; - $( = $freeside_gid; - #if freebsd can't setuid(), presumably it can't setgid() either. grr fleabsd - ($(,$)) = ($),$(); - $) = $freeside_gid; - - $> = $FS::UID::freeside_uid; - $< = $FS::UID::freeside_uid; - #freebsd is sofa king broken, won't setuid() - ($<,$>) = ($>,$<); - $> = $FS::UID::freeside_uid; - #eslaf - - $ENV{HOME} = (getpwuid($>))[7]; #for ssh - adminsuidsetup $user; - - #$log_file = "/usr/local/etc/freeside/selfservice.". $FS::UID::datasrc; #MACHINE NAME - $log_file = "/usr/local/etc/freeside/selfservice.$machine.log"; - - open STDOUT, '>/dev/null' - or die "Can't write to /dev/null: $!"; - setsid or die "Can't start a new session: $!"; - open STDERR, '>&STDOUT' or die "Can't dup stdout: $!"; - - $SIG{__DIE__} = \&_die; - $SIG{__WARN__} = \&_logmsg; - - warn "freeside-selfservice-server starting\n"; - -} - -sub shutdown { - my $wait = 12; #wait up to 1 minute - while ( $kids > 0 && $wait-- ) { - warn "waiting for $kids children to terminate"; - sleep 5; - } - warn "abandoning $kids children" if $kids; - kill 'TERM', $ssh_pid if $ssh_pid; - die "exiting"; -} - -sub _die { - my $msg = shift; - unlink $pid_file if -e $pid_file; - _logmsg($msg); -} - -sub _logmsg { - chomp( my $msg = shift ); - _do_logmsg( "[server] [". scalar(localtime). "] [$$] $msg\n" ); -} - -sub _do_logmsg { - chomp( my $msg = shift ); - my $log = new IO::File ">>$log_file"; - flock($log, LOCK_EX); - seek($log, 0, 2); - print $log "$msg\n"; - flock($log, LOCK_UN); - close $log; -} - -sub usage { - die "Usage:\n\n fs_signup_server user machine\n"; -} - diff --git a/fs_selfservice/fs_passwd_test b/fs_selfservice/fs_passwd_test deleted file mode 100755 index 4f8b8a888..000000000 --- a/fs_selfservice/fs_passwd_test +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use FS::SelfService qw(passwd); - -my $rv = passwd( - 'username' => 'ivan', - 'old_password' => 'heyhoo', - 'new_password' => 'haloo', -); -my $error = $rv->{error}; - -if ( $error eq 'Incorrect password.' ) { - exit; -} else { - die $error if $error; - die "no error"; -} - diff --git a/fs_sesmon/FS-SessionClient/Changes b/fs_sesmon/FS-SessionClient/Changes deleted file mode 100644 index 390a7b946..000000000 --- a/fs_sesmon/FS-SessionClient/Changes +++ /dev/null @@ -1,5 +0,0 @@ -Revision history for Perl extension FS::SessionClient - -0.01 Wed Oct 18 16:34:36 1999 - - original version; created by ivan 1.0 - diff --git a/fs_sesmon/FS-SessionClient/MANIFEST b/fs_sesmon/FS-SessionClient/MANIFEST deleted file mode 100644 index 162d4e453..000000000 --- a/fs_sesmon/FS-SessionClient/MANIFEST +++ /dev/null @@ -1,11 +0,0 @@ -Changes -MANIFEST -MANIFEST.SKIP -Makefile.PL -SessionClient.pm -test.pl -fs_sessiond -cgi/login.cgi -cgi/logout.cgi -bin/freeside-login -bin/freeside-logout diff --git a/fs_sesmon/FS-SessionClient/MANIFEST.SKIP b/fs_sesmon/FS-SessionClient/MANIFEST.SKIP deleted file mode 100644 index ae335e78a..000000000 --- a/fs_sesmon/FS-SessionClient/MANIFEST.SKIP +++ /dev/null @@ -1 +0,0 @@ -CVS/ diff --git a/fs_sesmon/FS-SessionClient/Makefile.PL b/fs_sesmon/FS-SessionClient/Makefile.PL deleted file mode 100644 index 137b6b8bd..000000000 --- a/fs_sesmon/FS-SessionClient/Makefile.PL +++ /dev/null @@ -1,10 +0,0 @@ -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'FS::SessionClient', - 'VERSION_FROM' => 'SessionClient.pm', # finds $VERSION - 'EXE_FILES' => [ qw(fs_sessiond bin/freeside-login bin/freeside-logout) ], - 'INSTALLSCRIPT' => '/usr/local/sbin', - 'PERM_RWX' => '750', -); diff --git a/fs_sesmon/FS-SessionClient/SessionClient.pm b/fs_sesmon/FS-SessionClient/SessionClient.pm deleted file mode 100644 index 8a0ff705f..000000000 --- a/fs_sesmon/FS-SessionClient/SessionClient.pm +++ /dev/null @@ -1,122 +0,0 @@ -package FS::SessionClient; - -use strict; -use vars qw($AUTOLOAD $VERSION @ISA @EXPORT_OK $fs_sessiond_socket); -use Exporter; -use Socket; -use FileHandle; -use IO::Handle; - -$VERSION = '0.01'; - -@ISA = qw( Exporter ); -@EXPORT_OK = qw( login logout portnum ); - -$fs_sessiond_socket = "/usr/local/freeside/fs_sessiond_socket"; - -$ENV{'PATH'} ='/usr/bin:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -my $freeside_uid = scalar(getpwnam('freeside')); -die "not running as the freeside user\n" if $> != $freeside_uid; - -=head1 NAME - -FS::SessionClient - Freeside session client API - -=head1 SYNOPSIS - - use FS::SessionClient qw( login portnum logout ); - - $error = login ( { - 'username' => $username, - 'password' => $password, - 'login' => $timestamp, - 'portnum' => $portnum, - } ); - - $portnum = portnum( { 'ip' => $ip } ) or die "unknown ip!" - $portnum = portnum( { 'nasnum' => $nasnum, 'nasport' => $nasport } ) - or die "unknown nasnum/nasport"; - - $error = logout ( { - 'username' => $username, - 'password' => $password, - 'logout' => $timestamp, - 'portnum' => $portnum, - } ); - -=head1 DESCRIPTION - -This modules provides an API for a remote session application. - -It needs to be run as the freeside user. Because of this, the program which -calls these subroutines should be written very carefully. - -=head1 SUBROUTINES - -=over 4 - -=item login HASHREF - -HASHREF should have the following keys: username, password, login and portnum. -login is a UNIX timestamp; if not specified, will default to the current time. -Starts a new session for the specified user and portnum. The password is -optional, but must be correct if specified. - -Returns a scalar error message, or the empty string for success. - -=item portnum - -HASHREF should contain a single key: ip, or the two keys: nasnum and nasport. -Returns a portnum suitable for the login and logout subroutines, or false -on error. - -=item logout HASHREF - -HASHREF should have the following keys: usrename, password, logout and portnum. -logout is a UNIX timestamp; if not specified, will default to the current time. -Starts a new session for the specified user and portnum. The password is -optional, but must be correct if specified. - -Returns a scalar error message, or the empty string for success. - -=cut - -sub AUTOLOAD { - my $hashref = shift; - my $method = $AUTOLOAD; - $method =~ s/^.*:://; - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_sessiond_socket)) or die "connect: $!"; - print SOCK "$method\n"; - - print SOCK join("\n", %{$hashref}, 'END' ), "\n"; - SOCK->flush; - - chomp( my $r = ); - $r; -} - -=back - -=head1 VERSION - -$Id: SessionClient.pm,v 1.3 2000-12-03 20:25:20 ivan Exp $ - -=head1 BUGS - -=head1 SEE ALSO - -L - -=cut - -1; - - - diff --git a/fs_sesmon/FS-SessionClient/bin/freeside-login b/fs_sesmon/FS-SessionClient/bin/freeside-login deleted file mode 100644 index a6d475169..000000000 --- a/fs_sesmon/FS-SessionClient/bin/freeside-login +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/perl -Tw - -#false-laziness hack w freeside-logout - -use strict; -use FS::SessionClient qw( login portnum ); - -my $username = shift; - -my $portnum; -if ( scalar(@ARGV) == 1 ) { - my $arg = shift; - if ( $arg =~ /^(\d+)$/ ) { - $portnum = $1; - } elsif ( $arg =~ /^([\d\.]+)$/ ) { - $portnum = portnum( { 'ip' => $1 } ) or die "unknown ip!" - } else { - &usage; - } -} elsif ( scalar(@ARGV) == 2 ) { - $portnum = portnum( { 'nasnum' => shift, 'nasport' => shift } ) - or die "unknown nasnum/nasport"; -} else { - &usage; -} - -my $error = login ( { - 'username' => $username, - 'portnum' => $portnum, -} ); - -warn $error if $error; - -sub usage { - die "Usage:\n\n freeside-login username ( portnum | ip | nasnum nasport )"; -} diff --git a/fs_sesmon/FS-SessionClient/bin/freeside-logout b/fs_sesmon/FS-SessionClient/bin/freeside-logout deleted file mode 100644 index 9b4ecfe23..000000000 --- a/fs_sesmon/FS-SessionClient/bin/freeside-logout +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/perl -Tw - -#false-laziness hack w freeside-login - -use strict; -use FS::SessionClient qw( logout portnum ); - -my $username = shift; - -my $portnum; -if ( scalar(@ARGV) == 1 ) { - my $arg = shift; - if ( $arg =~ /^(\d+)$/ ) { - $portnum = $1; - } elsif ( $arg =~ /^([\d\.]+)$/ ) { - $portnum = portnum( { 'ip' => $1 } ) or die "unknown ip!" - } else { - &usage; - } -} elsif ( scalar(@ARGV) == 2 ) { - $portnum = portnum( { 'nasnum' => shift, 'nasport' => shift } ) - or die "unknown nasnum/nasport"; -} else { - &usage; -} - -my $error = logout ( { - 'username' => $username, - 'portnum' => $portnum, -} ); - -warn $error if $error; - -sub usage { - die "Usage:\n\n freeside-logout username ( portnum | ip | nasnum nasport )"; -} diff --git a/fs_sesmon/FS-SessionClient/cgi/login.cgi b/fs_sesmon/FS-SessionClient/cgi/login.cgi deleted file mode 100644 index 0307c5a3d..000000000 --- a/fs_sesmon/FS-SessionClient/cgi/login.cgi +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/perl -Tw - -#false-laziness hack w logout.cgi - -use strict; -use vars qw( $cgi $username $password $error $ip $portnum ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::SessionClient qw( login portnum ); - -$cgi = new CGI; - -if ( defined $cgi->param('magic') ) { - $cgi->param('username') =~ /^\s*(\w{1,255})\s*$/ or do { - $error = "Illegal username"; - &print_form; - exit; - }; - $username = $1; - $cgi->param('password') =~ /^([^\n]{0,255})$/ or die "guru meditation #420"; - $password = $1; - #$ip = $cgi->remote_host; - $ip = $ENV{REMOTE_ADDR}; - $ip =~ /^([\d\.]+)$/ or die "illegal ip: $ip"; - $ip = $1; - $portnum = portnum( { 'ip' => $1 } ) or do { - $error = "You appear to be coming from an unknown IP address. Verify ". - "that your computer is set to obtain an IP address automatically ". - "via DHCP."; - &print_form; - exit; - }; - - ( $error = login ( { - 'username' => $username, - 'portnum' => $portnum, - 'password' => $password, - } ) ) - ? &print_form() - : &print_okay(); - -} else { - $username = ''; - $password = ''; - $error = ''; - &print_form; -} - -sub print_form { - my $self_url = $cgi->self_url; - - print $cgi->header( '-expires' => 'now' ), <login - -END - -print qq!Error: $error! if $error; - -print < - - - - - - - - - - - - - - - - -
    - Welcome -
    - Username - - -
    - Password - - -
    - -
    - - - -END - -} - -sub print_okay { - print $cgi->header( '-expires' => 'now' ), <login sucessful -login successful, etc. - - -END -} - -sub usage { - die "Usage:\n\n freeside-login username ( portnum | ip | nasnum nasport )"; -} diff --git a/fs_sesmon/FS-SessionClient/cgi/logout.cgi b/fs_sesmon/FS-SessionClient/cgi/logout.cgi deleted file mode 100644 index 95cef98d1..000000000 --- a/fs_sesmon/FS-SessionClient/cgi/logout.cgi +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/perl -Tw - -#false-laziness hack w login.cgi - -use strict; -use vars qw( $cgi $username $password $error $ip $portnum ); -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use FS::SessionClient qw( logout portnum ); - -$cgi = new CGI; - -if ( defined $cgi->param('magic') ) { - $cgi->param('username') =~ /^\s*(\w{1,255})\s*$/ or do { - $error = "Illegal username"; - &print_form; - exit; - }; - $username = $1; - $cgi->param('password') =~ /^([^\n]{0,255})$/ or die "guru meditation #420"; - $password = $1; - #$ip = $cgi->remote_host; - $ip = $ENV{REMOTE_ADDR}; - $ip =~ /^([\d\.]+)$/ or die "illegal ip: $ip"; - $ip = $1; - $portnum = portnum( { 'ip' => $1 } ) or do { - $error = "You appear to be coming from an unknown IP address. Verify ". - "that your computer is set to obtain an IP address automatically ". - "via DHCP."; - &print_form; - exit; - }; - - ( $error = logout ( { - 'username' => $username, - 'portnum' => $portnum, - 'password' => $password, - } ) ) - ? &print_form() - : &print_okay(); - -} else { - $username = ''; - $password = ''; - $error = ''; - &print_form; -} - -sub print_form { - my $self_url = $cgi->self_url; - - print $cgi->header( '-expires' => 'now' ), <logout - -END - -print qq!Error: $error! if $error; - -print < - -Username
    -Password
    - - - - -END - -} - -sub print_okay { - print $cgi->header( '-expires' => 'now' ), <logout sucessful -logout successful, etc. - - -END -} - -sub usage { - die "Usage:\n\n freeside-logout username ( portnum | ip | nasnum nasport )"; -} diff --git a/fs_sesmon/FS-SessionClient/fs_sessiond b/fs_sesmon/FS-SessionClient/fs_sessiond deleted file mode 100644 index bfdb20a1d..000000000 --- a/fs_sesmon/FS-SessionClient/fs_sessiond +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_sessiond -# -# This is run REMOTELY over ssh by fs_session_server -# - -use strict; -use Socket; - -use vars qw( $Debug ); - -$Debug = 1; - -my $fs_sessiond_socket = "/usr/local/freeside/fs_sessiond_socket"; - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -$|=1; - -my $me = "[fs_sessiond]"; - -warn "$me starting\n" if $Debug; -#nothing to read from server - -warn "$me creating $fs_sessiond_socket\n" if $Debug; -my $uaddr = sockaddr_un($fs_sessiond_socket); -my $proto = getprotobyname('tcp'); -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($fs_sessiond_socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -warn "$me entering main loop\n" if $Debug; -my $paddr; -for ( ; $paddr = accept(Client,Server); close Client) { - - chomp( my $command = ); - - if ( $command eq 'login' || $command eq 'logout' || $command eq 'portnum' ) { - warn "$me reading data from local client\n" if $Debug; - my @data; - my $dos = 0; - push @data, scalar() until $dos++ == 99 || $data[$#data] eq "END\n"; - if ( $dos == 99 ) { - warn "$me WARNING: DoS attempt!" - } else { - warn "$me sending data to remote server\n" if $Debug; - print "$command\n", @data; - warn "$me reading result from remote server\n" if $Debug; - my $error = ; - warn "$me sending error to local client\n" if $Debug; - print Client $error; - } - } else { - warn "$me WARNING: unexpected command from client: $command"; - } - -} - diff --git a/fs_sesmon/FS-SessionClient/test.pl b/fs_sesmon/FS-SessionClient/test.pl deleted file mode 100644 index 4b9ae17e0..000000000 --- a/fs_sesmon/FS-SessionClient/test.pl +++ /dev/null @@ -1,21 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### We start with some black magic to print on failure. - -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) - -BEGIN { $| = 1; print "1..1\n"; } -END {print "not ok 1\n" unless $loaded;} -#use FS::SessionClient; -#sigh, "not running as the freeside user" -$loaded = 1; -print "ok 1\n"; - -######################### End of black magic. - -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - diff --git a/fs_sesmon/fs_session_server b/fs_sesmon/fs_session_server deleted file mode 100644 index 00229f8dc..000000000 --- a/fs_sesmon/fs_session_server +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_session_server -# - -use strict; -use vars qw( $opt $Debug ); -use IO::Handle; -use Net::SSH qw(sshopen2); -use FS::UID qw(adminsuidsetup dbh); -use FS::Record qw( qsearchs ); #qsearch ); -#use FS::cust_main_county; -#use FS::cust_main; -use FS::session; -use FS::port; -use FS::svc_acct; - -#require "configfile"; -$Debug = 1; - -my $user = shift or die &usage; -&adminsuidsetup( $user ); - -my $machine = shift or die &usage; - -my $fs_sessiond = "/usr/local/sbin/fs_sessiond"; - -my $me = "[fs_session_server]"; - -while (1) { - my($reader, $writer) = (new IO::Handle, new IO::Handle); - $writer->autoflush(1); - warn "$me Connecting to $machine\n" if $Debug; - sshopen2($machine,$reader,$writer,$fs_sessiond); - - warn "$me Entering main loop\n" if $Debug; - while (1) { - warn "$me Reading (waiting for) data\n" if $Debug; - my $command = scalar(<$reader>); - chomp $command; - #DoS protection here too, to protect against a compromised client? *sigh* - my %hash; - while ( ( my $key = scalar(<$reader>) ) ne "END\n" ) { - chomp $key; - chomp( $hash{$key} = scalar(<$reader>) ); - } - - if ( $command eq 'login' ) { - my $error = &login(\%hash); - print $writer "$error\n"; - } elsif ( $command eq 'logout' ) { - my $error = &logout(\%hash); - print $writer "$error\n"; - } elsif ( $command eq 'portnum' ) { - my $port; - if ( exists $hash{'ip'} ) { - $hash{'ip'} =~ /^([\d\.]+)$/ or $1='nomatch'; - $port = qsearchs('port', { 'ip' => $1 } ); - } else { - $hash{'nasnum'} =~ /^(\d+)$/ and my $nasnum = $1; - $hash{'nasport'} =~ /^(\d+)$/ and my $nasport = $1; - $port = qsearchs('port', { 'nasnum'=>$nasnum, 'nasport'=>$nasport } ); - } - print $writer ( $port ? $port->portnum : '' ), "\n"; - } else { - warn "$me WARNING: unrecognized command: $command"; - } - } - #won't ever reach without code above to throw out of loop, but... - close $writer; - close $reader; - warn "connection to $machine lost!\n"; - sleep 5; - warn "reconnecting...\n"; -} - -sub login { - my $href = shift; - $href->{'username'} =~ /^([a-z0-9_\-\.]+)$/ or return "Illegal username"; - my $username = $1; - my $svc_acct = qsearchs('svc_acct', { 'username' => $username } ) - or return "Unknown user"; - return "Incorrect password" - if exists($href->{'password'}) - && $href->{'password'} ne $svc_acct->_password; - return "Time limit exceeded" unless $svc_acct->seconds; - my $session = new FS::session { - 'portnum' => $href->{'portnum'}, - 'svcnum' => $svc_acct->svcnum, - 'login' => $href->{'login'}, - }; - $session->insert; -} - -sub logout { - my $href = shift; - $href->{'username'} =~ /^([a-z0-9_\-\.]+)$/ or return "Illegal username"; - my $username = $1; - local $FS::UID::AutoCommit = 0; - my $dbh = dbh; - my $svc_acct = - qsearchs('svc_acct', { 'username' => $username }, '', 'FOR UPDATE' ) - or return "Unknown user"; - return "Incorrect password" - if exists($href->{'password'}) - && $href->{'password'} ne $svc_acct->_password; - my $session = qsearchs( 'session', { - 'portnum' => $href->{'portnum'}, - 'svcnum' => $svc_acct->svcnum, - 'logout' => '', - }, - '', 'FOR UPDATE' - ); - unless ( $session ) { - $dbh->rollback; - return "No currently open sessions found for that user/port!"; - } - my $nsession = new FS::session ( { $session->hash } ); - warn "$nsession replacing $session"; - my $error = $nsession->replace($session); - if ( $error ) { - $dbh->rollback; - return "can't logout: $error"; - } - my $time = $nsession->logout - $nsession->login; - my $new_svc_acct = new FS::svc_acct ( { $svc_acct->hash } ); - my $seconds = $new_svc_acct->seconds; - $seconds -= $time; - $seconds = 0 if $seconds < 0; - $new_svc_acct->seconds( $seconds ); - $error = $new_svc_acct->replace( $svc_acct ); - warn "can't debit time: $error\n"; #don't want to rollback, though - $dbh->commit or die $dbh->errstr; - '' -} - -sub usage { - die "Usage:\n\n fs_session_server user machine\n"; -} - diff --git a/fs_signup/FS-SignupClient/Changes b/fs_signup/FS-SignupClient/Changes deleted file mode 100644 index e750a82bc..000000000 --- a/fs_signup/FS-SignupClient/Changes +++ /dev/null @@ -1,5 +0,0 @@ -Revision history for Perl extension FS::SignupClient. - -0.01 Mon Aug 23 01:12:46 1999 - - original version; created by h2xs 1.19 - diff --git a/fs_signup/FS-SignupClient/MANIFEST b/fs_signup/FS-SignupClient/MANIFEST deleted file mode 100644 index b4a9900c8..000000000 --- a/fs_signup/FS-SignupClient/MANIFEST +++ /dev/null @@ -1,8 +0,0 @@ -Changes -MANIFEST -MANIFEST.SKIP -Makefile.PL -SignupClient.pm -test.pl -fs_signupd -cgi/signup.cgi diff --git a/fs_signup/FS-SignupClient/MANIFEST.SKIP b/fs_signup/FS-SignupClient/MANIFEST.SKIP deleted file mode 100644 index ae335e78a..000000000 --- a/fs_signup/FS-SignupClient/MANIFEST.SKIP +++ /dev/null @@ -1 +0,0 @@ -CVS/ diff --git a/fs_signup/FS-SignupClient/Makefile.PL b/fs_signup/FS-SignupClient/Makefile.PL deleted file mode 100644 index e74051947..000000000 --- a/fs_signup/FS-SignupClient/Makefile.PL +++ /dev/null @@ -1,18 +0,0 @@ -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - 'NAME' => 'FS::SignupClient', - 'VERSION_FROM' => 'SignupClient.pm', # finds $VERSION - 'EXE_FILES' => [ 'fs_signupd' ], - 'INSTALLSCRIPT' => '/usr/local/sbin', - 'INSTALLSITEBIN' => '/usr/local/sbin', - 'PERM_RWX' => '750', - 'PREREQ_PM' => { - 'Business::CreditCard' => 0, - 'HTTP::BrowserDetect' => 0, - 'HTTP::Headers::UserAgent' => 3, - 'Storable' => 0, - 'Text::Template' => 0, - }, -); diff --git a/fs_signup/FS-SignupClient/SignupClient.pm b/fs_signup/FS-SignupClient/SignupClient.pm deleted file mode 100644 index 0a6cbfba2..000000000 --- a/fs_signup/FS-SignupClient/SignupClient.pm +++ /dev/null @@ -1,187 +0,0 @@ -package FS::SignupClient; - -use strict; -use vars qw($VERSION @ISA @EXPORT_OK $fs_signupd_socket); -use Exporter; -use Socket; -use FileHandle; -use IO::Handle; -use Storable qw(nstore_fd fd_retrieve); - -$VERSION = '0.03'; - -@ISA = qw( Exporter ); -@EXPORT_OK = qw( signup_info new_customer ); - -$fs_signupd_socket = "/usr/local/freeside/fs_signupd_socket"; - -$ENV{'PATH'} ='/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -my $freeside_uid = scalar(getpwnam('freeside')); -die "not running as the freeside user\n" if $> != $freeside_uid; - -=head1 NAME - -FS::SignupClient - Freeside signup client API - -=head1 SYNOPSIS - - use FS::SignupClient qw( signup_info new_customer ); - - ( $locales, $packages, $pops ) = signup_info; - - $error = new_customer ( { - 'first' => $first, - 'last' => $last, - 'ss' => $ss, - 'comapny' => $company, - 'address1' => $address1, - 'address2' => $address2, - 'city' => $city, - 'county' => $county, - 'state' => $state, - 'zip' => $zip, - 'country' => $country, - 'daytime' => $daytime, - 'night' => $night, - 'fax' => $fax, - 'payby' => $payby, - 'payinfo' => $payinfo, - 'paydate' => $paydate, - 'payname' => $payname, - 'invoicing_list' => $invoicing_list, - 'referral_custnum' => $referral_custnum, - 'pkgpart' => $pkgpart, - 'username' => $username, - '_password' => $password, - 'sec_phrase' => $sec_phrase, - 'popnum' => $popnum, - 'agentnum' => $agentnum, #optional - } ); - -=head1 DESCRIPTION - -This module provides an API for a remote signup server. - -It needs to be run as the freeside user. Because of this, the program which -calls these subroutines should be written very carefully. - -=head1 SUBROUTINES - -=over 4 - -=item signup_info - -Returns three array references of hash references. - -The first set of hash references is of allowable locales. Each hash reference -has the following keys: - taxnum - state - county - country - -The second set of hash references is of allowable packages. Each hash -reference has the following keys: - pkgpart - pkg - -The third set of hash references is of allowable POPs (Points Of Presence). -Each hash reference has the following keys: - popnum - city - state - ac - exch - -(Future expansion: fourth argument is the $init_data hash reference) - -=cut - -sub signup_info { - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_signupd_socket)) or die "connect: $!"; - print SOCK "signup_info\n"; - SOCK->flush; - - my $init_data = fd_retrieve(\*SOCK); - close SOCK; - - (map { $init_data->{$_} } qw( cust_main_county part_pkg svc_acct_pop ) ), - $init_data; - -} - -=item new_customer HASHREF - -Adds a customer to the remote Freeside system. Requires a hash reference as -a paramater with the following keys: - first - last - ss - comapny - address1 - address2 - city - county - state - zip - country - daytime - night - fax - payby - payinfo - paydate - payname - invoicing_list - referral_custnum - pkgpart - username - _password - sec_phrase - popnum - -Returns a scalar error message, or the empty string for success. - -=cut - -sub new_customer { - my $hashref = shift; - - socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!"; - connect(SOCK, sockaddr_un($fs_signupd_socket)) or die "connect: $!"; - print SOCK "new_customer\n"; - - my $signup_data = { map { $_ => $hashref->{$_} } qw( - first last ss company address1 address2 city county state zip country - daytime night fax payby payinfo paydate payname invoicing_list - referral_custnum pkgpart username _password sec_phrase popnum - ) }; - - $signup_data->{agentnum} = $hashref->{agentnum} if $hashref->{agentnum}; - - nstore_fd($signup_data, \*SOCK) or die "can't send customer signup: $!"; - SOCK->flush; - - chop( my $error = ); - $error; -} - -=back - -=head1 BUGS - -=head1 SEE ALSO - -L, L - -=cut - -1; - diff --git a/fs_signup/FS-SignupClient/cgi/decline.html b/fs_signup/FS-SignupClient/cgi/decline.html deleted file mode 100644 index a37ba3ab6..000000000 --- a/fs_signup/FS-SignupClient/cgi/decline.html +++ /dev/null @@ -1,5 +0,0 @@ -Processing error -Processing error

    -There has been an error processing your account. Please contact customer -support. - diff --git a/fs_signup/FS-SignupClient/cgi/signup-alternate.html b/fs_signup/FS-SignupClient/cgi/signup-alternate.html deleted file mode 100755 index 490cefa5e..000000000 --- a/fs_signup/FS-SignupClient/cgi/signup-alternate.html +++ /dev/null @@ -1,218 +0,0 @@ -ISP Signup form -ISP Signup form

    -<%= $error %> -
    - - - - -Contact Information - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    *Contact name
    (last, first)
    , -
    Company
    *Address
     
    *City*State/Country*Zip
    Day Phone
    Night Phone
    Fax
    * required fields
    - -

    - - - - - - - - - - - - - - -<%= if ( $init_data->{'security_phrase'} ) { - < - - - -ENDOUT - } else { - ''; - } -%> - -<%= if ( scalar(@$pops) ) { - ''; - } else { - popselector($popnum); - } -%> - -
    *Username
    *Password
    *Re-enter Password
    Security Phrase -
    Access number'. - popselector($popnum). '
    * required fields - -

    First package - - <%= use Tie::IxHash; - my %pkgpart2payby = map { $_->{pkgpart} => $_->{payby}[0] } @{$packages}; - tie my %options, 'Tie::IxHash', - '' => '(none)', - map { $_->{pkgpart} => $_->{pkg} } - sort { $a->{recur} <=> $b->{recur} } - @{$packages} - ; - - use HTML::Widgets::SelectLayers 0.02; - my @form_text = qw( magic ref ss agentnum - last first company address1 address2 - city zip daytime night fax - username _password _password2 sec_phrase ); - my @form_select = qw( state ); #county country - if ( scalar(@$pops) == 0 or scalar(@$pops) == 1 ) { - push @form_text, 'popnum', - } else { - push @form_select, 'popnum', - } - my $widget = new HTML::Widgets::SelectLayers( - options => \%options, - selected_layer => $pkgpart, - form_name => 'dummy', - form_action => $self_url, - form_text => \@form_text, - form_select => \@form_select, - layer_callback => sub { - my $layer = shift; - my $html = qq( ); - - if ( $pkgpart2payby{$layer} eq 'BILL' ) { - $html .= < - - - - - -

    -ENDOUT - } elsif ( $pkgpart2payby{$layer} eq 'CARD' ) { - my $postal_checked = ''; - my @invoicing_list = split(', ', $invoicing_list ); - $postal_checked = 'CHECKED' - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; - - $invoicing_list= join(', ', grep { $_ ne 'POST' } @invoicing_list ); - - my $expselect = expselect("CARD", $paydate); - - my $cardselect = ''; - - $html .= < -

    Billing information - - - - - - - - - - - - - - - - - - - - - - -
    Email statement to
    *Credit card type$cardselect
    *Card number
    **Exp$expselect
    *Name on card
    -* required fields -

    -ENDOUT - } else { - $html = <Please select a package.
    -ENDOUT - - } - - $html; - - }, - ); - - $widget->html; - - - %> - diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi deleted file mode 100755 index 08d8a4d45..000000000 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ /dev/null @@ -1,656 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: signup.cgi,v 1.29 2002-05-30 22:45:20 ivan Exp $ - -use strict; -use vars qw( @payby $cgi $locales $packages $pops $init_data $error - $last $first $ss $company $address1 $address2 $city $state $county - $country $zip $daytime $night $fax $invoicing_list $payby $payinfo - $paydate $payname $referral_custnum - $pkgpart $username $password $password2 $sec_phrase $popnum - $agentnum - $ieak_file $ieak_template $cck_file $cck_template - $signup_html $signup_template - $success_html $success_template - $decline_html $decline_template - $ac $exch $loc - $email_name $pkg - $self_url - ); -use subs qw( print_form print_okay print_decline - signup_default success_default decline_default - expselect ); -use CGI; -#use CGI::Carp qw(fatalsToBrowser); -use Text::Template; -use Business::CreditCard; -use HTTP::Headers::UserAgent 2.00; -use FS::SignupClient 0.03 qw( signup_info new_customer ); - -#acceptable payment methods -# -#@payby = qw( CARD BILL COMP ); -#@payby = qw( CARD BILL ); -#@payby = qw( CARD ); -@payby = qw( CARD PREPAY ); - -$ieak_file = '/usr/local/freeside/ieak.template'; -$cck_file = '/usr/local/freeside/cck.template'; -$signup_html = -e 'signup.html' - ? 'signup.html' - : '/usr/local/freeside/signup.html'; -$success_html = -e 'success.html' - ? 'success.html' - : '/usr/local/freeside/success.html'; -$decline_html = -e 'decline.html' - ? 'decline.html' - : '/usr/local/freeside/decline.html'; - - -if ( -e $ieak_file ) { - my $ieak_txt = Text::Template::_load_text($ieak_file) - or die $Text::Template::ERROR; - $ieak_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $ieak_txt = $1; - $ieak_txt =~ s/\r//g; # don't double \r on old templates - $ieak_txt =~ s/\n/\r\n/g; - $ieak_template = new Text::Template ( TYPE => 'STRING', SOURCE => $ieak_txt ) - or die $Text::Template::ERROR; -} else { - $ieak_template = ''; -} - -if ( -e $cck_file ) { - my $cck_txt = Text::Template::_load_text($cck_file) - or die $Text::Template::ERROR; - $cck_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $cck_txt = $1; - $cck_template = new Text::Template ( TYPE => 'STRING', SOURCE => $cck_txt ) - or die $Text::Template::ERROR; -} else { - $cck_template = ''; -} - -$agentnum = ''; -if ( -e $signup_html ) { - my $signup_txt = Text::Template::_load_text($signup_html) - or die $Text::Template::ERROR; - $signup_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $signup_txt = $1; - $signup_template = new Text::Template ( TYPE => 'STRING', - SOURCE => $signup_txt, - DELIMITERS => [ '<%=', '%>' ] - ) - or die $Text::Template::ERROR; - if ( $signup_txt =~ - /<\s*INPUT TYPE="?hidden"?\s+NAME="?agentnum"?\s+VALUE="?(\d+)"?\s*>/si - ) { - $agentnum = $1; - } -} else { - $signup_template = new Text::Template ( TYPE => 'STRING', - SOURCE => &signup_default, - DELIMITERS => [ '<%=', '%>' ] - ) - or die $Text::Template::ERROR; -} - -if ( -e $success_html ) { - my $success_txt = Text::Template::_load_text($success_html) - or die $Text::Template::ERROR; - $success_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $success_txt = $1; - $success_template = new Text::Template ( TYPE => 'STRING', - SOURCE => $success_txt, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} else { - $success_template = new Text::Template ( TYPE => 'STRING', - SOURCE => &success_default, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} - -if ( -e $decline_html ) { - my $decline_txt = Text::Template::_load_text($decline_html) - or die $Text::Template::ERROR; - $decline_txt =~ /^(.*)$/s; #untaint the template source - it's trusted - $decline_txt = $1; - $decline_template = new Text::Template ( TYPE => 'STRING', - SOURCE => $decline_txt, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} else { - $decline_template = new Text::Template ( TYPE => 'STRING', - SOURCE => &decline_default, - DELIMITERS => [ '<%=', '%>' ], - ) - or die $Text::Template::ERROR; -} - - -( $locales, $packages, $pops, $init_data ) = signup_info(); -@payby = @{$init_data->{'payby'}} if @{$init_data->{'payby'}}; -$packages = $init_data->{agentnum2part_pkg}{$agentnum} if $agentnum; - -$cgi = new CGI; - -if ( defined $cgi->param('magic') ) { - if ( $cgi->param('magic') eq 'process' ) { - - $cgi->param('state') =~ /^(\w*)( \(([\w ]+)\))? ?\/ ?(\w+)$/ - or die "Oops, illegal \"state\" param: ". $cgi->param('state'); - $state = $1; - $county = $3 || ''; - $country = $4; - - $payby = $cgi->param('payby'); - $payinfo = $cgi->param( $payby. '_payinfo' ); - $paydate = - $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ); - $payname = $cgi->param( $payby. '_payname' ); - - if ( $invoicing_list = $cgi->param('invoicing_list') ) { - $invoicing_list .= ', POST' if $cgi->param('invoicing_list_POST'); - } else { - $invoicing_list = 'POST'; - } - - $error = ''; - - $last = $cgi->param('last'); - $first = $cgi->param('first'); - $ss = $cgi->param('ss'); - $company = $cgi->param('company'); - $address1 = $cgi->param('address1'); - $address2 = $cgi->param('address2'); - $city = $cgi->param('city'); - #$county, - #$state, - $zip = $cgi->param('zip'); - #$country, - $daytime = $cgi->param('daytime'); - $night = $cgi->param('night'); - $fax = $cgi->param('fax'); - #$payby, - #$payinfo, - #$paydate, - #$payname, - #$invoicing_list, - $referral_custnum = $cgi->param('ref'); - $pkgpart = $cgi->param('pkgpart'); - $username = $cgi->param('username'); - $sec_phrase = $cgi->param('sec_phrase'); - $password = $cgi->param('_password'); - $popnum = $cgi->param('popnum'); - #$agentnum, # = $cgi->param('agentnum'), - - if ( $cgi->param('_password') ne $cgi->param('_password2') ) { - $error = $init_data->{msgcat}{passwords_dont_match}; #msgcat - $password = ''; - $password2 = ''; - } else { - $password2 = $cgi->param('_password2'); - - if ( $payby eq 'CARD' && $cgi->param('CARD_type') ) { - $payinfo =~ s/\D//g; - - $payinfo =~ /^(\d{13,16})$/ - or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - $payinfo = $1; - validate($payinfo) - or $error ||= $init_data->{msgcat}{invalid_card}; #. $self->payinfo; - cardtype($payinfo) eq $cgi->param('CARD_type') - or $error ||= $init_data->{msgcat}{not_a}. $cgi->param('CARD_type'); - } - - $error ||= new_customer ( { - 'last' => $last, - 'first' => $first, - 'ss' => $ss, - 'company' => $company, - 'address1' => $address1, - 'address2' => $address2, - 'city' => $city, - 'county' => $county, - 'state' => $state, - 'zip' => $zip, - 'country' => $country, - 'daytime' => $daytime, - 'night' => $night, - 'fax' => $fax, - 'payby' => $payby, - 'payinfo' => $payinfo, - 'paydate' => $paydate, - 'payname' => $payname, - 'invoicing_list' => $invoicing_list, - 'referral_custnum' => $referral_custnum, - 'pkgpart' => $pkgpart, - 'username' => $username, - 'sec_phrase' => $sec_phrase, - '_password' => $password, - 'popnum' => $popnum, - 'agentnum' => $agentnum, - } ); - - } - - if ( $error eq '_decline' ) { - print_decline(); - } elsif ( $error ) { - print_form(); - } else { - print_okay(); - } - - } else { - die "unrecognized magic: ". $cgi->param('magic'); - } -} else { - $error = ''; - $last = ''; - $first = ''; - $ss = ''; - $company = ''; - $address1 = ''; - $address2 = ''; - $city = ''; - $state = ''; - $county = ''; - $country = ''; - $zip = ''; - $daytime = ''; - $night = ''; - $fax = ''; - $invoicing_list = ''; - $payby = ''; - $payinfo = ''; - $paydate = ''; - $payname = ''; - $pkgpart = ''; - $username = ''; - $password = ''; - $password2 = ''; - $sec_phrase = ''; - $popnum = ''; - $referral_custnum = $cgi->param('ref') || ''; - print_form; -} - -sub print_form { - - $cgi->delete('ref'); - $self_url = $cgi->self_url; - - $error = "Error: $error" if $error; - - print $cgi->header( '-expires' => 'now' ), - $signup_template->fill_in(); - -} - -sub print_decline { - print $cgi->header( '-expires' => 'now' ), - $decline_template->fill_in(); -} - -sub print_okay { - my $user_agent = new HTTP::Headers::UserAgent $ENV{HTTP_USER_AGENT}; - - $cgi->param('username') =~ /^(.+)$/ - or die "fatal: invalid username got past FS::SignupClient::new_customer"; - my $username = $1; - $cgi->param('_password') =~ /^(.+)$/ - or die "fatal: invalid password got past FS::SignupClient::new_customer"; - my $password = $1; - ( $cgi->param('first'). ' '. $cgi->param('last') ) =~ /^(.*)$/ - or die "fatal: invalid email_name got past FS::SignupClient::new_customer"; - $email_name = $1; #global for template - - my $pop = pop_info($cgi->param('popnum')); - #or die "fatal: invalid popnum got past FS::SignupClient::new_customer"; - if ( $pop ) { - ( $ac, $exch, $loc ) = ( $pop->{'ac'}, $pop->{'exch'}, $pop->{'loc'} ); - } else { - ( $ac, $exch, $loc ) = ( '', '', ''); #presumably you're not using them. - } - - #global for template - $pkg = ( grep { $_->{'pkgpart'} eq $pkgpart } @$packages )[0]->{'pkg'}; - - if ( $ieak_template - && $user_agent->platform eq 'ia32' - && $user_agent->os =~ /^win/ - && ($user_agent->browser)[0] eq 'IE' - ) - { #send an IEAK config - print $cgi->header('application/x-Internet-signup'), - $ieak_template->fill_in(); - } elsif ( $cck_template - && $user_agent->platform eq 'ia32' - && $user_agent->os =~ /^win/ - && ($user_agent->browser)[0] eq 'Netscape' - ) - { #send a Netscape config - my $cck_data = $cck_template->fill_in(); - print $cgi->header('application/x-netscape-autoconfigure-dialer-v2'), - map { - m/(.*)\s+(.*)$/; - pack("N", length($1)). $1. pack("N", length($2)). $2; - } split(/\n/, $cck_data); - - } else { #send a simple confirmation - print $cgi->header( '-expires' => 'now' ), - $success_template->fill_in(); - } -} - -sub pop_info { - my $popnum = shift; - my $pop; - foreach $pop ( @{$pops} ) { - if ( $pop->{'popnum'} == $popnum ) { return $pop; } - } - ''; -} - -#horrible false laziness with FS/FS/svc_acct_pop.pm::popselector -sub popselector { - my( $popnum, $state ) = @_; - - return '' unless @$pops; - return $pops->[0]{city}. ', '. $pops->[0]{state}. - ' ('. $pops->[0]{ac}. ')/'. $pops->[0]{exch}. - '' - if scalar(@$pops) == 1; - - my %pop = (); - push @{ $pop{$_->{state}} }, $_ foreach @$pops; - - my $text = < - function opt(what,href,text) { - var optionName = new Option(text, href, false, false) - var length = what.length; - what.options[length] = optionName; - } - - function popstate_changed(what) { - state = what.options[what.selectedIndex].text; - for (var i = what.form.popnum.length;i > 0;i--) - what.form.popnum.options[i] = null; - what.form.popnum.options[0] = new Option("", "", false, true); -END - - foreach my $popstate ( sort { $a cmp $b } keys %pop ) { - $text .= "\nif ( state == \"$popstate\" ) {\n"; - - foreach my $pop ( @{$pop{$popstate}}) { - my $o_popnum = $pop->{popnum}; - my $poptext = $pop->{city}. ', '. $pop->{state}. - ' ('. $pop->{ac}. ')/'. $pop->{exch}; - - $text .= "opt(what.form.popnum, \"$o_popnum\", \"$poptext\");\n" - } - $text .= "}\n"; - } - - $text .= "}\n\n"; - - $text .= - qq!'; #callback? return 3 html pieces? #''; - - $text .= qq!'; - - $text; -} - -sub expselect { - my $prefix = shift; - my $date = shift || ''; - my( $m, $y ) = ( 0, 0 ); - if ( $date =~ /^(\d{4})-(\d{2})-\d{2}$/ ) { #PostgreSQL date format - ( $m, $y ) = ( $2, $1 ); - } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) { - ( $m, $y ) = ( $1, $3 ); - } - my $return = qq!!; - for ( 2001 .. 2037 ) { - $return .= "Signup successful -Signup successful

    -Thanks for signing up! -

    -Signup information for <%= $email_name %>: -

    -Username: <%= $username %>
    -Password: <%= $password %>
    -Access number: (<%= $ac %>) / $exch - $local
    -Package: <%= $pkg %>
    - -END -} - -sub decline_default { #html to use if there is a decline - <<'END'; -Processing error -Processing error

    -There has been an error processing your account. Please contact customer -support. - -END -} - -sub signup_default { #html to use if you don't specify a template file - <<'END'; -ISP Signup form -ISP Signup form

    -<%= $error %> - - - - -Contact Information - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    *Contact name
    (last, first)
    , -
    Company
    *Address
     
    *City*State/Country*Zip
    Day Phone
    Night Phone
    Fax
    * required fields
    -
    Billing information - - -<%= scalar(@payby) > 1 ? '' : '' %> -
    - - <%= - $OUT .= ' - - Postal mail invoice -
    Email invoice -
    Billing type
    - - - - <%= - - my $cardselect = ''; - - my %payby = ( - 'CARD' => qq!Credit card
    *$cardselect
    *Exp !. expselect("CARD"). qq!
    *Name on card
    !, - 'BILL' => qq!Billing
    P.O.
    *Exp !. expselect("BILL", "12-2037"). qq!
    *Attention
    !, - 'COMP' => qq!Complimentary
    *Approved by
    *Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card
    *!, - ); - - my %paybychecked = ( - 'CARD' => qq!Credit card
    *$cardselect
    *Exp !. expselect("CARD", $paydate). qq!
    *Name on card
    !, - 'BILL' => qq!Billing
    P.O.
    *Exp !. expselect("BILL", $paydate). qq!
    *Attention
    !, - 'COMP' => qq!Complimentary
    *Approved by
    *Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card
    *!, - ); - - for (@payby) { - if ( scalar(@payby) == 1) { - $OUT .= '"; - } else { - $OUT .= qq!!; - } else { - $OUT .= qq!> $payby{$_}!; - } - - } - } - %> - -
    '. - qq!!. - "$paybychecked{$_} $paybychecked{$_}
    * required fields for each billing type -

    First package - - - - - - - - - - - - - - - - -<%= - if ( $init_data->{'security_phrase'} ) { - $OUT .= < - - - -ENDOUT - } else { - $OUT .= ''; - } -%> -<%= - if ( scalar(@$pops) ) { - $OUT .= ''; - } else { - $OUT .= popselector($popnum); - } -%> -
    Username
    Password
    Re-enter Password
    Security Phrase -
    Access number'. - popselector($popnum). '
    -

    - -END -} diff --git a/fs_signup/FS-SignupClient/cgi/signup.html b/fs_signup/FS-SignupClient/cgi/signup.html deleted file mode 100755 index 6c601410c..000000000 --- a/fs_signup/FS-SignupClient/cgi/signup.html +++ /dev/null @@ -1,180 +0,0 @@ -ISP Signup form -ISP Signup form

    -<%= $error %> -
    - - - -Contact Information - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    *Contact name
    (last, first)
    , -
    Company
    *Address
     
    *City*State/Country*Zip
    Day Phone
    Night Phone
    Fax
    * required fields
    -
    Billing information - - -<%= scalar(@payby) > 1 ? '' : '' %> -
    - - <%= - $OUT .= ' - - Postal mail invoice -
    Email invoice -
    Billing type
    - - - - <%= - - my $cardselect = ''; - - my %payby = ( - 'CARD' => qq!Credit card
    *$cardselect
    *Exp !. expselect("CARD"). qq!
    *Name on card
    !, - 'BILL' => qq!Billing
    P.O.
    *Exp !. expselect("BILL", "12-2037"). qq!
    *Attention
    !, - 'COMP' => qq!Complimentary
    *Approved by
    *Exp !. expselect("COMP"), - 'PREPAY' => qq!Prepaid card
    *!, - ); - - my %paybychecked = ( - 'CARD' => qq!Credit card
    *$cardselect
    *Exp !. expselect("CARD", $paydate). qq!
    *Name on card
    !, - 'BILL' => qq!Billing
    P.O.
    *Exp !. expselect("BILL", $paydate). qq!
    *Attention
    !, - 'COMP' => qq!Complimentary
    *Approved by
    *Exp !. expselect("COMP", $paydate), - 'PREPAY' => qq!Prepaid card
    *!, - ); - - for (@payby) { - if ( scalar(@payby) == 1) { - $OUT .= '"; - } else { - $OUT .= qq!!; - } else { - $OUT .= qq!> $payby{$_}!; - } - - } - } - %> - -
    '. - qq!!. - "$paybychecked{$_} $paybychecked{$_}
    * required fields for each billing type -

    First package - - - - - - - - - - - - - - - - -<%= - if ( $init_data->{'security_phrase'} ) { - $OUT .= < - - - -ENDOUT - } else { - $OUT .= ''; - } -%> -<%= - if ( scalar(@$pops) ) { - $OUT .= ''; - } else { - $OUT .= popselector($popnum); - } -%> -
    Username
    Password
    Re-enter Password
    Security Phrase -
    Access number'. - popselector($popnum). '
    -

    -
    diff --git a/fs_signup/FS-SignupClient/cgi/success.html b/fs_signup/FS-SignupClient/cgi/success.html deleted file mode 100644 index 397cc6c30..000000000 --- a/fs_signup/FS-SignupClient/cgi/success.html +++ /dev/null @@ -1,11 +0,0 @@ -Signup successful -Signup successful

    -Thanks for signing up! -

    -Signup information for <%= $email_name %>: -

    -Username: <%= $username %>
    -Password: <%= $password %>
    -Access number: (<%= $ac %>) / <%= $exch %> - <%= $local %>
    -Package: <%= $pkg %>
    - diff --git a/fs_signup/FS-SignupClient/fs_signupd b/fs_signup/FS-SignupClient/fs_signupd deleted file mode 100755 index 85bd68a2f..000000000 --- a/fs_signup/FS-SignupClient/fs_signupd +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_signupd -# -# This is run REMOTELY over ssh by fs_signup_server. - -use strict; -use Socket; -use Storable qw(nstore_fd fd_retrieve); -use IO::Handle; - -use vars qw( $Debug ); - -$Debug = 1; - -my $fs_signupd_socket = "/usr/local/freeside/fs_signupd_socket"; -my $pid_file = "$fs_signupd_socket.pid"; - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -$|=1; - -warn "[fs_signupd] Reading init data...\n" if $Debug; -my $init_data = fd_retrieve(\*STDIN); - -warn "[fs_signupd] Creating $fs_signupd_socket\n" if $Debug; -my $uaddr = sockaddr_un($fs_signupd_socket); -my $proto = getprotobyname('tcp'); -socket(Server,PF_UNIX,SOCK_STREAM,0) or die "socket: $!"; -unlink($fs_signupd_socket); -bind(Server, $uaddr) or die "bind: $!"; -listen(Server,SOMAXCONN) or die "listen: $!"; - -if ( -e $pid_file ) { - open(PIDFILE,"<$pid_file"); - #chomp( my $old_pid = ); - my $old_pid = ; - close PIDFILE; - $old_pid =~ /^(\d+)$/; - kill 'TERM', $1; -} -open(PIDFILE,">$pid_file"); -print PIDFILE "$$\n"; -close PIDFILE; - -warn "[fs_signupd] Entering main loop...\n" if $Debug; -my $paddr; -for ( ; $paddr = accept(Client,Server); close Client) { - - chop( my $command = ); - - if ( $command eq "signup_info" ) { - - warn "[fs_signupd] sending signup info...\n" if $Debug; - nstore_fd($init_data, \*Client) or die "can't send init data: $!"; - Client->flush; - - } elsif ( $command eq "new_customer" ) { - - #inefficient... - - warn "[fs_signupd] reading customer signup...\n" if $Debug; - my $signup_data = fd_retrieve(\*Client); - - warn "[fs_signupd] sending customer data to remote server...\n" if $Debug; - nstore_fd($signup_data, \*STDOUT) or die "can't send signup data: $!"; - STDOUT->flush; - - warn "[fs_signupd] reading error from remote server...\n" if $Debug; - my $error = ; - - warn "[fs_signupd] sending error to local client...\n" if $Debug; - print Client $error; - Client->flush; - - } else { - die "unexpected command from client: $command"; - } - -} - diff --git a/fs_signup/FS-SignupClient/test.pl b/fs_signup/FS-SignupClient/test.pl deleted file mode 100644 index b6136954d..000000000 --- a/fs_signup/FS-SignupClient/test.pl +++ /dev/null @@ -1,20 +0,0 @@ -# Before `make install' is performed this script should be runnable with -# `make test'. After `make install' it should work as `perl test.pl' - -######################### We start with some black magic to print on failure. - -# Change 1..1 below to 1..last_test_to_print . -# (It may become useful if the test is moved to ./t subdirectory.) - -BEGIN { $| = 1; print "1..1\n"; } -END {print "not ok 1\n" unless $loaded;} -#blah#use FS::SignupClient; -$loaded = 1; -print "ok 1\n"; - -######################### End of black magic. - -# Insert your test code below (better if it prints "ok 13" -# (correspondingly "not ok 13") depending on the success of chunk 13 -# of the test code): - diff --git a/fs_signup/cck.template b/fs_signup/cck.template deleted file mode 100644 index f1db554b1..000000000 --- a/fs_signup/cck.template +++ /dev/null @@ -1,14 +0,0 @@ -SITE_FILE 8chrfile -SITE_NAME YourISP -LOGIN { $username } -PASSWORD { $password } -PHONE_NUM +1({ $ac }){ $exch }-{ $loc } -DNS_ADDR 10.0.0.1 -DNS_ADDR2 10.0.0.2 -NNTP_HOST news.yourisp.com -SMTP_HOST mail.yourisp.com -DOMAIN_NAME yourisp.com -POP_SERVER { $username }@mail.yourisp.com -POP_PASSWORD { $password } -HOME_URL http://www.yourisp.com -EMAIL_ADDR { $username }@yourisp.com diff --git a/fs_signup/fs_signup_server b/fs_signup/fs_signup_server deleted file mode 100755 index 7f962e057..000000000 --- a/fs_signup/fs_signup_server +++ /dev/null @@ -1,269 +0,0 @@ -#!/usr/bin/perl -Tw -# -# fs_signup_server -# - -use strict; -use vars qw($pid); -use IO::Handle; -use Storable qw(nstore_fd fd_retrieve); -use Tie::RefHash; -use Net::SSH qw(sshopen2); -use FS::UID qw(adminsuidsetup); -use FS::Conf; -use FS::Record qw( qsearch qsearchs ); -use FS::cust_main_county; -use FS::cust_main; -use FS::Msgcat qw(gettext); - -use vars qw( $opt $Debug ); - -$Debug = 2; - -my $user = shift or die &usage; -&adminsuidsetup( $user ); - -my $conf = new FS::Conf; - -#my @payby = qw(CARD PREPAY); -my @payby = $conf->config('signup_server-payby'); -my $smtpmachine = $conf->config('smtpmachine'); - -my $machine = shift or die &usage; - -my $agentnum = shift or die &usage; -my $agent = qsearchs( 'agent', { 'agentnum' => $agentnum } ) or die &usage; -my $pkgpart_href = $agent->pkgpart_hashref; - -my $refnum = shift or die &usage; - -#causing trouble for some folks -#$SIG{CHLD} = sub { wait() }; - -$SIG{HUP} = \&killssh; -$SIG{INT} = \&killssh; -$SIG{QUIT} = \&killssh; -$SIG{TERM} = \&killssh; -$SIG{PIPE} = \&killssh; -sub killssh { kill 'TERM', $pid if $pid; exit; }; - -my($fs_signupd)="/usr/local/sbin/fs_signupd"; - -while (1) { - my($reader,$writer)=(new IO::Handle, new IO::Handle); - #seems to be broken - calling ->flush explicitly# $writer->autoflush(1); - warn "[fs_signup_server] Connecting to $machine...\n" if $Debug; - $pid = sshopen2($machine,$reader,$writer,$fs_signupd); - - my @pops = qsearch('svc_acct_pop',{} ); - my $init_data = { - - #'_protocol' => 'signup', - #'_version' => '0.1', - #'_packet' => 'init' - - 'cust_main_county' => - [ map { $_->hashref } qsearch('cust_main_county', {}) ], - - 'part_pkg' => - [ - #map { $_->hashref } - map { { 'payby' => [ $_->payby ], %{$_->hashref} } } - grep { $_->svcpart('svc_acct') && $pkgpart_href->{ $_->pkgpart } } - qsearch( 'part_pkg', { 'disabled' => '' } ) - ], - - 'agentnum2part_pkg' => - { - map { - my $href = $_->pkgpart_hashref; - $_->agentnum => - [ - map { { 'payby' => [ $_->payby ], %{$_->hashref} } } - grep { $_->svcpart('svc_acct') && $href->{ $_->pkgpart } } - qsearch( 'part_pkg', { 'disabled' => '' } ) - ]; - } qsearch('agent', {} ) - }, - - 'svc_acct_pop' => [ map { $_->hashref } @pops ], - - 'security_phrase' => $conf->exists('security_phrase'), - - 'payby' => [ $conf->config('signup_server-payby') ], - - 'msgcat' => { map { $_=>gettext($_) } qw( - passwords_dont_match invalid_card unknown_card_type not_a - ) } - - }; - - warn "[fs_signup_server] Sending init data...\n" if $Debug; - nstore_fd($init_data, $writer) or die "can't send init data: $!"; - $writer->flush; - - warn "[fs_signup_server] Entering main loop...\n" if $Debug; - while (1) { - warn "[fs_signup_server] Reading (waiting for) signup data...\n" if $Debug; - my $signup_data = fd_retrieve($reader); - - if ( $Debug > 1 ) { - warn join('', - map { " $_ => ". $signup_data->{$_}. "\n" } keys %$signup_data ); - } - - warn "[fs_signup_server] Processing signup...\n" if $Debug; - - my $error = ''; - - #things that aren't necessary in base class, but are for signup server - #return "Passwords don't match" - # if $hashref->{'_password'} ne $hashref->{'_password2'} - $error ||= gettext('empty_password') unless $signup_data->{'_password'}; - $error ||= gettext('no_access_number_selected') - unless $signup_data->{'popnum'} || !scalar(@pops); - - #shares some stuff with htdocs/edit/process/cust_main.cgi... take any - # common that are still here and library them. - my $cust_main = new FS::cust_main ( { - #'custnum' => '', - 'agentnum' => $signup_data->{agentnum} || $agentnum, - 'refnum' => $refnum, - - map { $_ => $signup_data->{$_} } qw( - last first ss company address1 address2 city county state zip country - daytime night fax payby payinfo paydate payname referral_custnum - ), - - } ); - - $error ||= "Illegal payment type" - unless grep { $_ eq $signup_data->{'payby'} } @payby; - - my @invoicing_list = split( /\s*\,\s*/, $signup_data->{'invoicing_list'} ); - - $signup_data->{'pkgpart'} =~ /^(\d+)$/ or '' =~ /^()$/; - my $pkgpart = $1; - - my $part_pkg = - qsearchs( 'part_pkg', { 'pkgpart' => $pkgpart } ) - or $error ||= "WARNING: unknown pkgpart: $pkgpart"; - my $svcpart = $part_pkg->svcpart unless $error; - - my $cust_pkg = new FS::cust_pkg ( { - #later#'custnum' => $custnum, - 'pkgpart' => $signup_data->{'pkgpart'}, - } ); - $error ||= $cust_pkg->check; - - my $svc_acct = new FS::svc_acct ( { - 'svcpart' => $svcpart, - map { $_ => $signup_data->{$_} } - qw( username _password sec_phrase popnum ), - } ); - - my $y = $svc_acct->setdefault; # arguably should be in new method - $error ||= $y unless ref($y); - - $error ||= $svc_acct->check; - - use Tie::RefHash; - tie my %hash, 'Tie::RefHash'; - %hash = ( $cust_pkg => [ $svc_acct ] ); - $error ||= $cust_main->insert( \%hash, \@invoicing_list ); #msgcat - - if ( ! $error && $conf->exists('signup_server-realtime') ) { - - warn "[fs_signup_server] Billing customer...\n" if $Debug; - - my $bill_error = $cust_main->bill; - warn "[fs_signup_server] error billing new customer: $bill_error" - if $bill_error; - - $cust_main->apply_payments; - $cust_main->apply_credits; - - $bill_error = $cust_main->collect; - warn "[fs_signup_server] error collecting from new customer: $bill_error" - if $bill_error; - - if ( $cust_main->balance > 0 ) { - #should check list for errors... - #$cust_main->suspend; - $cust_main->cancel; - $error = '_decline'; - } - } - - warn "[fs_signup_server] Sending results...\n" if $Debug; - print $writer $error, "\n"; - - next if $error; - - if ( $conf->config('signup_server-email') ) { - warn "[fs_signup_server] Sending email...\n" if $Debug; - - #false laziness w/FS::cust_bill::send & FS::cust_pay::delete - use Mail::Header; - use Mail::Internet 1.44; - use Date::Format; - my $from = $conf->config('invoice_from'); #??? as good as any - $ENV{MAILADDRESS} = $from; - my $header = new Mail::Header ( [ - "From: $from", - "To: ". $conf->config('signup_server-email'), - "Sender: $from", - "Reply-To: $from", - "Date: ". time2str("%a, %d %b %Y %X %z", time), - "Subject: FREESIDE NOTIFICATION: Signup Server", - ] ); - my $body = [ - "This is an automatic message from your Freeside installation\n", - "informing you a customer has signed up via the signup server:\n", - "\n", - 'custnum : '. $cust_main->custnum. "\n", - 'Name : '. $cust_main->last. ", ". $cust_main->first. "\n", - 'Agent : '. $cust_main->agent->agent. "\n", - 'Package : '. $part_pkg->pkg. ' - '. $part_pkg->comment. "\n", - 'Signup Date : '. time2str('%C', time). "\n", - 'Username : '. $svc_acct->username. "\n", - #'Password : '. # config file to turn this on if noment insists - 'Day phone : '. $cust_main->daytime. "\n", - 'Night phone : '. $cust_main->night. "\n", - 'Address : '. $cust_main->address1. "\n", - ( $cust_main->address2 - ? ' '. $cust_main->address2. "\n" - : '' ), - ' '. $cust_main->city. ', '. $cust_main->state. ' '. - $cust_main->zip. "\n", - ( $cust_main->country eq 'US' - ? '' - : ' '. $cust_main->country. "\n" ), - "\n", - ]; - #if ( $cust_main->balance > 0 ) { - # push @$body, - # "This customer has an outstanding balance and has been suspended.\n"; - #} - my $message = new Mail::Internet ( 'Header' => $header, 'Body' => $body ); - $!=0; - $message->smtpsend( Host => $smtpmachine ) - or $message->smtpsend( Host => $smtpmachine, Debug => 1 ) - or warn "[fs_signup_server] can't send email to ". - $conf->config('signup_server-email'). - " via server $smtpmachine with SMTP: $!"; - #end-of-send mail - } - - } - close $writer; - close $reader; - warn "connection to $machine lost! waiting 60 seconds...\n"; - sleep 60; - warn "reconnecting...\n"; -} - -sub usage { - die "Usage:\n\n fs_signup_server user machine agentnum refnum\n"; -} - diff --git a/fs_signup/ieak.template b/fs_signup/ieak.template deleted file mode 100755 index 52edaa951..000000000 --- a/fs_signup/ieak.template +++ /dev/null @@ -1,40 +0,0 @@ -[Entry] -Entry_Name = The Internet -[Phone] -Dial_As_Is=no -Phone_Number = { $exch. $loc } -Area_Code = { $ac } -Country_Code = 1 -Country_Id = 1 -[Server] -Type = PPP -SW_Compress = Yes -PW_Encrypt = Yes -Negotiate_TCP/IP = Yes -Disable_LCP = No -[TCP/IP] -Specify_IP_Address = No -Specity_Server_Address = No -IP_Header_Compress = Yes -Gateway_On_Remote = Yes -[User] -Name = { $username } -Password = { $password } -Display_Password = Yes -[Internet_Mail] -Email_Name = { $email_name } -Email_Address = { $username }\@domain.tld -POP_Server = mail.domain.tld -POP_Server_Port_Number = 110 -POP_Login_Name = { $username } -POP_Login_Password = { $password } -SMTP_Server = mail.domain.tld -SMTP_Server_Port_Number = 25 -Install_Mail = 1 -[Internet_News] -NNTP_Server = news.domain.tld -NNTP_Server_Port_Number = 119 -Logon_Required = No -Install_News = 1 -[Branding] -Window_Title = The Internet diff --git a/fs_webdemo/register.cgi b/fs_webdemo/register.cgi deleted file mode 100755 index 825582262..000000000 --- a/fs_webdemo/register.cgi +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/perl -Tw -# -# $Id: register.cgi,v 1.5 2000-03-03 18:22:42 ivan Exp $ - -use strict; -use vars qw( - $datasrc $user $pass $x - $cgi $username $email - $dbh $sth - ); - #$freeside_bin $freeside_test $freeside_conf - #@pw_set @saltset - #$user_pw $crypt_pw - #$header $msg -use CGI; -use CGI::Carp qw(fatalsToBrowser); -use DBI; -#use Mail::Internet; -#use Mail::Header; -#use Date::Format; - -$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -$ENV{'SHELL'} = '/bin/sh'; -$ENV{'IFS'} = " \t\n"; -$ENV{'CDPATH'} = ''; -$ENV{'ENV'} = ''; -$ENV{'BASH_ENV'} = ''; - -#$freeside_bin = '/home/freeside/bin/'; -#$freeside_test = '/home/freeside/test/'; -#$freeside_conf = '/usr/local/etc/freeside/'; - -$datasrc = 'DBI:mysql:http_auth'; -$user = "freeside"; -$pass = "maelcolm"; - -##my(@pw_set)= ( 'a'..'z', 'A'..'Z', '0'..'9', '(', ')', '#', '!', '.', ',' ); -##my(@pw_set)= ( 'a'..'z', 'A'..'Z', '0'..'9' ); -#@pw_set = ( 'a'..'z', '0'..'9' ); -#@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -### - -$cgi = new CGI; - -$username = $cgi->param('username'); -$username =~ /^\s*([a-z][\w]{0,15})\s*$/i - or &idiot("Illegal username. Please use 1-16 alphanumeric characters, and start your username with a letter."); -$username = lc($1); - -$email = $cgi->param('email'); -$email =~ /^([\w\-\.\+]+\@[\w\-\.]+)$/ - or &idiot("Illegal email address."); -$email = $1; - -### - -#$user_pw = join('',map($pw_set[ int(rand $#pw_set) ], (0..7) ) ); -#$crypt_pw = crypt($user_pw,$saltset[int(rand(64))].$saltset[int(rand(64))]); - -### - - local $SIG{HUP} = 'IGNORE'; - local $SIG{INT} = 'IGNORE'; - local $SIG{QUIT} = 'IGNORE'; - local $SIG{TERM} = 'IGNORE'; - local $SIG{TSTP} = 'IGNORE'; - local $SIG{PIPE} = 'IGNORE'; - -### - -$dbh = DBI->connect( $datasrc, $user, $pass, { - 'AutoCommit' => 'true', -} ) or die "DBI->connect error: $DBI::errstr\n"; -$x = $DBI::errstr; #silly; to avoid "used only once" warning - -$sth = $dbh->prepare("INSERT INTO mysql_auth VALUES (". join(", ", - $dbh->quote($username), -# $dbh->quote("X"), -# $dbh->quote($crypt_pw), - $dbh->quote($email), - $dbh->quote('freeside'), - $dbh->quote('unconfigured'), -). ")" ); - -$sth->execute or &idiot("Username in use: ". $sth->errstr); - -$dbh->disconnect or die $dbh->errstr; - -### - -$|=1; -print $cgi->header; -print < - - Freeside demo registration successful - - - - -
    -

    - Silicon Interactive Software Design -

    -
    freeside demo registration successful
    -
    -

    Your sample database has been setup. Your password and the URL for the - Freeside demo have been emailed to you. - - -END - -### - -sub idiot { - my($error)=@_; - print $cgi->header, < - - Registration error - - -

    -

    Registration error

    -
    -

    $error -

    Hit the Back button in your web browser, correct this mistake, - and submit the form again. - - -END - - exit; - -} diff --git a/fs_webdemo/register.html b/fs_webdemo/register.html deleted file mode 100644 index acf9cff7f..000000000 --- a/fs_webdemo/register.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - Freeside - Billing and account administration software for ISPs - - - - - -
    - - - - -
    freeside demo registration
    -
    -

    You will need to choose a username for access to the Freeside web demo. - -

    A password - and the URL for your demo will be emailed to you, so don't waste your - time with non-deliverable addresses. -We will not give your email address to any third party, - nor will we send you any unsolicited email (or in fact any email after the automatic registration). -

    -
    -Freeside username: 
    -
    -Email address:     
    -
    -
    -
    - - diff --git a/fs_webdemo/registerd b/fs_webdemo/registerd deleted file mode 100755 index 6314d0af2..000000000 --- a/fs_webdemo/registerd +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id: registerd,v 1.8 2000-03-03 12:27:54 ivan Exp $ - -use strict; -use vars qw( - $freeside_conf - $mysql_data - $datasrc $user $pass $x - $dbh $sth - @pw_set @saltset - $header $msg - ); - # $freeside_bin $freeside_test - # $cgi $username $name $email $user_pw $crypt_pw -#use CGI; -#use CGI::Carp qw(fatalsToBrowser); -use DBI; -use Mail::Internet; -use Mail::Header; -use Date::Format; - -#$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -#$ENV{'SHELL'} = '/bin/sh'; -#$ENV{'IFS'} = " \t\n"; -#$ENV{'CDPATH'} = ''; -#$ENV{'ENV'} = ''; -#$ENV{'BASH_ENV'} = ''; - -#$freeside_bin = '/home/freeside/bin/'; -#$freeside_test = '/home/freeside/test/'; -$freeside_conf = '/usr/local/etc/freeside/'; - -$mysql_data = "/var/lib/mysql"; - -$datasrc = 'DBI:mysql:http_auth'; -$user = "freeside"; -$pass = "maelcolm"; - -#my(@pw_set)= ( 'a'..'z', 'A'..'Z', '0'..'9', '(', ')', '#', '!', '.', ',' ); -#my(@pw_set)= ( 'a'..'z', 'A'..'Z', '0'..'9' ); -@pw_set = ( 'a'..'z', '0'..'9' ); -@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -#die "not running as system user freeside" -# unless $> == scalar(getpwnam('freeside')); -die "not running as root user" - unless $> == 0; - -$dbh = DBI->connect( $datasrc, $user, $pass, { - 'AutoCommit' => 'true', -} ) or die "DBI->connect error: $DBI::errstr\n"; -$x = $DBI::errstr; #silly; to avoid "used only once" warning - -while ( 1 ) { - - $SIG{HUP} = 'IGNORE'; - $SIG{INT} = 'IGNORE'; - $SIG{QUIT} = 'IGNORE'; - $SIG{TERM} = 'IGNORE'; - $SIG{TSTP} = 'IGNORE'; - $SIG{PIPE} = 'IGNORE'; - - $sth = $dbh->prepare("LOCK TABLES mysql_auth WRITE"); - $sth->execute or die $sth->errstr; - - $sth = $dbh->prepare( - 'SELECT * FROM mysql_auth WHERE status = "unconfigured"' - ); - $sth->execute or die $sth->errstr; - my $pending = $sth->fetchall_arrayref( {} ); - - $sth = $dbh->prepare( - 'UPDATE mysql_auth SET status = "locked" WHERE status = "unconfigured"' - ); - $sth->execute or die $sth->errstr; - - $sth = $dbh->prepare("UNLOCK TABLES"); - $sth->execute or die $sth->errstr; - - # - - foreach my $row ( @{$pending} ) { - - my $username = $row->{'username'}; - my $email = $row->{'passwd'}; - - system("/usr/bin/mysqladmin --user=$user --password=$pass ". - "create demo_$username >/dev/null"); - - system "cp -p $mysql_data/demo_template/* $mysql_data/demo_$username"; - - mkdir "${freeside_conf}conf.DBI:mysql:demo_$username", 0755; - system "cp -pr ${freeside_conf}conf.DBI:mysql:demo_template/* ". - "${freeside_conf}conf.DBI:mysql:demo_$username"; - - mkdir "${freeside_conf}counters.DBI:mysql:demo_$username", 0755; - system "cp -p ${freeside_conf}counters.DBI:mysql:demo_template/* ". - "${freeside_conf}counters.DBI:mysql:demo_$username"; - chown scalar(getpwnam('freeside')), scalar(getgrnam('freeside')), - "${freeside_conf}counters.DBI:mysql:demo_$username"; - - system "cp -p ${freeside_conf}dbdef.DBI:mysql:demo_template ". - "${freeside_conf}dbdef.DBI:mysql:demo_$username"; - - open(INVOICE_FROM, ">${freeside_conf}conf.DBI:mysql:demo_$username/invoice_from") - or die "Can\'t open ${freeside_conf}conf.DBI:mysql:demo_$username/invoice_from: $!"; - print INVOICE_FROM "$email\n"; - close INVOICE_FROM; - - open(LPR, ">${freeside_conf}conf.DBI:mysql:demo_$username/lpr") - or die "Can\'t open ${freeside_conf}conf.DBI:mysql:demo_$username/lpr: $!"; - print LPR "mail $email"; - close LPR; - - open(FROM, ">${freeside_conf}conf.DBI:mysql:demo_$username/registries/internic/from") - or die "Can\'t open ${freeside_conf}conf.DBI:mysql:demo_$username/registries/internic/from: $!"; - print FROM "$email\n"; - close FROM; - - open(TO, ">${freeside_conf}conf.DBI:mysql:demo_$username/registries/internic/to") - or die "Can\'t open ${freeside_conf}conf.DBI:mysql:demo_$username/registries/internic/to: $!"; - print TO "$email\n"; - close TO; - - open(SECRETS, ">${freeside_conf}secrets.demo_$username") - or die "Can\'t open ${freeside_conf}secrets.demo_$username: $!"; - chown scalar(getpwnam('freeside')), scalar(getgrnam('freeside')), - "${freeside_conf}secrets.demo_$username"; - chmod 0600, "${freeside_conf}secrets.demo_$username"; - print SECRETS "DBI:mysql:demo_$username\nfreeside\nmaelcolm\n"; - close SECRETS; - - open(MAPSECRETS, ">>${freeside_conf}mapsecrets") - or die "Can\'t open ${freeside_conf}mapsecrets: $!"; - print MAPSECRETS "$username secrets.demo_$username\n"; - close MAPSECRETS; - - my $user_pw = join('',map($pw_set[ int(rand $#pw_set) ], (0..7) ) ); - my $crypt_pw = - crypt($user_pw,$saltset[int(rand(64))].$saltset[int(rand(64))]); - - $sth = $dbh->prepare( - qq(UPDATE mysql_auth SET passwd = "$crypt_pw", status = "done" WHERE username = "$username") - ); - $sth->execute or die $sth->errstr; - - $ENV{SMTPHOSTS} = "localhost"; - $ENV{MAILADDRESS} = 'ivan-fsreg@sisd.com'; - $ENV{TZ} = "PST8PDT"; - $header = Mail::Header->new( [ - 'From: ivan-fsreg@sisd.com', - "To: $email", - 'Bcc: ivan-fsreg_bcc@sisd.com', - 'Sender: ivan-fsreg@sisd.com', - 'Reply-To: ivan-fsreg@sisd.com', - #'Date: '. time2str("%a, %d %b %Y %X %z", time ), - 'Date: '. time2str("%a, %d %b %Y %X ", time ). "-0800", - 'Subject: Freeside demo information', - ] ); - $msg = Mail::Internet->new( - 'Header' => $header, - 'Body' => [ - "Hello,\n", - "\n", - "Your sample Freeside database has been setup.\n", - "\n", - "Point your web browswer at http://freeside.sisd.com/ and use the following\n", - "authentication information:\n", - "\n", - "Username: $username\n", - "Password: $user_pw\n", - "\n", - "-- \n", - "ivan\n", - ] - ); - $msg->smtpsend or die "Can\'t send registration email!"; - - } - - $SIG{HUP} = 'DEFAULT'; - $SIG{INT} = 'DEFAULT'; - $SIG{QUIT} = 'DEFAULT'; - $SIG{TERM} = 'DEFAULT'; - $SIG{TSTP} = 'DEFAULT'; - $SIG{PIPE} = 'DEFAULT'; - - sleep 5; - -} - diff --git a/fs_webdemo/registerd.Pg b/fs_webdemo/registerd.Pg deleted file mode 100755 index f166846b7..000000000 --- a/fs_webdemo/registerd.Pg +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/perl -w -# -# $Id: registerd.Pg,v 1.11 2001-10-24 15:29:30 ivan Exp $ - -use strict; -use vars qw( - $freeside_conf - $mysql_data - $datasrc $user $pass $x - $dbh $sth - @pw_set @saltset - $header $msg - ); - # $freeside_bin $freeside_test - # $cgi $username $name $email $user_pw $crypt_pw -#use CGI; -#use CGI::Carp qw(fatalsToBrowser); -use DBI; -use Mail::Internet; -use Mail::Header; -use Date::Format; - -#$ENV{'PATH'} ='/usr/local/bin:/usr/bin:/usr/ucb:/bin'; -#$ENV{'SHELL'} = '/bin/sh'; -#$ENV{'IFS'} = " \t\n"; -#$ENV{'CDPATH'} = ''; -#$ENV{'ENV'} = ''; -#$ENV{'BASH_ENV'} = ''; - -#$freeside_bin = '/home/freeside/bin/'; -#$freeside_test = '/home/freeside/test/'; -$freeside_conf = '/usr/local/etc/freeside/'; - -#$mysql_data = "/var/lib/mysql"; - -$datasrc = 'DBI:mysql:http_auth'; -$user = "freeside"; -$pass = "maelcolm"; - -#my(@pw_set)= ( 'a'..'z', 'A'..'Z', '0'..'9', '(', ')', '#', '!', '.', ',' ); -#my(@pw_set)= ( 'a'..'z', 'A'..'Z', '0'..'9' ); -@pw_set = ( 'a'..'z', '0'..'9' ); -@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' ); - -#die "not running as system user freeside" -# unless $> == scalar(getpwnam('freeside')); -die "not running as root user" - unless $> == 0; - -$dbh = DBI->connect( $datasrc, $user, $pass, { - 'AutoCommit' => 'true', -} ) or die "DBI->connect error: $DBI::errstr\n"; -#$x = $DBI::errstr; #silly; to avoid "used only once" warning - -while ( 1 ) { - - $SIG{HUP} = 'IGNORE'; - $SIG{INT} = 'IGNORE'; - $SIG{QUIT} = 'IGNORE'; - $SIG{TERM} = 'IGNORE'; - $SIG{TSTP} = 'IGNORE'; - $SIG{PIPE} = 'IGNORE'; - - $sth = $dbh->prepare("LOCK TABLES mysql_auth WRITE"); - $sth->execute or die $sth->errstr; - - $sth = $dbh->prepare( - 'SELECT * FROM mysql_auth WHERE status = "unconfigured"' - ); - $sth->execute or die $sth->errstr; - my $pending = $sth->fetchall_arrayref( {} ); - - $sth = $dbh->prepare( - 'UPDATE mysql_auth SET status = "locked" WHERE status = "unconfigured"' - ); - $sth->execute or die $sth->errstr; - - $sth = $dbh->prepare("UNLOCK TABLES"); - $sth->execute or die $sth->errstr; - - # - - foreach my $row ( @{$pending} ) { - - my $username = $row->{'username'}; - my $email = $row->{'passwd'}; - - my $pdbh = DBI->connect( 'DBI:Pg:host=localhost;dbname=demo_template', 'freeside', 'maelcolm' ) - or do { &myerr("$username: ". $DBI::errstr); next; }; - - my $psth = $pdbh->prepare("CREATE DATABASE demo_$username") - or do { &myerr("$username: ". $pdbh->errstr); next; }; - $psth->execute() - or do { &myerr("$username: ". $psth->errstr); next; }; - - $pdbh->disconnect - or do { &myerr("fatal: $DBI::errstr"); die; }; - - open(PSQL,"|psql -U freeside demo_$username") - or do { &myerr("|psql -U freeside demo_$username: $!"); next; }; - open(PSQLDATA, ") { - print PSQL $_; - } - close PSQLDATA - or do { &myerr("/usr/local/etc/freeside/demo_template.Pg: $!"); next; }; - close PSQL - or do { &myerr("|psql -U freeside demo_$username: $!"); next; }; - - mkdir "${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username", 0755; - system "cp -pr ${freeside_conf}conf.DBI:Pg:host=localhost\\;dbname=demo_template/* ". - "${freeside_conf}conf.DBI:Pg:host=localhost\\;dbname=demo_$username"; - - mkdir "${freeside_conf}counters.DBI:Pg:host=localhost;dbname=demo_$username", 0755; - system "cp -p ${freeside_conf}counters.DBI:Pg:host=localhost\\;dbname=demo_template/* ". - "${freeside_conf}counters.DBI:Pg:host=localhost\\;dbname=demo_$username"; - chown scalar(getpwnam('freeside')), scalar(getgrnam('freeside')), - "${freeside_conf}counters.DBI:Pg:host=localhost;dbname=demo_$username"; - - system "cp -p ${freeside_conf}dbdef.DBI:Pg:host=localhost\\;dbname=demo_template ". - "${freeside_conf}dbdef.DBI:Pg:host=localhost\\;dbname=demo_$username"; - - open(INVOICE_FROM, ">${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/invoice_from") - or die "Can\'t open ${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/invoice_from: $!"; - print INVOICE_FROM "$email\n"; - close INVOICE_FROM; - - open(LPR, ">${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/lpr") - or die "Can\'t open ${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/lpr: $!"; - print LPR "mail $email"; - close LPR; - -# open(FROM, ">${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/registries/internic/from") -# or die "Can\'t open ${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/registries/internic/from: $!"; -# print FROM "$email\n"; -# close FROM; -# -# open(TO, ">${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/registries/internic/to") -# or die "Can\'t open ${freeside_conf}conf.DBI:Pg:host=localhost;dbname=demo_$username/registries/internic/to: $!"; -# print TO "$email\n"; -# close TO; - - open(SECRETS, ">${freeside_conf}secrets.demo_$username") - or die "Can\'t open ${freeside_conf}secrets.demo_$username: $!"; - chown scalar(getpwnam('freeside')), scalar(getgrnam('freeside')), - "${freeside_conf}secrets.demo_$username"; - chmod 0600, "${freeside_conf}secrets.demo_$username"; - print SECRETS "DBI:Pg:host=localhost;dbname=demo_$username\nfreeside\nmaelcolm\n"; - close SECRETS; - - open(MAPSECRETS, ">>${freeside_conf}mapsecrets") - or die "Can\'t open ${freeside_conf}mapsecrets: $!"; - print MAPSECRETS "$username secrets.demo_$username\n"; - close MAPSECRETS; - - my $user_pw = join('',map($pw_set[ int(rand $#pw_set) ], (0..7) ) ); - my $crypt_pw = - crypt($user_pw,$saltset[int(rand(64))].$saltset[int(rand(64))]); - - $sth = $dbh->prepare( - qq(UPDATE mysql_auth SET passwd = "$crypt_pw", status = "done" WHERE username = "$username") - ); - $sth->execute or die $sth->errstr; - - #$ENV{SMTPHOSTS} = "localhost"; - $ENV{SMTPHOSTS} = "192.168.1.1"; - $ENV{MAILADDRESS} = 'ivan-fsreg@sisd.com'; - $ENV{TZ} = "PST8PDT"; - $header = Mail::Header->new( [ - 'From: ivan-fsreg@sisd.com', - "To: $email", - 'Bcc: ivan-fsreg_bcc@sisd.com', - 'Sender: ivan-fsreg@sisd.com', - 'Reply-To: ivan-fsreg@sisd.com', - #'Date: '. time2str("%a, %d %b %Y %X %z", time ), - 'Date: '. time2str("%a, %d %b %Y %X ", time ). "-0800", - 'Subject: Freeside demo information', - ] ); - $msg = Mail::Internet->new( - 'Header' => $header, - 'Body' => [ - "Hello,\n", - "\n", - "Your sample Freeside database has been setup.\n", - "\n", - "Your login and database will be automatically deleted in 1-2 months.\n", - "\n", - "Point your web browswer at http://freeside.sisd.com/ and use the following\n", - "authentication information:\n", - "\n", - "Username: $username\n", - "Password: $user_pw\n", - "\n", - "-- \n", - "ivan\n", - ] - ); - $msg->smtpsend or die "Can\'t send registration email!"; - - } - - $SIG{HUP} = 'DEFAULT'; - $SIG{INT} = 'DEFAULT'; - $SIG{QUIT} = 'DEFAULT'; - $SIG{TERM} = 'DEFAULT'; - $SIG{TSTP} = 'DEFAULT'; - $SIG{PIPE} = 'DEFAULT'; - - sleep 5; - -} - -sub myerr { - my $msg = shift; - open(MAIL,"|mail ivan-fsdemoerr\@420.am"); - print MAIL $msg, "\n\n"; - print MAIL $msg, "\n\n"; - close MAIL; -}; - diff --git a/htetc/global.asa b/htetc/global.asa deleted file mode 100644 index d04a5edbf..000000000 --- a/htetc/global.asa +++ /dev/null @@ -1,83 +0,0 @@ -use strict; -use vars qw( $cgi $p ); -use CGI; -#use CGI::Carp qw(fatalsToBrowser); -use Date::Format; -use Date::Parse; -use Tie::IxHash; -use HTML::Entities; -use IO::Handle; -use IO::File; -use String::Approx qw(amatch); -use HTML::Widgets::SelectLayers 0.02; -use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name); -use FS::Record qw(qsearch qsearchs fields dbdef); -use FS::Conf; -use FS::CGI qw(header menubar popurl table itable ntable idiot eidiot - small_custview myexit); -use FS::Msgcat qw(gettext geterror); - -use FS::agent; -use FS::agent_type; -use FS::domain_record; -use FS::cust_bill; -use FS::cust_bill_pay; -use FS::cust_credit; -use FS::cust_credit_bill; -use FS::cust_main; -use FS::cust_main_county; -use FS::cust_pay; -use FS::cust_pkg; -use FS::cust_refund; -use FS::cust_svc; -use FS::nas; -use FS::part_bill_event; -use FS::part_pkg; -use FS::part_referral; -use FS::part_svc; -use FS::pkg_svc; -use FS::port; -use FS::queue qw(joblisting); -use FS::raddb; -use FS::session; -use FS::svc_acct; -use FS::svc_acct_pop qw(popselector); -use FS::svc_acct_sm; -use FS::svc_domain; -use FS::svc_forward; -use FS::svc_www; -use FS::type_pkgs; -use FS::part_export; -use FS::part_export_option; -use FS::export_svc; -use FS::msgcat; - -sub Script_OnStart { - $Response->AddHeader('Pragma' => 'no-cache'); - $Response->AddHeader('Cache-control' => 'no-cache'); -# $Response->AddHeader('Expires' => 0); - $Response->{Expires} = -36288000; - - $cgi = new CGI; - &cgisuidsetup($cgi); - $p = popurl(2); - #print $cgi->header( '-expires' => 'now' ); -} - -sub Script_OnFlush { - my $ref = $Response->{BinaryRef}; - $$ref = $cgi->header( @FS::CGI::header ) . $$ref; - if ( dbh->can('sprintProfile') ) { - - $$ref =~ s/<\/BODY>[\s\n]*<\/HTML>[\s\n]*$//i - or warn "can't remove"; - - #$$ref .= '
    '. ("\n"x96). encode_entities(dbh->sprintProfile()). '
    '; - # wtf? konqueror... - $$ref .= '
    '. ("\n"x4096). encode_entities(dbh->sprintProfile()). '
    '; - - $$ref .= ''; - - dbh->{'private_profile'} = {}; - } -} diff --git a/htetc/handler.pl b/htetc/handler.pl deleted file mode 100644 index 49bcbc08c..000000000 --- a/htetc/handler.pl +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/perl -# -# This is a basic, fairly fuctional Mason handler.pl. -# -# For something a little more involved, check out session_handler.pl - -package HTML::Mason; - -# Bring in main Mason package. -use HTML::Mason; - -# Bring in ApacheHandler, necessary for mod_perl integration. -# Uncomment the second line (and comment the first) to use -# Apache::Request instead of CGI.pm to parse arguments. -use HTML::Mason::ApacheHandler; -# use HTML::Mason::ApacheHandler (args_method=>'mod_perl'); - -# Uncomment the next line if you plan to use the Mason previewer. -#use HTML::Mason::Preview; - -use strict; - -# List of modules that you want to use from components (see Admin -# manual for details) -#{ package HTML::Mason::Commands; -# use CGI; -#} - -# Create Mason objects -# -my $parser = new HTML::Mason::Parser; -my $interp = new HTML::Mason::Interp (parser=>$parser, - comp_root=>'/var/www/masondocs', - data_dir=>'/home/ivan/freeside_current/masondata', - out_mode=>'stream', - ); -my $ah = new HTML::Mason::ApacheHandler ( interp => $interp, - #auto_send_headers => 0, - ); - -# Activate the following if running httpd as root (the normal case). -# Resets ownership of all files created by Mason at startup. -# -chown (Apache->server->uid, Apache->server->gid, $interp->files_written); - -sub handler -{ - my ($r) = @_; - - # If you plan to intermix images in the same directory as - # components, activate the following to prevent Mason from - # evaluating image files as components. - # - #return -1 if $r->content_type && $r->content_type !~ m|^text/|i; - - #rar - { package HTML::Mason::Commands; - use strict; - use vars qw( $cgi $p ); - use CGI; - #use CGI::Carp qw(fatalsToBrowser); - use Date::Format; - use Date::Parse; - use Tie::IxHash; - use HTML::Entities; - use IO::Handle; - use IO::File; - use String::Approx qw(amatch); - use HTML::Widgets::SelectLayers 0.02; - use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name); - use FS::Record qw(qsearch qsearchs fields dbdef); - use FS::Conf; - use FS::CGI qw(header menubar popurl table itable ntable idiot eidiot - small_custview myexit); - use FS::Msgcat qw(gettext geterror); - - use FS::agent; - use FS::agent_type; - use FS::domain_record; - use FS::cust_bill; - use FS::cust_bill_pay; - use FS::cust_credit; - use FS::cust_credit_bill; - use FS::cust_main; - use FS::cust_main_county; - use FS::cust_pay; - use FS::cust_pkg; - use FS::cust_refund; - use FS::cust_svc; - use FS::nas; - use FS::part_bill_event; - use FS::part_pkg; - use FS::part_referral; - use FS::part_svc; - use FS::pkg_svc; - use FS::port; - use FS::queue qw(joblisting); - use FS::raddb; - use FS::session; - use FS::svc_acct; - use FS::svc_acct_pop qw(popselector); - use FS::svc_acct_sm; - use FS::svc_domain; - use FS::svc_forward; - use FS::svc_www; - use FS::type_pkgs; - use FS::part_export; - use FS::part_export_option; - use FS::export_svc; - use FS::msgcat; - - *CGI::redirect = sub { - my( $self, $location ) = @_; - - #http://www.masonhq.com/docs/faq/#how_do_i_do_an_external_redirect - $m->clear_buffer; - # The next two lines are necessary to stop Apache from re-reading - # POSTed data. - $r->method('GET'); - $r->headers_in->unset('Content-length'); - $r->content_type('text/html'); - #$r->err_header_out('Location' => $location); - $r->header_out('Location' => $location); - $r->header_out('Content-Type' => 'text/html'); - $m->abort(302); - - ''; - }; - - $cgi = new CGI; - &cgisuidsetup($cgi); - #&cgisuidsetup($r); - $p = popurl(2); - } - - $r->content_type('text/html'); - #eorar - - my $headers = $r->headers_out; - $headers->{'Pragma'} = $headers->{'Cache-control'} = 'no-cache'; - #$r->no_cache(1); - $headers->{'Expires'} = '0'; - -# $r->send_http_header; - - my $status = $ah->handle_request($r); - - $status; -} - -1; diff --git a/httemplate/.htaccess b/httemplate/.htaccess deleted file mode 100755 index f8c6b9c0c..000000000 --- a/httemplate/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ -AuthName Freeside -AuthType Basic -require valid-user diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi deleted file mode 100755 index cff111ca4..000000000 --- a/httemplate/browse/agent.cgi +++ /dev/null @@ -1,63 +0,0 @@ - -<% -#Begin silliness -# -#use FS::UI::CGI; -#use FS::UI::agent; -# -#$ui = new FS::UI::agent; -#$ui->browse; -#exit; -#__END__ -#End silliness -%> - -<%= header('Agent Listing', menubar( - 'Main Menu' => $p, - 'Agent Types' => $p. 'browse/agent_type.cgi', -# 'Add new agent' => '../edit/agent.cgi' -)) %> -Agents are resellers of your service. Agents may be limited to a subset of your -full offerings (via their type).

    -Add a new agent

    - -<%= table() %> - - Agent - Type - Freq. - Prog. - -<% -# Agent # -# Agent - -foreach my $agent ( sort { - #$a->getfield('agentnum') <=> $b->getfield('agentnum') - $a->getfield('agent') cmp $b->getfield('agent') -} qsearch('agent',{}) ) { - my($hashref)=$agent->hashref; - my($typenum)=$hashref->{typenum}; - my($agent_type)=qsearchs('agent_type',{'typenum'=>$typenum}); - my($atype)=$agent_type->getfield('atype'); - print < - - $hashref->{agentnum} - - $hashref->{agent} - $atype - $hashref->{freq} - $hashref->{prog} - -END - -} - -print < - - -END - -%> diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi deleted file mode 100755 index 5a8438589..000000000 --- a/httemplate/browse/agent_type.cgi +++ /dev/null @@ -1,58 +0,0 @@ - -<%= header("Agent Type Listing", menubar( - 'Main Menu' => $p, - 'Agents' => $p. 'browse/agent.cgi', -)) %> -Agent types define groups of packages that you can then assign to particular -agents.

    -Add a new agent type

    - -<%= table() %> - - Agent Type - Packages - - -<% -foreach my $agent_type ( sort { - $a->getfield('typenum') <=> $b->getfield('typenum') -} qsearch('agent_type',{}) ) { - my($hashref)=$agent_type->hashref; - my(@type_pkgs)=qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} }); - my($rowspan)=scalar(@type_pkgs); - $rowspan = int($rowspan/2+0.5) ; - print < - - $hashref->{typenum} - - $hashref->{atype} -END - - my($type_pkgs); - my($tdcount) = -1 ; - foreach $type_pkgs ( @type_pkgs ) { - my($pkgpart)=$type_pkgs->getfield('pkgpart'); - my($part_pkg) = qsearchs('part_pkg',{'pkgpart'=> $pkgpart }); - print qq!! if ($tdcount == 0) ; - $tdcount = 0 if ($tdcount == -1) ; - print qq!!, - $part_pkg->getfield('pkg'),""; - $tdcount ++ ; - if ($tdcount == 2) - { - print qq!\n! ; - $tdcount = 0 ; - } - } - - print ""; -} - -print < - - -END - -%> diff --git a/httemplate/browse/cust_main_county.cgi b/httemplate/browse/cust_main_county.cgi deleted file mode 100755 index 991606087..000000000 --- a/httemplate/browse/cust_main_county.cgi +++ /dev/null @@ -1,127 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $enable_taxclasses = $conf->exists('enable_taxclasses'); - -print header("Tax Rate Listing", menubar( - 'Main Menu' => $p, - 'Edit tax rates' => $p. "edit/cust_main_county.cgi", -)),<expand country to specify a country's tax rates by state. -
    Click on expand state to specify a state's tax rates by county. -END - -if ( $enable_taxclasses ) { - print '
    Click on expand taxclasses to specify tax classes'; -} - -print '

    '. &table(). < - Country - State - County - Taxclass - Tax - Exempt
    per
    month - -END - -my @regions = sort { $a->country cmp $b->country - or $a->state cmp $b->state - or $a->county cmp $b->county - or $a->taxclass cmp $b->taxclass - } qsearch('cust_main_county',{}); - -my $sup=0; -#foreach $cust_main_county ( @regions ) { -for ( my $i=0; $i<@regions; $i++ ) { - my $cust_main_county = $regions[$i]; - my $hashref = $cust_main_county->hashref; - print < - $hashref->{country} -END - - my $j; - if ( $sup ) { - $sup--; - } else { - - #lookahead - for ( $j=1; $i+$j<@regions; $j++ ) { - last if $hashref->{country} ne $regions[$i+$j]->country - || $hashref->{state} ne $regions[$i+$j]->state - || $hashref->{tax} != $regions[$i+$j]->tax - || $hashref->{exempt_amount} != $regions[$i+$j]->exempt_amount; - } - - my $newsup=0; - if ( $j>1 && $i+$j+1 < @regions - && ( $hashref->{state} ne $regions[$i+$j+1]->state - || $hashref->{country} ne $regions[$i+$j+1]->country - ) - && ( ! $i - || $hashref->{state} ne $regions[$i-1]->state - || $hashref->{country} ne $regions[$i-1]->country - ) - ) { - $sup = $j-1; - } else { - $j = 1; - } - - print "{state} - ? ' BGCOLOR="#ffffff">'. $hashref->{state} - : qq! BGCOLOR="#cccccc">(ALL) !. - qq!expand country!; - - print qq! collapse state! if $j>1; - - print ""; - } - -# $sup=$newsup; - - print "{county} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{county}; - } else { - print ' BGCOLOR="#cccccc">(ALL)'; - if ( $hashref->{state} ) { - print qq!!. - qq!expand state!; - } - } - print ""; - - print "{taxclass} ) { - print ' BGCOLOR="#ffffff">'. $hashref->{taxclass}; - } else { - print ' BGCOLOR="#cccccc">(ALL)'; - if ( $enable_taxclasses ) { - print qq!!. - qq!expand taxclasses!; - } - - } - print ""; - - print "$hashref->{tax}%". - '$'. - sprintf("%.2f", $hashref->{exempt_amount} || 0). ''. - ''; - -} - -print < - - -END - -%> diff --git a/httemplate/browse/cust_pay_batch.cgi b/httemplate/browse/cust_pay_batch.cgi deleted file mode 100755 index 608a58d0d..000000000 --- a/httemplate/browse/cust_pay_batch.cgi +++ /dev/null @@ -1,52 +0,0 @@ - -<% - -print header("Pending credit card batch", menubar( - 'Main Menu' => $p, -# 'Add new referral' => "../edit/part_referral.cgi", -)), &table(), < - # - inv# - Customer - Card name - Card - Exp - Amount - -END - -foreach my $cust_pay_batch ( sort { - $a->getfield('paybatchnum') <=> $b->getfield('paybatchnum') -} qsearch('cust_pay_batch',{}) ) { -# my $date = time2str( "%a %b %e %T %Y", $queue->_date ); -# my $status = $hashref->{status}; -# if ( $status eq 'failed' || $status eq 'locked' ) { -# $status .= -# qq! ( retry |!. -# qq! remove )!; -# } - my $cardnum = $cust_pay_batch->{cardnum}; - $cardnum =~ s/.{4}$/xxxx/; - print < - $cust_pay_batch->{paybatchnum} - $cust_pay_batch->{invnum} - $cust_pay_batch->{custnum} - $cust_pay_batch->{last}, $cust_pay_batch->{last} - $cust_pay_batch->{payname} - $cardnum - $cust_pay_batch->{exp} - \$$cust_pay_batch->{amount} - -END - -} - -print < - - -END - -%> diff --git a/httemplate/browse/msgcat.cgi b/httemplate/browse/msgcat.cgi deleted file mode 100755 index d4adf9f1a..000000000 --- a/httemplate/browse/msgcat.cgi +++ /dev/null @@ -1,50 +0,0 @@ - -<% - -print header("View Message catalog", menubar( - 'Main Menu' => $p, - 'Edit message catalog' => $p. "edit/msgcat.cgi", -)), '
    '; - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => 'en_US', - 'options' => { 'en_US'=>'en_US' }, - 'layer_callback' => sub { - my $layer = shift; - my $html = "
    Messages for locale $layer
    ". table(). - "Code". - "Message"; - $html .= "en_US Message" unless $layer eq 'en_US'; - $html .= ''; - - #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } - # qsearch('msgcat', { 'locale' => $layer } ) ) { - foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { - $html .= ''. $msgcat->msgnum. ''. - ''. $msgcat->msgcode. ''. - ''. $msgcat->msg. ''; - unless ( $layer eq 'en_US' ) { - my $en_msgcat = qsearchs('msgcat', { - 'locale' => 'en_US', - 'msgcode' => $msgcat->msgcode, - } ); - $html .= ''. $en_msgcat->msg. ''; - } - $html .= ''; - } - - $html .= ''; - $html; - }, - -); - -print $widget->html; - -print < - - -END - -%> diff --git a/httemplate/browse/nas.cgi b/httemplate/browse/nas.cgi deleted file mode 100755 index 9ccbfe632..000000000 --- a/httemplate/browse/nas.cgi +++ /dev/null @@ -1,80 +0,0 @@ - -<% - -print header('NAS ports', menubar( - 'Main Menu' => $p, -)); - -my $now = time; - -foreach my $nas ( sort { $a->nasnum <=> $b->nasnum } qsearch( 'nas', {} ) ) { - print $nas->nasnum. ": ". $nas->nas. " ". - $nas->nasfqdn. " (". $nas->nasip. ") ". - "as of ". time2str("%c",$nas->last). - " (". &pretty_interval($now - $nas->last). " ago)
    ". - &table(). "Nas
    Port #Global
    Port #
    ". - "IP addressUserSinceDuration", - ; - foreach my $port ( sort { - $a->nasport <=> $b->nasport || $a->portnum <=> $b->portnum - } qsearch( 'port', { 'nasnum' => $nas->nasnum } ) ) { - my $session = $port->session; - my($user, $since, $pretty_since, $duration); - if ( ! $session ) { - $user = "(empty)"; - $since = 0; - $pretty_since = "(never)"; - $duration = ''; - } elsif ( $session->logout ) { - $user = "(empty)"; - $since = $session->logout; - } else { - my $svc_acct = $session->svc_acct; - $user = "
    svcnum. "\">". - $svc_acct->username. ""; - $since = $session->login; - } - $pretty_since = time2str("%c", $since) if $since; - $duration = pretty_interval( $now - $since ). " ago" - unless defined($duration); - print "". $port->nasport. "". $port->portnum. "". - $port->ip. "$user$pretty_since". - "$duration" - ; - } - print "
    "; -} - -#Time::Duration?? -sub pretty_interval { - my $interval = shift; - my %howlong = ( - '604800' => 'week', - '86400' => 'day', - '3600' => 'hour', - '60' => 'minute', - '1' => 'second', - ); - - my $pretty = ""; - foreach my $key ( sort { $b <=> $a } keys %howlong ) { - my $value = int( $interval / $key ); - if ( $value ) { - if ( $value == 1 ) { - $pretty .= - ( $howlong{$key} eq 'hour' ? 'an ' : 'a ' ). $howlong{$key}. " " - } else { - $pretty .= $value. ' '. $howlong{$key}. 's '; - } - } - $interval -= $value * $key; - } - $pretty =~ /^\s*(\S.*\S)\s*$/; - $1; -} - -#print &table(), < -# # -# NAS diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi deleted file mode 100755 index 670474d48..000000000 --- a/httemplate/browse/part_bill_event.cgi +++ /dev/null @@ -1,71 +0,0 @@ - -<% - -my %search; -if ( $cgi->param('showdisabled') ) { - %search = (); -} else { - %search = ( 'disabled' => '' ); -} - -my @part_bill_event = qsearch('part_bill_event', \%search ); -my $total = scalar(@part_bill_event); - -%> -<%= header('Invoice Event Listing', menubar( 'Main Menu' => $p) ) %> - - Invoice events are actions taken on overdue invoices.

    -Add a new invoice event -

    -<%= $total %> events -<%= $cgi->param('showdisabled') - ? do { $cgi->param('showdisabled', 0); - '( hide disabled events )'; } - : do { $cgi->param('showdisabled', 1); - '( show disabled events )'; } -%> -<%= table() %> - - param('showdisabled') ? 2 : 3 %>>Event - Payby - After - Action - Options - Code - - -<% foreach my $part_bill_event ( sort { $a->payby cmp $b->payby - || $a->seconds <=> $b->seconds - || $a->weight <=> $b->weight - || $a->eventpart <=> $b->eventpart - } @part_bill_event ) { - my $url = "${p}edit/part_bill_event.cgi?". $part_bill_event->eventpart; - use Time::Duration; - my $delay = duration_exact($part_bill_event->seconds); - my $plandata = $part_bill_event->plandata; - $plandata =~ s/\n/
    /go; -%> - - - <%= $part_bill_event->eventpart %> -<% unless ( $cgi->param('showdisabled') ) { %> - - <%= $part_bill_event->disabled ? 'DISABLED' : '' %> -<% } %> - - <%= $part_bill_event->event %> - - <%= $part_bill_event->payby %> - - <%= $delay %> - - <%= $part_bill_event->plan %> - - <%= $plandata %> - - <%= $part_bill_event->eventcode %> - -<% } %> - - - diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi deleted file mode 100755 index 76662e0c9..000000000 --- a/httemplate/browse/part_export.cgi +++ /dev/null @@ -1,39 +0,0 @@ - -<%= header("Export Listing", menubar( 'Main Menu' => "$p#sysadmin" )) %> -Provisioning services to external machines, databases and APIs.

    -Add a new export

    - - -<%= table() %> - - Export - Options - - -<% foreach my $part_export ( sort { - $a->getfield('exportnum') <=> $b->getfield('exportnum') - } qsearch('part_export',{}) ) { -%> - - <%= $part_export->exportnum %> - <%= $part_export->exporttype %> to <%= $part_export->machine %> (edit | delete) - - <%= itable() %> - <% my %opt = $part_export->options; - foreach my $opt ( keys %opt ) { %> - <%= $opt %><%= $opt{$opt} %> - <% } %> - - - - -<% } %> - - - - diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi deleted file mode 100755 index 58422c67d..000000000 --- a/httemplate/browse/part_pkg.cgi +++ /dev/null @@ -1,102 +0,0 @@ - -<% - -my %search; -if ( $cgi->param('showdisabled') ) { - %search = (); -} else { - %search = ( 'disabled' => '' ); -} - -my @part_pkg = qsearch('part_pkg', \%search ); -my $total = scalar(@part_pkg); - -%> -<%= header("Package Definition Listing",menubar( 'Main Menu' => $p )) %> -One or more services are grouped together into a package and given pricing -information. Customers purchase packages rather than purchase services -directly.

    -Add a new package definition -

    - -<%= $total %> packages -<% -if ( $cgi->param('showdisabled') ) { - $cgi->param('showdisabled', 0); - print qq!( hide disabled packages )!; -} else { - $cgi->param('showdisabled', 1); - print qq!( show disabled packages )!; -} - -my $colspan = $cgi->param('showdisabled') ? 2 : 3; -print &table(), < - Package - Comment - Freq. - Plan - Data - Service - Quan. - -END - -foreach my $part_pkg ( sort { - $a->getfield('pkgpart') <=> $b->getfield('pkgpart') -} @part_pkg ) { - my($hashref)=$part_pkg->hashref; - my(@pkg_svc)=grep $_->getfield('quantity'), - qsearch('pkg_svc',{'pkgpart'=> $hashref->{pkgpart} }); - my($rowspan)=scalar(@pkg_svc); - my $plandata; - if ( $hashref->{plan} ) { - $plandata = $hashref->{plandata}; - $plandata =~ s/^(\w+)=/$1 /mg; - $plandata =~ s/\n/
    /g; - } else { - $hashref->{plan} = "(legacy)"; - $plandata = "Setup ". $hashref->{setup}. - "
    Recur ". $hashref->{recur}; - } - print < - $hashref->{pkgpart} -END - - unless ( $cgi->param('showdisabled') ) { - print ""; - print "DISABLED" if $hashref->{disabled}; - print ''; - } - - print <$hashref->{pkg} - $hashref->{comment} - $hashref->{freq} - $hashref->{plan} - $plandata -END - - my($pkg_svc); - my($n)=""; - foreach $pkg_svc ( @pkg_svc ) { - my($svcpart)=$pkg_svc->getfield('svcpart'); - my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); - print $n,qq!!, - $part_svc->getfield('svc'),"", - $pkg_svc->getfield('quantity'),"\n"; - $n=""; - } - - print ""; -} - -$colspan = $cgi->param('showdisabled') ? 8 : 9; -print < - - -END -%> diff --git a/httemplate/browse/part_referral.cgi b/httemplate/browse/part_referral.cgi deleted file mode 100755 index 084c21bd0..000000000 --- a/httemplate/browse/part_referral.cgi +++ /dev/null @@ -1,38 +0,0 @@ - -<%= header("Advertising source Listing", menubar( - 'Main Menu' => $p, -# 'Add new referral' => "../edit/part_referral.cgi", -)) %> -Where a customer heard about your service. Tracked for informational purposes. -

    -Add a new advertising source -

    - -<%= table() %> - - Advertising source - - -<% -foreach my $part_referral ( sort { - $a->getfield('refnum') <=> $b->getfield('refnum') -} qsearch('part_referral',{}) ) { - my($hashref)=$part_referral->hashref; - print < - - $hashref->{refnum} - - $hashref->{referral} - -END - -} - -print < - - -END - -%> diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi deleted file mode 100755 index 9fb359d1d..000000000 --- a/httemplate/browse/part_svc.cgi +++ /dev/null @@ -1,107 +0,0 @@ - -<% - -my %search; -if ( $cgi->param('showdisabled') ) { - %search = (); -} else { - %search = ( 'disabled' => '' ); -} - -my @part_svc = - sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') } - qsearch('part_svc', \%search ); -my $total = scalar(@part_svc); - -%> -<%= header('Service Definition Listing', menubar( 'Main Menu' => $p) ) %> - - - - Services are items you offer to your customers.

    - -
    Add a new service definition or  -

    - -<%= $total %> services -<%= $cgi->param('showdisabled') - ? do { $cgi->param('showdisabled', 0); - '( hide disabled services )'; } - : do { $cgi->param('showdisabled', 1); - '( show disabled services )'; } -%> -<%= table() %> - - param('showdisabled') ? 2 : 3 %>>Service - Table - Export - Field - Modifier - - -<% foreach my $part_svc ( @part_svc ) { - my $hashref = $part_svc->hashref; - my $svcdb = $hashref->{svcdb}; - my @dfields = fields($svcdb); - push @dfields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge - my @fields = - grep { $_ ne 'svcnum' && $part_svc->part_svc_column($_)->columnflag } - @dfields; - - my $rowspan = scalar(@fields) || 1; - my $url = "${p}edit/part_svc.cgi?$hashref->{svcpart}"; -%> - - - > - <%= $hashref->{svcpart} %> -<% unless ( $cgi->param('showdisabled') ) { %> - > - <%= $hashref->{disabled} ? 'DISABLED' : '' %> -<% } %> - > - <%= $hashref->{svc} %> - > - <%= $hashref->{svcdb} %> - ><%= itable() %> -<% -# my @part_export = -map { qsearchs('part_export', { exportnum => $_->exportnum } ) } qsearch('export_svc', { svcpart => $part_svc->svcpart } ) ; - foreach my $part_export ( - map { qsearchs('part_export', { exportnum => $_->exportnum } ) } - qsearch('export_svc', { svcpart => $part_svc->svcpart } ) - ) { -%> - - <%= $part_export->exporttype %> to <%= $part_export->machine %> -<% } %> - - -<% my($n1)=''; - foreach my $field ( @fields ) { - my $flag = $part_svc->part_svc_column($field)->columnflag; -%> - <%= $n1 %><%= $field %> - -<% if ( $flag eq "D" ) { print "Default"; } - elsif ( $flag eq "F" ) { print "Fixed"; } - else { print "(Unknown!)"; } -%> - <%= $part_svc->part_svc_column($field)->columnvalue%> -<% $n1=""; - } -%> - -<% } %> - - - diff --git a/httemplate/browse/queue.cgi b/httemplate/browse/queue.cgi deleted file mode 100755 index b53c1402d..000000000 --- a/httemplate/browse/queue.cgi +++ /dev/null @@ -1,7 +0,0 @@ - -<% - -print header("Job Queue", menubar( 'Main Menu' => $p, )). - joblisting({}). ''; - -%> diff --git a/httemplate/browse/svc_acct_pop.cgi b/httemplate/browse/svc_acct_pop.cgi deleted file mode 100755 index e890f07bf..000000000 --- a/httemplate/browse/svc_acct_pop.cgi +++ /dev/null @@ -1,53 +0,0 @@ - -<% - -print header('Access Number Listing', menubar( - 'Main Menu' => $p, -)) %> -Points of Presence

    -Add new Access Number

    -<%= table() %> - - - City - State - Area code - Exchange - Local - - -<% -foreach my $svc_acct_pop ( sort { - #$a->getfield('popnum') <=> $b->getfield('popnum') - $a->state cmp $b->state || $a->city cmp $b->city - || $a->ac <=> $b->ac || $a->exch <=> $b->exch || $a->loc <=> $b->loc -} qsearch('svc_acct_pop',{}) ) { - my($hashref)=$svc_acct_pop->hashref; - print < - - $hashref->{popnum} - - $hashref->{city} - - $hashref->{state} - - $hashref->{ac} - - $hashref->{exch} - - $hashref->{loc} - -END - -} - -print < - - - - -END - -%> diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi deleted file mode 100644 index 259713260..000000000 --- a/httemplate/config/config-process.cgi +++ /dev/null @@ -1,51 +0,0 @@ -<% - my $conf = new FS::Conf; - $FS::Conf::DEBUG = 1; - my @config_items = $conf->config_items; - - foreach my $i ( @config_items ) { - my @touch = (); - my @delete = (); - my $n = 0; - foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - if ( $type eq '' ) { - } elsif ( $type eq 'textarea' ) { - if ( $cgi->param($i->key. $n) ne '' ) { - my $value = $cgi->param($i->key. $n); - $value =~ s/\r\n/\n/g; #browsers? - $conf->set($i->key, $value); - } else { - $conf->delete($i->key); - } - } elsif ( $type eq 'checkbox' ) { -# if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) { - if ( defined $cgi->param($i->key. $n) ) { - #$conf->touch($i->key); - push @touch, $i->key; - } else { - #$conf->delete($i->key); - push @delete, $i->key; - } - } elsif ( $type eq 'text' || $type eq 'select' ) { - if ( $cgi->param($i->key. $n) ne '' ) { - $conf->set($i->key, $cgi->param($i->key. $n)); - } else { - $conf->delete($i->key); - } - } elsif ( $type eq 'editlist' || $type eq 'selectmultiple' ) { - if ( scalar(@{[ $cgi->param($i->key. $n) ]}) ) { - $conf->set($i->key, join("\n", @{[ $cgi->param($i->key. $n) ]} )); - } else { - $conf->delete($i->key); - } - } else { - } - $n++; - } - # warn @touch; - $conf->touch($_) foreach @touch; - $conf->delete($_) foreach @delete; - } - -%> -<%= $cgi->redirect("config-view.cgi") %> diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi deleted file mode 100644 index bafe5a8e7..000000000 --- a/httemplate/config/config-view.cgi +++ /dev/null @@ -1,64 +0,0 @@ - -<%= header('View Configuration', menubar( 'Main Menu' => $p, - 'Edit Configuration' => 'config.cgi' ) ) %> - -<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %> - -<% foreach my $section ( qw(required billing username password UI session - shell mail apache BIND - ), - '', 'deprecated') { %> - - - <% foreach my $nav_section ( qw(required billing username password UI session - shell mail apache BIND - ), - '', 'deprecated') { %> - <% if ( $section eq $nav_section ) { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } else { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } %> - <% } %> -
    - <%= table("#cccccc", 2) %> - - - <%= ucfirst($section || 'unclassified') %> configuration options - - - <% foreach my $i (grep $_->section eq $section, @config_items) { %> - - - <%= $i->key %> - <%= $i->description %> - - - <% foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - my $n = 0; %> - <% if ( $type eq '' ) { %> - - <% } elsif ( $type eq 'textarea' - || $type eq 'editlist' - || $type eq 'selectmultiple' ) { %> - - <% } elsif ( $type eq 'checkbox' ) { %> - - <% } elsif ( $type eq 'text' || $type eq 'select' ) { %> - - <% } else { %> - - <% } %> - <% $n++; } %> -
    no type
    -
    -<%= encode_entities(join("\n", $conf->config($i->key) ) ) %>
    -
    -
    YES' : 'ff0000">NO' %>
    <%= $conf->exists($i->key) ? $conf->config($i->key) : '' %>
    - unknown type <%= $type %> -
    - - <% } %> -

    -<% } %> - - diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi deleted file mode 100644 index fd9a82958..000000000 --- a/httemplate/config/config.cgi +++ /dev/null @@ -1,176 +0,0 @@ - -<%= header('Edit Configuration', menubar( 'Main Menu' => $p ) ) %> - - -<% my $conf = new FS::Conf; my @config_items = $conf->config_items; %> - -
    - -<% foreach my $section ( qw(required billing username password UI session - shell mail apache BIND - ), - '', 'deprecated') { %> - - - <% foreach my $nav_section ( qw(required billing username password UI session - shell mail apache BIND - ), - '', 'deprecated') { %> - <% if ( $section eq $nav_section ) { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } else { %> - [<%= ucfirst($nav_section || 'unclassified') %>] - <% } %> - <% } %> -
    - <%= table("#cccccc", 2) %> - - - <%= ucfirst($section || 'unclassified') %> configuration options - - - <% foreach my $i (grep $_->section eq $section, @config_items) { %> - - - <% my $n = 0; - foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) { - #warn $i->key unless defined($type); - %> - <% if ( $type eq '' ) { %> - no type - <% } elsif ( $type eq 'textarea' ) { %> - - <% } elsif ( $type eq 'checkbox' ) { %> - exists($i->key) ? ' CHECKED' : '' %>> - <% } elsif ( $type eq 'text' ) { %> - - <% } elsif ( $type eq 'select' || $type eq 'selectmultiple' ) { %> - - <% } elsif ( $type eq 'editlist' ) { %> - -
    - - -
    - <%= itable() %> - <% if ( defined $i->editlist_parts ) { %> - <% my $pnum=0; foreach my $part ( @{$i->editlist_parts} ) { %> - - <% if ( $part->{type} eq 'text' ) { %> - "> - <% } elsif ( $part->{type} eq 'immutable' ) { %> - <%= $part->{value} %>" value="<%= $part->{value} %>"> - <% } elsif ( $part->{type} eq 'select' ) { %> - - <% } else { %> - unknown type <%= $part->type %> - <% } %> - - <% $pnum++; } %> - <% } else { %> - - <% } %> - - - <% } else { %> - unknown type <%= $type %> - <% } %> - <% $n++; } %> - - - <%= $i->key %> - <%= $i->description %> - - - <% } %> -
    - - You may need to restart Apache and/or freeside-queued for configuration - changes to take effect.
    - -

    - -<% } %> - -
    - - diff --git a/httemplate/docs/admin.html b/httemplate/docs/admin.html deleted file mode 100755 index 50beafe78..000000000 --- a/httemplate/docs/admin.html +++ /dev/null @@ -1,81 +0,0 @@ - - Administration - - -

    Administration

    - -
    - - diff --git a/httemplate/docs/billing.html b/httemplate/docs/billing.html deleted file mode 100644 index c78a87f04..000000000 --- a/httemplate/docs/billing.html +++ /dev/null @@ -1,54 +0,0 @@ - - Billing - - -

    Billing

    -
      -
    • You can bill individual customers by clicking on the Bill now link on the main customer view. -
    • The freeside-daily script should be run daily to bill customers and run invoice collection events. -
    • Real-time credit card processing: Install the Business::OnlinePayment module for your processor. Configure the business-onlinepayment configuration option. Disable the default Batch card invoice event and add one for Business::OnlinePayment. -
    • Optional: Credit card expiration alerts: Customize alerter_template configuration option and run freeside-expiration-alerter daily. -
    • Credit card decline alerts: Customize the declinetemplate configuration option and set the emaildecline configuration option. -
    • Optional: Invoice template customization -
        -
      • See the Text::Template documentation for details on the substitution language. -
      • You must call the invoice_lines() function at least once - pass it a number of lines, and it returns a list of array references, each of two elements: a service description column, and a price column. Alternatively, call invoice_lines() with no arguments, and pagination will be disabled - all invoice line items will print on one page, with no padding (recommended for email invoices). -
      • In addition, the following variables are available: -
          -
        • $invnum - invoice number -
        • $date - as a UNIX timestamp (see Date::Format for conversion functions). -
        • $page - current page -
        • $total_pages - total pages -
        • @address - A six-element array containing the customer name, company, and address. - -
        -
      -
    • Batch credit card processing -
        -
      • After freeside-daily is run, a credit card batch will be in the cust_pay_batch table. Export this table to your credit card batching. -
      • When your batch completes, erase the cust_pay_batch records in that batch and add any necessary paymants to the cust_pay table. Example code to add payments is: -
        use FS::cust_pay;
        -
        -# loop over all records in batch
        -
        -my $payment=create FS::cust_pay (
        -  'invnum' => $invnum,
        -  'paid' => $paid,
        -  '_date' => $_date,
        -  'payby' => $payby,
        -  'payinfo' => $payinfo,
        -  'paybatch' => $paybatch,
        -);
        -
        -my $error=$payment->insert;
        -if ( $error ) {
        -  #process error
        -}
        -
        -# end loop
        -
        -All fields except paybatch are contained in the cust_pay_batch table. You can use paybatch field to track particular batches and/or particular transactions within a batch. -
      - -
    - diff --git a/httemplate/docs/config.html b/httemplate/docs/config.html deleted file mode 100644 index 9caf3bb3a..000000000 --- a/httemplate/docs/config.html +++ /dev/null @@ -1,36 +0,0 @@ - - Configuration files - - -

    Configuration files

    -Configuration is now done by the top-level Makefile and web interface. The instructions below are no longer necessary. -
      -
    • Create the /usr/local/etc/freeside directory to hold your configuration. -
    • Setting up Apache user authetication is mandatory. -
    • Create the /usr/local/etc/freeside/mapsecrets file, which maps Apache users to a secrets file which contains a DBI data source, username and password. Every -line in /usr/local/etc/freeside/mapsecrets should contain a username and -filename, separated by whitespace. Note that these are not local usernames - -they are passed from Apache. -Apache user authetication is mandatory. For example, if you had the Apache users admin, -john, and sam, -you mapsecrets file might look like: -
      -admin secretfile
      -john secretfile
      -sam secretfile
      -
      -
    • Next, the filename(s) referenced in /usr/local/etc/freeside/mapsecrets file should be created in the /usr/local/etc/freeside/ directory. Each file contains three lines: DBI data source (for example, - DBI:mysql:freeside or DBI:Pg:host=localhost;dbname=freeside), database username, and database password. - These files should not be world readable. See the DBI manpage and the manpage for your DBD for the exact syntax of a DBI data source. In a normal installation such as the example above, a single file /usr/local/etc/freeside/secretfile would be created - for example: -
      -DBI:Pg:host=localhost;dbname=freeside
      -dbusername
      -dbpassword
      -
      -
    • Create the /usr/local/etc/freeside/conf.datasource directory, for example, /usr/local/etc/freeside/conf.DBI:Pg:host=localhost;dbname=freeside (remember to backslash-escape the ; character when creating directories in the shell: -
      mkdir /usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=freeside
      -
      -
    • The rest of the configuration can be done with the web interface. Select Configuration from the main menu and update your configuration values. -
    - - diff --git a/httemplate/docs/export.html b/httemplate/docs/export.html deleted file mode 100755 index 71e3acf1f..000000000 --- a/httemplate/docs/export.html +++ /dev/null @@ -1,55 +0,0 @@ - - File exporting - - -

    File exporting

    - NOTE: This file is OUT OF DATE with the landing of the new export code and is only here for reference. DO NOT follow these instructions. Instead use the new exports in the web interface. -
      -
    • bin/svc_acct.export will create UNIX passwd, shadow and master.passwd files, ERPCD acp_passwd and acp_dialup files and a RADIUS users file in the /usr/local/etc/freeside/export.datasrc directory. Some RADIUS servers (such as Radiator, ICRADIUS and FreeRADIUS) will authenticate directly out of an SQL database. In these cases, -it is reccommended that you replicate (Replication in MySQL) the data to an external RADIUS machine or point icradius_secrets to the external machine rather than running the RADIUS server on your Freeside machine. Using the appropriate configuration settings, you can export these files to your remote machines unattended: -
        -
      • shellmachines - passwd and shadow are copied to the remote machine as /etc/passwd.new and /etc/shadow.new and then moved to /etc/passwd and /etc/shadow if no errors occur. -
      • bsdshellmachines - passwd and master.passwd are copied to the remote machine as /etc/passwd.new and /etc/master.passwd.new and moved to /etc/passwd and /etc/master.passwd if no errors occur. -
      • nismachines - passwd and shadow are copied to the /etc/global directory on the remote machine. If no errors occur, the command ( cd /var/yp; make; ) is executed on the remote machine. -
      • erpcdmachines - acp_passwd and acp_dialup are copied to the /usr/annex directory on the remote machine. If no errors occur, the command ( kill -USR1 `cat /usr/annex/erpcd.pid` ) is executed on the remote machine. -
      • radiusmachines - users is copied to the /etc/raddb directory on the remote machine. If no errors occur, the command ( builddbm ) is executed on the remote machine. -
      • icradiusmachines - Turn this option on to enable radcheck table population - by default in the Freeside database, or in the database specified by the icradius_secrets config option (the radcheck table needs to be created manually). You do not need to use MySQL for your Freeside database to export to an ICRADIUS/FreeRADIUS MySQL database with this option.
        ADDITIONAL DEPRECATED FUNCTIONALITY (instead use MySQL replication or point icradius_secrets to the external database) - your ICRADIUS machines or FreeRADIUS (with MySQL authentication) machines, one per line. Machines listed in this file will have the radcheck table exported to them. Each line should contain four items, separted by whitespace: machine name, MySQL database name, MySQL username, and MySQL password. For example: "radius.isp.tld radius_db radius_user passw0rd"
        -
      -
    • svc_acct.pm - If a shellmachine is defined, users can be created, modified and deleted remotely; see below. -
        -
      • Account creation - If the username, uid and dir fields are defined for a new user, the command(s) specified in the shellmachine-useradd configuration file are executed on shellmachine via ssh. If this file does not exist, useradd -d $dir -m -s $shell -u $uid $username is the default. If the file exists but is empty, cp -pr /etc/skel $dir; chown -R $uid.$gid $dir is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username, $uid, $gid, $dir, and $shell. -
      • Account deletion - The command(s) specified in the shellmachine-userdel configuration file are executed on shellmachine via ssh. If this file does not exist, userdel $username is the default. If the file exists but is empty, rm -rf $dir is the default instead. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $username and $dir. -
      • Account modification - If a user's home directory changes, the command(s) specified in the shellmachine-usermod configuration file are execute on shellmachine via ssh. If this file does not exist or is empty, [ -d $old_dir ] && mv $old_dir $new_dir || ( chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; find . -depth -print | cpio -pdm $new_dir; chmod u-t $new_dir; chown -R $uid.$gid $new_dir; rm -rf $old_dir ) is the default. Otherwise the contents of the file are treated as a double-quoted perl string, with the following variables available: $old_dir, $new_dir, $uid and $gid. -
      -
    • svc_acct.pm - Cyrus IMAP Server integration, enabled by the cyrus configuration file -
        -
      • Account creation - (Cyrus::IMAP::Admin should be installed locally) -
      • Account deletion - (Cyrus::IMAP::Admin should be installed locally) -
      • Account modification - (not yet implemented) -
      -
    • bin/svc_acct_sm.export will create Qmail rcpthosts, recipientmap and virtualdomains files and Sendmail virtusertable and sendmail.cw files in the /usr/local/etc/freeside/export.datasrc directory. Using the appropriate configuration files, you can export these files to your remote machines unattemded: -
        -
      • qmailmachines - recipientmap, virtualdomains and rcpthosts are copied to the /var/qmail/control directory on the remote machine. Note: If you imported qmail configuration files, run the generated /usr/local/etc/freeside/export.datasrc/virtualdomains.FIX on a machine with your user home directories before exporting qmail configuration files. -
      • shellmachine - The command [ -e homedir/.qmail-default ] || { touch homedir/.qmail-default; chown uid.gid homedir/.qmail-default; } will be run on this machine for users in the virtualdomains file. -
      • sendmailmachines - sendmail.cw and virtusertable are copied to the remote machine as /etc/sendmail.cw.new and /etc/virtusertable.new. If no errors occur, they are moved to /etc/sendmail.cw and /etc/virtusertable and the command specified in the sendmailrestart configuration file is executed. (The path can be changed from the default /etc with the sendmailconfigpath configuration file.) -
      -
    • svc_domain.pm - If the qmailmachines configuration file exists and a shellmachine is defined, user .qmail- files can be updated for catchall mailboxes. -
        -
      • The command
        [ -e homedir/.qmail-domain-default ] || {
        -    touch homedir/.qmail-domain-default;
        -    chown uid.gid homedir/.qmail-domain-default;
        -}
        is run. -
      -
    • svc_forward.pm - Not yet documented; see manpage. -
    • svc_www.pm - Not yet documented; see manpage. -
    -
    Unattended remote login - Freeside can login to remote machines unattended using SSH. This can pose a security risk if not configured correctly, and will allow an intruder who breaks into your freeside machine full access to your remote machines. Do not use this feature unless you understand what you are doing! -
      -
    • As the freeside user (on your freeside machine), generate an authentication key using ssh-keygen. Since this is for unattended operation, use a blank passphrase. -
    • Append the newly-created identity.pub file to ~root/.ssh/authorized_keys on the remote machine(s). -
    • Some new SSH v2 implementation accept v2 style keys only. Use the -t option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to ~root/.ssh/authorized_keys2 on the remote machine(s). -
    • You may need to set PermitRootLogin without-password (meaning with keys only) in your sshd_config file on the remote machine(s). -
    - - - diff --git a/httemplate/docs/index.html b/httemplate/docs/index.html deleted file mode 100644 index 00c863b0c..000000000 --- a/httemplate/docs/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - Documentation - - -

    Documentation

    - - - diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html deleted file mode 100644 index 75f039dd1..000000000 --- a/httemplate/docs/install.html +++ /dev/null @@ -1,198 +0,0 @@ - - Installation - - -

    Installation

    -Before installing, you need: - -Install the Freeside distribution: -
      -
    • Add the user and group `freeside' to your system. -
    • Allow the freeside user full access to the freeside database. -
        -
      • with PostgreSQL: -
        -$ su postgres
        -$ createuser -P freeside
        -Enter password for user "freeside": 
        -Enter it again: 
        -Shall the new user be allowed to create databases? (y/n) y
        -Shall the new user be allowed to create more new users? (y/n) n
        -CREATE USER
        - -
      - -
    • Edit the top-level Makefile: -
        -
      • Set DATASOURCE to your DBI data source, for example, DBI:Pg:host=localhost;dbname=freeside for PostgresSQL. See the DBI manpage and the manpage for your DBD for the exact syntax of your DBI data source. -
      • Set DB_PASSWORD to the freeside database user's password. -
      -
    • Add the freeside database to your database engine: -
      -$ su
      -# make create-database
      - (or manually, with Postgres:) -
      -$ su freeside
      -$ createdb freeside
      - -
    • Build and install the Perl modules: -
      -$ make perl-modules
      -$ su
      -# make install-perl-modules
      -
    • Create the necessary configuration files:
      -$ su
      -# make create-config
      -
      -
    • Run a separate iteration of Apache[-SSL] with mod_perl enabled as the freeside user. -
    - - - - - - - - -
    Apache::ASPMason
      -
    • Run make aspdocs -
    • Copy aspdocs/ to your web server's document space. -
    • Create a Global directory, such as /usr/local/etc/freeside/asp-global/: -
      -mkdir /usr/local/etc/freeside/asp-global/
      -chown freeside /usr/local/etc/freeside/asp-global/
      -
      -
    • Copy htetc/global.asa to the Global directory: -
      -cp htetc/global.asa /usr/local/etc/freeside/asp-global/global.asa
      -
      -
    • Configure Apache for the Global directory and to execute .cgi files using Apache::ASP. For example: -
      -<Directory /usr/local/apache/htdocs/freeside-asp>
      -<Files ~ (\.cgi)>
      -AddHandler perl-script .cgi
      -PerlHandler Apache::ASP
      -</Files>
      -<Perl>
      -$MLDBM::RemoveTaint = 1;
      -</Perl>
      -PerlSetVar Global /usr/local/etc/freeside/asp-global/
      -PerlSetVar Debug 2
      -</Directory>
      -
      -
      -
    • (use version 1.0x - Freeside is not yet compatible with version 1.1x) -
    • Run make masondocs -
    • Copy masondocs/ to your web server's document space. -
    • Copy htetc/handler.pl to your web server's configuration directory. -
    • Edit handler.pl and set an appropriate data_dir, such as /usr/local/etc/freeside/mason-data -
    • Configure Apache to use the handler.pl file and to execute .cgi files using HTML::Mason. For example: -
      -<Directory /usr/local/apache/htdocs/freeside-mason>
      -<Files ~ (\.cgi)>
      -AddHandler perl-script .cgi
      -PerlHandler HTML::Mason
      -</Files>
      -<Perl>
      -require "/usr/local/apache/conf/handler.pl";
      -</Perl>
      -</Directory>
      -
      -
    -
      -
    • Restrict access to this web interface - see the Apache documentation on user authentication. For example, to configure user authentication with mod_auth (flat files): -
      -<Directory /usr/local/apache/htdocs/freeside-asp>
      -PerlSetVar Global /usr/local/etc/freeside/asp-global/
      -AuthName Freeside
      -AuthType Basic
      -AuthUserFile /usr/local/etc/freeside/htpasswd
      -require valid-user
      -</Directory>
      -
      -
    • Create one or more Freeside users (your internal sales/tech folks, not customer accounts). These users are setup using using Apache authentication, not UNIX user accounts. For example, using mod_auth (flat files): -
        -
      • First user: -
        $ su
        -$ freeside-adduser -c -h /usr/local/etc/freeside/htpasswd username
        -
      • Additional users: -
        $ su
        -$ freeside-adduser -h /usr/local/etc/freeside/htpasswd username
        -
      - (using other auth types, add each user to your Apache authentication and then run: freeside-adduser username -
    • As the freeside UNIX user, run bin/fs-setup username (in the untar'ed freeside directory) to create the database tables, passing the username of a Freeside user you created above: -
      -$ su freeside
      -$ cd /path/to/freeside-1.4.0/
      -$ bin/fs-setup username
      -
      -
    • As the freeside UNIX user, run bin/populate-msgcat username (in the untar'ed freeside directory) to populate the message catalog, passing the username of a Freeside user you created above: -
      -$ su freeside
      -$ cd /path/to/freeside-1.4.0/
      -$ bin/populate-msgcat username
      -
      -
    • freeside-queued was installed with the Perl modules. Start it now and ensure that is run upon system startup (Do this manually, or edit the top-level Makefile, replacing INIT_FILE with the appropriate location on your systemand QUEUED_USER with the username of a Freeside user you created above, and run make install-init) -
    • Now proceed to the initial administration of your installation. -
    - diff --git a/httemplate/docs/legacy.html b/httemplate/docs/legacy.html deleted file mode 100755 index 2db9edb0f..000000000 --- a/httemplate/docs/legacy.html +++ /dev/null @@ -1,38 +0,0 @@ - - Importing legacy data - - -

    Importing legacy data

    -In most cases, legacy data import all cases will require writing custom code to deal with your particular legacy data. The example scripts here will not work "out-of-the-box". Importing your legacy data will most probably involve some hacking on the example scripts noted below. Contributions to the import process are welcome. -

    Some import scripts may require installation of the Array-PrintCols and Term-Query (make test broken; install manually) modules.
    -
      -
    • bin/bind.import - Import domain information from BIND named -
    • bin/passwd.import - Just import `passwd' and `shadow' or `master.passwd', no RADIUS import. -
    • bin/svc_acct.import - Import `passwd', ( `shadow' or `master.passwd' ) and RADIUS `users'. Before running bin/svc_acct.import, you need services (with table svc_acct) as follows: -
        -
      • Most accounts probably have entries in passwd and users (with Port-Limit nonexistant or 1) -
      • Some accounts have entries in passwd and users, but with Port-Limit 2 (or more) -
      • Some accounts might have entries in users only (Port-Limit 1) -
      • Some accounts might have entries in users only (Port-Limit >= 2) -
      • POP mail accounts have entries in passwd only, and have a particular shell. -
      • Everything else in passwd is a shell account. -
      -
    • bin/svc_acct_sm.import - Import qmail ( `virtualdomains' and `rcpthosts' ), or sendmail ( `virtusertable' and `sendmail.cw' ) files. Before running bin/svc_acct_sm.import, you need services as follows: -
        -
      • Domain (table svc_acct) -
      • Mail alias (table svc_acct_sm) -
      -
    • Importing customer data -
        -
      • Manually -
          -
        • Add a new customer -
        • Add one or more packages for this customer -
        • Enter a package by clicking on the package number -
        • Pick the `Link to existing' option -
        -
      • Batch - You will need to write a script to import your particular legacy data. You can use eg/TEMPLATE_cust_main.import as a starting point. -
      -
    - - diff --git a/httemplate/docs/overview.dia b/httemplate/docs/overview.dia deleted file mode 100644 index a0e34c30e..000000000 Binary files a/httemplate/docs/overview.dia and /dev/null differ diff --git a/httemplate/docs/overview.png b/httemplate/docs/overview.png deleted file mode 100644 index bf2dbc26c..000000000 Binary files a/httemplate/docs/overview.png and /dev/null differ diff --git a/httemplate/docs/passwd.html b/httemplate/docs/passwd.html deleted file mode 100755 index fc1dde956..000000000 --- a/httemplate/docs/passwd.html +++ /dev/null @@ -1,23 +0,0 @@ - - fs_passwd - - -

    fs_passwd

    -You may use fs_passwd/fs_passwd as a "passwd", "chfn" and "chsh" replacement on your shell machine(s) to cause password, gecos and shell changes to update your freeside machine. You can also use the fs_passwd/fs_passwd.html and fs_passwd/fs_passwd.cgi to run a public password change CGI on a public web server. This can pose a security risk if not configured correctly. Do not use this feature unless you understand what you are doing! -

    Currently it is assumed that the the crypt(3) function in the C library is the same on the Freeside machine as on the target machine. -
      -
    • Create a freeside account on the shell or web machine(s). -
    • Setup SSH keys: -
        -
      • As the freeside user (on your freeside machine), generate an authentication key using ssh-keygen. Since this is for unattended operation, use a blank passphrase. -
      • Append the newly-created identity.pub file to ~freeside -/.ssh/authorized_keys on the shell or web machine(s). -
      • Some new SSH v2 implementation accept v2 style keys only. Use the -t option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to ~freeside/.ssh/authorized_keys2 on the remote machine(s). -
      -
    • Copy fs_passwd/fs_passwdd to /usr/local/sbin on the shell or web machine(s). (chown freeside, chmod 500) -
    • Create /usr/local/freeside on the shell or web machine(s). (chown freeside, chmod 700) -
    • Run an iteration of "fs_passwd/fs_passwd_server user shell.machine" as the freeside user for each shell or web machine (this is a daemon process). user refers to a freeside user added by freeside-adduser. -
    • Copy fs_passwd/fs_passwd to /usr/local/bin on the shell machine(s). (chown freeside, chmod 4755). You may link it to passwd, chfn and chsh as well. -
    • Copy fs_passwd/fs_passwd.cgi to the cgi-bin directory on your web machine(s). Use suEXEC or suidperl to run fs_passwd.cgi as the freeside user. -
    - diff --git a/httemplate/docs/schema.dia b/httemplate/docs/schema.dia deleted file mode 100644 index 092d2f88b..000000000 Binary files a/httemplate/docs/schema.dia and /dev/null differ diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html deleted file mode 100644 index 2b8b3a132..000000000 --- a/httemplate/docs/schema.html +++ /dev/null @@ -1,424 +0,0 @@ - - Schema reference - - -

    Schema reference

    - Schema diagram: as a giant .png or dia source (dia homepage). -
      -
    • agent - Agents are resellers of your service. Agents may be limited to a subset of your full offerings (via their agent type). -
        -
      • agentnum - primary key -
      • agent - name of this agent -
      • typenum - agent type -
      • prog - (unimplemented) -
      • freq - (unimplemented) -
      -
    • agent_type - Agent types define groups of packages that you can then assign to particular agents. -
        -
      • typenum - primary key -
      • atype - name of this agent type -
      -
    • cust_bill - Invoices. Declarations that a customer owes you money. The specific charges are itemized in cust_bill_pkg. -
        -
      • invnum - primary key -
      • custnum - customer -
      • _date -
      • charged - amount of this invoice -
      • printed - how many times this invoice has been printed automatically -
      • closed - books closed flag, empty or `Y' -
      -
    • cust_bill_event - Invoice event history - -
    • part_bill_event - Invoice event definitions -
        -
      • eventpart - primary key -
      • payby - CARD, BILL, or COMP -
      • event - event name -
      • eventcode - event action -
      • seconds - how long after the invoice date (cust_bill._date) events of this type are triggered -
      • weight - ordering for events with identical seconds -
      • plan - eventcode plan -
      • plandata - additional plan data -
      • disabled - Disabled flag, empty or `Y' -
      • taxclass - Texas tax class flag, empty or "none", "access", or "hosting" -
      -
    • cust_bill_pkg - Invoice line items -
        -
      • invnum - (multiple) key -
      • pkgnum - package or 0 for the special virtual sales tax package -
      • setup - setup fee -
      • recur - recurring fee -
      • sdate - starting date -
      • edate - ending date -
      -
    • cust_credit - Credits. The equivalent of a negative cust_bill record. -
        -
      • crednum - primary key -
      • custnum - customer -
      • amount - amount credited -
      • _date -
      • otaker - order taker -
      • reason -
      • closed - books closed flag, empty or `Y' -
      -
    • cust_credit_bill - Credit invoice application. Links a credit to an invoice. -
        -
      • creditbillnum - primary key -
      • crednum - credit being applied -
      • invnum - invoice to which credit is applied -
      • amount - amount applied -
      • _date -
      -
    • cust_main - Customers -
        -
      • custnum - primary key -
      • agentnum - agent -
      • refnum - referral -
      • first - name -
      • last - name -
      • ss - social security number -
      • company -
      • address1 -
      • address2 -
      • city -
      • county -
      • state -
      • zip -
      • country -
      • daytime - phone -
      • night - phone -
      • fax - phone -
      • ship_first -
      • ship_last -
      • ship_company -
      • ship_address1 -
      • ship_address2 -
      • ship_city -
      • ship_county -
      • ship_state -
      • ship_zip -
      • ship_country -
      • ship_daytime -
      • ship_night -
      • ship_fax -
      • payby - CARD, BILL, or COMP -
      • payinfo - card number, P.O.#, or comp issuer -
      • paydate - expiration date -
      • payname - billing name (name on card) -
      • tax - tax exempt, Y or null -
      • otaker - order taker -
      • referral_custnum -
      • comments -
      - (columns in italics are optional) -
    • cust_main_invoice - Invoice destinations for email invoices. Note that a customer can have many email destinations for their invoice (either literal or via svcnum), but only one postal destination. -
        -
      • destnum - primary key -
      • custnum - customer -
      • dest - Invoice destination. Freeside supports three types of invoice delivery: send directly to a service defined in Freeside, send to an arbitrary email address, or print the invoice to a printer and have someone send it out via snail mail. Freeside determines which method to use based on the contents of the dest field. If the contents are numeric, a svcnum pointing to a valid service is expected in the field. If the contents are a string, a literal email address is expected to be in the field. If the special keyword `POST' is present, the snail mail method is used (which is the default if no cust_main_invoice records exist). Snail mail invoices get their address information from cust_main and are printed with the printer defined in the configuration files. -
      -
    • cust_main_county - Tax rates -
        -
      • taxnum - primary key -
      • state -
      • county -
      • country -
      • tax - % rate -
      • taxclass -
      • exempt_amount -
      -
    • cust_tax_exempt - Tax exemption record -
        -
      • exemptnum - primary key -
      • taxnum - tax rate -
      • year -
      • month -
      • amount -
      -
    • cust_pay - Payments. Money being transferred from a customer. -
        -
      • paynum - primary key -
      • custnum - customer -
      • paid - amount -
      • _date -
      • payby - CARD, BILL, or COMP -
      • payinfo - card number, P.O.#, or comp issuer -
      • paybatch - text field for tracking card processor batches -
      • closed - books closed flag, empty or `Y' -
      -
    • cust_bill_pay - Applicaton of a payment to a specific invoice. -
        -
      • billpaynum -
      • invnum - invoice -
      • paynum - payment -
      • amount -
      • _date -
      -
    • cust_pay_batch - Pending batch -
        -
      • paybatchnum -
      • cardnum -
      • exp - card expiration -
      • amount -
      • invnum - invoice -
      • custnum - customer -
      • payname - name on card -
      • first - name -
      • last - name -
      • address1 -
      • address2 -
      • city -
      • state -
      • zip -
      • country -
      -
    • cust_pkg - Customer billing items -
        -
      • pkgnum - primary key -
      • custnum - customer -
      • pkgpart - Package definition -
      • setup - date -
      • bill - next bill date -
      • susp - (past) suspension date -
      • expire - (future) cancellation date -
      • cancel - (past) cancellation date -
      • otaker - order taker -
      • manual_flag - If this field is set to 1, disables the automatic unsuspensiond of this package when using the unsuspendauto config file. -
      -
    • cust_refund - Refunds. The transfer of money to a customer; equivalent to a negative cust_pay record. -
        -
      • refundnum - primary key -
      • custnum - customer -
      • refund - amount -
      • _date -
      • payby - CARD, BILL or COMP -
      • payinfo - card number, P.O.#, or comp issuer -
      • otaker - order taker -
      • closed - books closed flag, empty or `Y' -
      -
    • cust_credit_refund - Applicaton of a refund to a specific credit. -
        -
      • creditrefundnum - primary key -
      • crednum - credit -
      • refundnum - refund -
      • amount -
      • _date -
      -
    • cust_svc - Customer services - -
    • nas - Network Access Server (terminal server) -
        -
      • nasnum - primary key -
      • nas - NAS name -
      • nasip - NAS ip address -
      • nasfqdn - NAS fully-qualified domain name -
      • last - timestamp indicating the last instant the NAS was in a known state (used by the session monitoring). -
      -
    • part_pkg - Package definitions -
        -
      • pkgpart - primary key -
      • pkg - package name -
      • comment - non-customer visable package comment -
      • setup - setup fee expression -
      • freq - recurring frequency (months) -
      • recur - recurring fee expression -
      • setuptax - Setup fee tax exempt flag, empty or `Y' -
      • recurtax - Recurring fee tax exempt flag, empty or `Y' -
      • plan - price plan -
      • plandata - additional price plan data -
      • disabled - Disabled flag, empty or `Y' -
      -
    • part_referral - Referral listing -
        -
      • refnum - primary key -
      • referral - referral -
      -
    • part_svc - Service definitions -
        -
      • svcpart - primary key -
      • svc - name of this service -
      • svcdb - table used for this service: svc_acct, svc_acct_sm, svc_forward, svc_domain, svc_charge or svc_wo -
      • disabled - Disabled flag, empty or `Y' - -
      -
    • part_svc_column -
        -
      • columnnum - primary key -
      • svcpart - Service definition -
      • columnname - column name in part_svc.svcdb table -
      • columnvalue - default or fixed value for the column -
      • columnflag - null, D or F -
      -
    • pkg_svc - -
    • export_svc - -
    • part_export - Export to external provisioning -
        -
      • exportnum - primary key -
      • machine - Machine name -
      • exporttype - Export type -
      • nodomain - blank or Y: usernames are exported to this service with no domain -
      -
    • part_export_option - provisioning options -
        -
      • optionnum - primary key -
      • exportnum - Export -
      • optionname - option name -
      • optionvalue - option value -
      -
    • port - individual port on a nas -
        -
      • portnum - primary key -
      • ip - IP address of this port -
      • nasport - port number on the NAS -
      • nasnum - NAS -
      -
    • prepay_credit -
        -
      • prepaynum - primary key -
      • identifier - text or numeric string used to receive this credit -
      • amount - amount of credit -
      -
    • session -
        -
      • sessionnum - primary key -
      • portnum - Port -
      • svcnum - Account -
      • login - timestamp indicating the beginning of this user session. -
      • logout - timestamp indicating the end of this user session. May be null, which indicates a currently open session. -
      - -
    • svc_acct - Accounts -
        -
      • svcnum - primary key -
      • username -
      • _password -
      • sec_phrase - security phrase -
      • popnum - Point of Presence -
      • uid -
      • gid -
      • finger - GECOS -
      • dir -
      • shell -
      • quota - (unimplementd) -
      • slipip - IP address -
      • seconds -
      • domsvc -
      • radius_Radius_Reply_Attribute - Radius-Reply-Attribute -
      • rc_Radius_Check_Attribute - Radius-Check-Attribute -
      -
    • svc_acct_pop - Points of Presence -
        -
      • popnum - primary key -
      • city -
      • state -
      • ac - area code -
      • exch - exchange -
      • loc - rest of number -
      -
    • part_pop_local - Local calling areas -
        -
      • localnum - primary key -
      • popnum - primary key -
      • city -
      • state -
      • npa - area code -
      • nxx - exchange -
      -
    • svc_acct_sm - DEPRECIATED Domain mail aliases - -
    • svc_domain - Domains - -
    • svc_forward - Mail forwarding aliases - -
    • domain_record - Domain zone detail -
        -
      • recnum - primary key -
      • svcnum - Domain (by svcnum) -
      • reczone - zone for this line -
      • recaf - address family, usually IN -
      • rectype - type for this record (A, MX, etc.) -
      • recdata - data for this record -
      -
    • svc_www - -
    • type_pkgs - -
    • queue - job queue -
        -
      • jobnum - primary key -
      • job -
      • _date -
      • status -
      • statustext -
      • svcnum -
      -
    • queue_arg - job arguments -
        -
      • argnum - primary key -
      • jobnum - job -
      • arg - argument -
      -
    • queue_depend - job dependancies -
        -
      • dependnum - primary key -
      • jobnum - source jobnum -
      • depend_jobnum - dependancy jobnum -
      -
    • radius_usergroup - Link users to RADIUS groups. -
        -
      • usergroupnum - primary key -
      • svcnum - account -
      • groupname -
      -
    • msgcat - i18n message catalog -
        -
      • msgnum - primary key -
      • msgcode - message code -
      • locale - locale -
      • msg - Message text -
      -
    - diff --git a/httemplate/docs/schema.png b/httemplate/docs/schema.png deleted file mode 100644 index d0392e76f..000000000 Binary files a/httemplate/docs/schema.png and /dev/null differ diff --git a/httemplate/docs/session.html b/httemplate/docs/session.html deleted file mode 100644 index 7dac5fdf7..000000000 --- a/httemplate/docs/session.html +++ /dev/null @@ -1,54 +0,0 @@ - - Session monitor - - -

    Session monitor

    -

    Installation

    -For security reasons, the client portion of the session montior may run on one -or more external public machine(s). On these machines, install: -
      -
    • Perl (at l -east 5.004_05 for the 5.004 series or 5.005_03 for the 5.005 series. Don't enable experimental features like threads or the PerlIO abstraction layer.) -
    • FS::SessionClient (copy the fs_session/FS-SessionClient directory to the external machine, then: perl Makefile.PL; make; make install) -
    -Then: -
      -
    • Add the user `freeside' to the the external machine. -
    • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
    • touch /usr/local/freeside/fs_sessiond_socket; chown freeside /usr/local/freeside/fs_sessiond_socket; chmod 600 /usr/local/freeside/fs_sessiond_socket -
    • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
    • Run
      fs_session_server user machine
      on the Freeside machine. -
        -
      • user is a user from the mapsecrets file. -
      • machine is the name of the external machine. -
      -
    -

    Usage

    -
      -
    • Web -
        -
      • Copy FS-SessionClient/cgi/login.cgi and logout.cgi to your web - server's document space. -
      • Use suEXEC or setuid (see install.html for details) to run login.cgi and logout.cgi as the freeside user. -
      -
    • Command-line -
      freeside-login username ( portnum | ip | nasnum nasport )
      -freeside-logout username ( portnum | ip | nasnum nasport )
      -
        -
      • username is a customer username from the svc_acct table -
      • portnum, ip or nasport and nasnum uniquely identify a port in the port database table. -
      -
    • RADIUS -
        -
      • Configure your RADIUS server's login and logout callbacks to use the command-line freeside-login and freeside-logout utilites. -
      -
    -

    Callbacks

    -
      -
    • Sesstion start - The command(s) specified in the session-start configuration file are executed on the Freeside machine. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
    • Session end - The command(s) specified in the session-stop configuration file are executed on the Freeside machine. The contents of the file are treated as a double-quoted perl string, with the following variables available: $ip, $nasip and $nasfqdn, which are the IP address of the starting session, and the IP address and fully-qualified domain name of the NAS this session is on. -
    -

    Dropping expired users

    -Run
    bin/freeside-session-kill username
    periodically from cron. - - diff --git a/httemplate/docs/signup.html b/httemplate/docs/signup.html deleted file mode 100644 index 5168f47d6..000000000 --- a/httemplate/docs/signup.html +++ /dev/null @@ -1,56 +0,0 @@ - - Signup server - - -

    Signup server

    -For security reasons, the signup server should run on an external public -webserver. On this machine, install: - -Then: -
      -
    • Add the user `freeside' to the the external machine. -
    • Copy or symlink fs_signup/FS-SignupClient/cgi/signup.cgi into the web server's document space. -
    • When linking to signup.cgi, you can include a referring custnum in the URL as follows: http://public.web.server/path/signup.cgi?ref=1542 -
    • Enable CGI execution for files with the `.cgi' extension. (with Apache) -
    • Create the /usr/local/freeside directory on the external machine (owned by the freeside user). -
    • touch /usr/local/freeside/fs_signupd_socket; chown freeside /usr/local/freeside/fs_signupd_socket; chmod 600 /usr/local/freeside/fs_signupd_socket -
    • Use suEXEC or setuid (see install.html for details) to run signup.cgi as the freeside user. -
    • Append the identity.pub from the freeside user on your freeside machine to the authorized_keys file of the newly created freeside user on the external machine(s). -
    • Run
      fs_signup_server user machine agentnum refnum
      on the Freeside machine. -
        -
      • user is a user from the mapsecrets file. -
      • machine is the name of the external machine. -
      • agentnum and refnum are the agent and referral, respectively, to use for customers who sign up via this signup server. -
      -
    -Optional: -
      -
    • If you create a /usr/local/freeside/ieak.template file on the external machine, it will be sent to IE users with MIME type application/x-Internet-signup. This file will be processed with Text::Template with the variables listed below available. - (an example file is included as fs_signup/ieak.template) See the IEAK documentation for more information. -
    • If you create a /usr/local/freeside/cck.template file on the external machine, the variables defined will be sent to Netscape users with MIME type application/x-netscape-autoconfigure-dialer-v2. This file will be processed with Text::Template with the variables listed below available. - (an example file is included as fs_signup/cck.template). See the Netscape documentation for more information. -
    • If you create a /usr/local/freeside/success.html file on the external machine, it will be used as the success HTML page. Although template substiutions are available, a regular HTML file will work fine here, unlike signup.html. An example file is included as fs_signup/FS-SignupClient/cgi/success.html -
    • Variable substitutions available in ieak.template, cck.template and success.html: -
        -
      • $ac - area code of selected POP -
      • $exch - exchange of selected POP -
      • $loc - local part of selected POP -
      • $username -
      • $password -
      • $email_name - first and last name -
      • $pkg - package name -
      -
    • If you create a /usr/local/freeside/signup.html file on the external machine, it will be used as a template for the form HTML. This requires the template to be constructed appropriately; probably best to start with the example file included as fs_signup/FS-SignupClient/cgi/signup.html. -
    • If there are any entries in the prepay_credit table, a user can enter a string matching the identifier column to receive the credit specified in the amount column, and/or the time specified in the seconds column (for use with the session monitor), after which that identifier is no longer valid. This can be used to implement pre-paid "calling card" type signups. The bin/generate-prepay script can be used to populate the prepay_credit table. -
    - diff --git a/httemplate/docs/ssh.html b/httemplate/docs/ssh.html deleted file mode 100755 index 5503a242e..000000000 --- a/httemplate/docs/ssh.html +++ /dev/null @@ -1,15 +0,0 @@ - - Unattended SSH - - -

    Unattended SSH

    -
    Unattended remote login - Freeside can login to remote machines unattended using SSH. This can pose a security risk if not configured correctly, and will allow an intruder who breaks into your freeside machine full access to your remote machines. Do not use this feature unless you understand what you are doing! -
      -
    • As the freeside user (on your freeside machine), generate an authentication key using ssh-keygen. Since this is for unattended operation, use a blank passphrase. -
    • Append the newly-created identity.pub file to ~root/.ssh/authorized_keys on the remote machine(s). -
    • Some new SSH v2 implementation accept v2 style keys only. Use the -t option to ssh-keygen, and append the created id_dsa.pub or id_rsa.pub to ~root/.ssh/authorized_keys2 on the remote machine(s). -
    • You may need to set PermitRootLogin without-password (meaning with keys only) in your sshd_config file on the remote machine(s). -
    - - - diff --git a/httemplate/docs/trouble.html b/httemplate/docs/trouble.html deleted file mode 100755 index fce743928..000000000 --- a/httemplate/docs/trouble.html +++ /dev/null @@ -1,26 +0,0 @@ - - Troubleshooting - - -

    Troubleshooting

    -
      -
    • When troubleshooting the web interface, helpful information is often in your web server's error log. -
    • If bin/svc_acct.import fails with an "Out of memory!" error using MySQL, upgrede MySQL and recompile the Perl DBD. There was a memory leak in some older versions of MySQL. -
    • If you get tons of errors in your web server's error log like this: -
      -Ambiguous use of value => resolved to "value" =>
      -at /usr/lib/perl5/site_perl/File/CounterFile.pm line 132.
      -
      - This clutters up your log files but is otherwise harmless. Upgrade to the latest File::CounterFile. -
    • If you get errors like this: -
      -UID.pm: Can't open /var/spool/freeside/conf/secrets: Permission denied 
      -at /your/path/site_perl/FS/UID.pm line 26.
      -BEGIN failed--compilation aborted at
      -/your/path/edit/process/part_svc.cgi line 15.
      -
      - Then the scripts are not running as the freeside freeside user. See -the New Installation section of the documentation. -
    • If you receive `can not connect to server' errors using MySQL on a system that doesn't support native threading, you may need to specify the full hostname in your DBI datasource. See the MySQL documentation, DBI manpage and the DBD::mysql manpage for details. -
    - diff --git a/httemplate/docs/upgrade4.html b/httemplate/docs/upgrade4.html deleted file mode 100644 index 1d70f8b73..000000000 --- a/httemplate/docs/upgrade4.html +++ /dev/null @@ -1,27 +0,0 @@ - - Upgrading to 1.2.2 - - -

    Upgrading to 1.2.2 from 1.2.x

    -
      -
    • If migrating from 1.0.0, see these instructions first. -
    • If migrating from less than 1.1.4, see these instructions first. -
    • If migrating from less than 1.2.0, see these instructions first. -
    • Back up your data and current Freeside installation. -
    • Install the Perl modules Locale-Codes and Net-Whois. -
    • Apply the following changes to your database: -
      -ALTER TABLE cust_pay_batch CHANGE exp exp VARCHAR(11);
      -
      -
    • Copy or symlink htdocs to the new copy. -
    • Remove the symlink or directory (your_site_perl_directory)/FS. -
    • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
      -$ cd FS/
      -$ perl Makefile.PL
      -$ make
      -$ su
      -# make install
      -
    • Run bin/dbdef-create. This file uses MySQL-specific syntax. If you are running a different database engine you will need to modify it slightly. - diff --git a/httemplate/docs/upgrade5.html b/httemplate/docs/upgrade5.html deleted file mode 100644 index 3f3431653..000000000 --- a/httemplate/docs/upgrade5.html +++ /dev/null @@ -1,34 +0,0 @@ - - Upgrading to 1.3.0 - - -

      Upgrading to 1.2.3 from 1.2.2

      -
        -
      • If migrating from 1.0.0, see these instructions first. -
      • If migrating from less than 1.1.4, see these instructions first. -
      • If migrating from less than 1.2.0, see these instructions first. -
      • If migrating from less than 1.2.2, see these instructions first. -
      • Back up your data and current Freeside installation. -
      • Apply the following changes to your database: -
        -ALTER TABLE svc_acct_pop ADD loc CHAR(4);
        -CREATE TABLE prepay_credit (
        -  prepaynum int NOT NULL,
        -  identifier varchar(80) NOT NULL,
        -  amount decimal(10,2) NOT NULL,
        -  PRIMARY KEY (prepaynum),
        -  INDEX (identifier)
        -);
        -
        -
      • Copy or symlink htdocs to the new copy. -
      • Remove the symlink or directory (your_site_perl_directory)/FS. -
      • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
        -$ cd FS/
        -$ perl Makefile.PL
        -$ make
        -$ su
        -# make install
        -
      • Run bin/dbdef-create. This file uses MySQL-specific syntax. If you are running a different database engine you will need to modify it slightly. - diff --git a/httemplate/docs/upgrade6.html b/httemplate/docs/upgrade6.html deleted file mode 100644 index dc82975f3..000000000 --- a/httemplate/docs/upgrade6.html +++ /dev/null @@ -1,66 +0,0 @@ - - Upgrading to 1.3.0 - - -

        Upgrading to 1.3.0 from 1.2.3

        -
          -
        • If migrating from 1.0.0, see these instructions first. -
        • If migrating from less than 1.1.4, see these instructions first. -
        • If migrating from less than 1.2.0, see these instructions first. -
        • If migrating from less than 1.2.2, see these instructions first. -
        • If migrating from less than 1.2.3, see these instructions first. -
        • Back up your data and current Freeside installation. -
        • As 1.3.0 requires transactions, MySQL's default MyISAM and ISAM table types are no longer supported. Converting to PostgreSQL is recommended. If you really want to use MySQL, convert your tables to one of the transaction-safe table types such as BDB. -
        • Copy the invoice_template file from the conf/ directory in the distribution to your configuration directory. -
        • Install the Text-Template, DBIx-DBSchema, Net-SSH, String-ShellQuote and Net-SCP Perl modules. -
        • Apply the following changes to your database: -
          -CREATE TABLE domain_record (
          -  recnum int NOT NULL,
          -  svcnum int NOT NULL,
          -  reczone varchar(80) NOT NULL,
          -  recaf char(2) NOT NULL,
          -  rectype char(5) NOT NULL,
          -  recdata varchar(80) NOT NULL,
          -  PRIMARY KEY (recnum)
          -);
          -CREATE TABLE svc_www (
          -  svcnum int NOT NULL,
          -  recnum int NOT NULL,
          -  usersvc int NOT NULL,
          -  PRIMARY KEY (svcnum)
          -);
          -ALTER TABLE part_svc ADD svc_www__recnum varchar(80) NULL;
          -ALTER TABLE part_svc ADD svc_www__recnum_flag char(1) NULL;
          -ALTER TABLE part_svc ADD svc_www__usersvc varchar(80) NULL;
          -ALTER TABLE part_svc ADD svc_www__uesrsvc_flag char(1) NULL;
          -ALTER TABLE svc_acct CHANGE _password _password varchar(50) NULL;
          -ALTER TABLE svc_acct ADD seconds integer NULL;
          -ALTER TABLE part_svc ADD svc_acct__seconds integer NULL;
          -ALTER TABLE part_svc ADD svc_acct__seconds_flag char(1) NULL;
          -ALTER TABLE prepay_credit ADD seconds integer NULL;
          -
          -
          -
        • If your database supports dropping columns: -
          -ALTER TABLE cust_bill DROP owed;
          -ALTER TABLE cust_credit DROP credited;
          -
          - Or, if your database does not support dropping columns, you can do this: -
          -ALTER TABLE cust_bill CHANGE owed depriciated decimal(10,2);
          -ALTER TABLE cust_credit CHANGE credited depriciated2 decimal(10,2);
          -
          - -
        • Copy or symlink htdocs to the new copy. -
        • Remove the symlink or directory (your_site_perl_directory)/FS. -
        • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
          -$ cd FS/
          -$ perl Makefile.PL
          -$ make
          -$ su
          -# make install
          -
        • Run bin/dbdef-create. - diff --git a/httemplate/docs/upgrade7.html b/httemplate/docs/upgrade7.html deleted file mode 100644 index d9dcfe2ae..000000000 --- a/httemplate/docs/upgrade7.html +++ /dev/null @@ -1,24 +0,0 @@ - - Upgrading to 1.3.1 - - -

          Upgrading to 1.3.1 from 1.3.0

          -
            -
          • If migrating from 1.0.0, see these instructions first. -
          • If migrating from less than 1.1.4, see these instructions first. -
          • If migrating from less than 1.2.0, see these instructions first. -
          • If migrating from less than 1.2.2, see these instructions first. -
          • If migrating from less than 1.2.3, see these instructions first. -
          • If migrating from less than 1.3.0, see these instructions first. -
          • Back up your data and current Freeside installation. -
          • Copy or symlink htdocs to the new copy. -
          • Change to the FS directory in the new tarball, and build and install the - Perl modules: -
            -$ cd FS/
            -$ perl Makefile.PL
            -$ make
            -$ su
            -# make install UNINST=1
            -
          • Run bin/dbdef-create. - diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html deleted file mode 100644 index 0210430ef..000000000 --- a/httemplate/docs/upgrade8.html +++ /dev/null @@ -1,392 +0,0 @@ - - Upgrading to 1.4.0 - - -

            Upgrading to 1.4.0 from 1.3.1

            - - - - - - - - - -
            Apache::ASPMason
              -
            • Run make aspdocs -
            • Copy aspdocs/ to your web server's document space. -
            • Create a Global directory, such as /usr/local/etc/freeside/asp-global/ -
            • Copy htetc/global.asa to the Global directory. -
            • Configure Apache for the Global directory and to execute .cgi files using Apache::ASP. For example: -
              -<Directory /usr/local/apache/htdocs/freeside-asp>
              -<Files ~ (\.cgi)>
              -AddHandler perl-script .cgi
              -PerlHandler Apache::ASP
              -</Files>
              -<Perl>
              -$MLDBM::RemoveTaint = 1;
              -</Perl>
              -PerlSetVar Global /usr/local/etc/freeside/asp-global/
              -</Directory>
              -
              -
              -
            • (use version 1.0x - Freeside is not yet compatible with version 1.1x) -
            • Run make masondocs -
            • Copy masondocs/ to your web server's document space. -
            • Copy htetc/handler.pl to your web server's configuration directory. -
            • Edit handler.pl and set an appropriate data_dir, such as /usr/local/etc/freeside/mason-data -
            • Configure Apache to use the handler.pl file and to execute .cgi files using HTML::Mason. For example: -
              -<Directory /usr/local/apache/htdocs/freeside-mason>
              -<Files ~ (\.cgi)>
              -AddHandler perl-script .cgi
              -PerlHandler HTML::Mason
              -</Files>
              -<Perl>
              -require "/usr/local/apache/conf/handler.pl";
              -</Perl>
              -</Directory>
              -
              -
            -
              -
            • Build and install the Perl modules: -
              -$ su
              -# make install-perl-modules
              -
            • Apply the following changes to your database: -
              -CREATE TABLE svc_forward (
              -  svcnum int NOT NULL,
              -  srcsvc int NOT NULL,
              -  dstsvc int NOT NULL,
              -  dst varchar(80),
              -  PRIMARY KEY (svcnum)
              -);
              -ALTER TABLE part_svc ADD svc_forward__srcsvc varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_forward__srcsvc_flag char(1) NULL;
              -ALTER TABLE part_svc ADD svc_forward__dstsvc varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_forward__dstsvc_flag char(1) NULL;
              -ALTER TABLE part_svc ADD svc_forward__dst varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_forward__dst_flag char(1) NULL;
              -
              -CREATE TABLE cust_credit_bill (
              -  creditbillnum int primary key,
              -  crednum int not null,
              -  invnum int not null,
              -  _date int not null,
              -  amount decimal(10,2) not null
              -);
              -
              -CREATE TABLE cust_bill_pay (
              -  billpaynum int primary key,
              -  invnum int not null,
              -  paynum int not null,
              -  _date int not null,
              -  amount decimal(10,2) not null
              -);
              -
              -CREATE TABLE cust_credit_refund (
              -  creditrefundnum int primary key,
              -  crednum int not null,
              -  refundnum int not null,
              -  _date int not null,
              -  amount decimal(10,2) not null
              -);
              -
              -CREATE TABLE part_svc_column (
              -  columnnum int primary key,
              -  svcpart int not null,
              -  columnname varchar(64) not null,
              -  columnvalue varchar(80) null,
              -  columnflag char(1) null
              -);
              -
              -CREATE TABLE queue (
              -  jobnum int primary key,
              -  job text not null,
              -  _date int not null,
              -  status varchar(80) not null,
              -  statustext text null,
              -  svcnum int null
              -);
              -CREATE INDEX queue1 ON queue ( svcnum );
              -CREATE INDEX queue2 ON queue ( status );
              -
              -CREATE TABLE queue_arg (
              -  argnum int primary key,
              -  jobnum int not null,
              -  arg text null
              -);
              -CREATE INDEX queue_arg1 ON queue_arg ( jobnum );
              -
              -CREATE TABLE queue_depend (
              -  dependnum int primary key,
              -  jobnum int not null,
              -  depend_jobnum int not null
              -);
              -CREATE INDEX queue_depend1 ON queue_depend ( jobnum );
              -CREATE INDEX queue_depend2 ON queue_depend ( depend_jobnum );
              -
              -CREATE TABLE part_pop_local (
              -  localnum int primary key,
              -  popnum int not null,
              -  city varchar(80) null,
              -  state char(2) null,
              -  npa char(3) not null,
              -  nxx char(3) not null
              -);
              -CREATE UNIQUE INDEX part_pop_local1 ON part_pop_local ( npa, nxx );
              -
              -CREATE TABLE cust_bill_event (
              -  eventnum int primary key,
              -  invnum int not null,
              -  eventpart int not null,
              -  _date int not null
              -);
              -CREATE UNIQUE INDEX cust_bill_event1 ON cust_bill_event ( eventpart, invnum );
              -CREATE INDEX cust_bill_event2 ON cust_bill_event ( invnum );
              -
              -CREATE TABLE part_bill_event (
              -  eventpart int primary key,
              -  payby char(4) not null,
              -  event varchar(80) not null,
              -  eventcode text null,
              -  seconds int null,
              -  weight int not null,
              -  plan varchar(80) null,
              -  plandata text null,
              -  disabled char(1) null
              -);
              -CREATE INDEX part_bill_event1 ON part_bill_event ( payby );
              -
              -CREATE TABLE export_svc (
              -  exportsvcnum int primary key,
              -  exportnum int not null,
              -  svcpart int not null
              -);
              -CREATE UNIQUE INDEX export_svc1 ON export_svc ( exportnum, svcpart );
              -CREATE INDEX export_svc2 ON export_svc ( exportnum );
              -CREATE INDEX export_svc3 ON export_svc ( svcpart );
              -
              -CREATE TABLE part_export (
              -  exportnum int primary key,
              -  machine varchar(80) not null,
              -  exporttype varchar(80) not null,
              -  nodomain char(1) NULL
              -);
              -CREATE INDEX part_export1 ON part_export ( machine );
              -CREATE INDEX part_export2 ON part_export ( exporttype );
              -
              -CREATE TABLE part_export_option (
              -  optionnum int primary key,
              -  exportnum int not null,
              -  optionname varchar(80) not null,
              -  optionvalue text NULL
              -);
              -CREATE INDEX part_export_option1 ON part_export_option ( exportnum );
              -CREATE INDEX part_export_option2 ON part_export_option ( optionname );
              -
              -CREATE TABLE radius_usergroup (
              -  usergroupnum int primary key,
              -  svcnum int not null,
              -  groupname varchar(80) not null
              -);
              -CREATE INDEX radius_usergroup1 ON radius_usergroup ( svcnum );
              -CREATE INDEX radius_usergroup2 ON radius_usergroup ( groupname );
              -
              -CREATE TABLE msgcat (
              -  msgnum int primary key,
              -  msgcode varchar(80) not null,
              -  locale varchar(16) not null,
              -  msg text not null
              -);
              -CREATE INDEX msgcat1 ON msgcat ( msgcode, locale );
              -
              -CREATE TABLE cust_tax_exempt (
              -  exemptnum int primary key,
              -  custnum int not null,
              -  taxnum int not null,
              -  year int not null,
              -  month int not null,
              -  amount decimal(10,2)
              -);
              -CREATE UNIQUE INDEX cust_tax_exempt1 ON cust_tax_exempt ( taxnum, year, month );
              -
              -ALTER TABLE svc_acct ADD domsvc integer NULL;
              -ALTER TABLE part_svc ADD svc_acct__domsvc varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_acct__domsvc_flag char(1) NULL;
              -ALTER TABLE svc_domain ADD catchall integer NULL;
              -ALTER TABLE cust_main ADD referral_custnum integer NULL;
              -ALTER TABLE cust_main ADD comments text NULL;
              -ALTER TABLE cust_pay ADD custnum integer;
              -ALTER TABLE cust_pay_batch ADD paybatchnum integer;
              -ALTER TABLE cust_refund ADD custnum integer;
              -ALTER TABLE cust_pkg ADD manual_flag char(1) NULL;
              -ALTER TABLE part_pkg ADD plan varchar(80) NULL;
              -ALTER TABLE part_pkg ADD plandata text NULL;
              -ALTER TABLE part_pkg ADD setuptax char(1) NULL;
              -ALTER TABLE part_pkg ADD recurtax char(1) NULL;
              -ALTER TABLE part_pkg ADD disabled char(1) NULL;
              -ALTER TABLE part_svc ADD disabled char(1) NULL;
              -ALTER TABLE cust_bill ADD closed char(1) NULL;
              -ALTER TABLE cust_pay ADD closed char(1) NULL;
              -ALTER TABLE cust_credit ADD closed char(1) NULL;
              -ALTER TABLE cust_refund ADD closed char(1) NULL;
              -ALTER TABLE cust_bill_event ADD status varchar(80);
              -ALTER TABLE cust_bill_event ADD statustext text NULL;
              -ALTER TABLE svc_acct ADD sec_phrase varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_acct__sec_phrase varchar(80) NULL;
              -ALTER TABLE part_svc ADD svc_acct__sec_phrase_flag char(1) NULL;
              -ALTER TABLE part_pkg ADD taxclass varchar(80) NULL;
              -ALTER TABLE cust_main_county ADD taxclass varchar(80) NULL;
              -ALTER TABLE cust_main_county ADD exempt_amount decimal(10,2);
              -CREATE INDEX cust_main3 ON cust_main ( referral_custnum );
              -CREATE INDEX cust_credit_bill1 ON cust_credit_bill ( crednum );
              -CREATE INDEX cust_credit_bill2 ON cust_credit_bill ( invnum );
              -CREATE INDEX cust_bill_pay1 ON cust_bill_pay ( invnum );
              -CREATE INDEX cust_bill_pay2 ON cust_bill_pay ( paynum );
              -CREATE INDEX cust_credit_refund1 ON cust_credit_refund ( crednum );
              -CREATE INDEX cust_credit_refund2 ON cust_credit_refund ( refundnum );
              -CREATE UNIQUE INDEX cust_pay_batch_pkey ON cust_pay_batch ( paybatchnum );
              -CREATE UNIQUE INDEX part_svc_column1 ON part_svc_column ( svcpart, columnname );
              -CREATE INDEX cust_pay2 ON cust_pay ( paynum );
              -CREATE INDEX cust_pay3 ON cust_pay ( custnum );
              -CREATE INDEX cust_pay4 ON cust_pay ( paybatch );
              -
              - -
            • If you are using PostgreSQL, apply the following changes to your database: -
              -CREATE UNIQUE INDEX agent_pkey ON agent ( agentnum );
              -CREATE UNIQUE INDEX agent_type_pkey ON agent_type ( typenum );
              -CREATE UNIQUE INDEX cust_bill_pkey ON cust_bill ( invnum );
              -CREATE UNIQUE INDEX cust_credit_pkey ON cust_credit ( crednum );
              -CREATE UNIQUE INDEX cust_main_pkey ON cust_main ( custnum );
              -CREATE UNIQUE INDEX cust_main_county_pkey ON cust_main_county ( taxnum );
              -CREATE UNIQUE INDEX cust_main_invoice_pkey ON cust_main_invoice ( destnum );
              -CREATE UNIQUE INDEX cust_pay_pkey ON cust_pay ( paynum );
              -CREATE UNIQUE INDEX cust_pkg_pkey ON cust_pkg ( pkgnum );
              -CREATE UNIQUE INDEX cust_refund_pkey ON cust_refund ( refundnum );
              -CREATE UNIQUE INDEX cust_svc_pkey ON cust_svc ( svcnum );
              -CREATE UNIQUE INDEX domain_record_pkey ON domain_record ( recnum );
              -CREATE UNIQUE INDEX nas_pkey ON nas ( nasnum );
              -CREATE UNIQUE INDEX part_pkg_pkey ON part_pkg ( pkgpart );
              -CREATE UNIQUE INDEX part_referral_pkey ON part_referral ( refnum );
              -CREATE UNIQUE INDEX part_svc_pkey ON part_svc ( svcpart );
              -CREATE UNIQUE INDEX port_pkey ON port ( portnum );
              -CREATE UNIQUE INDEX prepay_credit_pkey ON prepay_credit ( prepaynum );
              -CREATE UNIQUE INDEX session_pkey ON session ( sessionnum );
              -CREATE UNIQUE INDEX svc_acct_pkey ON svc_acct ( svcnum );
              -CREATE UNIQUE INDEX svc_acct_pop_pkey ON svc_acct_pop ( popnum );
              -CREATE UNIQUE INDEX svc_acct_sm_pkey ON svc_acct_sm ( svcnum );
              -CREATE UNIQUE INDEX svc_domain_pkey ON svc_domain ( svcnum );
              -CREATE UNIQUE INDEX svc_www_pkey ON svc_www ( svcnum );
              -
              -
            • If you wish to enable service/shipping addresses, apply the following - changes to your database: -
              -ALTER TABLE cust_main ADD COLUMN ship_last varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_first varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_company varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_address1 varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_address2 varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_city varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_county varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_state varchar(80) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_zip varchar(10) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_country char(2) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_daytime varchar(20) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_night varchar(20) NULL;
              -ALTER TABLE cust_main ADD COLUMN ship_fax varchar(12) NULL;
              -CREATE INDEX cust_main4 ON cust_main ( ship_last );
              -CREATE INDEX cust_main5 ON cust_main ( ship_company );
              -
              -
            • If you are using the signup server, reinstall it according to the instructions. The 1.3.x signup server is not compatible with 1.4.x. -
            • Run bin/dbdef-create username -
            • If you have svc_acct_sm records or service definitions: -
                -
              • Create a service definition with table svc_forward -
              • Run bin/fs-migrate-svc_acct_sm username -
              -
            • Or if you just have svc_acct records: -
                -
              • Order and provision a package for your default domain and note down the Service # or svcnum. -
              • UPDATE svc_acct SET domsvc = svcnum -
              • Update your service definitions to have default (or fixed) domsvc. -
              -
            • Run bin/fs-migrate-payrefusername -
            • Run bin/fs-migrate-part_svcusername -
            • After running bin/fs-migrate-payref, apply the following changes to your database: - -
              PostgreSQLMySQL, others
              -
              -CREATE TABLE cust_pay_temp (
              -  paynum int primary key,
              -  custnum int not null,
              -  paid decimal(10,2) not null,
              -  _date int null,
              -  payby char(4) not null,
              -  payinfo varchar(16) null,
              -  paybatch varchar(80) null,
              -  closed char(1) null
              -);
              -INSERT INTO cust_pay_temp SELECT paynum, custnum, paid, _date, payby, payinfo, paybatch, closed FROM cust_pay;
              -DROP TABLE cust_pay;
              -ALTER TABLE cust_pay_temp RENAME TO cust_pay;
              -CREATE UNIQUE INDEX cust_pay1 ON cust_pay (paynum);
              -CREATE TABLE cust_refund_temp (
              -  refundnum int primary key,
              -  custnum int not null,
              -  _date int null,
              -  refund decimal(10,2) not null,
              -  otaker varchar(8) not null,
              -  reason varchar(80) not null,
              -  payby char(4) not null,
              -  payinfo varchar(16) null,
              -  paybatch varchar(80) null,
              -  closed char(1) null
              -);
              -INSERT INTO cust_refund_temp SELECT refundnum, custnum, _date, refund, otaker, reason, payby, payinfo, '', closed from cust_refund;
              -DROP TABLE cust_refund;
              -ALTER TABLE cust_refund_temp RENAME TO cust_refund;
              -CREATE UNIQUE INDEX cust_refund1 ON cust_refund (refundnum);
              -
              -
              -
              -ALTER TABLE cust_pay DROP COLUMN invnum;
              -ALTER TABLE cust_refund DROP COLUMN crednum;
              -
              -
              -
            • IMPORTANT: After applying the second set of database changes, run bin/dbdef-create username again. -
            • IMPORTANT: run bin/create-history-tables username -
            • IMPORTANT: After running bin/create-history-tables, run bin/dbdef-create username again. -
            • As the freeside UNIX user, run bin/populate-msgcat username to populate the message catalog -
            • set the user_policy configuration value as appropriate for your site. -
            • set the locale configuration value to en_US. -
            • the mxmachines, nsmachines, arecords and cnamerecords configuration values have been deprecated. Set the defaultrecords configuration value instead. -
            • Create the `/usr/local/etc/freeside/cache.datasrc' directory - (owned by the freeside user). -
            • freeside-queued was installed with the Perl modules. Start it now and ensure that is run upon system startup. -
            • Set appropriate invoice events for your site. At the very least, you'll want to set some invoice events "After 0 days": a BILL invoice event to print invoices, a CARD invoice event to batch or run cards real-time, and a COMP invoice event to "pay" complimentary customers. If you were using the -i option to freeside-bill it should be removed. -
            • Use freeside-daily instead of freeside-bill. -
            • If you would like Freeside to notify your customers when their credit - cards and other billing arrangements are about to expire, arrange for - freeside-expiration-alerter to be run daily by cron or similar - facility. The message it sends can be configured from the - Configuration choice of the main menu as alerter_template. -
            • Export has been rewritten. If you were using the icradiusmachines, - icradius_mysqldest, icradius_mysqlsource, or icradius_secrets files, add - an appropriate "sqlradius" export to all relevant Service Definitions - instead. Use MySQL replication or - point the "sqlradius" export directly at your external ICRADIUS or FreeRADIUS - database (or through an SSL-necrypting proxy...) -
            - diff --git a/httemplate/edit/REAL_cust_pkg.cgi b/httemplate/edit/REAL_cust_pkg.cgi deleted file mode 100755 index 0d2f1c238..000000000 --- a/httemplate/edit/REAL_cust_pkg.cgi +++ /dev/null @@ -1,89 +0,0 @@ - -<% -# - -my $error =''; -my $pkgnum = ''; -if ( $cgi->param('error') ) { - $error = $cgi->param('error'); - $pkgnum = $cgi->param('pkgnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "no pkgnum"; - $pkgnum = $1; -} - -#get package record -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -die "No package!" unless $cust_pkg; -my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); - -if ( $error ) { - #$cust_pkg->$_(str2time($cgi->param($_)) foreach qw(setup bill); - $cust_pkg->setup(str2time($cgi->param('setup'))); - $cust_pkg->bill(str2time($cgi->param('bill'))); -} - -#my $custnum = $cust_pkg->getfield('custnum'); -print header('Package Edit'); #, menubar( -# "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", -# 'Main Menu' => popurl(2) -#)); - -#print info -my($susp,$cancel,$expire)=( - $cust_pkg->getfield('susp'), - $cust_pkg->getfield('cancel'), - $cust_pkg->getfield('expire'), -); -my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -my $otaker = $cust_pkg->getfield('otaker'); - -print '
            ', qq!!; - -print qq!Error: $error! - if $error; - -print ntable("#cccccc",2), - 'Package number', - $pkgnum, '', - 'Package', - $pkg, '', - 'Comment', - $comment, '', - 'Order taker', - $otaker, '', - 'Setup date'. - '', - 'Next bill date', - '', -; - -print 'Suspension date', - time2str("%D",$susp), '' - if $susp; - -#print 'Expiration date', -# time2str("%D",$expire), '' -# if $expire; -print 'Expiration date'. - '', - ''. - '
            (will cancel this package'. - ' when the date is reached)'. - ''; - -print 'Cancellation date', - time2str("%D",$cancel), '' - if $cancel; - -%> - -
            -
            - - diff --git a/httemplate/edit/agent.cgi b/httemplate/edit/agent.cgi deleted file mode 100755 index 449456cdd..000000000 --- a/httemplate/edit/agent.cgi +++ /dev/null @@ -1,74 +0,0 @@ - -<% - -my $agent; -if ( $cgi->param('error') ) { - $agent = new FS::agent ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent = qsearchs( 'agent', { 'agentnum' => $1 } ); -} else { #adding - $agent = new FS::agent {}; -} -my $action = $agent->agentnum ? 'Edit' : 'Add'; -my $hashref = $agent->hashref; - -print header("$action Agent", menubar( - 'Main Menu' => $p, - 'View all agents' => $p. 'browse/agent.cgi', -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '
            ', - qq!!, - "Agent #", $hashref->{agentnum} ? $hashref->{agentnum} : "(NEW)"; - -print &ntable("#cccccc", 2, ''), < - Agent - - - - Agent type - - - - - - - -END - -print qq!
            !; - -print < - - -END - -%> diff --git a/httemplate/edit/agent_type.cgi b/httemplate/edit/agent_type.cgi deleted file mode 100755 index 637c710ab..000000000 --- a/httemplate/edit/agent_type.cgi +++ /dev/null @@ -1,63 +0,0 @@ - -<% - -my($agent_type); -if ( $cgi->param('error') ) { - $agent_type = new FS::agent_type ( { - map { $_, scalar($cgi->param($_)) } fields('agent') - } ); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $agent_type=qsearchs('agent_type',{'typenum'=>$1}); -} else { #adding - $agent_type = new FS::agent_type {}; -} -my $action = $agent_type->typenum ? 'Edit' : 'Add'; -my $hashref = $agent_type->hashref; - -print header("$action Agent Type", menubar( - 'Main Menu' => "$p", - 'View all agent types' => "${p}browse/agent_type.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '', - qq!!, - "Agent Type #", $hashref->{typenum} ? $hashref->{typenum} : "(NEW)"; - -print <
            Agent Type -

            Select which packages agents of this type may sell to customers
            -END - -foreach my $part_pkg ( qsearch('part_pkg',{ 'disabled' => '' }) ) { - print qq!
            $agent_type->getfield('typenum'), - 'pkgpart' => $part_pkg->getfield('pkgpart'), - }) - ? 'CHECKED ' - : '', - qq!VALUE="ON"> !, - qq!', $part_pkg->pkgpart. ": ". $part_pkg->getfield('pkg'), '', - ; -} - -print qq!

            !; - -print < - - -END - -%> diff --git a/httemplate/edit/cust_bill_pay.cgi b/httemplate/edit/cust_bill_pay.cgi deleted file mode 100755 index 8cdf4509a..000000000 --- a/httemplate/edit/cust_bill_pay.cgi +++ /dev/null @@ -1,95 +0,0 @@ - -<% - -my($paynum, $amount, $invnum); -if ( $cgi->param('error') ) { - $paynum = $cgi->param('paynum'); - $amount = $cgi->param('amount'); - $invnum = $cgi->param('invnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $paynum = $1; - $amount = ''; - $invnum = ''; -} - -my $otaker = getotaker; - -my $p1 = popurl(1); - -print header("Apply Payment", ''); -print qq!Error: !, $cgi->param('error'), - "

            " - if $cgi->param('error'); -print < -END - -my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ); -die "payment $paynum not found!" unless $cust_pay; - -my $unapplied = $cust_pay->unapplied; - -print "Payment # $paynum". - qq!!. - '
            Date: '. time2str("%D", $cust_pay->_date). ''. - '
            Amount: $'. $cust_pay->paid. ''. - "
            Unapplied amount: \$$unapplied" - ; - -my @cust_bill = grep $_->owed != 0, - qsearch('cust_bill', { 'custnum' => $cust_pay->custnum } ); - -print < -function changed(what) { - cust_bill = what.options[what.selectedIndex].value; -END - -foreach my $cust_bill ( @cust_bill ) { - my $invnum = $cust_bill->invnum; - my $changeto = $cust_bill->owed < $unapplied - ? $cust_bill->owed - : $unapplied; - print < -END - -print qq!
            Invoice #"; - -print qq!
            Amount \$!; - -print < - -END - -print < - - -END - -%> diff --git a/httemplate/edit/cust_credit.cgi b/httemplate/edit/cust_credit.cgi deleted file mode 100755 index aae0df2fc..000000000 --- a/httemplate/edit/cust_credit.cgi +++ /dev/null @@ -1,63 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my($custnum, $amount, $reason); -if ( $cgi->param('error') ) { - #$cust_credit = new FS::cust_credit ( { - # map { $_, scalar($cgi->param($_)) } fields('cust_credit') - #} ); - $custnum = $cgi->param('custnum'); - $amount = $cgi->param('amount'); - #$refund = $cgi->param('refund'); - $reason = $cgi->param('reason'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - $amount = ''; - #$refund = 'yes'; - $reason = ''; -} -my $_date = time; - -my $otaker = getotaker; - -my $p1 = popurl(1); - -print header("Post Credit", ''); -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); -print <config('countrydefault')); - - - - - - - -END - -print '

            Credit'. ntable("#cccccc", 2). - 'Date'. - time2str("%D",$_date). ''; - -print qq!Amount\$!; - -#print qq! Also post refund!; - -print qq!Reason!; - -print qq!Auto-apply
            to invoices!; - -print < -
            - - - - -END - -%> diff --git a/httemplate/edit/cust_credit_bill.cgi b/httemplate/edit/cust_credit_bill.cgi deleted file mode 100755 index 1a97e1312..000000000 --- a/httemplate/edit/cust_credit_bill.cgi +++ /dev/null @@ -1,101 +0,0 @@ - -<% - -my($crednum, $amount, $invnum); -if ( $cgi->param('error') ) { - #$cust_credit_bill = new FS::cust_credit_bill ( { - # map { $_, scalar($cgi->param($_)) } fields('cust_credit_bill') - #} ); - $crednum = $cgi->param('crednum'); - $amount = $cgi->param('amount'); - #$refund = $cgi->param('refund'); - $invnum = $cgi->param('invnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $crednum = $1; - $amount = ''; - #$refund = 'yes'; - $invnum = ''; -} - -my $otaker = getotaker; - -my $p1 = popurl(1); - -print header("Apply Credit", ''); -print qq!Error: !, $cgi->param('error'), - "

            " - if $cgi->param('error'); -print < -END - -my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ); -die "credit $crednum not found!" unless $cust_credit; - -my $credited = $cust_credit->credited; - -print "Credit # $crednum". - qq!!. - '
            Date: '. time2str("%D", $cust_credit->_date). ''. - '
            Amount: $'. $cust_credit->amount. ''. - "
            Unapplied amount: \$$credited". - '
            Reason: '. $cust_credit->reason. '' - ; - -my @cust_bill = grep $_->owed != 0, - qsearch('cust_bill', { 'custnum' => $cust_credit->custnum } ); - -print < -function changed(what) { - cust_bill = what.options[what.selectedIndex].value; -END - -foreach my $cust_bill ( @cust_bill ) { - my $invnum = $cust_bill->invnum; - my $changeto = $cust_bill->owed < $cust_credit->credited - ? $cust_bill->owed - : $cust_credit->credited; - print < -END - -print qq!
            Invoice #"; - -print qq!
            Amount \$!; - -print < - -END - -print < - - -END - -%> diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi deleted file mode 100755 index cf8de2f13..000000000 --- a/httemplate/edit/cust_main.cgi +++ /dev/null @@ -1,460 +0,0 @@ - -<% - - #for misplaced logic below - #use FS::part_pkg; - - #for false laziness below (now more properly lazy) - #use FS::svc_acct_pop; - - #for (other) false laziness below - #use FS::agent; - #use FS::type_pkgs; - -my $conf = new FS::Conf; - -#get record - -my $error = ''; -my($custnum, $username, $password, $popnum, $cust_main, $saved_pkgpart); -if ( $cgi->param('error') ) { - $error = $cgi->param('error'); - $cust_main = new FS::cust_main ( { - map { $_, scalar($cgi->param($_)) } fields('cust_main') - } ); - $custnum = $cust_main->custnum; - $saved_pkgpart = $cgi->param('pkgpart_svcpart') || ''; - if ( $saved_pkgpart =~ /^(\d+)_/ ) { - $saved_pkgpart = $1; - } else { - $saved_pkgpart = ''; - } - $username = $cgi->param('username'); - $password = $cgi->param('_password'); - $popnum = $cgi->param('popnum'); -} elsif ( $cgi->keywords ) { #editing - my( $query ) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum=$1; - $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - $saved_pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; -} else { - $custnum=''; - $cust_main = new FS::cust_main ( {} ); - $cust_main->otaker( &getotaker ); - $cust_main->referral_custnum( $cgi->param('referral_custnum') ); - $saved_pkgpart = 0; - $username = ''; - $password = ''; - $popnum = 0; -} -$cgi->delete_all(); -my $action = $custnum ? 'Edit' : 'Add'; - -# top - -my $p1 = popurl(1); -print header("Customer $action", ''); -print qq!Error: !, $error, "" - if $error; - -print qq!
            !, - qq!!, - qq!Customer # !, ( $custnum ? "$custnum" : " (NEW)" ), - -; - -# agent - -my $r = qq!* !; - -my @agents = qsearch( 'agent', {} ); -#die "No agents created!" unless @agents; -die "You have not created any agents. You must create at least one agent before adding a customer. Go to ". popurl(2). "browse/agent.cgi and create one or more agents." unless @agents; -my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first -if ( scalar(@agents) == 1 ) { - print qq!!; -} else { - print qq!

            ${r}Agent "; -} - -#referral - -my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0; -if ( $custnum && ! $conf->exists('editreferrals') ) { - print qq!!; -} else { - my(@referrals) = qsearch('part_referral',{}); - if ( scalar(@referrals) == 0 ) { - die "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.cgi and create one or more advertising sources."; - } elsif ( scalar(@referrals) == 1 ) { - $refnum ||= $referrals[0]->refnum; - print qq!!; - } else { - print qq!

            ${r}Advertising source "; - } -} - -#referring customer - -#print qq!

            Referring Customer: !; -if ( $cust_main->referral_custnum ) { - my $referring_cust_main = - qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ); - print '

            Referring Customer: '. - $cust_main->referral_custnum. ': '. - ( $referring_cust_main->company - || $referring_cust_main->last. ', '. $referring_cust_main->first ). - ''; -} elsif ( ! $conf->exists('disable_customer_referrals') ) { - print '

            Referring customer number: '; -} else { - print ''; -} - -# contact info - -my($last,$first,$ss,$company,$address1,$address2,$city,$zip)=( - $cust_main->last, - $cust_main->first, - $cust_main->ss, - $cust_main->company, - $cust_main->address1, - $cust_main->address2, - $cust_main->city, - $cust_main->zip, -); - -print "

            Billing address", &itable("#cccccc"), <${r}Contact name
            (last, first) -END - -print < , - - -END - -if ( $conf->exists('show_ss') ) { - print qq!SS#!; -} else { - print qq!!; -} - -print < -Company -${r}Address -${r}City${r}State -END - -#false laziness with ship state -my $countrydefault = $conf->config('countrydefault') || 'US'; -$cust_main->country( $countrydefault ) unless $cust_main->country; - -$cust_main->state( $conf->config('statedefault') || 'CA' ) - unless $cust_main->state || $cust_main->country ne 'US'; - -my($county_html, $state_html, $country_html) = - FS::cust_main_county::regionselector( $cust_main->county, - $cust_main->state, - $cust_main->country ); - -print "$county_html $state_html"; - -print qq!${r}Zip!; - -my($daytime,$night,$fax)=( - $cust_main->daytime, - $cust_main->night, - $cust_main->fax, -); - -print <${r}Country$country_html -Day Phone -Night Phone -Fax -END - -print "${r}required fields
            "; - -# service address - -if ( defined $cust_main->dbdef_table->column('ship_last') ) { - - print "\n", < - function changed(what) { - what.form.same.checked = false; - } - function samechanged(what) { - if ( what.checked ) { -END -print " what.form.ship_$_.value = what.form.$_.value;\n" - for (qw( last first company address1 address2 city zip daytime night fax )); -print < -END - - print '
            Service address ', - '(ship_last ) { - print ' CHECKED'; - foreach ( - qw( last first company address1 address2 city county state zip country - daytime night fax ) - ) { - $cust_main->set("ship_$_", $cust_main->get($_) ); - } - } - print '>same as billing address)
            '; - - my($ship_last,$ship_first,$ship_company,$ship_address1,$ship_address2,$ship_city,$ship_zip)=( - $cust_main->ship_last, - $cust_main->ship_first, - $cust_main->ship_company, - $cust_main->ship_address1, - $cust_main->ship_address2, - $cust_main->ship_city, - $cust_main->ship_zip, - ); - - print &itable("#cccccc"), <${r}Contact name
            (last, first) -END - - print < , - -END - - print < - Company - ${r}Address -   - ${r}City${r}State -END - - #false laziness with regular state - $cust_main->ship_country( $countrydefault ) unless $cust_main->ship_country; - - $cust_main->ship_state( $conf->config('statedefault') || 'CA' ) - unless $cust_main->ship_state || $cust_main->ship_country ne 'US'; - - my($ship_county_html, $ship_state_html, $ship_country_html) = - FS::cust_main_county::regionselector( $cust_main->ship_county, - $cust_main->ship_state, - $cust_main->ship_country, - 'ship_', - 'changed(this)', ); - - print "$ship_county_html $ship_state_html"; - - print qq!${r}Zip!; - - my($ship_daytime,$ship_night,$ship_fax)=( - $cust_main->ship_daytime, - $cust_main->ship_night, - $cust_main->ship_fax, - ); - - print <${r}Country$ship_country_html - Day Phone - Night Phone - Fax -END - - print "${r}required fields
            "; - -} - -# billing info - -sub expselect { - my $prefix = shift; - my( $m, $y ) = (0, 0); - if ( scalar(@_) ) { - my $date = shift || '01-2000'; - if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format - ( $m, $y ) = ( $2, $1 ); - } elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) { - ( $m, $y ) = ( $1, $3 ); - } else { - die "unrecognized expiration date format: $date"; - } - } - - my $return = qq!!; - for ( 2001 .. 2037 ) { - $return .= "Billing information", &itable("#cccccc"), - qq!tax eq "Y"; -print qq!>Tax Exempt!; -print qq!invoicing_list; -print qq! CHECKED! - if ( ! @invoicing_list && ! $conf->exists('disablepostalinvoicedefault') ) - || grep { $_ eq 'POST' } @invoicing_list; -print qq!>Postal mail invoice!; -my $invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list ); -print qq!Email invoice !; - -print "Billing type", - "", - &table("#cccccc"), ""; - -my($payinfo, $payname)=( - $cust_main->payinfo, - $cust_main->payname, -); - -my %payby = ( - 'CARD' => qq!Credit card
            ${r}
            ${r}Exp !. expselect("CARD"). qq!
            ${r}Name on card
            !, - 'BILL' => qq!Billing
            P.O.
            ${r}Exp !. expselect("BILL", "12-2037"). qq!
            Attention
            !, - 'COMP' => qq!Complimentary
            ${r}Approved by
            ${r}Exp !. expselect("COMP"), -); -my %paybychecked = ( - 'CARD' => qq!Credit card
            ${r}
            ${r}Exp !. expselect("CARD", $cust_main->paydate). qq!
            ${r}Name on card
            !, - 'BILL' => qq!Billing
            P.O.
            ${r}Exp !. expselect("BILL", $cust_main->paydate). qq!
            Attention
            !, - 'COMP' => qq!Complimentary
            ${r}Approved by
            ${r}Exp !. expselect("COMP", $cust_main->paydate), -); -for (qw(CARD BILL COMP)) { - print qq!payby eq "$_") { - print qq! CHECKED> $paybychecked{$_}!; - } else { - print qq!> $payby{$_}!; - } -} - -print "$r required fields for each billing type"; - -if ( defined $cust_main->dbdef_table->column('comments') ) { - print "

            Comments", &itable("#cccccc"), - qq!", - ""; -} - -unless ( $custnum ) { - # pry the wrong place for this logic. also pretty expensive - #use FS::part_pkg; - - #false laziness, copied from FS::cust_pkg::order - my $pkgpart; - if ( scalar(@agents) == 1 ) { - # $pkgpart->{PKGPART} is true iff $custnum may purchase PKGPART - my($agent)=qsearchs('agent',{'agentnum'=> $agentnum }); - $pkgpart = $agent->pkgpart_hashref; - } else { - #can't know (agent not chosen), so, allow all - my %typenum; - foreach my $agent ( @agents ) { - next if $typenum{$agent->typenum}++; - #fixed in 5.004_05 #$pkgpart->{$_}++ foreach keys %{ $agent->pkgpart_hashref } - foreach ( keys %{ $agent->pkgpart_hashref } ) { $pkgpart->{$_}++; } #5.004_04 workaround - } - } - #eslaf - - my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } - qsearch( 'part_pkg', { 'disabled' => '' } ); - - if ( @part_pkg ) { - -# print "

            First package", &itable("#cccccc", "0 ALIGN=LEFT"), -#apiabuse & undesirable wrapping - print "

            First package", &itable("#cccccc"), - qq!"; - - #false laziness: (mostly) copied from edit/svc_acct.cgi - #$ulen = $svc_acct->dbdef_table->column('username')->length; - my $ulen = dbdef->table('svc_acct')->column('username')->length; - my $ulen2 = $ulen+2; - my $passwordmax = $conf->config('passwordmax') || 8; - my $pmax2 = $passwordmax + 2; - print <Username - -Password - -(blank to generate) -END - - print 'Access number' - . - &FS::svc_acct_pop::popselector($popnum). - '' - ; - } -} - -my $otaker = $cust_main->otaker; -print qq!!, - qq!
            !, - "", -; - -%> diff --git a/httemplate/edit/cust_main_county-expand.cgi b/httemplate/edit/cust_main_county-expand.cgi deleted file mode 100755 index 9f314a457..000000000 --- a/httemplate/edit/cust_main_county-expand.cgi +++ /dev/null @@ -1,54 +0,0 @@ - -<% - -my($taxnum, $delim, $expansion, $taxclass ); -my($query) = $cgi->keywords; -if ( $cgi->param('error') ) { - $taxnum = $cgi->param('taxnum'); - $delim = $cgi->param('delim'); - $expansion = $cgi->param('expansion'); - $taxclass = $cgi->param('taxclass'); -} else { - $query =~ /^(taxclass)?(\d+)$/ - or die "Illegal taxnum (query $query)"; - $taxclass = $1 ? 'taxclass' : ''; - $taxnum = $2; - $delim = 'n'; - $expansion = ''; -} - -my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die "cust_main_county.taxnum $taxnum not found"; -die "Can't expand entry!" if $cust_main_county->getfield('county'); - -my $p1 = popurl(1); -print header("Tax Rate (expand)", menubar( - 'Main Menu' => popurl(2), -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < - - - Separate by -END -print 'line (broken on some browsers) or', - 'whitespace.'; -print < -
            - -
      -
    • Open up the root of the Freeside document tree in your web - browser. For example, if you created the Freeside document tree in - /home/httpd/html/freeside, and your web browser's DocumentRoot is - /home/httpd/html, open https://your_host/freeside/. Replace - "your_host" with the name or network address of your web server. -
    • Select Configuration from the main menu and update your configuration values. -
    • Next you must create a service definition. An example of a service - definition would be a dial-up account or a domain. First, it is - necessary to create a domain definition. Click on View/Edit service - definitions and Add a new service definition with Table - svc_domain (and no modifiers). - -
    • Now that you have created your first service, you must create a package - including this service which you can sell to customers. Zero, one, or many - services are bundled into a package. Click on View/Edit package - definitions and Add a new package definition which includes - quantity 1 of the svc_domain service you created above. - -
    • After you create your first package, then you must define who is - able to sell that package by creating an agent type. An example of - an agent type would be an internal sales representitive which sells - regular and promotional packages, as opposed to an external sales - representitive which would only sell regular packages of services. Click on - View/Edit agent types and Add a new agent type. Allow this - agent type to sell the package you created above. - -
    • After creating a new agent type, you must create an agent. Click on - View/Edit agents and Add a new agent. - -
    • Set up at least one Advertising source. Advertising sources will help - you keep track of how effective your advertising is, tracking where customers - heard of your service offerings. You must create at least one advertising - source. If you do not wish to use the referral functionality, simply create - a single advertising source only. Click on View/Edit advertising - sources and Add a new advertising source. - -
    • Click on New Customer and create a new customer for your system - accounts with billing type Complimentary. - -
    • From the Customer View screen of the newly created customer, order the - package you defined above. - -
    • From the Package View screen of the newly created package, choose - (Provision) to add the customer's service for this new package. - -
    • Add your own domain. - -
    • Go back to View/Edit service definitions on the main menu, and - Add a new service definition with Table svc_acct. - Select your domain in the domsvc Modifier. Set Fixed to define - a service locked-in to this domain, or Default to define a service - which may select from among this domain and the customer's domains. - -
    • - - - -
      Create at least POP (Point of Presence) by selecting - View/Edit POPs from the main menu. OR If you are not doing dialup, set slipip to fixed and blank for all your - Service Definitions which have Table svc_acct.
      - -
    • If you are using Freeside to keep track of sales taxes, define tax - information for your locales by clicking on the View/Edit locales and tax - rates on the main menu. - -
    • If you would like Freeside to notify your customers when their credit - cards and other billing arrangements are about to expire, arrange for - freeside-expiration-alerter to be run daily by cron or similar - facility. The message it sends can be configured from the - Configuration choice of the main menu as alerter_template. - -
    - - -END - -%> diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi deleted file mode 100755 index 7ef37a48d..000000000 --- a/httemplate/edit/cust_main_county.cgi +++ /dev/null @@ -1,66 +0,0 @@ - -<% - -print header("Edit tax rates", menubar( - 'Main Menu' => popurl(2), -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
    !, &table(), < - Country - State - County - Taxclass - Tax - Exempt
    per
    month - -END - -foreach my $cust_main_county ( sort { $a->country cmp $b->country - or $a->state cmp $b->state - or $a->county cmp $b->county - } qsearch('cust_main_county',{}) ) { - my($hashref)=$cust_main_county->hashref; - print < - $hashref->{country} -END - - print "{state} - ? ' BGCOLOR="#ffffff">'.$hashref->{state} - : ' BGCOLOR="#cccccc">(ALL)' - , ""; - - print "{county} - ? ' BGCOLOR="#ffffff">'. $hashref->{county} - : ' BGCOLOR="#cccccc">(ALL)' - , ""; - - print "{taxclass} - ? ' BGCOLOR="#ffffff">'. $hashref->{taxclass} - : ' BGCOLOR="#cccccc">(ALL)' - , ""; - - print qq!%!; - print qq!\$!; - print ''; - -} - -print < - - -
    - - -END - -%> diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi deleted file mode 100755 index f6ae7b299..000000000 --- a/httemplate/edit/cust_pay.cgi +++ /dev/null @@ -1,129 +0,0 @@ - -<% - -my $conf = new FS::Conf; - -my($link, $linknum, $paid, $payby, $payinfo, $quickpay); -if ( $cgi->param('error') ) { - $link = $cgi->param('link'); - $linknum = $cgi->param('linknum'); - $paid = $cgi->param('paid'); - $payby = $cgi->param('payby'); - $payinfo = $cgi->param('payinfo'); - $quickpay = $cgi->param('quickpay'); -} elsif ($cgi->keywords) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $link = 'invnum'; - $linknum = $1; - $paid = ''; - $payby = 'BILL'; - $payinfo = ""; - $quickpay = ''; -} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) { - $link = 'custnum'; - $linknum = $1; - $paid = ''; - $payby = 'BILL'; - $payinfo = ''; - $quickpay = $cgi->param('quickpay'); -} else { - die "illegal query ". $cgi->keywords; -} -my $_date = time; - -my $paybatch = "webui-$_date-$$-". rand() * 2**32; - -my $p1 = popurl(1); -print header("Post payment", ''); - -print qq!Error: !, $cgi->param('error'), - "

    " - if $cgi->param('error'); - -print < - - - -END - -my $custnum; -if ( $link eq 'invnum' ) { - - my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } ) - or die "unknown invnum $linknum"; - print "Invoice #$linknum". ntable("#cccccc",2). - 'Date'. - time2str("%D", $cust_bill->_date). ''. - 'Items'; - foreach ( $cust_bill->cust_bill_pkg ) { #false laziness with FS::cust_bill - if ( $_->pkgnum ) { - - my($cust_pkg)=qsearchs('cust_pkg', { 'pkgnum', $_->pkgnum } ); - my($part_pkg)=qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->pkgpart}); - my($pkg)=$part_pkg->pkg; - - if ( $_->setup != 0 ) { - print "$pkg Setup
    "; # $money_char. sprintf("%10.2f",$_->setup); - print join('
    ', - map { " ". $_->[0]. ": ". $_->[1] } $cust_pkg->labels - ). '
    '; - } - - if ( $_->recur != 0 ) { - print - "$pkg (" . time2str("%x",$_->sdate) . " - " . - time2str("%x",$_->edate) . ")
    "; - #$money_char. sprintf("%10.2f",$_->recur) - print join('
    ', - map { '--->'. $_->[0]. ": ". $_->[1] } $cust_pkg->labels - ). '
    '; - } - - } else { #pkgnum Tax - print "Tax
    " # $money_char. sprintf("%10.2f",$_->setup) - if $_->setup != 0; - } - - } - print '

    '; - - $custnum = $cust_bill->custnum; - -} elsif ( $link eq 'custnum' ) { - $custnum = $linknum; -} - -print small_custview($custnum, $conf->config('countrydefault')); - -print qq!!; -print qq!!; - -print '

    Payment'. ntable("#cccccc", 2). - 'Date'. - time2str("%D",$_date). ''; - -print qq!Amount\$!; - -print qq!Payby$payby!; - -#payinfo (check # now as payby="BILL" hardcoded.. what to do later?) -print qq!Check #!; - -print qq!Auto-apply
    to invoices!; - -print ""; - -#paybatch -print qq!!; - -print < - - - - -END - -%> diff --git a/httemplate/edit/cust_pkg.cgi b/httemplate/edit/cust_pkg.cgi deleted file mode 100755 index 485d601eb..000000000 --- a/httemplate/edit/cust_pkg.cgi +++ /dev/null @@ -1,117 +0,0 @@ - -<% - -my %pkg = (); -my %comment = (); -my %all_pkg = (); -my %all_comment = (); -#foreach (qsearch('part_pkg', { 'disabled' => '' })) { -# $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); -# $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); -#} -foreach (qsearch('part_pkg', {} )) { - $all_pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $all_comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); - next if $_->disabled; - $pkg{ $_ -> getfield('pkgpart') } = $_->getfield('pkg'); - $comment{ $_ -> getfield('pkgpart') } = $_->getfield('comment'); -} - -my($custnum, %remove_pkg); -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - %remove_pkg = map { $_ => 1 } $cgi->param('remove_pkg'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $custnum = $1; - %remove_pkg = (); -} - -my $p1 = popurl(1); -print header("Add/Edit Packages", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
    !; - -print qq!!; - -#current packages -my @cust_pkg = qsearch('cust_pkg',{ 'custnum' => $custnum, 'cancel' => '' } ); - -if (@cust_pkg) { - print <
    -END - - my $count = 0 ; - print qq!! ; - foreach (@cust_pkg) { - print '' if $count == 0; - my($pkgnum,$pkgpart)=( $_->getfield('pkgnum'), $_->getfield('pkgpart') ); - print qq!\n!; - $count ++ ; - if ($count == 2) - { - $count = 0 ; - print qq!\n! ; - } - } - print qq!
    $pkgnum: $all_pkg{$pkgpart} - $all_comment{$pkgpart}


    !; -} - -print <
    -END - -my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -my $agent = qsearchs('agent',{'agentnum'=> $cust_main->agentnum }); - -my $count = 0; -my $pkgparts = 0; -print qq!!; -foreach my $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { - $pkgparts++; - my($pkgpart)=$type_pkgs->pkgpart; - next unless exists $pkg{$pkgpart}; #skip disabled ones - print qq!! if ( $count == 0 ); - my $value = $cgi->param("pkg$pkgpart") || 0; - print < - - $pkgpart: $pkg{$pkgpart} - $comment{$pkgpart}\n -END - $count ++ ; - if ( $count == 2 ) { - print qq!\n! ; - $count = 0; - } -} -print qq!
    !; - -unless ( $pkgparts ) { - my $p2 = popurl(2); - my $typenum = $agent->typenum; - my $agent_type = qsearchs( 'agent_type', { 'typenum' => $typenum } ); - my $atype = $agent_type->atype; - print <package definitions, or agent type -$atype not allowed to purchase -any packages.) -END -} - -#submit -print < - - - -END -%> diff --git a/httemplate/edit/msgcat.cgi b/httemplate/edit/msgcat.cgi deleted file mode 100755 index ee9b1c6b3..000000000 --- a/httemplate/edit/msgcat.cgi +++ /dev/null @@ -1,58 +0,0 @@ - -<% - -print header("Edit Message catalog", menubar( -# 'Main Menu' => $p, -)), '
    '; - -print qq!Error: !. $cgi->param('error'). - '

    ' - if $cgi->param('error'); - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => 'en_US', - 'options' => { 'en_US'=>'en_US' }, - 'form_action' => 'process/msgcat.cgi', - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - "
    Messages for locale $layer
    ". table(). - "Code". - "Message"; - $html .= "en_US Message" unless $layer eq 'en_US'; - $html .= ''; - - #foreach my $msgcat ( sort { $a->msgcode cmp $b->msgcode } - # qsearch('msgcat', { 'locale' => $layer } ) ) { - foreach my $msgcat ( qsearch('msgcat', { 'locale' => $layer } ) ) { - $html .= - ''. $msgcat->msgnum. ''. $msgcat->msgcode. ''. - '!; - unless ( $layer eq 'en_US' ) { - my $en_msgcat = qsearchs('msgcat', { - 'locale' => 'en_US', - 'msgcode' => $msgcat->msgcode, - } ); - $html .= ''. $en_msgcat->msg. ''; - } - $html .= ''; - } - - $html .= '
    '; - - $html; - }, - -); - -print $widget->html; - -print < - - -END - -%> diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi deleted file mode 100755 index 324daeb90..000000000 --- a/httemplate/edit/part_bill_event.cgi +++ /dev/null @@ -1,192 +0,0 @@ - -<% - -if ( $cgi->param('eventpart') && $cgi->param('eventpart') =~ /^(\d+)$/ ) { - $cgi->param('eventpart', $1); -} else { - $cgi->param('eventpart', ''); -} - -my ($query) = $cgi->keywords; -my $action = ''; -my $part_bill_event = ''; -if ( $cgi->param('error') ) { - $part_bill_event = new FS::part_bill_event ( { - map { $_, scalar($cgi->param($_)) } fields('part_bill_event') - } ); -} -if ( $query && $query =~ /^(\d+)$/ ) { - $part_bill_event ||= qsearchs('part_bill_event',{'eventpart'=>$1}); -} else { - $part_bill_event ||= new FS::part_bill_event {}; -} -$action ||= $part_bill_event->pkgpart ? 'Edit' : 'Add'; -my $hashref = $part_bill_event->hashref; - -print header("$action Invoice Event Definition", menubar( - 'Main Menu' => popurl(2), - 'View all invoice events' => popurl(2). 'browse/part_bill_event.cgi', -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print '
    '. - ''; -print "Invoice Event #", $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)"; - -print ntable("#cccccc",2), <Payby -After days -END - -print 'Disabled'; -print '{disabled} eq "Y"; -print '>'; -print ''; - -print 'Action'; - -#print ntable(); - -#this is pretty kludgy right here. -tie my %events, 'Tie::IxHash', - - 'fee' => { - 'name' => 'Late fee', - 'code' => '$cust_main->charge( %%%charge%%%, \'%%%reason%%%\' );', - 'html' => - 'Amount '. - '
    Reason ', - 'weight' => 10, - }, - 'suspend' => { - 'name' => 'Suspend', - 'code' => '$cust_main->suspend();', - 'weight' => 10, - }, - 'cancel' => { - 'name' => 'Cancel', - 'code' => '$cust_main->cancel();', - 'weight' => 10, - }, - - 'addpost' => { - 'name' => 'Add postal invoicing', - 'code' => '$cust_main->invoicing_list_addpost(); "";', - 'weight' => 20, - }, - - 'comp' => { - 'name' => 'Pay invoice with a complimentary "payment"', - 'code' => '$cust_bill->comp();', - 'weight' => 30, - }, - - 'realtime-card' => { - 'name' => 'Run card with a Business::OnlinePayment realtime gateway', - 'code' => '$cust_bill->realtime_card();', - 'weight' => 30, - }, - - 'realtime-card-cybercash' => { - 'name' => '(deprecated) Run card with CyberCash CashRegister realtime gateway', - 'code' => '$cust_bill->realtime_card_cybercash();', - 'weight' => 30, - }, - - 'batch-card' => { - 'name' => 'Add card to the pending credit card batch', - 'code' => '$cust_bill->batch_card();', - 'weight' => 40, - }, - - 'send' => { - 'name' => 'Send invoice (email/print)', - 'code' => '$cust_bill->send();', - 'weight' => 50, - }, - - 'send_alternate' => { - 'name' => 'Send invoice (email/print) with alternate template', - 'code' => '$cust_bill->send(\'%%%templatename%%%\');', - 'html' => - '', - 'weight' => 50, - }, - - 'bill' => { - 'name' => 'Generate invoices (normally only used with a Late Fee event)', - 'code' => '$cust_main->bill();', - 'weight' => 60, - }, - - 'apply' => { - 'name' => 'Apply unapplied payments and credits', - 'code' => '$cust_main->apply_payments; $cust_main->apply_credits; "";', - 'weight' => 70, - }, - - 'collect' => { - 'name' => 'Collect on invoices (normally only used with a Late Fee and Generate Invoice events)', - 'code' => '$cust_main->collect();', - 'weight' => 80, - }, - -; - -foreach my $event ( keys %events ) { - my %plandata = map { /^(\w+) (.*)$/; ($1, $2); } - split(/\n/, $part_bill_event->plandata); - my $html = $events{$event}{html}; - while ( $html =~ /%%%(\w+)%%%/ ) { - my $field = $1; - $html =~ s/%%%$field%%%/$plandata{$field}/; - } - - print ntable( "#cccccc", 2). - qq!plan; - print qq!VALUE="!. $event. ":". $events{$event}{weight}. ":". - encode_entities($events{$event}{code}). - qq!">$events{$event}{name}!; - print ''. $html. '' if $html; - print qq!!; - print ''; -} - -#print ''; - -print < - -END - -print qq!!; -%> - - - - - diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi deleted file mode 100644 index 486bd4300..000000000 --- a/httemplate/edit/part_export.cgi +++ /dev/null @@ -1,117 +0,0 @@ - -<% - -#if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { -# $cgi->param('clone', $1); -#} else { -# $cgi->param('clone', ''); -#} - -my($query) = $cgi->keywords; -my $action = ''; -my $part_export = ''; -if ( $cgi->param('error') ) { - $part_export = new FS::part_export ( { - map { $_, scalar($cgi->param($_)) } fields('part_export') - } ); -} elsif ( $query =~ /^(\d+)$/ ) { - $part_export = qsearchs('part_export', { 'exportnum' => $1 } ); -} else { - $part_export = new FS::part_export; -} -$action ||= $part_export->exportnum ? 'Edit' : 'Add'; - -#my $exports = FS::part_export::export_info($svcdb); -my $exports = FS::part_export::export_info(); - -my %layers = map { $_ => "$_ - ". $exports->{$_}{desc} } keys %$exports; -$layers{''}=''; - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => $part_export->exporttype, - 'options' => \%layers, - 'form_name' => 'dummy', - 'form_action' => 'process/part_export.cgi', - 'form_text' => [qw( exportnum machine )], -# 'form_checkbox' => [qw()], - 'html_between' => "\n", - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - ntable("#cccccc",2); - - $html .= 'Description'. - $exports->{$layer}{notes}. '' - if $layer; - - foreach my $option ( keys %{$exports->{$layer}{options}} ) { - my $optinfo = $exports->{$layer}{options}{$option}; - my $label = $optinfo->{label}; - my $type = defined($optinfo->{type}) ? $optinfo->{type} : 'text'; - my $value = $cgi->param($option) - || $part_export->option($option) - || (exists $optinfo->{default} ? $optinfo->{default} : ''); - $html .= qq!$label!; - if ( $type eq 'select' ) { - $html .= qq!'; - } elsif ( $type eq 'textarea' ) { - $html .= qq!!; - } elsif ( $type eq 'text' ) { - $html .= qq!!; - } else { - $html .= "unknown type $type"; - } - $html .= ''; - } - $html .= ''; - - $html .= ''; - - $html .= ''; - - $html .= ''; - - $html; - }, -); - -%> -<%= header("$action Export", menubar( - 'Main Menu' => popurl(2), -), ' onLoad="visualize()"') -%> - -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -

    -<% } %> - -
    - - -<%= ntable("#cccccc",2) %> - - Export host - - - - - - Export - <%= $widget->html %> - - - diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi deleted file mode 100755 index b6ecff2d0..000000000 --- a/httemplate/edit/part_pkg.cgi +++ /dev/null @@ -1,464 +0,0 @@ - -<% - -if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { - $cgi->param('clone', $1); -} else { - $cgi->param('clone', ''); -} -if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { - $cgi->param('pkgnum', $1); -} else { - $cgi->param('pkgnum', ''); -} - -my ($query) = $cgi->keywords; -my $action = ''; -my $part_pkg = ''; -if ( $cgi->param('error') ) { - $part_pkg = new FS::part_pkg ( { - map { $_, scalar($cgi->param($_)) } fields('part_pkg') - } ); -} -if ( $cgi->param('clone') ) { - $action='Custom Pricing'; - my $old_part_pkg = - qsearchs('part_pkg', { 'pkgpart' => $cgi->param('clone') } ); - $part_pkg ||= $old_part_pkg->clone; - $part_pkg->disabled('Y'); -} elsif ( $query && $query =~ /^(\d+)$/ ) { - $part_pkg ||= qsearchs('part_pkg',{'pkgpart'=>$1}); -} else { - unless ( $part_pkg ) { - $part_pkg = new FS::part_pkg {}; - $part_pkg->plan('flat'); - } -} -unless ( $part_pkg->plan ) { #backwards-compat - $part_pkg->plan('flat'); - $part_pkg->plandata("setup_fee=". $part_pkg->setup. "\n". - "recur_fee=". $part_pkg->recur. "\n"); -} -$action ||= $part_pkg->pkgpart ? 'Edit' : 'Add'; -my $hashref = $part_pkg->hashref; - - -print header("$action Package Definition", menubar( - 'Main Menu' => popurl(2), - 'View all packages' => popurl(2). 'browse/part_pkg.cgi', -)); -#), ' onLoad="visualize()"'); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -#print ''; -print ''; - -#if ( $cgi->param('clone') ) { -# print qq!!; -#} -#if ( $cgi->param('pkgnum') ) { -# print qq!!; -#} -# -#print qq!!, -print "Package Part #", $hashref->{pkgpart} ? $hashref->{pkgpart} : "(NEW)"; - -print ntable("#cccccc",2), <Package (customer-visable) -Comment (customer-hidden) -Frequency (months) of recurring fee  0=no recurring fee, 1=monthly, 3=quarterly, 12=yearly -Setup fee tax exempt -END - -print '{setuptax} eq "Y"; -print '>'; - -print < -Recurring fee tax exempt -END - -print '{recurtax} eq "Y"; -print '>'; - -print ''; - -my $conf = new FS::Conf; -#false laziness w/ view/cust_main.cgi quick order -if ( $conf->exists('enable_taxclasses') ) { - print 'Tax class'; -} else { - print - ''; -} - -print 'Disable new orders'; -print '{disabled} eq "Y"; -print '>'; -print ''; - -my $thead = "\n\n". ntable('#cccccc', 2). <Quan.Service -END - -#unless ( $cgi->param('clone') ) { -#dunno why... -unless ( 0 ) { - #print <', $thead; -

    Enter the quantity of each service this package includes.

    -END -} - -my @fixups = (); -my $count = 0; -my $columns = 3; -my @part_svc = qsearch( 'part_svc', { 'disabled' => '' } ); -foreach my $part_svc ( @part_svc ) { - my $svcpart = $part_svc->svcpart; - my $pkg_svc = qsearchs( 'pkg_svc', { - 'pkgpart' => $cgi->param('clone') || $part_pkg->pkgpart, - 'svcpart' => $svcpart, - } ) || new FS::pkg_svc ( { - 'pkgpart' => $cgi->param('clone') || $part_pkg->pkgpart, - 'svcpart' => $svcpart, - 'quantity' => 0, - }); - #? #next unless $pkg_svc; - - push @fixups, "pkg_svc$svcpart"; - - #unless ( defined ($cgi->param('clone')) && $cgi->param('clone') ) { - #dunno why... - unless ( 0 ) { - print ''; # if $count == 0 ; - print qq!quantity || 0, - qq!">!, $part_svc->getfield('svc'), ""; -# print "$thead" if ++$count == int(scalar(@part_svc) / 2); - $count+=1; - foreach ( 1 .. $columns-1 ) { - print "$thead" - if $count == int( $_ * scalar(@part_svc) / $columns ); - } - } else { - print qq!quantity || 0, qq!">\n!; - } -} - -#unless ( $cgi->param('clone') ) { -#dunno why... -unless ( 0 ) { - print ""; - #print ""; -} - -foreach my $f ( qw( clone pkgnum ) ) { - print qq!'; -} -print ''; - -# prolly should be in database -tie my %plans, 'Tie::IxHash', - 'flat' => { - 'name' => 'Flat rate (anniversary billing)', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee' ], - 'setup' => 'what.setup_fee.value', - 'recur' => 'what.recur_fee.value', - }, - - 'flat_delayed' => { - 'name' => 'Free for X days, then flat rate (anniversary billing)', - 'fields' => { - 'free_days' => { 'name' => 'Initial free days', - 'default' => 0, - }, - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'free_days', 'setup_fee', 'recur_fee' ], - 'setup' => '\'my $d = $cust_pkg->bill || $time; $d += 86400 * \' + what.free_days.value + \'; $cust_pkg->bill($d); $cust_pkg_mod_flag=1; \' + what.setup_fee.value', - 'recur' => 'what.recur_fee.value', - }, - - 'prorate' => { - 'name' => 'First partial month pro-rated, then flat-rate (1st of month billing)', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '\'my $mnow = $sdate; my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate) )[0,1,2,3,4,5]; my $mstart = timelocal(0,0,0,1,$mon,$year); my $mend = timelocal(0,0,0,1, $mon == 11 ? 0 : $mon+1, $year+($mon==11)); $sdate = $mstart; ( $part_pkg->freq - 1 ) * \' + what.recur_fee.value + \' / $part_pkg->freq + \' + what.recur_fee.value + \' / $part_pkg->freq * ($mend-$mnow) / ($mend-$mstart) ; \'', - }, - - 'subscription' => { - 'name' => 'First partial month full charge, then flat-rate (1st of month billing)', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '\'my $mnow = $sdate; my ($sec,$min,$hour,$mday,$mon,$year) = (localtime($sdate) )[0,1,2,3,4,5]; $sdate = timelocal(0,0,0,1,$mon,$year); \' + what.recur_fee.value', - }, - - 'flat_comission_cust' => { - 'name' => 'Flat rate with recurring commission per active customer', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - 'comission_amount' => { 'name' => 'Commission amount per month (per active customer)', - 'default' => 0, - }, - 'comission_depth' => { 'name' => 'Number of layers', - 'default' => 1, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee', 'comission_depth', 'comission_amount' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '\'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar($cust_pkg->cust_main->referral_cust_main_ncancelled(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'', - }, - - 'flat_comission' => { - 'name' => 'Flat rate with recurring commission per (any) active package', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - 'comission_amount' => { 'name' => 'Commission amount per month (per active package)', - 'default' => 0, - }, - 'comission_depth' => { 'name' => 'Number of layers', - 'default' => 1, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee', 'comission_depth', 'comission_amount' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '\'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar($cust_pkg->cust_main->referral_cust_pkg(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'', - }, - - 'flat_comission_pkg' => { - 'name' => 'Flat rate with recurring commission per (selected) active package', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_fee' => { 'name' => 'Recurring fee for this package', - 'default' => 0, - }, - 'comission_amount' => { 'name' => 'Commission amount per month (per uncancelled package)', - 'default' => 0, - }, - 'comission_depth' => { 'name' => 'Number of layers', - 'default' => 1, - }, - 'comission_pkgpart' => { 'name' => 'Applicable packages
    (hold ctrl to select multiple packages)', - 'type' => 'select_multiple', - 'select_table' => 'part_pkg', - 'select_hash' => { 'disabled' => '' } , - 'select_key' => 'pkgpart', - 'select_label' => 'pkg', - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_fee', 'comission_depth', 'comission_amount', 'comission_pkgpart' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '""; var pkgparts = ""; for ( var c=0; c < document.flat_comission_pkg.comission_pkgpart.options.length; c++ ) { if (document.flat_comission_pkg.comission_pkgpart.options[c].selected) { pkgparts = pkgparts + document.flat_comission_pkg.comission_pkgpart.options[c].value + \', \'; } } what.recur.value = \'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar( grep { my $pkgpart = $_->pkgpart; grep { $_ == $pkgpart } ( \' + pkgparts + \' ) } $cust_pkg->cust_main->referral_cust_pkg(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'', - }, - - - - 'sesmon_hour' => { - 'name' => 'Base charge plus charge per-hour from the session monitor', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_flat' => { 'name' => 'Base monthly charge for this package', - 'default' => 0, - }, - 'recur_included_hours' => { 'name' => 'Hours included', - 'default' => 0, - }, - 'recur_hourly_charge' => { 'name' => 'Additional charge per hour', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_flat', 'recur_included_hours', 'recur_hourly_charge' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '\'my $hours = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 3600 - \' + what.recur_included_hours.value + \'; $hours = 0 if $hours < 0; \' + what.recur_flat.value + \' + \' + what.recur_hourly_charge.value + \' * $hours;\'', - }, - - 'sesmon_minute' => { - 'name' => 'Base charge plus charge per-minute from the session monitor', - 'fields' => { - 'setup_fee' => { 'name' => 'Setup fee for this package', - 'default' => 0, - }, - 'recur_flat' => { 'name' => 'Base monthly charge for this package', - 'default' => 0, - }, - 'recur_included_min' => { 'name' => 'Minutes included', - 'default' => 0, - }, - 'recur_minly_charge' => { 'name' => 'Additional charge per minute', - 'default' => 0, - }, - }, - 'fieldorder' => [ 'setup_fee', 'recur_flat', 'recur_included_min', 'recur_minly_charge' ], - 'setup' => 'what.setup_fee.value', - 'recur' => '\'my $min = $cust_pkg->seconds_since($cust_pkg->bill || 0) / 60 - \' + what.recur_included_min.value + \'; $min = 0 if $min < 0; \' + what.recur_flat.value + \' + \' + what.recur_minly_charge.value + \' * $min;\'', - - }, - -; - -my %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); } - split("\n", $part_pkg->plandata ); - -tie my %options, 'Tie::IxHash', map { $_=>$plans{$_}->{'name'} } keys %plans; - -my @form_select = (); -if ( $conf->exists('enable_taxclasses') ) { - push @form_select, 'taxclass'; -} else { - push @fixups, 'taxclass'; #hidden -} - - -my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => $part_pkg->plan, - 'options' => \%options, - 'form_name' => 'dummy', - 'form_action' => 'process/part_pkg.cgi', - 'form_text' => [ qw(pkg comment freq clone pkgnum pkgpart), @fixups ], - 'form_checkbox' => [ qw(setuptax recurtax disabled) ], - 'form_select' => [ @form_select ], - 'fixup_callback' => sub { - #my $ = @_; - my $html = ''; - for my $p ( keys %plans ) { - $html .= "if ( what.plan.value == \"$p\" ) { - what.setup.value = $plans{$p}->{setup} ; - what.recur.value = $plans{$p}->{recur} ; - }\n"; - } - $html; - }, - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - ntable("#cccccc",2); - my $href = $plans{$layer}->{'fields'}; - foreach my $field ( exists($plans{$layer}->{'fieldorder'}) - ? @{$plans{$layer}->{'fieldorder'}} - : keys %{ $href } - ) { - - $html .= ''. $href->{$field}{'name'}. ''; - - if ( ! exists($href->{$field}{'type'}) ) { - $html .= qq!!; - } elsif ( $href->{$field}{'type'} eq 'select_multiple' ) { - $html .= qq!'; - } - - $html .= ''; - } - $html .= ''; - - $html .= ''. - '

    '; - - $html .= ''; - - $html .= '

    don\'t edit this unless you know what you\'re doing '. - ''. - ntable("#cccccc",2). - ''. - 'Setup expression
    '. - ''. - '

    '. - 'Recurring espression
    '. - ''. - '
    '. - ''. - ''; - - $html; - - }, -); - -%> - -
    -Price plan <%= $widget->html %> - - diff --git a/httemplate/edit/part_referral.cgi b/httemplate/edit/part_referral.cgi deleted file mode 100755 index f784dfa3e..000000000 --- a/httemplate/edit/part_referral.cgi +++ /dev/null @@ -1,48 +0,0 @@ - -<% - -my $part_referral; -if ( $cgi->param('error') ) { - $part_referral = new FS::part_referral ( { - map { $_, scalar($cgi->param($_)) } fields('part_referral') - } ); -} elsif ( $cgi->keywords ) { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/; - $part_referral = qsearchs( 'part_referral', { 'refnum' => $1 } ); -} else { #adding - $part_referral = new FS::part_referral {}; -} -my $action = $part_referral->refnum ? 'Edit' : 'Add'; -my $hashref = $part_referral->hashref; - -my $p1 = popurl(1); -print header("$action Advertising source", menubar( - 'Main Menu' => popurl(2), - 'View all advertising sources' => popurl(2). "browse/part_referral.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -print qq!!; -#print "Referral #", $hashref->{refnum} ? $hashref->{refnum} : "(NEW)"; - -print < -END - -print qq!
    !; - -print < - - -END - -%> diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi deleted file mode 100755 index 4ccb770fb..000000000 --- a/httemplate/edit/part_svc.cgi +++ /dev/null @@ -1,232 +0,0 @@ - -<% - my $part_svc; - my $clone = ''; - if ( $cgi->param('error') ) { #error - $part_svc = new FS::part_svc ( { - map { $_, scalar($cgi->param($_)) } fields('part_svc') - } ); - } elsif ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone - #$cgi->param('clone') =~ /^(\d+)$/ or die "malformed query: $query"; - $part_svc = qsearchs('part_svc', { 'svcpart'=>$1 } ) - or die "unknown svcpart: $1"; - $clone = $part_svc->svcpart; - $part_svc->svcpart(''); - } elsif ( $cgi->keywords ) { #edit - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "malformed query: $query"; - $part_svc=qsearchs('part_svc', { 'svcpart'=>$1 } ) - or die "unknown svcpart: $1"; - } else { #adding - $part_svc = new FS::part_svc {}; - } - my $action = $part_svc->svcpart ? 'Edit' : 'Add'; - my $hashref = $part_svc->hashref; -# my $p_svcdb = $part_svc->svcdb || 'svc_acct'; - - - #" onLoad=\"visualize()\"" -%> - -<%= header("$action Service Definition", - menubar( 'Main Menu' => $p, - 'View all service definitions' => "${p}browse/part_svc.cgi" - ), - ) -%> - -<% if ( $cgi->param('error') ) { %> -Error: <%= $cgi->param('error') %> -<% } %> - - - - Service Part #<%= $part_svc->svcpart ? $part_svc->svcpart : "(NEW)" %> -

    -Service
    -Disable new orders {disabled} eq 'Y' ? ' CHECKED' : '' %>>
    - -
    -Services are items you offer to your customers. -
    • svc_acct - Shell accounts, POP mailboxes, SLIP/PPP and ISDN accounts -
    • svc_domain - Domains -
    • svc_acct_sm - deprecated (use svc_forward for new installations) Virtual domain mail aliasing. -
    • svc_forward - mail forwarding -
    • svc_www - Virtual domain website - -
    -For the selected table, you can give fields default or fixed (unchangable) -values. For example, a SLIP/PPP account may have a default (or perhaps fixed) -slipip of 0.0.0.0, while a POP mailbox will probably have a fixed -blank slipip as well as a fixed shell something like /bin/true or -/usr/bin/passwd. -

    - -<% -#these might belong somewhere else for other user interfaces -#pry need to eventually create stuff that's shared amount UIs -my %defs = ( - 'svc_acct' => { - 'dir' => 'Home directory', - 'uid' => 'UID (set to fixed and blank for dial-only)', - 'slipip' => 'IP address (Set to fixed and blank to disable dialin, or, set a value to be exported to RADIUS Framed-IP-Address. Use the special value 0e0 [zero e zero] to enable export to RADIUS without a Framed-IP-Address.)', -# 'popnum' => qq!POP number!, - 'popnum' => { - desc => 'Access number', - type => 'select', - select_table => 'svc_acct_pop', - select_key => 'popnum', - select_label => 'city', - }, - 'username' => 'Username', - 'quota' => '', - '_password' => 'Password', - 'gid' => 'GID (when blank, defaults to UID)', - 'shell' => 'Shell (all service definitions should have a default or fixed shell that is present in the shells configuration file)', - 'finger' => 'GECOS', - 'domsvc' => { - desc =>'svcnum from svc_domain', - type =>'select', - select_table => 'svc_domain', - select_key => 'svcnum', - select_label => 'domain', - }, - 'usergroup' => { - desc =>'ICRADIUS/FreeRADIUS groups', - type =>'radius_usergroup_selector', - }, - }, - 'svc_domain' => { - 'domain' => 'Domain', - }, - 'svc_acct_sm' => { - 'domuser' => 'domuser@virtualdomain.com', - 'domuid' => 'UID where domuser@virtualdomain.com mail is forwarded', - 'domsvc' => 'svcnum from svc_domain for virtualdomain.com', - }, - 'svc_forward' => { - 'srcsvc' => 'service from which mail is to be forwarded', - 'dstsvc' => 'service to which mail is to be forwarded', - 'dst' => 'someone@another.domain.com to use when dstsvc is 0', - }, - 'svc_charge' => { - 'amount' => 'amount', - }, - 'svc_wo' => { - 'worker' => 'Worker', - '_date' => 'Date', - }, - 'svc_www' => { - #'recnum' => '', - #'usersvc' => '', - }, -); - - my @dbs = $hashref->{svcdb} - ? ( $hashref->{svcdb} ) - : qw( svc_acct svc_domain svc_acct_sm svc_forward svc_www ); - - tie my %svcdb, 'Tie::IxHash', map { $_=>$_ } @dbs; - my $widget = new HTML::Widgets::SelectLayers( - #'selected_layer' => $p_svcdb, - 'selected_layer' => $hashref->{svcdb} || 'svc_acct', - 'options' => \%svcdb, - 'form_name' => 'dummy', - 'form_action' => 'process/part_svc.cgi', - 'form_text' => [ qw( svc svcpart ) ], - 'form_checkbox' => [ 'disabled' ], - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!; - - my $columns = 3; - my $count = 0; - my @part_export = - map { qsearch( 'part_export', {exporttype => $_ } ) } - keys %{FS::part_export::export_info($layer)}; - $html .= '

    '. table(). - table(). "Exports"; - foreach my $part_export ( @part_export ) { - $html .= ' $part_export->exportnum, - svcpart => $clone || $part_svc->svcpart }); - $html .= '> '. $part_export->exporttype. ' to '. $part_export->machine. - ''; - $count++; - $html .= '' unless $count % $columns; - } - $html .= '

    '; - - $html .= table(). "FieldModifier"; - #yucky kludge - my @fields = defined( $FS::Record::dbdef->table($layer) ) - ? grep { $_ ne 'svcnum' } fields($layer) - : (); - push @fields, 'usergroup' if $layer eq 'svc_acct'; #kludge - $part_svc->svcpart($clone) if $clone; #haha, undone below - foreach my $field (@fields) { - my $part_svc_column = $part_svc->part_svc_column($field); - my $value = $cgi->param('error') - ? $cgi->param("${layer}__${field}") - : $part_svc_column->columnvalue; - my $flag = $cgi->param('error') - ? $cgi->param("${layer}__${field}_flag") - : $part_svc_column->columnflag; - my $def = $defs{$layer}{$field}; - my $desc = ref($def) ? $def->{desc} : $def; - - $html .= "$field"; - $html .= "- $desc" if $desc; - $html .= ""; - $html .= - qq!Off". - qq!Default ". - qq!Fixed ". - '
    '; - if ( ref($def) ) { - if ( $def->{type} eq 'select' ) { - $html .= qq!'; - } elsif ( $def->{type} eq 'radius_usergroup_selector' ) { - $html .= FS::svc_acct::radius_usergroup_selector( - [ split(',', $value) ], "${layer}__${field}" ); - } else { - $html .= 'unknown type'. $def->{type}; - } - } else { - $html .= - qq!!; - } - $html .= "\n"; - } - $part_svc->svcpart('') if $clone; #undone - $html .= ""; - - $html .= '
    '; - - $html; - - }, - ); - -%> -Table <%= $widget->html %> - - - diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi deleted file mode 100755 index 2e0352c76..000000000 --- a/httemplate/edit/process/REAL_cust_pkg.cgi +++ /dev/null @@ -1,20 +0,0 @@ -<% - -my $pkgnum = $cgi->param('pkgnum') or die; -my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my %hash = $old->hash; -$hash{'setup'} = $cgi->param('setup') ? str2time($cgi->param('setup')) : ''; -$hash{'bill'} = $cgi->param('bill') ? str2time($cgi->param('bill')) : ''; -$hash{'expire'} = $cgi->param('expire') ? str2time($cgi->param('expire')) : ''; -my $new = new FS::cust_pkg \%hash; - -my $error = $new->replace($old); - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "REAL_cust_pkg.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $pkgnum); -} - -%> diff --git a/httemplate/edit/process/agent.cgi b/httemplate/edit/process/agent.cgi deleted file mode 100755 index 182eeab41..000000000 --- a/httemplate/edit/process/agent.cgi +++ /dev/null @@ -1,28 +0,0 @@ -<% - -my $agentnum = $cgi->param('agentnum'); - -my $old = qsearchs('agent',{'agentnum'=>$agentnum}) if $agentnum; - -my $new = new FS::agent ( { - map { - $_, scalar($cgi->param($_)); - } fields('agent') -} ); - -my $error; -if ( $agentnum ) { - $error=$new->replace($old); -} else { - $error=$new->insert; - $agentnum=$new->getfield('agentnum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "agent.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/agent.cgi"); -} - -%> diff --git a/httemplate/edit/process/agent_type.cgi b/httemplate/edit/process/agent_type.cgi deleted file mode 100755 index 516594573..000000000 --- a/httemplate/edit/process/agent_type.cgi +++ /dev/null @@ -1,55 +0,0 @@ -<% - -my $typenum = $cgi->param('typenum'); -my $old = qsearchs('agent_type',{'typenum'=>$typenum}) if $typenum; - -my $new = new FS::agent_type ( { - map { - $_, scalar($cgi->param($_)); - } fields('agent_type') -} ); - -my $error; -if ( $typenum ) { - $error=$new->replace($old); -} else { - $error=$new->insert; - $typenum=$new->getfield('typenum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "agent_type.cgi?". $cgi->query_string ); -} else { - - #false laziness w/ edit/process/part_svc.cgi - foreach my $part_pkg (qsearch('part_pkg',{})) { - my($pkgpart)=$part_pkg->getfield('pkgpart'); - - my($type_pkgs)=qsearchs('type_pkgs',{ - 'typenum' => $typenum, - 'pkgpart' => $pkgpart, - }); - if ( $type_pkgs && ! $cgi->param("pkgpart$pkgpart") ) { - my($d_type_pkgs)=$type_pkgs; #need to save $type_pkgs for below. - $error=$d_type_pkgs->delete; - die $error if $error; - - } elsif ( $cgi->param("pkgpart$pkgpart") - && ! $type_pkgs - ) { - #ok to clobber it now (but bad form nonetheless?) - $type_pkgs=new FS::type_pkgs ({ - 'typenum' => $typenum, - 'pkgpart' => $pkgpart, - }); - $error= $type_pkgs->insert; - die $error if $error; - } - - } - - print $cgi->redirect(popurl(3). "browse/agent_type.cgi"); -} - -%> diff --git a/httemplate/edit/process/cust_bill_pay.cgi b/httemplate/edit/process/cust_bill_pay.cgi deleted file mode 100755 index 0c33506a8..000000000 --- a/httemplate/edit/process/cust_bill_pay.cgi +++ /dev/null @@ -1,31 +0,0 @@ -<% - -$cgi->param('paynum') =~ /^(\d*)$/ or die "Illegal paynum!"; -my $paynum = $1; - -my $cust_pay = qsearchs('cust_pay', { 'paynum' => $paynum } ) - or die "No such paynum"; - -my $cust_main = qsearchs('cust_main', { 'custnum' => $cust_pay->custnum } ) - or die "Bogus credit: not attached to customer"; - -my $custnum = $cust_main->custnum; - -my $new = new FS::cust_bill_pay ( { - map { - $_, scalar($cgi->param($_)); - #} qw(custnum _date amount invnum) - } fields('cust_bill_pay') -} ); - -my $error = $new->insert; - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_bill_pay.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - - -%> diff --git a/httemplate/edit/process/cust_credit.cgi b/httemplate/edit/process/cust_credit.cgi deleted file mode 100755 index ac92631f8..000000000 --- a/httemplate/edit/process/cust_credit.cgi +++ /dev/null @@ -1,30 +0,0 @@ -<% - -$cgi->param('custnum') =~ /^(\d*)$/ or die "Illegal custnum!"; -my $custnum = $1; - -$cgi->param('otaker',getotaker); - -my $new = new FS::cust_credit ( { - map { - $_, scalar($cgi->param($_)); - #} qw(custnum _date amount otaker reason) - } fields('cust_credit') -} ); - -my $error = $new->insert; - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_credit.cgi?". $cgi->query_string ); -} else { - if ( $cgi->param('apply') eq 'yes' ) { - my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum }) - or die "unknown custnum $custnum"; - $cust_main->apply_credits; - } - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - - -%> diff --git a/httemplate/edit/process/cust_credit_bill.cgi b/httemplate/edit/process/cust_credit_bill.cgi deleted file mode 100755 index 23e2e6ce5..000000000 --- a/httemplate/edit/process/cust_credit_bill.cgi +++ /dev/null @@ -1,43 +0,0 @@ -<% - -$cgi->param('crednum') =~ /^(\d*)$/ or die "Illegal crednum!"; -my $crednum = $1; - -my $cust_credit = qsearchs('cust_credit', { 'crednum' => $crednum } ) - or die "No such crednum"; - -my $cust_main = qsearchs('cust_main', { 'custnum' => $cust_credit->custnum } ) - or die "Bogus credit: not attached to customer"; - -my $custnum = $cust_main->custnum; - -my $new; -if ($cgi->param('invnum') =~ /^Refund$/) { - $new = new FS::cust_refund ( { - 'reason' => $cust_credit->reason, - 'refund' => $cgi->param('amount'), - 'payby' => 'BILL', - #'_date' => $cgi->param('_date'), - 'payinfo' => 'Cash', - 'crednum' => $crednum, - } ); -} else { - $new = new FS::cust_credit_bill ( { - map { - $_, scalar($cgi->param($_)); - #} qw(custnum _date amount invnum) - } fields('cust_credit_bill') - } ); -} - -my $error = $new->insert; - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_credit_bill.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - - -%> diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi deleted file mode 100755 index 6ce60d14a..000000000 --- a/httemplate/edit/process/cust_main.cgi +++ /dev/null @@ -1,119 +0,0 @@ -<% - -my $error = ''; - -#unmunge stuff - -$cgi->param('tax','') unless defined $cgi->param('tax'); - -$cgi->param('refnum', (split(/:/, ($cgi->param('refnum'))[0] ))[0] ); - -my $payby = $cgi->param('payby'); -if ( $payby ) { - $cgi->param('payinfo', $cgi->param( $payby. '_payinfo' ) ); - $cgi->param('paydate', - $cgi->param( $payby. '_month' ). '-'. $cgi->param( $payby. '_year' ) ); - $cgi->param('payname', $cgi->param( $payby. '_payname' ) ); -} - -$cgi->param('otaker', &getotaker ); - -my @invoicing_list = split( /\s*\,\s*/, $cgi->param('invoicing_list') ); -push @invoicing_list, 'POST' if $cgi->param('invoicing_list_POST'); - -#create new record object - -my $new = new FS::cust_main ( { - map { - $_, scalar($cgi->param($_)) -# } qw(custnum agentnum last first ss company address1 address2 city county -# state zip daytime night fax payby payinfo paydate payname tax -# otaker refnum) - } fields('cust_main') -} ); - -if ( defined($cgi->param('same')) && $cgi->param('same') eq "Y" ) { - $new->setfield("ship_$_", '') foreach qw( - last first company address1 address2 city county state zip - country daytime night fax - ); -} - -#perhaps this stuff should go to cust_main.pm -my $cust_pkg = ''; -my $svc_acct = ''; -if ( $new->custnum eq '' ) { - - if ( $cgi->param('pkgpart_svcpart') ) { - my $x = $cgi->param('pkgpart_svcpart'); - $x =~ /^(\d+)_(\d+)$/; - my($pkgpart, $svcpart) = ($1, $2); - #false laziness: copied from FS::cust_pkg::order (which should become a - #FS::cust_main method) - my(%part_pkg); - # generate %part_pkg - # $part_pkg{$pkgpart} is true iff $custnum may purchase $pkgpart - my $agent = qsearchs('agent',{'agentnum'=> $new->agentnum }); - #my($type_pkgs); - #foreach $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) { - # my($pkgpart)=$type_pkgs->pkgpart; - # $part_pkg{$pkgpart}++; - #} - # $pkgpart_href->{PKGPART} is true iff $custnum may purchase $pkgpart - my $pkgpart_href = $agent->pkgpart_hashref; - #eslaf - - # this should wind up in FS::cust_pkg! - $error ||= "Agent ". $new->agentnum. " (type ". $agent->typenum. ") can't". - "purchase pkgpart ". $pkgpart - #unless $part_pkg{ $pkgpart }; - unless $pkgpart_href->{ $pkgpart }; - - $cust_pkg = new FS::cust_pkg ( { - #later 'custnum' => $custnum, - 'pkgpart' => $pkgpart, - } ); - $error ||= $cust_pkg->check; - - #$cust_svc = new FS::cust_svc ( { 'svcpart' => $svcpart } ); - - #$error ||= $cust_svc->check; - - $svc_acct = new FS::svc_acct ( { - 'svcpart' => $svcpart, - 'username' => $cgi->param('username'), - '_password' => $cgi->param('_password'), - 'popnum' => $cgi->param('popnum'), - } ); - - my $y = $svc_acct->setdefault; # arguably should be in new method - $error ||= $y unless ref($y); - #and just in case you were silly - $svc_acct->svcpart($svcpart); - $svc_acct->username($cgi->param('username')); - $svc_acct->_password($cgi->param('_password')); - $svc_acct->popnum($cgi->param('popnum')); - - $error ||= $svc_acct->check; - - } elsif ( $cgi->param('username') ) { #good thing to catch - $error = "Can't assign username without a package!"; - } - - use Tie::RefHash; - tie my %hash, 'Tie::RefHash'; - %hash = ( $cust_pkg => [ $svc_acct ] ) if $cust_pkg; - $error ||= $new->insert( \%hash, \@invoicing_list ); -} else { #create old record object - my $old = qsearchs( 'cust_main', { 'custnum' => $new->custnum } ); - $error ||= "Old record not found!" unless $old; - $error ||= $new->replace($old, \@invoicing_list); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_main.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new->custnum); -} -%> diff --git a/httemplate/edit/process/cust_main_county-collapse.cgi b/httemplate/edit/process/cust_main_county-collapse.cgi deleted file mode 100755 index 8e67140a8..000000000 --- a/httemplate/edit/process/cust_main_county-collapse.cgi +++ /dev/null @@ -1,35 +0,0 @@ -<% - -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/ or die "Illegal taxnum!"; -my $taxnum = $1; -my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die ("Unknown taxnum!"); - -#really should do this in a .pm & start transaction - -foreach my $delete ( qsearch('cust_main_county', { - 'country' => $cust_main_county->country, - 'state' => $cust_main_county->state - } ) ) { -# unless ( qsearch('cust_main',{ -# 'state' => $cust_main_county->getfield('state'), -# 'county' => $cust_main_county->getfield('county'), -# 'country' => $cust_main_county->getfield('country'), -# } ) ) { - my $error = $delete->delete; - die $error if $error; -# } else { - #should really fix the $cust_main record -# } - -} - -$cust_main_county->taxnum(''); -$cust_main_county->county(''); -my $error = $cust_main_county->insert; -die $error if $error; - -print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi"); - -%> diff --git a/httemplate/edit/process/cust_main_county-expand.cgi b/httemplate/edit/process/cust_main_county-expand.cgi deleted file mode 100755 index a452711c1..000000000 --- a/httemplate/edit/process/cust_main_county-expand.cgi +++ /dev/null @@ -1,58 +0,0 @@ -<% - -$cgi->param('taxnum') =~ /^(\d+)$/ or die "Illegal taxnum!"; -my $taxnum = $1; -my $cust_main_county = qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die ("Unknown taxnum!"); - -my @expansion; -if ( $cgi->param('delim') eq 'n' ) { - @expansion=split(/\n/,$cgi->param('expansion')); -} elsif ( $cgi->param('delim') eq 's' ) { - @expansion=split(' ',$cgi->param('expansion')); -} else { - die "Illegal delim!"; -} - -@expansion=map { - unless ( /^\s*([\w\- ]+)\s*$/ ) { - $cgi->param('error', "Illegal item in expansion"); - print $cgi->redirect(popurl(2). "cust_main_county-expand.cgi?". $cgi->query_string ); - myexit(); - } - $1; -} @expansion; - -foreach ( @expansion) { - my(%hash)=$cust_main_county->hash; - my($new)=new FS::cust_main_county \%hash; - $new->setfield('taxnum',''); - if ( $cgi->param('taxclass') ) { - $new->setfield('taxclass', $_); - } elsif ( ! $cust_main_county->state ) { - $new->setfield('state',$_); - } else { - $new->setfield('county',$_); - } - #if (datasrc =~ m/Pg/) - #{ - # $new->setfield('tax',0.0); - #} - my($error)=$new->insert; - die $error if $error; -} - -unless ( qsearch( 'cust_main', { - 'state' => $cust_main_county->state, - 'county' => $cust_main_county->county, - 'country' => $cust_main_county->country, - } ) - || ! @expansion -) { - my($error)=($cust_main_county->delete); - die $error if $error; -} - -print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi"); - -%> diff --git a/httemplate/edit/process/cust_main_county.cgi b/httemplate/edit/process/cust_main_county.cgi deleted file mode 100755 index 990a23919..000000000 --- a/httemplate/edit/process/cust_main_county.cgi +++ /dev/null @@ -1,25 +0,0 @@ -<% - -foreach ( grep { /^tax\d+$/ } $cgi->param ) { - /^tax(\d+)$/ or die "Illegal form $_!"; - my($taxnum)=$1; - my($old)=qsearchs('cust_main_county',{'taxnum'=>$taxnum}) - or die "Couldn't find taxnum $taxnum!"; - my $exempt_amount = $cgi->param("exempt_amount$taxnum"); - next unless $old->tax ne $cgi->param("tax$taxnum") - || $old->exempt_amount ne $exempt_amount; - my %hash = $old->hash; - $hash{tax} = $cgi->param("tax$taxnum"); - $hash{exempt_amount} = $exempt_amount; - my($new)=new FS::cust_main_county \%hash; - my($error)=$new->replace($old); - if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string ); - myexit(); - } -} - -print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi"); - -%> diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi deleted file mode 100755 index 82442ae00..000000000 --- a/httemplate/edit/process/cust_pay.cgi +++ /dev/null @@ -1,39 +0,0 @@ -<% - -$cgi->param('linknum') =~ /^(\d+)$/ - or die "Illegal linknum: ". $cgi->param('linknum'); -my $linknum = $1; - -$cgi->param('link') =~ /^(custnum|invnum)$/ - or die "Illegal link: ". $cgi->param('link'); -my $link = $1; - -my $new = new FS::cust_pay ( { - $link => $linknum, - map { - $_, scalar($cgi->param($_)); - } qw(paid _date payby payinfo paybatch) - #} fields('cust_pay') -} ); - -my $error = $new->insert; - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). 'cust_pay.cgi?'. $cgi->query_string ); -} elsif ( $link eq 'invnum' ) { - print $cgi->redirect(popurl(3). "view/cust_bill.cgi?$linknum"); -} elsif ( $link eq 'custnum' ) { - if ( $cgi->param('apply') eq 'yes' ) { - my $cust_main = qsearchs('cust_main', { 'custnum' => $linknum }) - or die "unknown custnum $linknum"; - $cust_main->apply_payments; - } - if ( $cgi->param('quickpay') eq 'yes' ) { - print $cgi->redirect(popurl(3). "search/cust_main-quickpay.html"); - } else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$linknum"); - } -} - -%> diff --git a/httemplate/edit/process/cust_pkg.cgi b/httemplate/edit/process/cust_pkg.cgi deleted file mode 100755 index f8c9f5151..000000000 --- a/httemplate/edit/process/cust_pkg.cgi +++ /dev/null @@ -1,36 +0,0 @@ -<% - -my $error = ''; - -#untaint custnum -$cgi->param('custnum') =~ /^(\d+)$/; -my $custnum = $1; - -my @remove_pkgnums = map { - /^(\d+)$/ or die "Illegal remove_pkg value!"; - $1; -} $cgi->param('remove_pkg'); - -my @pkgparts; -foreach my $pkgpart ( map /^pkg(\d+)$/ ? $1 : (), $cgi->param ) { - if ( $cgi->param("pkg$pkgpart") =~ /^(\d+)$/ ) { - my $num_pkgs = $1; - while ( $num_pkgs-- ) { - push @pkgparts,$pkgpart; - } - } else { - $error = "Illegal quantity"; - last; - } -} - -$error ||= FS::cust_pkg::order($custnum,\@pkgparts,\@remove_pkgnums); - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "cust_pkg.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum"); -} - -%> diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi deleted file mode 100755 index b8c3f62a1..000000000 --- a/httemplate/edit/process/domain_record.cgi +++ /dev/null @@ -1,34 +0,0 @@ -<% - -my $recnum = $cgi->param('recnum'); - -my $old = qsearchs('agent',{'recnum'=>$recnum}) if $recnum; - -my $new = new FS::domain_record ( { - map { - $_, scalar($cgi->param($_)); - } fields('domain_record') -} ); - -my $error; -if ( $recnum ) { - $error=$new->replace($old); -} else { - $error=$new->insert; - $recnum=$new->getfield('recnum'); -} - -if ( $error ) { -# $cgi->param('error', $error); -# print $cgi->redirect(popurl(2). "agent.cgi?". $cgi->query_string ); - #no edit screen to send them back to -%> - -<% - eidiot($error); -} else { - my $svcnum = $new->svcnum; - print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum"); -} - -%> diff --git a/httemplate/edit/process/msgcat.cgi b/httemplate/edit/process/msgcat.cgi deleted file mode 100644 index 1f94f6668..000000000 --- a/httemplate/edit/process/msgcat.cgi +++ /dev/null @@ -1,20 +0,0 @@ -<% - -my $error; -foreach my $param ( grep { /^\d+$/ } $cgi->param ) { - my $old = qsearchs('msgcat', { msgnum=>$param } ); - next if $old->msg eq $cgi->param($param); #no need to update identical records - my $new = new FS::msgcat { $old->hash }; - $new->msg($cgi->param($param)); - $error = $new->replace($old); - last if $error; -} - -if ( $error ) { - $cgi->param('error',$error); - print $cgi->redirect($p. "msgcat.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/msgcat.cgi"); -} - -%> diff --git a/httemplate/edit/process/part_bill_event.cgi b/httemplate/edit/process/part_bill_event.cgi deleted file mode 100755 index 4049ade80..000000000 --- a/httemplate/edit/process/part_bill_event.cgi +++ /dev/null @@ -1,53 +0,0 @@ -<% - -my $eventpart = $cgi->param('eventpart'); - -my $old = qsearchs('part_bill_event',{'eventpart'=>$eventpart}) if $eventpart; - -#s/days/seconds/ -$cgi->param('seconds', $cgi->param('days') * 86400 ); - -my $error; -if ( ! $cgi->param('plan_weight_eventcode') ) { - $error = "Must select an action"; -} else { - - $cgi->param('plan_weight_eventcode') =~ /^([\w\-]+):(\d+):(.*)$/ - or die "illegal plan_weight_eventcode:". - $cgi->param('plan_weight_eventcode'); - $cgi->param('plan', $1); - $cgi->param('weight', $2); - my $eventcode = $3; - my $plandata = ''; - while ( $eventcode =~ /%%%(\w+)%%%/ ) { - my $field = $1; - my $value = $cgi->param($field); - $eventcode =~ s/%%%$field%%%/$value/; - $plandata .= "$field $value\n"; - } - $cgi->param('eventcode', $eventcode); - $cgi->param('plandata', $plandata); - - my $new = new FS::part_bill_event ( { - map { - $_, scalar($cgi->param($_)); - } fields('part_bill_event'), - } ); - - if ( $eventpart ) { - $error = $new->replace($old); - } else { - $error = $new->insert; - $eventpart = $new->getfield('eventpart'); - } -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "part_bill_event.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3)."browse/part_bill_event.cgi"); -} - -%> - diff --git a/httemplate/edit/process/part_export.cgi b/httemplate/edit/process/part_export.cgi deleted file mode 100644 index fa009edbb..000000000 --- a/httemplate/edit/process/part_export.cgi +++ /dev/null @@ -1,39 +0,0 @@ -<% - -my $exportnum = $cgi->param('exportnum'); - -my $old = qsearchs('part_export', { 'exportnum'=>$exportnum } ) if $exportnum; - -#fixup options -#warn join('-', split(',',$cgi->param('options'))); -my %options = map { - my $value = $cgi->param($_); - $value =~ s/\r\n/\n/g; #browsers? (textarea) - $_ => $value; -} split(',', $cgi->param('options')); - -my $new = new FS::part_export ( { - map { - $_, scalar($cgi->param($_)); - } fields('part_export') -} ); - -my $error; -if ( $exportnum ) { - #warn $old; - #warn $exportnum; - #warn $new->machine; - $error = $new->replace($old,\%options); -} else { - $error = $new->insert(\%options); -# $exportnum = $new->exportnum; -} - -if ( $error ) { - $cgi->param('error', $error ); - print $cgi->redirect(popurl(2). "part_export.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/part_export.cgi"); -} - -%> diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi deleted file mode 100755 index d489426f9..000000000 --- a/httemplate/edit/process/part_pkg.cgi +++ /dev/null @@ -1,109 +0,0 @@ -<% - -my $dbh = dbh; - -my $pkgpart = $cgi->param('pkgpart'); - -my $old = qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart; - -#fixup plandata -my $plandata = $cgi->param('plandata'); -my @plandata = split(',', $plandata); -$cgi->param('plandata', - join('', map { "$_=". join(', ', $cgi->param($_)). "\n" } @plandata ) -); - -foreach (qw( setuptax recurtax disabled )) { - $cgi->param($_, '') unless defined $cgi->param($_); -} - -my $new = new FS::part_pkg ( { - map { - $_, scalar($cgi->param($_)); - } fields('part_pkg') -} ); - -#warn "setuptax: ". $new->setuptax; -#warn "recurtax: ". $new->recurtax; - -#most of the stuff below should move to part_pkg.pm - -foreach my $part_svc ( qsearch('part_svc', {} ) ) { - my $quantity = $cgi->param('pkg_svc'. $part_svc->svcpart) || 0; - unless ( $quantity =~ /^(\d+)$/ ) { - $cgi->param('error', "Illegal quantity" ); - print $cgi->redirect(popurl(2). "part_pkg.cgi?". $cgi->query_string ); - myexit(); - } -} - -local $SIG{HUP} = 'IGNORE'; -local $SIG{INT} = 'IGNORE'; -local $SIG{QUIT} = 'IGNORE'; -local $SIG{TERM} = 'IGNORE'; -local $SIG{TSTP} = 'IGNORE'; -local $SIG{PIPE} = 'IGNORE'; - -local $FS::UID::AutoCommit = 0; - -my $error; -if ( $pkgpart ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $pkgpart=$new->pkgpart; -} -if ( $error ) { - $dbh->rollback; - $cgi->param('error', $error ); - print $cgi->redirect(popurl(2). "part_pkg.cgi?". $cgi->query_string ); - myexit(); -} - -foreach my $part_svc (qsearch('part_svc',{})) { - my $quantity = $cgi->param('pkg_svc'. $part_svc->svcpart) || 0; - my $old_pkg_svc = qsearchs('pkg_svc', { - 'pkgpart' => $pkgpart, - 'svcpart' => $part_svc->svcpart, - } ); - my $old_quantity = $old_pkg_svc ? $old_pkg_svc->quantity : 0; - next unless $old_quantity != $quantity; #!here - my $new_pkg_svc = new FS::pkg_svc( { - 'pkgpart' => $pkgpart, - 'svcpart' => $part_svc->svcpart, - 'quantity' => $quantity, - } ); - if ( $old_pkg_svc ) { - my $myerror = $new_pkg_svc->replace($old_pkg_svc); - if ( $myerror ) { - $dbh->rollback; - die $myerror; - } - } else { - my $myerror = $new_pkg_svc->insert; - if ( $myerror ) { - $dbh->rollback; - die $myerror; - } - } -} - -unless ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { - $dbh->commit or die $dbh->errstr; - print $cgi->redirect(popurl(3). "browse/part_pkg.cgi"); -} else { - my($old_cust_pkg) = qsearchs( 'cust_pkg', { 'pkgnum' => $1 } ); - my %hash = $old_cust_pkg->hash; - $hash{'pkgpart'} = $pkgpart; - my($new_cust_pkg) = new FS::cust_pkg \%hash; - my $myerror = $new_cust_pkg->replace($old_cust_pkg); - if ( $myerror ) { - $dbh->rollback; - die "Error modifying cust_pkg record: $myerror\n"; - } - - $dbh->commit or die $dbh->errstr; - print $cgi->redirect(popurl(3). "view/cust_main.cgi?". $new_cust_pkg->custnum); -} - -%> diff --git a/httemplate/edit/process/part_referral.cgi b/httemplate/edit/process/part_referral.cgi deleted file mode 100755 index fd2c01506..000000000 --- a/httemplate/edit/process/part_referral.cgi +++ /dev/null @@ -1,28 +0,0 @@ -<% - -my $refnum = $cgi->param('refnum'); - -my $new = new FS::part_referral ( { - map { - $_, scalar($cgi->param($_)); - } fields('part_referral') -} ); - -my $error; -if ( $refnum ) { - my $old = qsearchs( 'part_referral', { 'refnum' =>$ refnum } ); - die "(Old) Record not found!" unless $old; - $error = $new->replace($old); -} else { - $error = $new->insert; -} -$refnum=$new->refnum; - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "part_referral.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/part_referral.cgi"); -} - -%> diff --git a/httemplate/edit/process/part_svc.cgi b/httemplate/edit/process/part_svc.cgi deleted file mode 100755 index 859670b17..000000000 --- a/httemplate/edit/process/part_svc.cgi +++ /dev/null @@ -1,62 +0,0 @@ -<% - -my $svcpart = $cgi->param('svcpart'); - -my $old = qsearchs('part_svc',{'svcpart'=>$svcpart}) if $svcpart; - -$cgi->param( 'svc_acct__usergroup', - join(',', $cgi->param('svc_acct__usergroup') ) ); - -my $new = new FS::part_svc ( { - map { - $_, scalar($cgi->param($_)); -# } qw(svcpart svc svcdb) - } ( fields('part_svc'), - map { my $svcdb = $_; - my @fields = fields($svcdb); - push @fields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge - map { ( $svcdb.'__'.$_, $svcdb.'__'.$_.'_flag' ) } @fields; - } grep defined( $FS::Record::dbdef->table($_) ), - qw( svc_acct svc_domain svc_acct_sm svc_forward svc_www ) - ) -} ); - -my $error; -if ( $svcpart ) { - $error = $new->replace($old, '1.3-COMPAT', [ 'usergroup' ] ); -} else { - $error = $new->insert( [ 'usergroup' ] ); - $svcpart=$new->getfield('svcpart'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "part_svc.cgi?". $cgi->query_string ); -} else { - - #false laziness w/ edit/process/agent_type.cgi - foreach my $part_export (qsearch('part_export',{})) { - my $exportnum = $part_export->exportnum; - my $export_svc = qsearchs('export_svc', { - 'exportnum' => $part_export->exportnum, - 'svcpart' => $new->svcpart, - } ); - if ( $export_svc && ! $cgi->param("exportnum". $part_export->exportnum) ) { - $error = $export_svc->delete; - die $error if $error; - } elsif ( $cgi->param("exportnum". $part_export->exportnum) - && ! $export_svc ) { - $export_svc = new FS::export_svc ( { - 'exportnum' => $part_export->exportnum, - 'svcpart' => $new->svcpart, - } ); - $error = $export_svc->insert; - die $error if $error; - } - - } - - print $cgi->redirect(popurl(3)."browse/part_svc.cgi"); -} - -%> diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi deleted file mode 100644 index 477f58508..000000000 --- a/httemplate/edit/process/quick-charge.cgi +++ /dev/null @@ -1,32 +0,0 @@ -<% - -#untaint custnum -$cgi->param('custnum') =~ /^(\d+)$/ - or die 'illegal custnum '. $cgi->param('custnum'); -my $custnum = $1; - -$cgi->param('amount') =~ /^\s*(\d+(\.\d{1,2})?)\s*$/ - or die 'illegal amount '. $cgi->param('amount'); -my $amount = $1; - -my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ) - or die "unknown custnum $custnum"; - -my $error = $cust_main->charge( - $amount, - $cgi->param('pkg'), - '$'. sprintf("%.2f",$amount), - $cgi->param('taxclass') -); - -if ($error) { -%> - -<% - eidiot($error); -} else { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum" ); -} - -%> - diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi deleted file mode 100644 index a8f5b1453..000000000 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ /dev/null @@ -1,24 +0,0 @@ -<% - -#untaint custnum -$cgi->param('custnum') =~ /^(\d+)$/ - or die 'illegal custnum '. $cgi->param('custnum'); -my $custnum = $1; -$cgi->param('pkgpart') =~ /^(\d+)$/ - or die 'illegal pkgpart '. $cgi->param('pkgpart'); -my $pkgpart = $1; - -my @cust_pkg = (); -my $error = FS::cust_pkg::order($custnum, [ $pkgpart ], [], \@cust_pkg, ); - -if ($error) { -%> - -<% - eidiot($error); -} else { - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?". $cust_pkg[0]->pkgnum ); -} - -%> - diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi deleted file mode 100755 index 950a8602f..000000000 --- a/httemplate/edit/process/svc_acct.cgi +++ /dev/null @@ -1,49 +0,0 @@ -<% - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my $svcnum = $1; - -my $old; -if ( $svcnum ) { - $old = qsearchs('svc_acct', { 'svcnum' => $svcnum } ) - or die "fatal: can't find account (svcnum $svcnum)!"; -} else { - $old = ''; -} - -#unmunge popnum -$cgi->param('popnum', (split(/:/, $cgi->param('popnum') ))[0] ); - -#unmunge passwd -if ( $cgi->param('_password') eq '*HIDDEN*' ) { - die "fatal: no previous account to recall hidden password from!" unless $old; - $cgi->param('_password',$old->getfield('_password')); -} - -#unmunge usergroup -$cgi->param('usergroup', [ $cgi->param('radius_usergroup') ] ); - -my $new = new FS::svc_acct ( { - map { - $_, scalar($cgi->param($_)); - #} qw(svcnum pkgnum svcpart username _password popnum uid gid finger dir - # shell quota slipip) - } ( fields('svc_acct'), qw( pkgnum svcpart usergroup ) ) -} ); - -my $error; -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->svcnum; -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_acct.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_acct.cgi?" . $svcnum ); -} - -%> diff --git a/httemplate/edit/process/svc_acct_pop.cgi b/httemplate/edit/process/svc_acct_pop.cgi deleted file mode 100755 index 46ad74d62..000000000 --- a/httemplate/edit/process/svc_acct_pop.cgi +++ /dev/null @@ -1,28 +0,0 @@ -<% - -my $popnum = $cgi->param('popnum'); - -my $old = qsearchs('svc_acct_pop',{'popnum'=>$popnum}) if $popnum; - -my $new = new FS::svc_acct_pop ( { - map { - $_, scalar($cgi->param($_)); - } fields('svc_acct_pop') -} ); - -my $error = ''; -if ( $popnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $popnum=$new->getfield('popnum'); -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_acct_pop.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "browse/svc_acct_pop.cgi"); -} - -%> diff --git a/httemplate/edit/process/svc_acct_sm.cgi b/httemplate/edit/process/svc_acct_sm.cgi deleted file mode 100755 index 41d03fb92..000000000 --- a/httemplate/edit/process/svc_acct_sm.cgi +++ /dev/null @@ -1,34 +0,0 @@ -<% - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my $svcnum =$1; - -my $old = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) if $svcnum; - -#unmunge domsvc and domuid -#$cgi->param('domsvc',(split(/:/, $cgi->param('domsvc') ))[0] ); -#$cgi->param('domuid',(split(/:/, $cgi->param('domuid') ))[0] ); - -my $new = new FS::svc_acct_sm ( { - map { - ($_, scalar($cgi->param($_))); - #} qw(svcnum pkgnum svcpart domuser domuid domsvc) - } ( fields('svc_acct_sm'), qw( pkgnum svcpart ) ) -} ); - -my $error = ''; -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->getfield('svcnum'); -} - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_acct_sm.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_acct_sm.cgi?$svcnum"); -} - -%> diff --git a/httemplate/edit/process/svc_domain.cgi b/httemplate/edit/process/svc_domain.cgi deleted file mode 100755 index 19f8eb4f8..000000000 --- a/httemplate/edit/process/svc_domain.cgi +++ /dev/null @@ -1,31 +0,0 @@ -<% - -#remove this to actually test the domains! -$FS::svc_domain::whois_hack = 1; - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my $svcnum = $1; - -my $new = new FS::svc_domain ( { - map { - $_, scalar($cgi->param($_)); - #} qw(svcnum pkgnum svcpart domain action purpose) - } ( fields('svc_domain'), qw( pkgnum svcpart action purpose ) ) -} ); - -my $error = ''; -if ($cgi->param('svcnum')) { - $error="Can't modify a domain!"; -} else { - $error=$new->insert; - $svcnum=$new->svcnum; -} - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_domain.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum"); -} - -%> diff --git a/httemplate/edit/process/svc_forward.cgi b/httemplate/edit/process/svc_forward.cgi deleted file mode 100755 index bb066d8a6..000000000 --- a/httemplate/edit/process/svc_forward.cgi +++ /dev/null @@ -1,29 +0,0 @@ -<% - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my $svcnum =$1; - -my $old = qsearchs('svc_forward',{'svcnum'=>$svcnum}) if $svcnum; - -my $new = new FS::svc_forward ( { - map { - ($_, scalar($cgi->param($_))); - } ( fields('svc_forward'), qw( pkgnum svcpart ) ) -} ); - -my $error = ''; -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->getfield('svcnum'); -} - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_forward.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_forward.cgi?$svcnum"); -} - -%> diff --git a/httemplate/edit/process/svc_www.cgi b/httemplate/edit/process/svc_www.cgi deleted file mode 100644 index 40913145a..000000000 --- a/httemplate/edit/process/svc_www.cgi +++ /dev/null @@ -1,36 +0,0 @@ -<% - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my $svcnum = $1; - -my $old; -if ( $svcnum ) { - $old = qsearchs('svc_www', { 'svcnum' => $svcnum } ) - or die "fatal: can't find website (svcnum $svcnum)!"; -} else { - $old = ''; -} - -my $new = new FS::svc_www ( { - map { - ($_, scalar($cgi->param($_))); - #} qw(svcnum pkgnum svcpart recnum usersvc) - } ( fields('svc_www'), qw( pkgnum svcpart ) ) -} ); - -my $error; -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->svcnum; -} - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "svc_www.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_www.cgi?" . $svcnum ); -} - -%> diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi deleted file mode 100755 index 90b26324a..000000000 --- a/httemplate/edit/svc_acct.cgi +++ /dev/null @@ -1,278 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my @shells = $conf->config('shells'); - -my($svcnum, $pkgnum, $svcpart, $part_svc, $svc_acct, @groups); -if ( $cgi->param('error') ) { - $svc_acct = new FS::svc_acct ( { - map { $_, scalar($cgi->param($_)) } fields('svc_acct') - } ); - $svcnum = $svc_acct->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } ); - die "No part_svc entry for svcpart $svcpart!" unless $part_svc; - @groups = $cgi->param('radius_usergroup'); -} else { - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_acct=qsearchs('svc_acct',{'svcnum'=>$svcnum}) - or die "Unknown (svc_acct) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } ); - die "No part_svc entry for svcpart $svcpart!" unless $part_svc; - - @groups = $svc_acct->radius_groups; - - } else { #adding - - $svc_acct = new FS::svc_acct({}); - - foreach $_ (split(/-/,$query)) { - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } ); - die "No part_svc entry for svcpart $svcpart!" unless $part_svc; - - $svcnum=''; - - #set gecos - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - if ($cust_pkg) { - my($cust_main)=qsearchs('cust_main',{'custnum'=> $cust_pkg->custnum } ); - unless ( $part_svc->part_svc_column('uid')->columnflag eq 'F' ) { - $svc_acct->setfield('finger', - $cust_main->getfield('first') . " " . $cust_main->getfield('last') - ); - } - } - - #set fixed and default fields from part_svc - foreach my $part_svc_column ( - grep { $_->columnflag } $part_svc->all_part_svc_column - ) { - if ( $part_svc_column->columnname eq 'usergroup' ) { - @groups = split(',', $part_svc_column->columnvalue); - } else { - $svc_acct->setfield( $part_svc_column->columnname, - $part_svc_column->columnvalue, - ); - } - } - - } -} -my $action = $svcnum ? 'Edit' : 'Add'; - -my $svc = $part_svc->getfield('svc'); - -my $otaker = getotaker; - -my $username = $svc_acct->username; -my $password; -if ( $svc_acct->_password ) { - if ( $conf->exists('showpasswords') || ! $svcnum ) { - $password = $svc_acct->_password; - } else { - $password = "*HIDDEN*"; - } -} else { - $password = ''; -} - -my $ulen = $conf->config('usernamemax') - || $svc_acct->dbdef_table->column('username')->length; -my $ulen2 = $ulen+2; - -my $pmax = $conf->config('passwordmax') || 8; -my $pmax2 = $pmax+2; - -my $p1 = popurl(1); -print header("$action $svc account"); - -print qq!Error: !, $cgi->param('error'), - "

    " - if $cgi->param('error'); - -print 'Service # '. ( $svcnum ? "$svcnum" : " (NEW)" ). '
    '. - 'Service: '. $part_svc->svc. '

    '. - < - - - -END - -print &ntable("#cccccc",2), <Username - -Password - -(blank to generate) - -END - -my $sec_phrase = $svc_acct->sec_phrase; -if ( $conf->exists('security_phrase') ) { - print <Security phrase - - (for forgotten passwords) - -END -} else { - print qq!!; -} - -#domain -my $domsvc = $svc_acct->domsvc || 0; -if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) { - print qq!!; -} else { - my %svc_domain = (); - - if ( $domsvc ) { - my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $domsvc, } ); - if ( $svc_domain ) { - $svc_domain{$svc_domain->svcnum} = $svc_domain; - } else { - warn "unknown svc_domain.svcnum for svc_acct.domsvc: $domsvc"; - } - } - - if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'D' ) { - my $svc_domain = qsearchs('svc_domain', { - 'svcnum' => $part_svc->part_svc_column('domsvc')->columnvalue, - } ); - if ( $svc_domain ) { - $svc_domain{$svc_domain->svcnum} = $svc_domain; - } else { - warn "unknown svc_domain.svcnum for part_svc_column domsvc: ". - $part_svc->part_svc_column('domsvc')->columnvalue; - } - } - - my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } ); - if ($cust_pkg) { - my @cust_svc = - map { qsearch('cust_svc', { 'pkgnum' => $_->pkgnum } ) } - qsearch('cust_pkg', { 'custnum' => $cust_pkg->custnum } ); - foreach my $cust_svc ( @cust_svc ) { - my $svc_domain = - qsearchs('svc_domain', { 'svcnum' => $cust_svc->svcnum } ); - $svc_domain{$svc_domain->svcnum} = $svc_domain if $svc_domain; - } - } else { - %svc_domain = map { $_->svcnum => $_ } qsearch('svc_domain', {} ); - } - print qq!Domain!. - qq!"; -} - -#pop -my $popnum = $svc_acct->popnum || 0; -if ( $part_svc->part_svc_column('popnum')->columnflag eq "F" ) { - print qq!!; -} else { - print qq!Access number!. - qq!!. FS::svc_acct_pop::popselector($popnum). ''; -} - -my($uid,$gid,$finger,$dir)=( - $svc_acct->uid, - $svc_acct->gid, - $svc_acct->finger, - $svc_acct->dir, -); - -print < - -END - -if ( !$finger && $part_svc->part_svc_column('uid')->columnflag eq 'F' ) { - print ''; -} else { - print 'GECOS'. - qq!!; -} -print qq!!; - -my $shell = $svc_acct->shell; -if ( $part_svc->part_svc_column('shell')->columnflag eq "F" - || ( !$shell && $part_svc->part_svc_column('uid')->columnflag eq 'F' ) - ) { - print qq!!; -} else { - print qq!Shell"; -} - -my($quota,$slipip)=( - $svc_acct->quota, - $svc_acct->slipip, -); - -print qq!!; - -if ( $part_svc->part_svc_column('slipip')->columnflag eq "F" ) { - print qq!!; -} else { - print qq!IP!; -} - -foreach my $r ( grep { /^r(adius|[cr])_/ } fields('svc_acct') ) { - $r =~ /^^r(adius|[cr])_(.+)$/ or next; #? - my $a = $2; - if ( $part_svc->part_svc_column($r)->columnflag eq 'F' ) { - print qq!'; - } else { - print qq!$FS::raddb::attrib{$a}'; - } -} - -print 'RADIUS groups'; -if ( $part_svc->part_svc_column('usergroup')->columnflag eq "F" ) { - print ''. join('
    ', @groups); -} else { - print ''. &FS::svc_acct::radius_usergroup_selector( \@groups ); -} -print ''; - -#submit -print qq!
    !; - -print < - - -END - -%> diff --git a/httemplate/edit/svc_acct_pop.cgi b/httemplate/edit/svc_acct_pop.cgi deleted file mode 100755 index 399502a70..000000000 --- a/httemplate/edit/svc_acct_pop.cgi +++ /dev/null @@ -1,56 +0,0 @@ - -<% - -my $svc_acct_pop; -if ( $cgi->param('error') ) { - $svc_acct_pop = new FS::svc_acct_pop ( { - map { $_, scalar($cgi->param($_)) } fields('svc_acct_pop') - } ); -} elsif ( $cgi->keywords ) { #editing - my($query)=$cgi->keywords; - $query =~ /^(\d+)$/; - $svc_acct_pop=qsearchs('svc_acct_pop',{'popnum'=>$1}); -} else { #adding - $svc_acct_pop = new FS::svc_acct_pop {}; -} -my $action = $svc_acct_pop->popnum ? 'Edit' : 'Add'; -my $hashref = $svc_acct_pop->hashref; - -my $p1 = popurl(1); -print header("$action Access Number", menubar( - 'Main Menu' => popurl(2), - 'View all Access Numbers' => popurl(2). "browse/svc_acct_pop.cgi", -)); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -#display - -print qq!!, - "POP #", $hashref->{popnum} ? $hashref->{popnum} : "(NEW)"; - -print < -City -State -Area Code -Exchange -Local - -END - -print qq!
    !; - -print < - - -END - -%> diff --git a/httemplate/edit/svc_acct_sm.cgi b/httemplate/edit/svc_acct_sm.cgi deleted file mode 100755 index 0fd5f7622..000000000 --- a/httemplate/edit/svc_acct_sm.cgi +++ /dev/null @@ -1,178 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); - -my($svcnum, $pkgnum, $svcpart, $part_svc, $svc_acct_sm ); -if ( $cgi->param('error') ) { - $svc_acct_sm = new FS::svc_acct_sm ( { - map { $_, scalar($cgi->param($_)) } fields('svc_acct_sm') - } ); - $svcnum = $svc_acct_sm->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - #$part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - #die "No part_svc entry!" unless $part_svc; -} else { - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_acct_sm=qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}) - or die "Unknown (svc_acct_sm) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - #$part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - #die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_acct_sm = new FS::svc_acct_sm({}); - - foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - my $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set fixed and default fields from part_svc - foreach my $part_svc_column ( - grep { $_->columnflag } $part_svc->all_part_svc_column - ) { - $svc_acct_sm->setfield( $part_svc_column->columnname, - $part_svc_column->columnvalue, - ); - } - - } -} -my $action = $svc_acct_sm->svcnum ? 'Edit' : 'Add'; - -my %username = (); -my %domain = (); -if ($pkgnum) { - - #find all possible uids (and usernames) - - my @u_acct_svcparts = (); - foreach my $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) { - push @u_acct_svcparts,$u_part_svc->getfield('svcpart'); - } - - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - my($custnum)=$cust_pkg->getfield('custnum'); - foreach my $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@u_acct_svcparts) { #now find the corresponding - #record(s) in cust_svc ( for this - #pkgnum ! ) - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - $username{$svc_acct->getfield('uid')}=$svc_acct->getfield('username'); - } - } - } - - #find all possible domains (and domsvc's) - - my @d_acct_svcparts = (); - foreach my $d_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_domain'}) ) { - push @d_acct_svcparts,$d_part_svc->getfield('svcpart'); - } - - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@d_acct_svcparts) { - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_domain)=qsearch('svc_domain',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - $domain{$svc_domain->getfield('svcnum')}=$svc_domain->getfield('domain'); - } - } - } - -} elsif ( $action eq 'Edit' ) { - - my($svc_acct)=qsearchs('svc_acct',{'uid'=>$svc_acct_sm->domuid}); - $username{$svc_acct_sm->uid} = $svc_acct->username; - - my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$svc_acct_sm->domsvc}); - $domain{$svc_acct_sm->domsvc} = $svc_domain->domain; - -} else { - die "\$action eq Add, but \$pkgnum is null!\n"; -} - -my $p1 = popurl(1); -print header("Mail Alias $action", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -#display - - #formatting - print "
    ";
    -
    -#svcnum
    -print qq!!;
    -print qq!Service #!, $svcnum ? $svcnum : " (NEW)", "";
    -
    -#pkgnum
    -print qq!!;
    - 
    -#svcpart
    -print qq!!;
    -
    -my($domuser,$domsvc,$domuid)=(
    -  $svc_acct_sm->domuser,
    -  $svc_acct_sm->domsvc,
    -  $svc_acct_sm->domuid,
    -);
    -
    -#domuser
    -print qq!\n\nMail to  ( * for anything )!;
    -
    -#domsvc
    -print qq! \@ ";
    -
    -#uid
    -print qq!\nforwards to \@$mydomain mailbox.";
    -
    -	#formatting
    -	print "
    \n"; - -print qq!
    !; - -print < - - -END - -%> diff --git a/httemplate/edit/svc_domain.cgi b/httemplate/edit/svc_domain.cgi deleted file mode 100755 index d20e1f336..000000000 --- a/httemplate/edit/svc_domain.cgi +++ /dev/null @@ -1,98 +0,0 @@ - -<% - -my($svcnum, $pkgnum, $svcpart, $kludge_action, $purpose, $part_svc, - $svc_domain); -if ( $cgi->param('error') ) { - $svc_domain = new FS::svc_domain ( { - map { $_, scalar($cgi->param($_)) } fields('svc_domain') - } ); - $svcnum = $svc_domain->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $kludge_action = $cgi->param('action'); - $purpose = $cgi->param('purpose'); - $part_svc = qsearchs('part_svc', { 'svcpart' => $svcpart } ); - die "No part_svc entry!" unless $part_svc; -} else { - $kludge_action = ''; - $purpose = ''; - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_domain=qsearchs('svc_domain',{'svcnum'=>$svcnum}) - or die "Unknown (svc_domain) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_domain = new FS::svc_domain({}); - - foreach $_ (split(/-/,$query)) { - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set fixed and default fields from part_svc - foreach my $part_svc_column ( - grep { $_->columnflag } $part_svc->all_part_svc_column - ) { - $svc_domain->setfield( $part_svc_column->columnname, - $part_svc_column->columnvalue, - ); - } - - } - -} -my $action = $svcnum ? 'Edit' : 'Add'; - -my $svc = $part_svc->getfield('svc'); - -my $otaker = getotaker; - -my $domain = $svc_domain->domain; - -my $p1 = popurl(1); -print header("$action $svc", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print < - - - -END - -print qq!New!; -print qq!
    Transfer!; - -print <Domain -
    Purpose/Description: -

    -

    - - -END - -%> diff --git a/httemplate/edit/svc_forward.cgi b/httemplate/edit/svc_forward.cgi deleted file mode 100755 index bc19fe1de..000000000 --- a/httemplate/edit/svc_forward.cgi +++ /dev/null @@ -1,176 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); - -my($svcnum, $pkgnum, $svcpart, $part_svc, $svc_forward); -if ( $cgi->param('error') ) { - $svc_forward = new FS::svc_forward ( { - map { $_, scalar($cgi->param($_)) } fields('svc_forward') - } ); - $svcnum = $svc_forward->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; -} else { - - my($query) = $cgi->keywords; - - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_forward=qsearchs('svc_forward',{'svcnum'=>$svcnum}) - or die "Unknown (svc_forward) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_forward = new FS::svc_forward({}); - - foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set fixed and default fields from part_svc - foreach my $part_svc_column ( - grep { $_->columnflag } $part_svc->all_part_svc_column - ) { - $svc_forward->setfield( $part_svc_column->columnname, - $part_svc_column->columnvalue, - ); - } - } - -} -my $action = $svc_forward->svcnum ? 'Edit' : 'Add'; - -my %email; -if ($pkgnum) { - - #find all possible user svcnums (and emails) - - #starting with those currently attached - if ( $svc_forward->srcsvc ) { - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $svc_forward->srcsvc } ); - $email{$svc_forward->srcsvc} = $svc_acct->email; - } - if ( $svc_forward->dstsvc ) { - my $svc_acct = qsearchs( 'svc_acct', { 'svcnum' => $svc_forward->dstsvc } ); - $email{$svc_forward->dstsvc} = $svc_acct->email; - } - - #and including the rest for this customer - my($u_part_svc,@u_acct_svcparts); - foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) { - push @u_acct_svcparts,$u_part_svc->getfield('svcpart'); - } - - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - my($custnum)=$cust_pkg->getfield('custnum'); - my($i_cust_pkg); - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@u_acct_svcparts) { #now find the corresponding - #record(s) in cust_svc ( for this - #pkgnum ! ) - foreach my $i_cust_svc ( - qsearch( 'cust_svc', { 'pkgnum' => $cust_pkgnum, - 'svcpart' => $acct_svcpart } ) - ) { - my $svc_acct = - qsearchs( 'svc_acct', { 'svcnum' => $i_cust_svc->svcnum } ); - $email{$svc_acct->svcnum} = $svc_acct->email; - } - } - } - -} elsif ( $action eq 'Edit' ) { - - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_forward->srcsvc}); - $email{$svc_forward->srcsvc} = $svc_acct->email; - - $svc_acct=qsearchs('svc_acct',{'svcnum'=>$svc_forward->dstsvc}); - $email{$svc_forward->dstsvc} = $svc_acct->email; - -} else { - die "\$action eq Add, but \$pkgnum is null!\n"; -} - -my($srcsvc,$dstsvc,$dst)=( - $svc_forward->srcsvc, - $svc_forward->dstsvc, - $svc_forward->dst, -); - -#display - -%> - -<%= header("Mail Forward $action") %> - -<% if ( $cgi->param('error') ) { %> - Error: <%= $cgi->param('error') %> -

    -<% } %> - -Service #<%= $svcnum ? "$svcnum" : " (NEW)" %>
    -Service: <%= $part_svc->svc %>

    - -
    - -<%= ntable("#cccccc",2) %> -Email to - -<% - tie my %tied_email, 'Tie::IxHash', - '' => 'SELECT DESTINATION', - %email, - '0' => '(other email address)'; - my $widget = new HTML::Widgets::SelectLayers( - 'selected_layer' => $dstsvc, - 'options' => \%tied_email, - 'form_name' => 'dummy', - 'form_action' => 'process/svc_forward.cgi', - 'form_select' => ['srcsvc'], - 'html_between' => '', - 'layer_callback' => sub { - my $layer = shift; - my $html = qq!!. - qq!!. - qq!!. - qq!!; - if ( $layer eq '0' ) { - $html .= ntable("#cccccc",2). - 'Destination email'. - qq!!. - ''; - } - $html .= '
    '; - $html; - }, - ); -%> - -Forwards to -<%= $widget->html %> - - diff --git a/httemplate/edit/svc_www.cgi b/httemplate/edit/svc_www.cgi deleted file mode 100644 index d2c9ade5c..000000000 --- a/httemplate/edit/svc_www.cgi +++ /dev/null @@ -1,178 +0,0 @@ - -<% - -my( $svcnum, $pkgnum, $svcpart, $part_svc, $svc_www ); -if ( $cgi->param('error') ) { - $svc_www = new FS::svc_www ( { - map { $_, scalar($cgi->param($_)) } fields('svc_www') - } ); - $svcnum = $svc_www->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; -} else { - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_www=qsearchs('svc_www',{'svcnum'=>$svcnum}) - or die "Unknown (svc_www) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { #adding - - $svc_www = new FS::svc_www({}); - - foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; - } - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - $svcnum=''; - - #set fixed and default fields from part_svc - foreach my $part_svc_column ( - grep { $_->columnflag } $part_svc->all_part_svc_column - ) { - $svc_www->setfield( $part_svc_column->columnname, - $part_svc_column->columnvalue, - ); - } - - } -} -my $action = $svc_www->svcnum ? 'Edit' : 'Add'; - -my( %username, %arec ); -if ($pkgnum) { - - my($u_part_svc,@u_acct_svcparts); - foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) { - push @u_acct_svcparts,$u_part_svc->getfield('svcpart'); - } - - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - my($custnum)=$cust_pkg->getfield('custnum'); - my($i_cust_pkg); - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@u_acct_svcparts) { #now find the corresponding - #record(s) in cust_svc ( for this - #pkgnum ! ) - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - $username{$svc_acct->getfield('svcnum')}=$svc_acct->getfield('username'); - } - } - } - - - my($d_part_svc,@d_acct_svcparts); - foreach $d_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_domain'}) ) { - push @d_acct_svcparts,$d_part_svc->getfield('svcpart'); - } - - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@d_acct_svcparts) { - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_domain)=qsearchs('svc_domain',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - my $domain_rec; - foreach $domain_rec ( qsearch('domain_record',{ - 'svcnum' => $svc_domain->svcnum, - 'rectype' => 'A' } ), - qsearch('domain_record',{ - 'svcnum' => $svc_domain->svcnum, - 'rectype' => 'CNAME' - } ) ) { - $arec{$domain_rec->recnum} = - $domain_rec->reczone eq '@' - ? $svc_domain->domain - : $domain_rec->reczone. '.'. $svc_domain->domain; - } - $arec{'@.'. $svc_domain->domain} = $svc_domain->domain - unless qsearchs('domain_record', { svcnum => $svc_domain->svcnum, - reczone => '@', } ); - $arec{'www.'. $svc_domain->domain} = 'www.'. $svc_domain->domain - unless qsearchs('domain_record', { svcnum => $svc_domain->svcnum, - reczone => 'www', } ); - } - } - } - -} elsif ( $action eq 'Edit' ) { - - my($domain_rec) = qsearchs('domain_record', { 'recnum'=>$svc_www->recnum }); - $arec{$svc_www->recnum} = join '.', $domain_rec->recdata, $domain_rec->reczone; - -} else { - die "\$action eq Add, but \$pkgnum is null!\n"; -} - - -my $p1 = popurl(1); -print header("Web Hosting $action", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!!; - -#display - - - -#svcnum -print qq!!; -print qq!Service #!, $svcnum ? $svcnum : "(NEW)", "

    "; - -#pkgnum -print qq!!; - -#svcpart -print qq!!; - -my($recnum,$usersvc)=( - $svc_www->recnum, - $svc_www->usersvc, -); - -print &ntable("#cccccc",2), - 'Zone"; - -print 'Username"; - -print '
    '; - -print < - - -END -%> diff --git a/httemplate/images/mid-logo.png b/httemplate/images/mid-logo.png deleted file mode 100644 index d993419cc..000000000 Binary files a/httemplate/images/mid-logo.png and /dev/null differ diff --git a/httemplate/images/small-logo.png b/httemplate/images/small-logo.png deleted file mode 100644 index 406a36980..000000000 Binary files a/httemplate/images/small-logo.png and /dev/null differ diff --git a/httemplate/index.html b/httemplate/index.html deleted file mode 100644 index 29dd3b471..000000000 --- a/httemplate/index.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - Freeside Main Menu - - - - - -
    - Silicon Interactive Software Design - - freeside main menu - - version 1.4.0 -
    Freeside home page -
    Documentation -
    - -
    -[ Sales / Customer service ] -[ Bookkeeping / Collections ] -[ Reports ] -[ Sysadmin ] - - - -
    Sales / Customer service
    -
    New Customer -
    -
    Customer # or all customers by customer number -
    Last name or all customers by last name
    -
    Company or all customers by company
    - -
    Phone #
    -
    Username or all accounts by username or uid
    -
    Domain or all domains
    - - -
    -
    - - - -


    - - -[ Sales / Customer service ] -[ Bookkeeping / Collections ] -[ Reports ] -[ Sysadmin ] - - - -
    Bookkeeping / Collections
    -
    Quick payment entry -
    -
    Credit card #
    -
    Invoice #
    -
    Check #
    -
    View pending credit card batch

    Packages (by next bill date range) -

    Invoice reports - - Financial reports - -


    - Administration - -
    -
    - - - -


    - - - -[ Sales / Customer service ] -[ Bookkeeping / Collections ] -[ Reports ] -[ Sysadmin ] - - - -
    Reports
    -
    - Auditing pre-Freeside services with no customer record - - Packages - - Invoices - - Financial reports - - Customers - -
    SQL query: SELECT
    - -
    -
    - - - -


    - - -[ Sales / Customer service ] -[ Bookkeeping / Collections ] -[ Reports ] -[ Sysadmin ] - - - -
    Sysadmin
    -
    - View active NAS ports -
    View pending job queue -



    - Configuration -

    Administration - -
    -
    -















    -















    -















    -















    -















    -















    -















    -















    - - diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi deleted file mode 100755 index f048e5559..000000000 --- a/httemplate/misc/bill.cgi +++ /dev/null @@ -1,37 +0,0 @@ -<% - -#untaint custnum -my($query) = $cgi->keywords; -$query =~ /^(\d*)$/; -my $custnum = $1; -my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); -die "Can't find customer!\n" unless $cust_main; - -my $error = $cust_main->bill( -# 'time'=>$time - ); -#&eidiot($error) if $error; - -unless ( $error ) { - $cust_main->apply_payments; - $cust_main->apply_credits; - - $error = $cust_main->collect( - # 'invoice-time'=>$time, - #'batch_card'=> 'yes', - #'batch_card'=> 'no', - #'report_badcard'=> 'yes', - 'retry_card' => 'yes', - ); -} -#&eidiot($error) if $error; - -if ( $error ) { -%> - -<% - &idiot($error); -} else { - print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum"); -} -%> diff --git a/httemplate/misc/cancel-unaudited.cgi b/httemplate/misc/cancel-unaudited.cgi deleted file mode 100755 index 11cde968d..000000000 --- a/httemplate/misc/cancel-unaudited.cgi +++ /dev/null @@ -1,31 +0,0 @@ -<% - -my $dbh = dbh; - -#untaint svcnum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $svcnum = $1; - -#my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); -#die "Unknown svcnum!" unless $svc_acct; - -my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -die "Unknown svcnum!" unless $cust_svc; -&eidiot(qq!This account has already been audited. Cancel the - package instead.!) - if $cust_svc->pkgnum ne '' && $cust_svc->pkgnum ne '0'; - -my $error = $cust_svc->cancel; - -if ( $error ) { - %> - -<% - &eidiot($error); -} else { - print $cgi->redirect(popurl(2)); -} - -%> diff --git a/httemplate/misc/cancel_pkg.cgi b/httemplate/misc/cancel_pkg.cgi deleted file mode 100755 index 0487677df..000000000 --- a/httemplate/misc/cancel_pkg.cgi +++ /dev/null @@ -1,15 +0,0 @@ -<% - -#untaint pkgnum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my $pkgnum = $1; - -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - -my $error = $cust_pkg->cancel; -eidiot($error) if $error; - -print $cgi->redirect($p. "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - -%> diff --git a/httemplate/misc/catchall.cgi b/httemplate/misc/catchall.cgi deleted file mode 100755 index 9aa84be18..000000000 --- a/httemplate/misc/catchall.cgi +++ /dev/null @@ -1,133 +0,0 @@ - -<% - -my $conf = new FS::Conf; - -my($svc_domain, $svcnum, $pkgnum, $svcpart, $part_svc); -if ( $cgi->param('error') ) { - $svc_domain = new FS::svc_domain ( { - map { $_, scalar($cgi->param($_)) } fields('svc_domain') - } ); - $svcnum = $svc_domain->svcnum; - $pkgnum = $cgi->param('pkgnum'); - $svcpart = $cgi->param('svcpart'); - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; -} else { - my($query) = $cgi->keywords; - if ( $query =~ /^(\d+)$/ ) { #editing - $svcnum=$1; - $svc_domain=qsearchs('svc_domain',{'svcnum'=>$svcnum}) - or die "Unknown (svc_domain) svcnum!"; - - my($cust_svc)=qsearchs('cust_svc',{'svcnum'=>$svcnum}) - or die "Unknown (cust_svc) svcnum!"; - - $pkgnum=$cust_svc->pkgnum; - $svcpart=$cust_svc->svcpart; - - $part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart}); - die "No part_svc entry!" unless $part_svc; - - } else { - - die "Invalid (svc_domain) svcnum!"; - - } -} - -my %email; -if ($pkgnum) { - - #find all possible user svcnums (and emails) - - #starting with that currently attached - if ($svc_domain->catchall) { - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_domain->catchall}); - $email{$svc_domain->catchall} = $svc_acct->email; - } - - #and including the rest for this customer - my($u_part_svc,@u_acct_svcparts); - foreach $u_part_svc ( qsearch('part_svc',{'svcdb'=>'svc_acct'}) ) { - push @u_acct_svcparts,$u_part_svc->getfield('svcpart'); - } - - my($cust_pkg)=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - my($custnum)=$cust_pkg->getfield('custnum'); - my($i_cust_pkg); - foreach $i_cust_pkg ( qsearch('cust_pkg',{'custnum'=>$custnum}) ) { - my($cust_pkgnum)=$i_cust_pkg->getfield('pkgnum'); - my($acct_svcpart); - foreach $acct_svcpart (@u_acct_svcparts) { #now find the corresponding - #record(s) in cust_svc ( for this - #pkgnum ! ) - my($i_cust_svc); - foreach $i_cust_svc ( qsearch('cust_svc',{'pkgnum'=>$cust_pkgnum,'svcpart'=>$acct_svcpart}) ) { - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$i_cust_svc->getfield('svcnum')}); - $email{$svc_acct->getfield('svcnum')}=$svc_acct->email; - } - } - } - -} else { - - my($svc_acct)=qsearchs('svc_acct',{'svcnum'=>$svc_domain->catchall}); - $email{$svc_domain->catchall} = $svc_acct->email; -} - -# add an absence of a catchall -$email{0} = "(none)"; - -my $p1 = popurl(1); -print header("Domain Catchall Edit", ''); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print qq!
    !; - -#display - - #formatting - print "
    ";
    -
    -#svcnum
    -print qq!!;
    -print qq!Service #!, $svcnum ? $svcnum : " (NEW)", "";
    -
    -#pkgnum
    -print qq!!;
    - 
    -#svcpart
    -print qq!!;
    -
    -my($domain,$catchall)=(
    -  $svc_domain->domain,
    -  $svc_domain->catchall,
    -);
    -
    -print qq!!;
    -
    -#catchall
    -print qq!\n\nMail to (anything)@$domain forwards to ";
    -
    -	#formatting
    -	print "
    \n"; - -print qq!
    !; - -print < - - -END - -%> diff --git a/httemplate/misc/delete-cust_pay.cgi b/httemplate/misc/delete-cust_pay.cgi deleted file mode 100755 index 3efd918ab..000000000 --- a/httemplate/misc/delete-cust_pay.cgi +++ /dev/null @@ -1,16 +0,0 @@ -<% - -#untaint paynum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal paynum"; -my $paynum = $1; - -my $cust_pay = qsearchs('cust_pay',{'paynum'=>$paynum}); -my $custnum = $cust_pay->custnum; - -my $error = $cust_pay->delete; -eidiot($error) if $error; - -print $cgi->redirect($p. "view/cust_main.cgi?". $custnum); - -%> diff --git a/httemplate/misc/delete-customer.cgi b/httemplate/misc/delete-customer.cgi deleted file mode 100755 index 430231737..000000000 --- a/httemplate/misc/delete-customer.cgi +++ /dev/null @@ -1,60 +0,0 @@ - -<% - -my $conf = new FS::Conf; -die "Customer deletions not enabled" unless $conf->exists('deletecustomers'); - -my($custnum, $new_custnum); -if ( $cgi->param('error') ) { - $custnum = $cgi->param('custnum'); - $new_custnum = $cgi->param('new_custnum'); -} else { - my($query) = $cgi->keywords; - $query =~ /^(\d+)$/ or die "Illegal query: $query"; - $custnum = $1; - $new_custnum = ''; -} -my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) - or die "Customer not found: $custnum"; - -print header('Delete customer'); - -print qq!Error: !, $cgi->param('error'), - "" - if $cgi->param('error'); - -print - qq!!, - qq!!; - -if ( qsearch('cust_pkg', { 'custnum' => $custnum, 'cancel' => '' } ) ) { - print "Move uncancelled packages to customer number ", - qq!

    !; -} - -print <completely remove
    all traces of this customer record. This -is not what you want if this is a real customer who has simply -canceled service with you. For that, cancel all of the customer's packages. -(you can optionally hide cancelled customers with the hidecancelledcustomers configuration option) -
    -
    Are you absolutely sure you want to delete this customer? -
    -
    -END - -#Deleting a customer you have financial records on (i.e. credits) is -#typically considered fraudulant bookkeeping. Remember, deleting -#customers should ONLY be used for completely bogus records. You should -#NOT delete real customers who simply discontinue service. -# -#For real customers who simply discontinue service, cancel all of the -#customer's packages. Customers with all cancelled packages are not -#billed. There is no need to take further action to prevent billing on -#customers with all cancelled packages. -# -#Also see the "hidecancelledcustomers" and "hidecancelledpackages" -#configuration options, which will allow you to surpress the display of -#cancelled customers and packages, respectively. - -%> diff --git a/httemplate/misc/delete-domain_record.cgi b/httemplate/misc/delete-domain_record.cgi deleted file mode 100755 index dcc2d5022..000000000 --- a/httemplate/misc/delete-domain_record.cgi +++ /dev/null @@ -1,15 +0,0 @@ -<% - -#untaint recnum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal recnum"; -my $recnum = $1; - -my $domain_record = qsearchs('domain_record',{'recnum'=>$recnum}); - -my $error = $domain_record->delete; -eidiot($error) if $error; - -print $cgi->redirect($p. "view/svc_domain.cgi?". $domain_record->svcnum); - -%> diff --git a/httemplate/misc/delete-part_export.cgi b/httemplate/misc/delete-part_export.cgi deleted file mode 100755 index 7c4ab8b9d..000000000 --- a/httemplate/misc/delete-part_export.cgi +++ /dev/null @@ -1,15 +0,0 @@ -<% - -#untaint exportnum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal exportnum"; -my $exportnum = $1; - -my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum}); - -my $error = $part_export->delete; -eidiot($error) if $error; - -print $cgi->redirect($p. "browse/part_export.cgi"); - -%> diff --git a/httemplate/misc/expire_pkg.cgi b/httemplate/misc/expire_pkg.cgi deleted file mode 100755 index 9e4ce8b62..000000000 --- a/httemplate/misc/expire_pkg.cgi +++ /dev/null @@ -1,25 +0,0 @@ -<% - -#untaint date & pkgnum - -my $date; -if ( $cgi->param('date') ) { - str2time($cgi->param('date')) =~ /^(\d+)$/ or die "Illegal date"; - $date=$1; -} else { - $date=''; -} - -$cgi->param('pkgnum') =~ /^(\d+)$/ or die "Illegal pkgnum"; -my $pkgnum = $1; - -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -my %hash = $cust_pkg->hash; -$hash{expire}=$date; -my $new = new FS::cust_pkg ( \%hash ); -my $error = $new->replace($cust_pkg); -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - -%> diff --git a/httemplate/misc/link.cgi b/httemplate/misc/link.cgi deleted file mode 100755 index efc762cc5..000000000 --- a/httemplate/misc/link.cgi +++ /dev/null @@ -1,46 +0,0 @@ - -<% - -my %link_field = ( - 'svc_acct' => 'username', - 'svc_domain' => 'domain', - 'svc_acct_sm' => '', - 'svc_charge' => '', - 'svc_wo' => '', -); - -my($query) = $cgi->keywords; -my($pkgnum, $svcpart) = ('', ''); -foreach $_ (split(/-/,$query)) { #get & untaint pkgnum & svcpart - $pkgnum=$1 if /^pkgnum(\d+)$/; - $svcpart=$1 if /^svcpart(\d+)$/; -} - -my $part_svc = qsearchs('part_svc',{'svcpart'=>$svcpart}); -my $svc = $part_svc->getfield('svc'); -my $svcdb = $part_svc->getfield('svcdb'); -my $link_field = $link_field{$svcdb}; - -print header("Link to existing $svc"), - qq!
    !; - -if ( $link_field ) { - print < - - $link_field of existing service: -END -} else { - print qq!Service # of existing service: !; -} - -print < - -

    - - - -END - -%> diff --git a/httemplate/misc/print-invoice.cgi b/httemplate/misc/print-invoice.cgi deleted file mode 100755 index a5500bff2..000000000 --- a/httemplate/misc/print-invoice.cgi +++ /dev/null @@ -1,23 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $lpr = $conf->config('lpr'); - -#untaint invnum -my($query) = $cgi->keywords; -$query =~ /^(\d*)$/; -my $invnum = $1; -my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -die "Can't find invoice!\n" unless $cust_bill; - - open(LPR,"|$lpr") or die "Can't open $lpr: $!"; - print LPR $cust_bill->print_text; #( date ) - close LPR - or die $! ? "Error closing $lpr: $!" - : "Exit status $? from $lpr"; - -my $custnum = $cust_bill->getfield('custnum'); - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?$custnum#history"); - -%> diff --git a/httemplate/misc/process/catchall.cgi b/httemplate/misc/process/catchall.cgi deleted file mode 100755 index 44a63f9f8..000000000 --- a/httemplate/misc/process/catchall.cgi +++ /dev/null @@ -1,33 +0,0 @@ -<% - -$FS::svc_domain::whois_hack=1; - -$cgi->param('svcnum') =~ /^(\d*)$/ or die "Illegal svcnum!"; -my $svcnum =$1; - -my $old = qsearchs('svc_domain',{'svcnum'=>$svcnum}) if $svcnum; - -my $new = new FS::svc_domain ( { - map { - ($_, scalar($cgi->param($_))); - } ( fields('svc_domain'), qw( pkgnum svcpart ) ) -} ); - -$new->setfield('action' => 'M'); - -my $error; -if ( $svcnum ) { - $error = $new->replace($old); -} else { - $error = $new->insert; - $svcnum = $new->getfield('svcnum'); -} - -if ($error) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "catchall.cgi?". $cgi->query_string ); -} else { - print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum"); -} - -%> diff --git a/httemplate/misc/process/delete-customer.cgi b/httemplate/misc/process/delete-customer.cgi deleted file mode 100755 index 16bdbaea8..000000000 --- a/httemplate/misc/process/delete-customer.cgi +++ /dev/null @@ -1,29 +0,0 @@ -<% - -my $conf = new FS::Conf; -die "Customer deletions not enabled" unless $conf->exists('deletecustomers'); - -$cgi->param('custnum') =~ /^(\d+)$/; -my $custnum = $1; -my $new_custnum; -if ( $cgi->param('new_custnum') ) { - $cgi->param('new_custnum') =~ /^(\d+)$/ - or die "Illegal new customer number: ". $cgi->param('new_custnum'); - $new_custnum = $1; -} else { - $new_custnum = ''; -} -my $cust_main = qsearchs( 'cust_main', { 'custnum' => $custnum } ) - or die "Customer not found: $custnum"; - -my $error = $cust_main->delete($new_custnum); - -if ( $error ) { - $cgi->param('error', $error); - print $cgi->redirect(popurl(2). "delete-customer.cgi?". $cgi->query_string ); -} elsif ( $new_custnum ) { - print $cgi->redirect(popurl(3). "view/cust_main.cgi?$new_custnum"); -} else { - print $cgi->redirect(popurl(3)); -} -%> diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi deleted file mode 100755 index 4b220a867..000000000 --- a/httemplate/misc/process/link.cgi +++ /dev/null @@ -1,40 +0,0 @@ -<% - -$cgi->param('pkgnum') =~ /^(\d+)$/; -my $pkgnum = $1; -$cgi->param('svcpart') =~ /^(\d+)$/; -my $svcpart = $1; -$cgi->param('svcnum') =~ /^(\d*)$/; -my $svcnum = $1; - -unless ( $svcnum ) { - my($part_svc) = qsearchs('part_svc',{'svcpart'=>$svcpart}); - my($svcdb) = $part_svc->getfield('svcdb'); - $cgi->param('link_field') =~ /^(\w+)$/; my($link_field)=$1; - my($svc_x)=qsearchs($svcdb,{$link_field => $cgi->param('link_value') }); - eidiot("$link_field not found!") unless $svc_x; - $svcnum=$svc_x->svcnum; -} - -my $old = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -die "svcnum not found!" unless $old; -#die "svcnum $svcnum already linked to package ". $old->pkgnum if $old->pkgnum; -my $new = new FS::cust_svc ({ - 'svcnum' => $svcnum, - 'pkgnum' => $pkgnum, - 'svcpart' => $svcpart, -}); - -my $error = $new->replace($old); - -unless ($error) { - #no errors, so let's view this customer. - print $cgi->redirect(popurl(3). "view/cust_pkg.cgi?$pkgnum"); -} else { -%> - -<% - idiot($error); -} - -%> diff --git a/httemplate/misc/queue.cgi b/httemplate/misc/queue.cgi deleted file mode 100644 index ce9c8fbd3..000000000 --- a/httemplate/misc/queue.cgi +++ /dev/null @@ -1,47 +0,0 @@ -<% - -$cgi->param('action') =~ /^(new|del|(retry|remove) selected)$/ - or die "Illegal action"; -my $action = $1; - -my $job; -if ( $action eq 'new' || $action eq 'del' ) { - $cgi->param('jobnum') =~ /^(\d+)$/ or die "Illegal jobnum"; - my $jobnum = $1; - $job = qsearchs('queue', { 'jobnum' => $1 }) - or die "unknown jobnum $jobnum - ". - "it probably completed normally or was removed by another user"; -} - -if ( $action eq 'new' ) { - my %hash = $job->hash; - $hash{'status'} = 'new'; - $hash{'statustext'} = ''; - my $new = new FS::queue \%hash; - my $error = $new->replace($job); - die $error if $error; -} elsif ( $action eq 'del' ) { - my $error = $job->delete; - die $error if $error; -} elsif ( $action =~ /^(retry|remove) selected$/ ) { - foreach my $jobnum ( - map { /^jobnum(\d+)$/; $1; } grep /^jobnum\d+$/, $cgi->param - ) { - my $job = qsearchs('queue', { 'jobnum' => $jobnum }); - if ( $action eq 'retry selected' && $job ) { #new - my %hash = $job->hash; - $hash{'status'} = 'new'; - $hash{'statustext'} = ''; - my $new = new FS::queue \%hash; - my $error = $new->replace($job); - die $error if $error; - } elsif ( $action eq 'remove selected' && $job ) { #del - my $error = $job->delete; - die $error if $error; - } - } -} - -print $cgi->redirect(popurl(2). "browse/queue.cgi"); - -%> diff --git a/httemplate/misc/susp_pkg.cgi b/httemplate/misc/susp_pkg.cgi deleted file mode 100755 index 4a19fa830..000000000 --- a/httemplate/misc/susp_pkg.cgi +++ /dev/null @@ -1,15 +0,0 @@ -<% - -#untaint pkgnum -my ($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my $pkgnum = $1; - -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - -my $error = $cust_pkg->suspend; -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - -%> diff --git a/httemplate/misc/unsusp_pkg.cgi b/httemplate/misc/unsusp_pkg.cgi deleted file mode 100755 index 500872983..000000000 --- a/httemplate/misc/unsusp_pkg.cgi +++ /dev/null @@ -1,15 +0,0 @@ -<% - -#untaint pkgnum -my ($query) = $cgi->keywords; -$query =~ /^(\d+)$/ || die "Illegal pkgnum"; -my $pkgnum = $1; - -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - -my $error = $cust_pkg->unsuspend; -&eidiot($error) if $error; - -print $cgi->redirect(popurl(2). "view/cust_main.cgi?".$cust_pkg->getfield('custnum')); - -%> diff --git a/httemplate/search/cust_bill.cgi b/httemplate/search/cust_bill.cgi deleted file mode 100755 index 586399a41..000000000 --- a/httemplate/search/cust_bill.cgi +++ /dev/null @@ -1,165 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $maxrecords = $conf->config('maxsearchrecordsperpage'); - -my $orderby = ''; #removeme - -my $limit = ''; -$limit .= "LIMIT $maxrecords" if $maxrecords; - -my $offset = $cgi->param('offset') || 0; -$limit .= " OFFSET $offset" if $offset; - -my $total; - -my(@cust_bill); -if ( $cgi->keywords ) { - my($query) = $cgi->keywords; - my $owed = "charged - ( select coalesce(sum(amount),0) from cust_bill_pay - where cust_bill_pay.invnum = cust_bill.invnum ) - - ( select coalesce(sum(amount),0) from cust_credit_bill - where cust_credit_bill.invnum = cust_bill.invnum )"; - my @where; - if ( $query =~ /^(OPEN(\d*)_)?(invnum|date|custnum)$/ ) { - my($open, $days, $field) = ($1, $2, $3); - $field = "_date" if $field eq 'date'; - $orderby = "ORDER BY cust_bill.$field"; - push @where, "0 != $owed" if $open; - push @where, "cust_bill._date < ". (time-86400*$days) if $days; - } else { - die "unknown query string $query"; - } - - my $extra_sql = scalar(@where) ? 'WHERE '. join(' AND ', @where) : ''; - - my $statement = "SELECT COUNT(*), sum(charged), sum($owed) - FROM cust_bill $extra_sql"; - my $sth = dbh->prepare($statement) or die dbh->errstr. " doing $statement"; - $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - - ( $total, $tot_amount, $tot_balance ) = @{$sth->fetchrow_arrayref}; - - @cust_bill = qsearch( - 'cust_bill', - {}, - "cust_bill.*, $owed as owed", - "$extra_sql $orderby $limit" - ); -} else { - $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/; - my $invnum = $2; - @cust_bill = qsearchs('cust_bill', { 'invnum' => $invnum } ); - $total = scalar(@cust_bill); -} - -#if ( scalar(@cust_bill) == 1 ) { -if ( $total == 1 ) { - my $invnum = $cust_bill[0]->invnum; - print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect -} elsif ( scalar(@cust_bill) == 0 ) { -%> - -<% - eidiot("Invoice not found."); -} else { -%> - -<% - - #begin pager - my $pager = ''; - if ( $total != scalar(@cust_bill) && $maxrecords ) { - unless ( $offset == 0 ) { - $cgi->param('offset', $offset - $maxrecords); - $pager .= 'Previous '; - } - my $poff; - my $page; - for ( $poff = 0; $poff < $total; $poff += $maxrecords ) { - $page++; - if ( $offset == $poff ) { - $pager .= qq!$page !; - } else { - $cgi->param('offset', $poff); - $pager .= qq!$page !; - } - } - unless ( $offset + $maxrecords > $total ) { - $cgi->param('offset', $offset + $maxrecords); - $pager .= 'Next '; - } - } - #end pager - - print header("Invoice Search Results", menubar( - 'Main Menu', popurl(2) - )). - "$total matching invoices found
    ". - "\$$tot_balance total balance
    ". - "\$$tot_amount total amount
    ". - "
    $pager". table(). < - - Balance - Amount - Date - Contact name - Company - -END - - foreach my $cust_bill ( @cust_bill ) { - my($invnum, $owed, $charged, $date ) = ( - $cust_bill->invnum, - sprintf("%.2f", $cust_bill->getfield('owed')), - sprintf("%.2f", $cust_bill->charged), - $cust_bill->_date, - ); - my $pdate = time2str("%b %d %Y", $date); - - my $rowspan = 1; - - my $view = popurl(2). "view/cust_bill.cgi?$invnum"; - print < - $invnum - \$$owed - \$$charged - $pdate -END - my $custnum = $cust_bill->custnum; - my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - if ( $cust_main ) { - my $cview = popurl(2). "view/cust_main.cgi?". $cust_main->custnum; - my ( $name, $company ) = ( - $cust_main->last. ', '. $cust_main->first, - $cust_main->company, - ); - print <$name - $company -END - } else { - print <WARNING: couldn't find cust_main.custnum $custnum (cust_bill.invnum $invnum) -END - } - - print ""; - } - $tot_balance = sprintf("%.2f", $tot_balance); - $tot_amount = sprintf("%.2f", $tot_amount); - print "$pager
    ". table(). <       Total
    Balance
    Total
    Amount
    - \$$tot_balance\$$tot_amount - - - -END - -} - -%> diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html deleted file mode 100755 index 36e8bc91b..000000000 --- a/httemplate/search/cust_bill.html +++ /dev/null @@ -1,19 +0,0 @@ - - - Invoice Search - - - - Invoice Search - -

    -
    - Search for invoice #: - - -

    - -

    - - - diff --git a/httemplate/search/cust_bill_event.cgi b/httemplate/search/cust_bill_event.cgi deleted file mode 100644 index 9cb36d28e..000000000 --- a/httemplate/search/cust_bill_event.cgi +++ /dev/null @@ -1,62 +0,0 @@ - -<% - -#false laziness with view/cust_bill.cgi - -$cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; -my $beginning = str2time($1); - -$cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; -my $ending = str2time($1) + 86400; - -my @cust_bill_event = - sort { $a->_date <=> $b->_date } - qsearch('cust_bill_event', { - _date => { op=> '>=', value=>$beginning }, - statustext => { op=> '!=', value=>'' }, -# i wish... -# _date => { op=> '<=', value=>$ending }, - }, '', "AND _date <= $ending"); - -%> - -<%= header('Failed billing events') %> - -<%= table() %> - - Event - Date - Status - Invoice - (bill) name - company -<% if ( defined dbdef->table('cust_main')->column('ship_last') ) { %> - (service) name - company -<% } %> - - -<% foreach my $cust_bill_event ( @cust_bill_event ) { - my $status = $cust_bill_event->status; - $status .= ': '.$cust_bill_event->statustext if $cust_bill_event->statustext; - my $cust_bill = $cust_bill_event->cust_bill; - my $cust_main = $cust_bill->cust_main; - my $invlink = "${p}view/cust_bill.cgi?". $cust_bill->invnum; - my $custlink = "${p}view/cust_main.cgi?". $cust_main->custnum; -%> - - <%= $cust_bill_event->part_bill_event->event %> - <%= time2str("%a %b %e %T %Y", $cust_bill_event->_date) %> - <%= $status %> - Invoice #<%= $cust_bill->invnum %> (<%= time2str("%D", $cust_bill->_date ) %>) - <%= $cust_main->last. ', '. $cust_main->first %> - <%= $cust_main->company %> - <% if ( defined dbdef->table('cust_main')->column('ship_last') ) { %> - <%= $cust_main->ship_last. ', '. $cust_main->ship_first %> - <%= $cust_main->ship_company %> - <% } %> - -<% } %> - - - diff --git a/httemplate/search/cust_bill_event.html b/httemplate/search/cust_bill_event.html deleted file mode 100755 index d76ce3c8c..000000000 --- a/httemplate/search/cust_bill_event.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Failed billing events - - -
    -

    Failed billing events

    -
    -
    -
    - Return failed billing events for period: - from m/d/y - to m/d/y - -

    - -

    - -
    - - - - diff --git a/httemplate/search/cust_main-otaker.cgi b/httemplate/search/cust_main-otaker.cgi deleted file mode 100755 index b7173c49c..000000000 --- a/httemplate/search/cust_main-otaker.cgi +++ /dev/null @@ -1,29 +0,0 @@ - - - Customer Search - - - - Customer Search - -
    -
    - Search for Order taker: - - <% my $dbh = dbh; - my $sth = dbh->prepare("SELECT DISTINCT otaker FROM cust_main") - or eidiot $dbh->errstr; - $sth->execute() or eidiot $sth->errstr; -# my @otakers = map { $_->[0] } @{$sth->selectall_arrayref}; - %> - -

    - -

    - - - diff --git a/httemplate/search/cust_main-payinfo.html b/httemplate/search/cust_main-payinfo.html deleted file mode 100755 index 671b5ef08..000000000 --- a/httemplate/search/cust_main-payinfo.html +++ /dev/null @@ -1,20 +0,0 @@ - - - Customer Search - - - - Customer Search - -
    -
    - Search for Credit card #: - - - -

    - -

    - - - diff --git a/httemplate/search/cust_main-quickpay.html b/httemplate/search/cust_main-quickpay.html deleted file mode 100755 index 9f39db914..000000000 --- a/httemplate/search/cust_main-quickpay.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Quick payment entry - - - - Quick payment entry - -

    -
    - - Search for last name: - - using search method: - -

    Search for company: - - using search methods: - -

    Note: Fuzzy searching can take a while. Please be patient. - -

    - -
    Explanation of search methods: -
      -
    • All - Try all search methods. -
    • Fuzzy - Searches for matches that are close to your text. -
    • Substring - Searches for matches that contain your text. -
    • Exact - Finds exact matches only, but much faster than the other search methods. -
    - - - diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi deleted file mode 100755 index 586f8d991..000000000 --- a/httemplate/search/cust_main.cgi +++ /dev/null @@ -1,659 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $maxrecords = $conf->config('maxsearchrecordsperpage'); - -#my $cache; - -#my $monsterjoin = <param('offset') || 0; -$limit .= " OFFSET $offset" if $offset; - -my $total = 0; - -my(@cust_main, $sortby, $orderby); -if ( $cgi->param('browse') - || $cgi->param('otaker_on') -) { - - my %search = (); - if ( $cgi->param('browse') ) { - my $query = $cgi->param('browse'); - if ( $query eq 'custnum' ) { - $sortby=\*custnum_sort; - $orderby = "ORDER BY custnum"; - } elsif ( $query eq 'last' ) { - $sortby=\*last_sort; - $orderby = "ORDER BY LOWER(last || ' ' || first)"; - } elsif ( $query eq 'company' ) { - $sortby=\*company_sort; - $orderby = "ORDER BY LOWER(company || ' ' || last || ' ' || first )"; - } else { - die "unknown browse field $query"; - } - } else { - $sortby = \*last_sort; #?? - $orderby = "ORDER BY LOWER(last || ' ' || first)"; #?? - if ( $cgi->param('otaker_on') ) { - $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n"; - $search{otaker} = $1; - } else { - die "unknown query..."; - } - } - - my $ncancelled = ''; - - if ( driver_name eq 'mysql' ) { - - my $query = "CREATE TEMPORARY TABLE temp1_$$ TYPE=MYISAM - SELECT cust_pkg.custnum,COUNT(*) as count - FROM cust_pkg,cust_main - WHERE cust_pkg.custnum = cust_main.custnum - AND ( cust_pkg.cancel IS NULL - OR cust_pkg.cancel = 0 ) - GROUP BY cust_pkg.custnum"; - my $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query"; - $sth->execute or die "Error executing \"$query\": ". $sth->errstr; - $query = "CREATE TEMPORARY TABLE temp2_$$ TYPE=MYISAM - SELECT cust_pkg.custnum,COUNT(*) as count - FROM cust_pkg,cust_main - WHERE cust_pkg.custnum = cust_main.custnum - GROUP BY cust_pkg.custnum"; - my $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query"; - $sth->execute or die "Error executing \"$query\": ". $sth->errstr; - } - - if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me - || ( $conf->exists('hidecancelledcustomers') - && ! $cgi->param('showcancelledcustomers') ) - ) { - #grep { $_->ncancelled_pkgs || ! $_->all_pkgs } - if ( driver_name eq 'mysql' ) { - $ncancelled = " - temp1_$$.custnum = cust_main.custnum - AND temp2_$$.custnum = cust_main.custnum - AND (temp1_$$.count > 0 - OR temp2_$$.count = 0 ) - "; - } else { - $ncancelled = " - 0 < ( SELECT COUNT(*) FROM cust_pkg - WHERE cust_pkg.custnum = cust_main.custnum - AND ( cust_pkg.cancel IS NULL - OR cust_pkg.cancel = 0 - ) - ) - OR 0 = ( SELECT COUNT(*) FROM cust_pkg - WHERE cust_pkg.custnum = cust_main.custnum - ) - "; - } - - } - - #EWWWWWW - my $qual = join(' AND ', - map { "$_ = ". dbh->quote($search{$_}) } keys %search ); - - if ( $ncancelled ) { - $qual .= ' AND ' if $qual; - $qual .= $ncancelled; - } - - $qual = " WHERE $qual" if $qual; - my $statement; - if ( driver_name eq 'mysql' ) { - $statement = "SELECT COUNT(*) FROM cust_main"; - $statement .= ", temp1_$$, temp2_$$ $qual" if $qual; - } else { - $statement = "SELECT COUNT(*) FROM cust_main $qual"; - } - my $sth = dbh->prepare($statement) or die dbh->errstr." preparing $statement"; - $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - - $total = $sth->fetchrow_arrayref->[0]; - - if ( $ncancelled ) { - if ( %search ) { - $ncancelled = " AND $ncancelled"; - } else { - $ncancelled = " WHERE $ncancelled"; - } - } - - my @just_cust_main; - if ( driver_name eq 'mysql' ) { - @just_cust_main = qsearch('cust_main', \%search, 'cust_main.*', - ",temp1_$$,temp2_$$ $ncancelled $orderby $limit"); - } else { - @just_cust_main = qsearch('cust_main', \%search, '', - "$ncancelled $orderby $limit" ); - } - if ( driver_name eq 'mysql' ) { - $query = "DROP TABLE temp1_$$,temp2_$$;"; - my $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query"; - $sth->execute or die "Error executing \"$query\": ". $sth->errstr; - } - @cust_main = @just_cust_main; - -# foreach my $cust_main ( @just_cust_main ) { -# -# my @one_cust_main; -# $FS::Record::DEBUG=1; -# ( $cache, @one_cust_main ) = jsearch( -# "$monsterjoin", -# { 'custnum' => $cust_main->custnum }, -# '', -# '', -# 'cust_main', -# 'custnum', -# ); -# push @cust_main, @one_cust_main; -# } - -} else { - @cust_main=(); - $sortby = \*last_sort; - - push @cust_main, @{&custnumsearch} - if $cgi->param('custnum_on') && $cgi->param('custnum_text'); - push @cust_main, @{&cardsearch} - if $cgi->param('card_on') && $cgi->param('card'); - push @cust_main, @{&lastsearch} - if $cgi->param('last_on') && $cgi->param('last_text'); - push @cust_main, @{&companysearch} - if $cgi->param('company_on') && $cgi->param('company_text'); - push @cust_main, @{&address2search} - if $cgi->param('address2_on') && $cgi->param('address2_text'); - push @cust_main, @{&phonesearch} - if $cgi->param('phone_on') && $cgi->param('phone_text'); - push @cust_main, @{&referralsearch} - if $cgi->param('referral_custnum'); - - if ( $cgi->param('company_on') && $cgi->param('company_text') ) { - $sortby = \*company_sort; - push @cust_main, @{&companysearch}; - } - - @cust_main = grep { $_->ncancelled_pkgs || ! $_->all_pkgs } @cust_main - if $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me - || ( $conf->exists('hidecancelledcustomers') - && ! $cgi->param('showcancelledcustomers') ); - - my %saw = (); - @cust_main = grep { !$saw{$_->custnum}++ } @cust_main; -} - -my %all_pkgs; -if ( $conf->exists('hidecancelledpackages' ) ) { - %all_pkgs = map { $_->custnum => [ $_->ncancelled_pkgs ] } @cust_main; -} else { - %all_pkgs = map { $_->custnum => [ $_->all_pkgs ] } @cust_main; -} -#%all_pkgs = (); - -if ( scalar(@cust_main) == 1 && ! $cgi->param('referral_custnum') ) { - if ( $cgi->param('quickpay') eq 'yes' ) { - print $cgi->redirect(popurl(2). "edit/cust_pay.cgi?quickpay=yes;custnum=". $cust_main[0]->custnum); - } else { - print $cgi->redirect(popurl(2). "view/cust_main.cgi?". $cust_main[0]->custnum); - } - #exit; -} elsif ( scalar(@cust_main) == 0 ) { -%> - -<% - eidiot "No matching customers found!\n"; -} else { -%> - -<% - - $total ||= scalar(@cust_main); - print header("Customer Search Results",menubar( - 'Main Menu', popurl(2) - )), "$total matching customers found "; - - #begin pager - my $pager = ''; - if ( $total != scalar(@cust_main) && $maxrecords ) { - unless ( $offset == 0 ) { - $cgi->param('offset', $offset - $maxrecords); - $pager .= 'Previous '; - } - my $poff; - my $page; - for ( $poff = 0; $poff < $total; $poff += $maxrecords ) { - $page++; - if ( $offset == $poff ) { - $pager .= qq!$page !; - } else { - $cgi->param('offset', $poff); - $pager .= qq!$page !; - } - } - unless ( $offset + $maxrecords > $total ) { - $cgi->param('offset', $offset + $maxrecords); - $pager .= 'Next '; - } - } - #end pager - - if ( $cgi->param('showcancelledcustomers') eq '0' #see if it was set by me - || ( $conf->exists('hidecancelledcustomers') - && ! $cgi->param('showcancelledcustomers') - ) - ) { - $cgi->param('showcancelledcustomers', 1); - $cgi->param('offset', 0); - print qq!( show cancelled customers )!; - } else { - $cgi->param('showcancelledcustomers', 0); - $cgi->param('offset', 0); - print qq!( hide cancelled customers )!; - } - if ( $cgi->param('referral_custnum') ) { - $cgi->param('referral_custnum') =~ /^(\d+)$/ - or eidiot "Illegal referral_custnum\n"; - my $referral_custnum = $1; - my $cust_main = qsearchs('cust_main', { custnum => $referral_custnum } ); - print '
    '. - qq!!. - 'referrals of $referral_custnum: ". - ( $cust_main->company - || $cust_main->last. ', '. $cust_main->first ). - ''; - print "\n",< - function changed(what) { - what.form.submit(); - } - -END - print ' levels deep". - ''. - ''; - } - - print "

    ". $pager. &table(). < - - (bill) name - company -END - -if ( defined dbdef->table('cust_main')->column('ship_last') ) { - print <(service) name - company -END -} - -print <Packages - Services - -END - - my(%saw,$cust_main); - my $p = popurl(2); - foreach $cust_main ( - sort $sortby grep(!$saw{$_->custnum}++, @cust_main) - ) { - my($custnum,$last,$first,$company)=( - $cust_main->custnum, - $cust_main->getfield('last'), - $cust_main->getfield('first'), - $cust_main->company, - ); - - my(@lol_cust_svc); - my($rowspan)=0;#scalar( @{$all_pkgs{$custnum}} ); - foreach ( @{$all_pkgs{$custnum}} ) { - #my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } ); - my @cust_svc = $_->cust_svc; - push @lol_cust_svc, \@cust_svc; - $rowspan += scalar(@cust_svc) || 1; - } - - #my($rowspan) = scalar(@{$all_pkgs{$custnum}}); - my $view; - if ( defined $cgi->param('quickpay') && $cgi->param('quickpay') eq 'yes' ) { - $view = $p. 'edit/cust_pay.cgi?quickpay=yes;custnum='. $custnum; - } else { - $view = $p. 'view/cust_main.cgi?'. $custnum; - } - my $pcompany = $company - ? qq!$company! - : ' '; - print < - $custnum - $last, $first - $pcompany -END - if ( defined dbdef->table('cust_main')->column('ship_last') ) { - my($ship_last,$ship_first,$ship_company)=( - $cust_main->ship_last || $cust_main->getfield('last'), - $cust_main->ship_last ? $cust_main->ship_first : $cust_main->first, - $cust_main->ship_last ? $cust_main->ship_company : $cust_main->company, - ); - my $pship_company = $ship_company - ? qq!$ship_company! - : ' '; - print <$ship_last, $ship_first - $pship_company -END - } - - my($n1)=''; - foreach ( @{$all_pkgs{$custnum}} ) { - my $pkgnum = $_->pkgnum; -# my $part_pkg = qsearchs( 'part_pkg', { pkgpart => $_->pkgpart } ); - my $part_pkg = $_->part_pkg; - - my $pkg = $part_pkg->pkg; - my $comment = $part_pkg->comment; - my $pkgview = $p. 'view/cust_pkg.cgi?'. $pkgnum; - my @cust_svc = @{shift @lol_cust_svc}; - #my(@cust_svc) = qsearch( 'cust_svc', { 'pkgnum' => $_->pkgnum } ); - my $rowspan = scalar(@cust_svc) || 1; - - print $n1, qq!$pkg - $comment!; - my($n2)=''; - foreach my $cust_svc ( @cust_svc ) { - my($label, $value, $svcdb) = $cust_svc->label; - my($svcnum) = $cust_svc->svcnum; - my($sview) = $p.'view'; - print $n2,qq!$label!, - qq!$value!; - $n2=""; - } - #print qq!\n!; - $n1=""; - } - print ""; - } - - print "$pager"; - -} - -#undef $cache; #does this help? - -# - -sub last_sort { - lc($a->getfield('last')) cmp lc($b->getfield('last')) - || lc($a->first) cmp lc($b->first); -} - -sub company_sort { - return -1 if $a->company && ! $b->company; - return 1 if ! $a->company && $b->company; - lc($a->company) cmp lc($b->company) - || lc($a->getfield('last')) cmp lc($b->getfield('last')) - || lc($a->first) cmp lc($b->first);; -} - -sub custnum_sort { - $a->getfield('custnum') <=> $b->getfield('custnum'); -} - -sub custnumsearch { - - my $custnum = $cgi->param('custnum_text'); - $custnum =~ s/\D//g; - $custnum =~ /^(\d{1,23})$/ or eidiot "Illegal customer number\n"; - my $custnum = $1; - - [ qsearchs('cust_main', { 'custnum' => $custnum } ) ]; -} - -sub cardsearch { - - my($card)=$cgi->param('card'); - $card =~ s/\D//g; - $card =~ /^(\d{13,16})$/ or eidiot "Illegal card number\n"; - my($payinfo)=$1; - - [ qsearch('cust_main',{'payinfo'=>$payinfo, 'payby'=>'CARD'}) ]; -} - -sub referralsearch { - $cgi->param('referral_custnum') =~ /^(\d+)$/ - or eidiot "Illegal referral_custnum"; - my $cust_main = qsearchs('cust_main', { 'custnum' => $1 } ) - or eidiot "Customer $1 not found"; - my $depth; - if ( $cgi->param('referral_depth') ) { - $cgi->param('referral_depth') =~ /^(\d+)$/ - or eidiot "Illegal referral_depth"; - $depth = $1; - } else { - $depth = 1; - } - [ $cust_main->referral_cust_main($depth) ]; -} - -sub lastsearch { - my(%last_type); - my @cust_main; - foreach ( $cgi->param('last_type') ) { - $last_type{$_}++; - } - - $cgi->param('last_text') =~ /^([\w \,\.\-\']*)$/ - or eidiot "Illegal last name"; - my($last)=$1; - - if ( $last_type{'Exact'} || $last_type{'Fuzzy'} ) { - push @cust_main, qsearch( 'cust_main', - { 'last' => { 'op' => 'ILIKE', - 'value' => $last } } ); - - push @cust_main, qsearch( 'cust_main', - { 'ship_last' => { 'op' => 'ILIKE', - 'value' => $last } } ) - if defined dbdef->table('cust_main')->column('ship_last'); - } - - if ( $last_type{'Substring'} || $last_type{'All'} ) { - - push @cust_main, qsearch( 'cust_main', - { 'last' => { 'op' => 'ILIKE', - 'value' => "%$last%" } } ); - - push @cust_main, qsearch( 'cust_main', - { 'ship_last' => { 'op' => 'ILIKE', - 'value' => "%$last%" } } ) - if defined dbdef->table('cust_main')->column('ship_last'); - - } - - if ( $last_type{'Fuzzy'} || $last_type{'All'} ) { - - &FS::cust_main::check_and_rebuild_fuzzyfiles; - my $all_last = &FS::cust_main::all_last; - - my %last; - if ( $last_type{'Fuzzy'} || $last_type{'All'} ) { - foreach ( amatch($last, [ qw(i) ], @$all_last) ) { - $last{$_}++; - } - } - - #if ($last_type{'Sound-alike'}) { - #} - - foreach ( keys %last ) { - push @cust_main, qsearch('cust_main',{'last'=>$_}); - push @cust_main, qsearch('cust_main',{'ship_last'=>$_}) - if defined dbdef->table('cust_main')->column('ship_last'); - } - - } - - \@cust_main; -} - -sub companysearch { - - my(%company_type); - my @cust_main; - foreach ( $cgi->param('company_type') ) { - $company_type{$_}++ - }; - - $cgi->param('company_text') =~ - /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/ - or eidiot "Illegal company"; - my $company = $1; - - if ( $company_type{'Exact'} || $company_type{'Fuzzy'} ) { - push @cust_main, qsearch( 'cust_main', - { 'company' => { 'op' => 'ILIKE', - 'value' => $company } } ); - - push @cust_main, qsearch( 'cust_main', - { 'ship_company' => { 'op' => 'ILIKE', - 'value' => $company } } ) - if defined dbdef->table('cust_main')->column('ship_last'); - } - - if ( $company_type{'Substring'} || $company_type{'All'} ) { - - push @cust_main, qsearch( 'cust_main', - { 'company' => { 'op' => 'ILIKE', - 'value' => "%$company%" } } ); - - push @cust_main, qsearch( 'cust_main', - { 'ship_company' => { 'op' => 'ILIKE', - 'value' => "%$company%" } }) - if defined dbdef->table('cust_main')->column('ship_last'); - - } - - if ( $company_type{'Fuzzy'} || $company_type{'All'} ) { - - &FS::cust_main::check_and_rebuild_fuzzyfiles; - my $all_company = &FS::cust_main::all_company; - - my %company; - if ( $company_type{'Fuzzy'} || $company_type{'All'} ) { - foreach ( amatch($company, [ qw(i) ], @$all_company ) ) { - $company{$_}++; - } - } - - #if ($company_type{'Sound-alike'}) { - #} - - foreach ( keys %company ) { - push @cust_main, qsearch('cust_main',{'company'=>$_}); - push @cust_main, qsearch('cust_main',{'ship_company'=>$_}) - if defined dbdef->table('cust_main')->column('ship_last'); - } - - } - - \@cust_main; -} - -sub address2search { - my @cust_main; - - $cgi->param('address2_text') =~ - /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/ - or eidiot "Illegal address2"; - my $address2 = $1; - - push @cust_main, qsearch( 'cust_main', - { 'address2' => { 'op' => 'ILIKE', - 'value' => $address2 } } ); - push @cust_main, qsearch( 'cust_main', - { 'address2' => { 'op' => 'ILIKE', - 'value' => $address2 } } ) - if defined dbdef->table('cust_main')->column('ship_last'); - - \@cust_main; -} - -sub phonesearch { - my @cust_main; - - my $phone = $cgi->param('phone_text'); - - #false laziness with Record::ut_phonen, only works with US/CA numbers... - $phone =~ s/\D//g; - $phone =~ /^(\d{3})(\d{3})(\d{4})(\d*)$/ - or eidiot gettext('illegal_phone'). ": $phone"; - $phone = "$1-$2-$3"; - $phone .= " x$4" if $4; - - my @fields = qw(daytime night fax); - push @fields, qw(ship_daytime ship_night ship_fax) - if defined dbdef->table('cust_main')->column('ship_last'); - - for my $field ( @fields ) { - push @cust_main, qsearch ( 'cust_main', - { $field => { 'op' => 'LIKE', - 'value' => "$phone%" } } ); - } - - \@cust_main; -} - -%> diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html deleted file mode 100755 index 5a066e453..000000000 --- a/httemplate/search/cust_main.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Customer Search - - - - Customer Search - -

    -
    - Search for last name: - - using search method: - -

    Search for company: - - using search methods: - -

    Note: Fuzzy searching can take a while. Please be patient. - -

    - -
    Explanation of search methods: -
      -
    • All - Try all search methods. -
    • Fuzzy - Searches for matches that are close to your text. -
    • Substring - Searches for matches that contain your text. -
    • Exact - Finds exact matches only, but much faster than the other search methods. -
    - - - diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi deleted file mode 100755 index b5bdf8296..000000000 --- a/httemplate/search/cust_pay.cgi +++ /dev/null @@ -1,103 +0,0 @@ -<% - -$cgi->param('payinfo') =~ /^\s*(\d+)\s*$/ or die "illegal payinfo"; -my $payinfo = $1; -$cgi->param('payby') =~ /^(\w+)$/ or die "illegal payby"; -my $payby = $1; -my @cust_pay = qsearch('cust_pay', { 'payinfo' => $payinfo, - 'payby' => $payby } ); -my $sortby = \*date_sort; - -if (0) { -#if ( scalar(@cust_pay) == 1 ) { -# my $invnum = $cust_bill[0]->invnum; -# print $cgi->redirect(popurl(2). "view/cust_bill.cgi?$invnum"); #redirect -} elsif ( scalar(@cust_pay) == 0 ) { -%> - -<% - idiot("Check # not found."); - #exit; -} else { - my $total = scalar(@cust_pay); - my $s = $total > 1 ? 's' : ''; -%> - -<% - print header("Check # Search Results", menubar( - 'Main Menu', popurl(2) - )), "$total matching check$s found
    ", &table(), < - - Amount - Date - Contact name - Company - -END - - my(%saw, $cust_pay); - foreach my $cust_pay ( - sort $sortby grep(!$saw{$_->paynum}++, @cust_pay) - ) { - my($paynum, $custnum, $payinfo, $amount, $date ) = ( - $cust_pay->paynum, - $cust_pay->custnum, - $cust_pay->payinfo, - sprintf("%.2f", $cust_pay->paid), - $cust_pay->_date, - ); - my $pdate = time2str("%b %d %Y", $date); - - my $rowspan = 1; - - my $view = popurl(2). "view/cust_main.cgi?". $custnum. - "#". $payby. $payinfo; - - print < - $payinfo - \$$amount - $pdate -END - my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } ); - if ( $cust_main ) { - #my $cview = popurl(2). "view/cust_main.cgi?". $cust_main->custnum; - my ( $name, $company ) = ( - $cust_main->last. ', '. $cust_main->first, - $cust_main->company, - ); - print <$name - $company -END - } else { - print <WARNING: couldn't find cust_main.custnum $custnum (cust_pay.paynum $paynum) -END - } - - print ""; - } - print < - - -END - -} - -# - -#sub invnum_sort { -# $a->invnum <=> $b->invnum; -#} -# -#sub custnum_sort { -# $a->custnum <=> $b->custnum || $a->invnum <=> $b->invnum; -#} - -sub date_sort { - $a->_date <=> $b->_date || $a->invnum <=> $b->invnum; -} -%> diff --git a/httemplate/search/cust_pay.html b/httemplate/search/cust_pay.html deleted file mode 100755 index 3848d66f7..000000000 --- a/httemplate/search/cust_pay.html +++ /dev/null @@ -1,18 +0,0 @@ - - - Check # Search - - - - Check # Search - -

    -
    - Search for check #: - - -

    -
    - - - diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi deleted file mode 100755 index abf6eee4c..000000000 --- a/httemplate/search/cust_pkg.cgi +++ /dev/null @@ -1,319 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $maxrecords = $conf->config('maxsearchrecordsperpage'); - -my %part_pkg = map { $_->pkgpart => $_ } qsearch('part_pkg', {}); - -my $limit = ''; -$limit .= "LIMIT $maxrecords" if $maxrecords; - -my $offset = $cgi->param('offset') || 0; -$limit .= " OFFSET $offset" if $offset; - -my $total; - -my($query) = $cgi->keywords; -my $sortby; -my @cust_pkg; - -if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { - $sortby=\*bill_sort; - my $range = ''; - if ( $cgi->param('beginning') - && $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/ ) { - my $beginning = str2time($1); - $range = " WHERE bill >= $beginning "; - } - if ( $cgi->param('ending') - && $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) { - my $ending = str2time($1) + 86400; - $range .= ( $range ? ' AND ' : ' WHERE ' ). " bill <= $ending "; - } - - #false laziness with below - my $statement = "SELECT COUNT(*) FROM cust_pkg $range"; - warn $statement; - my $sth = dbh->prepare($statement) or die dbh->errstr." preparing $statement"; - $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - - $total = $sth->fetchrow_arrayref->[0]; - - @cust_pkg = qsearch('cust_pkg',{}, '', " $range ORDER BY bill $limit" ); - -} else { - - my $unconf = ''; - if ( $query eq 'pkgnum' ) { - $sortby=\*pkgnum_sort; - - } elsif ( $query eq 'APKG_pkgnum' ) { - - $sortby=\*pkgnum_sort; - - #@cust_pkg=(); - ##perhaps this should go in cust_pkg as a qsearch-like constructor? - #my($cust_pkg); - #foreach $cust_pkg ( - # qsearch('cust_pkg',{}, '', "ORDER BY pkgnum $limit" ) - #) { - # my($flag)=0; - # my($pkg_svc); - # PKG_SVC: - # foreach $pkg_svc (qsearch('pkg_svc',{ 'pkgpart' => $cust_pkg->pkgpart })) { - # if ( $pkg_svc->quantity - # > scalar(qsearch('cust_svc',{ - # 'pkgnum' => $cust_pkg->pkgnum, - # 'svcpart' => $pkg_svc->svcpart, - # })) - # ) - # { - # $flag=1; - # last PKG_SVC; - # } - # } - # push @cust_pkg, $cust_pkg if $flag; - #} - - if ( driver_name eq 'mysql' ) { - #$query = "DROP TABLE temp1_$$,temp2_$$;"; - #my $sth = dbh->prepare($query); - #$sth->execute; - - $query = "CREATE TEMPORARY TABLE temp1_$$ TYPE=MYISAM - SELECT cust_svc.pkgnum,cust_svc.svcpart,COUNT(*) as count - FROM cust_pkg,cust_svc,pkg_svc - WHERE cust_pkg.pkgnum = cust_svc.pkgnum - AND cust_svc.svcpart = pkg_svc.svcpart - AND cust_pkg.pkgpart = pkg_svc.pkgpart - GROUP BY cust_svc.pkgnum,cust_svc.svcpart"; - $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query"; - - $sth->execute or die "Error executing \"$query\": ". $sth->errstr; - - $query = "CREATE TEMPORARY TABLE temp2_$$ TYPE=MYISAM - SELECT cust_pkg.pkgnum FROM cust_pkg - LEFT JOIN pkg_svc ON (cust_pkg.pkgpart=pkg_svc.pkgpart) - LEFT JOIN temp1_$$ ON (cust_pkg.pkgnum = temp1_$$.pkgnum - AND pkg_svc.svcpart=temp1_$$.svcpart) - WHERE ( pkg_svc.quantity > temp1_$$.count - OR temp1_$$.pkgnum IS NULL ) - AND pkg_svc.quantity != 0;"; - $sth = dbh->prepare($query) or die dbh->errstr. " preparing $query"; - $sth->execute or die "Error executing \"$query\": ". $sth->errstr; - $unconf = " LEFT JOIN temp2_$$ ON cust_pkg.pkgnum = temp2_$$.pkgnum - WHERE temp2_$$.pkgnum IS NOT NULL"; - - } else { - - $unconf = " - WHERE 0 < - ( SELECT count(*) FROM pkg_svc - WHERE pkg_svc.pkgpart = cust_pkg.pkgpart - AND pkg_svc.quantity > ( SELECT count(*) FROM cust_svc - WHERE cust_svc.pkgnum = cust_pkg.pkgnum - AND cust_svc.svcpart = pkg_svc.svcpart - ) - ) - "; - - } - - } else { - die "Empty QUERY_STRING!"; - } - - my $statement = "SELECT COUNT(*) FROM cust_pkg $unconf"; - my $sth = dbh->prepare($statement) or die dbh->errstr." preparing $statement"; - $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - - $total = $sth->fetchrow_arrayref->[0]; - - my $tblname = driver_name eq 'mysql' ? 'cust_pkg.' : ''; - @cust_pkg = - qsearch('cust_pkg',{}, '', "$unconf ORDER BY ${tblname}pkgnum $limit" ); - - if ( driver_name eq 'mysql' ) { - $query = "DROP TABLE temp1_$$,temp2_$$;"; - my $sth = dbh->prepare($query) or die dbh->errstr. " doing $query"; - $sth->execute; # or die "Error executing \"$query\": ". $sth->errstr; - } - -} - -if ( scalar(@cust_pkg) == 1 ) { - my($pkgnum)=$cust_pkg[0]->pkgnum; - print $cgi->redirect(popurl(2). "view/cust_pkg.cgi?$pkgnum"); - #exit; -} elsif ( scalar(@cust_pkg) == 0 ) { #error -%> - -<% - eidiot("No packages found"); -} else { -%> - -<% - $total ||= scalar(@cust_pkg); - - #begin pager - my $pager = ''; - if ( $total != scalar(@cust_pkg) && $maxrecords ) { - unless ( $offset == 0 ) { - $cgi->param('offset', $offset - $maxrecords); - $pager .= 'Previous '; - } - my $poff; - my $page; - for ( $poff = 0; $poff < $total; $poff += $maxrecords ) { - $page++; - if ( $offset == $poff ) { - $pager .= qq!$page !; - } else { - $cgi->param('offset', $poff); - $pager .= qq!$page !; - } - } - unless ( $offset + $maxrecords > $total ) { - $cgi->param('offset', $offset + $maxrecords); - $pager .= 'Next '; - } - } - #end pager - - print header('Package Search Results',''), - "$total matching packages found

    $pager", &table(), < - Package - Setup - Next
    bill
    - Susp. - Expire - Cancel - Cust# - (bill) name - company -END - -if ( defined dbdef->table('cust_main')->column('ship_last') ) { - print <(service) name - company -END -} - -print <Services - -END - - my $n1 = ''; - my(%saw,$cust_pkg); - foreach $cust_pkg ( - sort $sortby grep(!$saw{$_->pkgnum}++, @cust_pkg) - ) { - my($cust_main)=qsearchs('cust_main',{'custnum'=>$cust_pkg->custnum}); - my($pkgnum, $setup, $bill, $susp, $expire, $cancel, - $custnum, $last, $first, $company ) = ( - $cust_pkg->pkgnum, - $cust_pkg->getfield('setup') - ? time2str("%D", $cust_pkg->getfield('setup') ) - : '', - $cust_pkg->getfield('bill') - ? time2str("%D", $cust_pkg->getfield('bill') ) - : '', - $cust_pkg->getfield('susp') - ? time2str("%D", $cust_pkg->getfield('susp') ) - : '', - $cust_pkg->getfield('expire') - ? time2str("%D", $cust_pkg->getfield('expire') ) - : '', - $cust_pkg->getfield('cancel') - ? time2str("%D", $cust_pkg->getfield('cancel') ) - : '', - $cust_pkg->custnum, - $cust_main ? $cust_main->last : '', - $cust_main ? $cust_main->first : '', - $cust_main ? $cust_main->company : '', - ); - my($ship_last, $ship_first, $ship_company); - if ( defined dbdef->table('cust_main')->column('ship_last') ) { - ($ship_last, $ship_first, $ship_company) = ( - $cust_main - ? ( $cust_main->ship_last || $cust_main->getfield('last') ) - : '', - $cust_main - ? ( $cust_main->ship_last - ? $cust_main->ship_first - : $cust_main->first ) - : '', - $cust_main - ? ( $cust_main->ship_last - ? $cust_main->ship_company - : $cust_main->company ) - : '', - ); - } - my $pkg = $part_pkg{$cust_pkg->pkgpart}->pkg; - #$pkg .= ' - '. $part_pkg{$cust_pkg->pkgpart}->comment; - my @cust_svc = qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } ); - my $rowspan = scalar(@cust_svc) || 1; - my $p = popurl(2); - print $n1, <$pkgnum - $pkg - $setup - $bill - $susp - $expire - $cancel -END - if ( $cust_main ) { - print <$custnum - $last, $first - $company -END - if ( defined dbdef->table('cust_main')->column('ship_last') ) { - print <$ship_last, $ship_first - $ship_company -END - } - } else { - my $colspan = defined dbdef->table('cust_main')->column('ship_last') - ? 5 : 3; - print <WARNING: couldn't find cust_main.custnum $custnum (cust_pkg.pkgnum $pkgnum) -END - } - - my $n2 = ''; - foreach my $cust_svc ( @cust_svc ) { - my($label, $value, $svcdb) = $cust_svc->label; - my $svcnum = $cust_svc->svcnum; - my $sview = $p. "view"; - print $n2,qq!$label!, - qq!$value!; - $n2=""; - } - - $n1 = ""; - - } - print ''; - - print "$pager"; - -} - -sub pkgnum_sort { - $a->getfield('pkgnum') <=> $b->getfield('pkgnum'); -} - -sub bill_sort { - $a->getfield('bill') <=> $b->getfield('bill'); -} - -%> diff --git a/httemplate/search/cust_pkg.html b/httemplate/search/cust_pkg.html deleted file mode 100755 index bb0a5407c..000000000 --- a/httemplate/search/cust_pkg.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Packages - - -
    -

    Packages

    -
    -
    -
    - - Return packages with next bill date: - from m/d/y - to m/d/y - -

    - -

    - -
    - - - - diff --git a/httemplate/search/report_cc.cgi b/httemplate/search/report_cc.cgi deleted file mode 100755 index c2ab726b6..000000000 --- a/httemplate/search/report_cc.cgi +++ /dev/null @@ -1,25 +0,0 @@ - -<% - -my $user = getotaker; - -$cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; -my $beginning = $1; - -$cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; -my $ending = $1; - -print header('Credit Card Recipt Report Results'); - -open (REPORT, "freeside-cc-receipts-report -v -s $beginning -f $ending $user |"); - -print '
    ';
    -while() {
    -  print $_;
    -}
    -print '
    '; - -print ''; - -%> - diff --git a/httemplate/search/report_cc.html b/httemplate/search/report_cc.html deleted file mode 100755 index 8653dcc69..000000000 --- a/httemplate/search/report_cc.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Credit Card Receipt Report Criteria - - -
    -

    Credit Card Receipt Report Criteria

    -
    -
    -
    - Return credit card receipt report for period: - from m/d/y - to m/d/y - -

    - -

    - -
    - - - - diff --git a/httemplate/search/report_credit.cgi b/httemplate/search/report_credit.cgi deleted file mode 100755 index 2adafc06e..000000000 --- a/httemplate/search/report_credit.cgi +++ /dev/null @@ -1,25 +0,0 @@ - -<% - -my $user = getotaker; - -$cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; -my $beginning = $1; - -$cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; -my $ending = $1; - -print header('In House Credit Report Results'); - -open (REPORT, "freeside-credit-report -v -s $beginning -f $ending $user |"); - -print '
    ';
    -while() {
    -  print $_;
    -}
    -print '
    '; - -print ''; - -%> - diff --git a/httemplate/search/report_credit.html b/httemplate/search/report_credit.html deleted file mode 100755 index df9b9581f..000000000 --- a/httemplate/search/report_credit.html +++ /dev/null @@ -1,23 +0,0 @@ - - - In House Credit Report Criteria - - -
    -

    In House Credit Report Criteria

    -
    -
    -
    - Return in house credit report for period: - from m/d/y - to m/d/y - -

    - -

    - -
    - - - - diff --git a/httemplate/search/report_receivables.cgi b/httemplate/search/report_receivables.cgi deleted file mode 100755 index fdd3779a9..000000000 --- a/httemplate/search/report_receivables.cgi +++ /dev/null @@ -1,19 +0,0 @@ - -<% - -my $user = getotaker; - -print header('Current Receivables Report Results'); - -open (REPORT, "freeside-receivables-report -v $user |"); - -print '
    ';
    -while() {
    -  print $_;
    -}
    -print '
    '; - -print ''; - -%> - diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi deleted file mode 100755 index ac76fad6e..000000000 --- a/httemplate/search/report_tax.cgi +++ /dev/null @@ -1,25 +0,0 @@ - -<% - -my $user = getotaker; - -$cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/; -my $beginning = $1; - -$cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/; -my $ending = $1; - -print header('Tax Report Results'); - -open (REPORT, "freeside-tax-report -v -s $beginning -f $ending $user |"); - -print '
    ';
    -while() {
    -  print $_;
    -}
    -print '
    '; - -print ''; - -%> - diff --git a/httemplate/search/report_tax.html b/httemplate/search/report_tax.html deleted file mode 100755 index 7bf681b42..000000000 --- a/httemplate/search/report_tax.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Tax Report Criteria - - -
    -

    Tax Report Criteria

    -
    -
    -
    - Return tax report for period: - from m/d/y - to m/d/y - -

    - -

    - -
    - - - - diff --git a/httemplate/search/sql.cgi b/httemplate/search/sql.cgi deleted file mode 100755 index b83ef039f..000000000 --- a/httemplate/search/sql.cgi +++ /dev/null @@ -1,76 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $maxrecords = $conf->config('maxsearchrecordsperpage'); - -my $limit = ''; -$limit .= "LIMIT $maxrecords" if $maxrecords; - -my $offset = $cgi->param('offset') || 0; -$limit .= " OFFSET $offset" if $offset; - -my $total; - -my $sql = $cgi->param('sql'); -$sql =~ s/^\s*SELECT//i; - -my $count_sql = $sql; -$count_sql =~ s/^(.*)\s+FROM\s/COUNT(*) FROM /i; - -my $sth = dbh->prepare("SELECT $count_sql") - or eidiot dbh->errstr. " doing $count_sql\n"; -$sth->execute or eidiot "Error executing \"$count_sql\": ". $sth->errstr; - -$total = $sth->fetchrow_arrayref->[0]; - -my $sth = dbh->prepare("SELECT $sql $limit") - or eidiot dbh->errstr. " doing $sql\n"; -$sth->execute or eidiot "Error executing \"$sql\": ". $sth->errstr; -my $rows = $sth->fetchall_arrayref; - -%> - -<% - - #begin pager - my $pager = ''; - if ( $total != scalar(@$rows) && $maxrecords ) { - unless ( $offset == 0 ) { - $cgi->param('offset', $offset - $maxrecords); - $pager .= 'Previous '; - } - my $poff; - my $page; - for ( $poff = 0; $poff < $total; $poff += $maxrecords ) { - $page++; - if ( $offset == $poff ) { - $pager .= qq!$page !; - } else { - $cgi->param('offset', $poff); - $pager .= qq!$page !; - } - } - unless ( $offset + $maxrecords > $total ) { - $cgi->param('offset', $offset + $maxrecords); - $pager .= 'Next '; - } - } - #end pager - - print header('Query Results', menubar('Main Menu'=>$p) ). - "$total total rows

    $pager". table(). - ""; - print "$_" foreach @{$sth->{NAME}}; - print ""; - - foreach $row ( @$rows ) { - print ""; - print "$_" foreach @$row; - print ""; - } - - print "$pager"; - -%> diff --git a/httemplate/search/svc_acct.cgi b/httemplate/search/svc_acct.cgi deleted file mode 100755 index 549231d3f..000000000 --- a/httemplate/search/svc_acct.cgi +++ /dev/null @@ -1,294 +0,0 @@ -<% - -my $mydomain = ''; - -my $conf = new FS::Conf; -my $maxrecords = $conf->config('maxsearchrecordsperpage'); - -my $orderby = ''; #removeme - -my $limit = ''; -$limit .= "LIMIT $maxrecords" if $maxrecords; - -my $offset = $cgi->param('offset') || 0; -$limit .= " OFFSET $offset" if $offset; - -my $total; - -my($query)=$cgi->keywords; -$query ||= ''; #to avoid use of unitialized value errors - -my $unlinked = ''; -if ( $query =~ /^UN_(.*)$/ ) { - $query = $1; - my $empty = driver_name eq 'Pg' ? qq('') : qq(""); - if ( driver_name eq 'mysql' ) { - $unlinked = "LEFT JOIN cust_svc ON cust_svc.svcnum = svc_acct.svcnum - WHERE cust_svc.pkgnum IS NULL - OR cust_svc.pkgnum = 0 - OR cust_svc.pkgnum = $empty"; - } else { - $unlinked = " - WHERE 0 < - ( SELECT count(*) FROM cust_svc - WHERE cust_svc.svcnum = svc_acct.svcnum - AND ( pkgnum IS NULL OR pkgnum = 0 OR pkgnum = $empty ) - ) - "; - } -} - -my $tblname = driver_name eq 'mysql' ? 'svc_acct.' : ''; -my(@svc_acct, $sortby); -if ( $query eq 'svcnum' ) { - $sortby=\*svcnum_sort; - $orderby = "ORDER BY ${tblname}svcnum"; -} elsif ( $query eq 'username' ) { - $sortby=\*username_sort; - $orderby = "ORDER BY ${tblname}username"; -} elsif ( $query eq 'uid' ) { - $sortby=\*uid_sort; - $orderby = ( $unlinked ? 'AND' : 'WHERE' ). - " ${tblname}uid IS NOT NULL ORDER BY ${tblname}uid"; -} else { - $sortby=\*uid_sort; - @svc_acct = @{&usernamesearch}; -} - -if ( $query eq 'svcnum' || $query eq 'username' || $query eq 'uid' ) { - - my $statement = "SELECT COUNT(*) FROM svc_acct $unlinked"; - my $sth = dbh->prepare($statement) - or die dbh->errstr. " doing $statement"; - $sth->execute or die "Error executing \"$statement\": ". $sth->errstr; - - $total = $sth->fetchrow_arrayref->[0]; - - @svc_acct = qsearch('svc_acct', {}, '', "$unlinked $orderby $limit"); - -} - -if ( scalar(@svc_acct) == 1 ) { - my($svcnum)=$svc_acct[0]->svcnum; - print $cgi->redirect(popurl(2). "view/svc_acct.cgi?$svcnum"); #redirect - #exit; -} elsif ( scalar(@svc_acct) == 0 ) { #error -%> - -<% - idiot("Account not found"); -} else { -%> - -<% - $total ||= scalar(@svc_acct); - - #begin pager - my $pager = ''; - if ( $total != scalar(@svc_acct) && $maxrecords ) { - unless ( $offset == 0 ) { - $cgi->param('offset', $offset - $maxrecords); - $pager .= 'Previous '; - } - my $poff; - my $page; - for ( $poff = 0; $poff < $total; $poff += $maxrecords ) { - $page++; - if ( $offset == $poff ) { - $pager .= qq!$page !; - } else { - $cgi->param('offset', $poff); - $pager .= qq!$page !; - } - } - unless ( $offset + $maxrecords > $total ) { - $cgi->param('offset', $offset + $maxrecords); - $pager .= 'Next '; - } - } - #end pager - - print header("Account Search Results",menubar('Main Menu'=>popurl(2))), - "$total matching accounts found

    $pager", - &table(), < - # - Username - Domain - UID - Service - Cust# - (bill) name - company -END - if ( defined dbdef->table('cust_main')->column('ship_last') ) { - print <(service) name - company -END - } - print ""; - - my(%saw,$svc_acct); - my $p = popurl(2); - foreach $svc_acct ( - sort $sortby grep(!$saw{$_->svcnum}++, @svc_acct) - ) { - my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $svc_acct->svcnum }) - or die "No cust_svc record for svcnum ". $svc_acct->svcnum; - my $part_svc = qsearchs('part_svc', { 'svcpart' => $cust_svc->svcpart }) - or die "No part_svc record for svcpart ". $cust_svc->svcpart; - - my $domain; - my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc }); - if ( $svc_domain ) { - $domain = "svcnum. - "\">". $svc_domain->domain. ""; - } else { - unless ( $mydomain ) { - my $conf = new FS::Conf; - unless ( $mydomain = $conf->config('domain') ) { - die "No legacy domain config file and no svc_domain.svcnum record ". - "for svc_acct.domsvc: ". $svc_acct->domsvc; - } - } - $domain = "$mydomain*"; - } - my($cust_pkg,$cust_main); - if ( $cust_svc->pkgnum ) { - $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cust_svc->pkgnum }) - or die "No cust_pkg record for pkgnum ". $cust_svc->pkgnum; - $cust_main = qsearchs('cust_main', { 'custnum' => $cust_pkg->custnum }) - or die "No cust_main record for custnum ". $cust_pkg->custnum; - } - my($svcnum, $username, $uid, $svc, $custnum, $last, $first, $company) = ( - $svc_acct->svcnum, - $svc_acct->getfield('username'), - $svc_acct->getfield('uid'), - $part_svc->svc, - $cust_svc->pkgnum ? $cust_main->custnum : '', - $cust_svc->pkgnum ? $cust_main->getfield('last') : '', - $cust_svc->pkgnum ? $cust_main->getfield('first') : '', - $cust_svc->pkgnum ? $cust_main->company : '', - ); - my($pcustnum) = $custnum - ? "$custnum" - : "(unlinked)" - ; - my $pname = $custnum ? "$last, $first" : ''; - my $pcompany = $custnum ? "$company" : ''; - my($pship_name, $pship_company); - if ( defined dbdef->table('cust_main')->column('ship_last') ) { - my($ship_last, $ship_first, $ship_company) = ( - $cust_svc->pkgnum ? ( $cust_main->ship_last || $last ) : '', - $cust_svc->pkgnum ? ( $cust_main->ship_last - ? $cust_main->ship_first - : $first - ) : '', - $cust_svc->pkgnum ? ( $cust_main->ship_last - ? $cust_main->ship_company - : $company - ) : '', - ); - $pship_name = $custnum ? "$ship_last, $ship_first" : ''; - $pship_company = $custnum ? "$ship_company" : ''; - } - print < - $svcnum - $username - $domain - $uid - $svc - $pcustnum - $pname - $pcompany -END - if ( defined dbdef->table('cust_main')->column('ship_last') ) { - print <$pship_name - $pship_company -END - } - print ""; - - } - - print "$pager
    "; - - if ( $mydomain ) { - print "
    * The $mydomain domain ". - "is contained in your legacy domain ". - "configuration file. ". - "You should run the bin/fs-migrate-svc_acct_sm script ". - "to create a proper svc_domain record for this domain."; - } - - print ''; - -} - -sub svcnum_sort { - $a->getfield('svcnum') <=> $b->getfield('svcnum'); -} - -sub username_sort { - $a->getfield('username') cmp $b->getfield('username'); -} - -sub uid_sort { - $a->getfield('uid') <=> $b->getfield('uid'); -} - -sub usernamesearch { - - my @svc_acct; - - my %username_type; - foreach ( $cgi->param('username_type') ) { - $username_type{$_}++; - } - - $cgi->param('username') =~ /^([\w\-\.\&]+)$/; #untaint username_text - my $username = $1; - - if ( $username_type{'Exact'} || $username_type{'Fuzzy'} ) { - push @svc_acct, qsearch( 'svc_acct', - { 'username' => { 'op' => 'ILIKE', - 'value' => $username } } ); - } - - if ( $username_type{'Substring'} || $username_type{'All'} ) { - push @svc_acct, qsearch( 'svc_acct', - { 'username' => { 'op' => 'ILIKE', - 'value' => "%$username%" } } ); - } - - if ( $username_type{'Fuzzy'} || $username_type{'All'} ) { - &FS::svc_acct::check_and_rebuild_fuzzyfiles; - my $all_username = &FS::svc_acct::all_username; - - my %username; - if ( $username_type{'Fuzzy'} || $username_type{'All'} ) { - foreach ( amatch($username, [ qw(i) ], @$all_username) ) { - $username{$_}++; - } - } - - #if ($username_type{'Sound-alike'}) { - #} - - foreach ( keys %username ) { - push @svc_acct, qsearch('svc_acct',{'username'=>$_}); - } - - } - - #[ qsearch('svc_acct',{'username'=>$username}) ]; - \@svc_acct; - -} - -%> diff --git a/httemplate/search/svc_acct.html b/httemplate/search/svc_acct.html deleted file mode 100755 index 742360596..000000000 --- a/httemplate/search/svc_acct.html +++ /dev/null @@ -1,19 +0,0 @@ - - - Account Search - - - - Account Search - -

    -
    - Search for username: - - -

    - -

    - - - diff --git a/httemplate/search/svc_acct_sm.cgi b/httemplate/search/svc_acct_sm.cgi deleted file mode 100755 index 4ee300612..000000000 --- a/httemplate/search/svc_acct_sm.cgi +++ /dev/null @@ -1,84 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); - -$cgi->param('domuser') =~ /^([a-z0-9_\-]{0,32})$/; -my $domuser = $1; - -$cgi->param('domain') =~ /^([\w\-\.]+)$/ or die "Illegal domain"; -my $svc_domain = qsearchs('svc_domain',{'domain'=>$1}) - or die "Unknown domain"; -my $domsvc = $svc_domain->svcnum; - -my @svc_acct_sm; -if ($domuser) { - @svc_acct_sm=qsearch('svc_acct_sm',{ - 'domuser' => $domuser, - 'domsvc' => $domsvc, - }); -} else { - @svc_acct_sm=qsearch('svc_acct_sm',{'domsvc' => $domsvc}); -} - -if ( scalar(@svc_acct_sm) == 1 ) { - my($svcnum)=$svc_acct_sm[0]->svcnum; - print $cgi->redirect(popurl(2). "view/svc_acct_sm.cgi?$svcnum"); -} elsif ( scalar(@svc_acct_sm) > 1 ) { -%> - -<% - print header('Mail Alias Search Results'), &table(), < - Mail to
    (click to view mail alias) - Forwards to
    (click to view account) - -END - - my($svc_acct_sm); - foreach $svc_acct_sm (@svc_acct_sm) { - my($svcnum,$domuser,$domuid,$domsvc)=( - $svc_acct_sm->svcnum, - $svc_acct_sm->domuser, - $svc_acct_sm->domuid, - $svc_acct_sm->domsvc, - ); - - my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $domsvc } ); - if ( $svc_domain ) { - my $domain = $svc_domain->domain; - - print qq!!, - #print '', ( ($domuser eq '*') ? "(anything)" : $domuser ); - ( ($domuser eq '*') ? "(anything)" : $domuser ), - qq!\@$domain !, - ; - } else { - my $warning = "couldn't find svc_domain.svcnum $svcnum ( svc_acct_sm.svcnum $svcnum"; - warn $warning; - print "WARNING: $warning"; - } - - my $svc_acct = qsearchs( 'svc_acct', { 'uid' => $domuid } ); - if ( $svc_acct ) { - my $username = $svc_acct->username; - my $svc_acct_svcnum =$svc_acct->svcnum; - print qq!$username\@$mydomain!, - qq!! - ; - } else { - my $warning = "couldn't find svc_acct.uid $domuid (svc_acct_sm.svcnum $svcnum)!"; - warn $warning; - print "WARNING: $warning"; - } - - } - - print ''; - -} else { #error - idiot("Mail Alias not found"); -} - -%> diff --git a/httemplate/search/svc_acct_sm.html b/httemplate/search/svc_acct_sm.html deleted file mode 100755 index 0719856db..000000000 --- a/httemplate/search/svc_acct_sm.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Mail Alias Search - - -
    -

    Mail Alias Search

    -
    -
    -
    - Search for mail alias: - (opt.) @ - (req.) - -

    - -

    - -
    - - - - diff --git a/httemplate/search/svc_domain.cgi b/httemplate/search/svc_domain.cgi deleted file mode 100755 index fb372db14..000000000 --- a/httemplate/search/svc_domain.cgi +++ /dev/null @@ -1,163 +0,0 @@ -<% - -my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); - -my($query)=$cgi->keywords; -$query ||= ''; #to avoid use of unitialized value errors -my(@svc_domain,$sortby); -if ( $query eq 'svcnum' ) { - $sortby=\*svcnum_sort; - @svc_domain=qsearch('svc_domain',{}); -} elsif ( $query eq 'domain' ) { - $sortby=\*domain_sort; - @svc_domain=qsearch('svc_domain',{}); -} elsif ( $query eq 'UN_svcnum' ) { - $sortby=\*svcnum_sort; - @svc_domain = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_domain',{}); -} elsif ( $query eq 'UN_domain' ) { - $sortby=\*domain_sort; - @svc_domain = grep qsearchs('cust_svc',{ - 'svcnum' => $_->svcnum, - 'pkgnum' => '', - }), qsearch('svc_domain',{}); -} else { - $cgi->param('domain') =~ /^([\w\-\.]+)$/; - my($domain)=$1; - #push @svc_domain, qsearchs('svc_domain',{'domain'=>$domain}); - @svc_domain = qsearchs('svc_domain',{'domain'=>$domain}); -} - -if ( scalar(@svc_domain) == 1 ) { - print $cgi->redirect(popurl(2). "view/svc_domain.cgi?". $svc_domain[0]->svcnum); - #exit; -} elsif ( scalar(@svc_domain) == 0 ) { -%> - -<% - eidiot "No matching domains found!\n"; -} else { -%> - -<% - my($total)=scalar(@svc_domain); - print header("Domain Search Results",''), < - - Service # - Domain - Mail to
    (click to view account) - Forwards to
    (click to view account) - -END - -# my(%saw); # if we've multiple domains with the same - # svcnum, then we've a corrupt database - - foreach my $svc_domain ( -# sort $sortby grep(!$saw{$_->svcnum}++, @svc_domain) - sort $sortby (@svc_domain) - ) { - my($svcnum,$domain)=( - $svc_domain->svcnum, - $svc_domain->domain, - ); - #my($malias); - #if ( qsearch('svc_acct_sm',{'domsvc'=>$svcnum}) ) { - # $malias=( - # qq|
    |. - # qq||. - # qq||. - # qq||. - # qq|
    | - # ); - #} else { - # $malias=''; - #} - - my @svc_acct=qsearch('svc_acct',{'domsvc' => $svcnum}); - my $rowspan = 0; - - my $n1 = ''; - my($svc_acct, @rows); - foreach $svc_acct ( - sort {$b->getfield('username') cmp $a->getfield('username')} (@svc_acct) - ) { - - my (@forwards) = (); - - my($svcnum,$username)=( - $svc_acct->svcnum, - $svc_acct->username, - ); - - my @svc_forward = qsearch( 'svc_forward', { 'srcsvc' => $svcnum } ); - my $svc_forward; - foreach $svc_forward (@svc_forward) { - my($dstsvc,$dst) = ( - $svc_forward->dstsvc, - $svc_forward->dst, - ); - if ($dstsvc) { - my $dst_svc_acct=qsearchs( 'svc_acct', { 'svcnum' => $dstsvc } ); - my $destination=$dst_svc_acct->email; - push @forwards, qq!$destination!, - qq!! - ; - }else{ - push @forwards, qq!$dst! - ; - } - } - - push @rows, qq!$n1!, - #print '', ( ($domuser eq '*') ? "(anything)" : $domuser ); - ( ($username eq '*') ? "(anything)" : $username ), - qq!\@$domain !, - ; - - push @rows, @forwards; - - $rowspan += (scalar(@svc_forward) || 1); - $n1 = ""; - } - #end of false laziness - - - - print < - $svcnum - $domain -END - - print @rows; - print ""; - - } - - print < - - -END - -} - -sub svcnum_sort { - $a->getfield('svcnum') <=> $b->getfield('svcnum'); -} - -sub domain_sort { - $a->getfield('domain') cmp $b->getfield('domain'); -} - - -%> diff --git a/httemplate/search/svc_domain.html b/httemplate/search/svc_domain.html deleted file mode 100755 index 94bb9a66d..000000000 --- a/httemplate/search/svc_domain.html +++ /dev/null @@ -1,19 +0,0 @@ - - - Domain Search - - - - Domain Search - -

    -
    - Search for domain: - - -

    - -

    - - - diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi deleted file mode 100755 index 53d7bc051..000000000 --- a/httemplate/view/cust_bill.cgi +++ /dev/null @@ -1,48 +0,0 @@ - -<% - -#untaint invnum -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $invnum = $1; - -my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum}); -die "Invoice #$invnum not found!" unless $cust_bill; -my $custnum = $cust_bill->getfield('custnum'); - -#my $printed = $cust_bill->printed; - -print header('Invoice View', menubar( - "Main Menu" => $p, - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", -)); - -print qq!Enter payments (check/cash) against this invoice | ! - if $cust_bill->owed > 0; - -print qq!Reprint this invoice!. '

    '; - -#false laziness with search/cust_bill_event.cgi - -print table(). 'EventDateStatus'; -foreach my $cust_bill_event ( - sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event -) { - my $status = $cust_bill_event->status; - $status .= ': '. $cust_bill_event->statustext if $cust_bill_event->statustext; - print ''. $cust_bill_event->part_bill_event->event. ''. - time2str("%a %b %e %T %Y", $cust_bill_event->_date). ''. - $status. ''; -} -print '
    ';
    -
    -print $cust_bill->print_text;
    -
    -	#formatting
    -	print <
    -  
    -
    -END
    -
    -%>
    diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
    deleted file mode 100755
    index 421bd98a4..000000000
    --- a/httemplate/view/cust_main.cgi
    +++ /dev/null
    @@ -1,653 +0,0 @@
    -
    -<%
    -
    -my $conf = new FS::Conf;
    -
    -#false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so
    -my %uiview = ();
    -my %uiadd = ();
    -foreach my $part_svc ( qsearch('part_svc',{}) ) {
    -  $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi";
    -  $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi";
    -}
    -
    -print header("Customer View", menubar(
    -  'Main Menu' => popurl(2)
    -));
    -
    -die "No customer specified (bad URL)!" unless $cgi->keywords;
    -my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
    -$query =~ /^(\d+)$/;
    -my $custnum = $1;
    -my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
    -die "Customer not found!" unless $cust_main;
    -
    -print qq!Edit this customer!;
    -print qq! |  Delete this customer!
    -  if $conf->exists('deletecustomers');
    -
    -unless ( $conf->exists('disable_customer_referrals') ) {
    -  print qq! | !,
    -        qq!Refer a new customer!;
    -
    -  print qq! | !,
    -        qq!View this customer's referrals!;
    -}
    -
    -print '

    '; - -my $signupurl = $conf->config('signupurl'); -if ( $signupurl ) { -print "This customer's signup URL: ". - "$signupurl?ref=$custnum

    "; -} - -print ''; - -print &itable(), ''; - -print ''; - - print "Billing address", &ntable("#cccccc"), "", - &ntable("#cccccc",2), - 'Contact name', - '', - $cust_main->last, ', ', $cust_main->first, - ''; -print 'SS#', - $cust_main->ss || ' ', '' - if $conf->exists('show_ss'); - -print '', - 'Company', - $cust_main->company, - '', - 'Address', - $cust_main->address1, - '', - ; - print ' ', - $cust_main->address2, '' - if $cust_main->address2; - print 'City', - $cust_main->city, - 'State', - $cust_main->state, - 'Zip', - $cust_main->zip, '', - 'Country', - $cust_main->country, - '', - ; - print 'Day Phone', - $cust_main->daytime || ' ', '', - 'Night Phone', - $cust_main->night || ' ', '', - 'Fax', - $cust_main->fax || ' ', '', - '', "" - ; - - if ( defined $cust_main->dbdef_table->column('ship_last') ) { - - my $pre = $cust_main->ship_last ? 'ship_' : ''; - - print "
    Service address", &ntable("#cccccc"), "", - &ntable("#cccccc",2), - 'Contact name', - '', - $cust_main->get("${pre}last"), ', ', $cust_main->get("${pre}first"), - '', - 'Company', - $cust_main->get("${pre}company"), - '', - 'Address', - $cust_main->get("${pre}address1"), - '', - ; - print ' ', - $cust_main->get("${pre}address2"), '' - if $cust_main->get("${pre}address2"); - print 'City', - $cust_main->get("${pre}city"), - 'State', - $cust_main->get("${pre}state"), - 'Zip', - $cust_main->get("${pre}zip"), '', - 'Country', - $cust_main->get("${pre}country"), - '', - ; - print 'Day Phone', - '', - $cust_main->get("${pre}daytime") || ' ', '', - 'Night Phone'. - '', - $cust_main->get("${pre}night") || ' ', '', - 'Fax', - $cust_main->get("${pre}fax") || ' ', '', - '', "" - ; - - } - -print ''; - -print ''; - - print &ntable("#cccccc"), "", &ntable("#cccccc",2), - 'Customer number', - $custnum, '', - ; - - my @agents = qsearch( 'agent', {} ); - my $agent; - unless ( scalar(@agents) == 1 ) { - $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } ); - print 'Agent', - $agent->agentnum, ": ", $agent->agent, ''; - } else { - $agent = $agents[0]; - } - my @referrals = qsearch( 'part_referral', {} ); - unless ( scalar(@referrals) == 1 ) { - my $referral = qsearchs('part_referral', { - 'refnum' => $cust_main->refnum - } ); - print 'Advertising source', - $referral->refnum, ": ", $referral->referral, ''; - } - print 'Order taker', - $cust_main->otaker, ''; - - print 'Referring Customer'; - my $referring_cust_main = ''; - if ( $cust_main->referral_custnum - && ( $referring_cust_main = - qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) - ) - ) { - print ''. - $cust_main->referral_custnum. ': '. - ( $referring_cust_main->company - ? $referring_cust_main->company. ' ('. - $referring_cust_main->last. ', '. $referring_cust_main->first. - ')' - : $referring_cust_main->last. ', '. $referring_cust_main->first - ). - ''; - } - print ''; - - print ''; - -print '
    '; - - my @invoicing_list = $cust_main->invoicing_list; - print "Billing information (", - qq!!, "Bill now)", - &ntable("#cccccc"), "", &ntable("#cccccc",2), - 'Tax exempt', - $cust_main->tax ? 'yes' : 'no', - '', - 'Postal invoices', - ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no', - '', - 'Email invoices', - join(', ', grep { $_ ne 'POST' } @invoicing_list ) || 'no', - '', - 'Billing type', - ; - - if ( $cust_main->payby eq 'CARD' ) { - my $payinfo = $cust_main->payinfo; - $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); - print 'Credit card', - 'Card number', - $payinfo, '', - 'Expiration', - $cust_main->paydate, '', - 'Name on card', - $cust_main->payname, '' - ; - } elsif ( $cust_main->payby eq 'BILL' ) { - print 'Billing'; - print 'P.O. ', - $cust_main->payinfo, '', - if $cust_main->payinfo; - print 'Expiration', - $cust_main->paydate, '', - 'Attention', - $cust_main->payname, '', - ; - } elsif ( $cust_main->payby eq 'COMP' ) { - print 'Complimentary', - 'Authorized by', - $cust_main->payinfo, '', - 'Expiration', - $cust_main->paydate, '', - ; - } - - print ""; - -print ''; - -if ( defined $cust_main->dbdef_table->column('comments') - && $cust_main->comments ) -{ - print "
    Comments", &ntable("#cccccc"), "", - &ntable("#cccccc",2), - '
    ', $cust_main->comments,
    -        '
    '; -} - -print ''; - -print '
    '. - '
    '. - qq!!. - '

    '; - -print '
    '. - qq!
    !. - qq!!. - qq!Description:!. - qq! Amount:!. - qq! !; - -#false laziness w/ edit/part_pkg.cgi -if ( $conf->exists('enable_taxclasses') ) { - print ''; -} else { - print ''; -} - -print qq!

    !; - -print < -function cust_pkg_areyousure(href) { - if (confirm("Permanently delete included services and cancel this package?") == true) - window.location.href = href; -} - -END - -print qq!
    Packages !, -# qq!
    Click on package number to view/edit package.!, - qq!( Order and cancel packages (preserves services) )!, -; - -#display packages - -#formatting -print qq!!, &table(), "\n", - qq!Package!, - qq!DatesServices\n!, - qq!Setup!, - qq!Next bill!, - qq!Susp.Expire!, - qq!!, - qq!Cancel!, - qq!\n!; - -#get package info -my @packages; -if ( $conf->exists('hidecancelledpackages') ) { - @packages = sort { $a->pkgnum <=> $b->pkgnum } ($cust_main->ncancelled_pkgs); -} else { - @packages = sort { $a->pkgnum <=> $b->pkgnum } ($cust_main->all_pkgs); -} - -my $n1 = ''; -foreach my $package (@packages) { - my $pkgnum = $package->pkgnum; - my $pkg = $package->part_pkg->pkg; - my $comment = $package->part_pkg->comment; - my $pkgview = popurl(2). "view/cust_pkg.cgi?$pkgnum"; - - #my @cust_svc = qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } ); - #my $rowspan = scalar(@cust_svc) || 1; - my @cust_svc = (); - my $rowspan = 0; - my %pkg_svc = (); - unless ( $package->getfield('cancel') ) { - foreach my $pkg_svc ( - grep { $_->quantity } - qsearch('pkg_svc',{'pkgpart'=> $package->pkgpart }) - ) { - $rowspan += ( $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity ); - } - } else { - #@cust_svc = qsearch( 'cust_svc', { 'pkgnum' => $pkgnum } ); - @cust_svc = (); - $rowspan = scalar(@cust_svc) || 1; - } - $rowspan ||= 1; - - my $button_cgi = new CGI; - $button_cgi->param('clone', $package->part_pkg->pkgpart); - $button_cgi->param('pkgnum', $package->pkgnum); - my $button_url = popurl(2). "edit/part_pkg.cgi?". $button_cgi->query_string; - - #print $n1, qq!$pkgnum!, - print $n1, qq!$pkgnum!, - qq!!, - #qq!$pkg - $comment!, - qq!$pkg - $comment ( Details )!; - # | !; - - #false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so - unless ( $package->getfield('cancel') ) { - print ' ( '; - if ( $package->getfield('susp') ) { - print qq!Unsuspend!; - } else { - print qq!Suspend!; - } - print ' | Cancel'; - - print ' ) '; - - print ' ( Edit dates | '; - - print qq!Customize )!; - - } - print ''; - - for ( qw( setup bill susp expire cancel ) ) { - print "", ( $package->getfield($_) - ? time2str("%D
    %l:%M:%S%P %z", - $package->getfield($_) ) - : ' ' - ), '
    ', - ; - } - - my $n2 = ''; - #false laziness with view/cust_pkg.cgi, but i'm trying to make that go away so - #foreach my $cust_svc ( @cust_svc ) { - foreach my $svcpart ( sort { $a<=>$b } keys %pkg_svc ) { - my $svc = qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc'); - my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum, - 'svcpart'=>$svcpart, - }); - for my $enum ( 1 .. $pkg_svc{$svcpart} ) { - my $cust_svc; - if ( $cust_svc = shift @cust_svc ) { - my($label, $value, $svcdb) = $cust_svc->label; - my($svcnum) = $cust_svc->svcnum; - my($sview) = popurl(2). "view"; - print $n2,qq!$label!, - qq!$value!; - } else { - print $n2, qq!!. - qq!Provision $svc!; - - print qq!
    !. - qq!Link to legacy $svc! - if $conf->exists('legacy_link'); - - print ''; - } - $n2=""; - } - } - - $n1=""; -} -print ""; - -#formatting -print ""; - -print < -function cust_pay_areyousure(href) { - if (confirm("Are you sure you want to delete this payment?") - == true) - window.location.href = href; -} - -END - -#formatting -print qq!

    Payment History!. - qq! ( !. - qq!!. - qq!Post payment | !. - qq!!. - qq!Post credit )!; - -#get payment history -# -# major problem: this whole thing is way too sloppy. -# minor problem: the description lines need better formatting. - -my @history = (); #needed for mod_perl :) - -my %target = (); - -my @bills = qsearch('cust_bill',{'custnum'=>$custnum}); -foreach my $bill (@bills) { - my($bref)=$bill->hashref; - my $bpre = ( $bill->owed > 0 ) - ? ' Open ' - : ''; - my $bpost = ( $bill->owed > 0 ) ? '' : ''; - push @history, - $bref->{_date} . qq!\t${bpre}Invoice #! . $bref->{invnum} . - qq! (Balance \$! . $bill->owed . qq!)$bpost\t! . - $bref->{charged} . qq!\t\t\t!; - - my(@cust_bill_pay)=qsearch('cust_bill_pay',{'invnum'=> $bref->{invnum} } ); -# my(@payments)=qsearch('cust_pay',{'invnum'=> $bref->{invnum} } ); -# my($payment); -# foreach $payment (@payments) { - foreach my $cust_bill_pay (@cust_bill_pay) { - my $payment = $cust_bill_pay->cust_pay; - my($date,$invnum,$payby,$payinfo,$paid)=($payment->_date, - $cust_bill_pay->invnum, - $payment->payby, - $payment->payinfo, - $cust_bill_pay->amount, - ); - $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)) - if $payby eq 'CARD'; - my $target = "$payby$payinfo"; - $payby =~ s/^BILL$/Check #/ if $payinfo; - $payby =~ s/^(CARD|COMP)$/$1 /; - my $delete = $payment->closed !~ /^Y/i && $conf->exists('deletepayments') - ? qq! (delete)! - : ''; - push @history, - "$date\tPayment, Invoice #$invnum ($payby$payinfo)$delete\t\t$paid\t\t\t$target"; - } - - my(@cust_credit_bill)= - qsearch('cust_credit_bill', { 'invnum'=> $bref->{invnum} } ); - foreach my $cust_credit_bill (@cust_credit_bill) { - my $cust_credit = $cust_credit_bill->cust_credit; - my($date, $invnum, $crednum, $amount, $reason, $app_date ) = ( - $cust_credit->_date, - $cust_credit_bill->invnum, - $cust_credit_bill->crednum, - $cust_credit_bill->amount, - $cust_credit->reason, - time2str("%D", $cust_credit_bill->_date), - ); - push @history, - "$date\tCredit #$crednum: $reason
    ". - "(applied to invoice #$invnum on $app_date)\t\t\t$amount\t"; - } -} - -my @credits = grep { scalar(my @array = $_->cust_credit_refund) } - qsearch('cust_credit',{'custnum'=>$custnum}); -foreach my $credit (@credits) { - my($cref)=$credit->hashref; - my(@cust_credit_refund)= - qsearch('cust_credit_refund', { 'crednum'=> $cref->{crednum} } ); - foreach my $cust_credit_refund (@cust_credit_refund) { - my $cust_refund = $cust_credit_refund->cust_credit; - my($date, $crednum, $amount, $reason, $app_date ) = ( - $credit->_date, - $credit->crednum, - $cust_credit_refund->amount, - $credit->reason, - time2str("%D", $cust_credit_refund->_date), - ); - push @history, - "$date\tCredit #$crednum: $reason
    ". - "(applied to refund on $app_date)\t\t\t$amount\t"; - } -} - -@credits = grep { $_->credited > 0 } - qsearch('cust_credit',{'custnum'=>$custnum}); -foreach my $credit (@credits) { - my($cref)=$credit->hashref; - push @history, - $cref->{_date} . "\t" . - qq!!. - 'Unapplied credit #' . - $cref->{crednum} . ": ". - $cref->{reason} . "\t\t\t" . $credit->credited . "\t"; -} - -my(@refunds)=qsearch('cust_refund',{'custnum'=> $custnum } ); -foreach my $refund (@refunds) { - my($rref)=$refund->hashref; - my($refundnum) = ( - $refund->refundnum, - ); - - push @history, - $rref->{_date} . "\tRefund #$refundnum, (" . - $rref->{payby} . " " . $rref->{payinfo} . ") by " . - $rref->{otaker} . " - ". $rref->{reason} . "\t\t\t\t" . - $rref->{refund}; -} - -my @unapplied_payments = - grep { $_->unapplied > 0 } qsearch('cust_pay', { 'custnum' => $custnum } ); -foreach my $payment (@unapplied_payments) { - my $payby = $payment->payby; - my $payinfo = $payment->payinfo; - #false laziness w/above - $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)) - if $payby eq 'CARD'; - my $target = "$payby$payinfo"; - $payby =~ s/^BILL$/Check #/ if $payinfo; - $payby =~ s/^(CARD|COMP)$/$1 /; - my $delete = $payment->closed !~ /^Y/i && $conf->exists('deletepayments') - ? qq! (delete)! - : ''; - push @history, - $payment->_date. "\t". - 'Unapplied payment #' . - $payment->paynum . " ($payby$payinfo) ". - '('. - "apply)$delete". - "\t\t" . $payment->unapplied . "\t\t\t$target"; -} - - #formatting - print &table(), < - Date - Description - Charge - Payment - In-house
    Credit
    - Refund - Balance - -END - -#display payment history - -my $balance = 0; -foreach my $item (sort keyfield_numerically @history) { - my($date,$desc,$charge,$payment,$credit,$refund,$target)=split(/\t/,$item); - $charge ||= 0; - $payment ||= 0; - $credit ||= 0; - $refund ||= 0; - $balance += $charge - $payment; - $balance -= $credit - $refund; - $balance = sprintf("%.2f", $balance); - $balance =~ s/^\-0\.00$/0.00/; #yay ieee fp - $target = '' unless defined $target; - - print ""; - print qq!! unless $target && $target{$target}++; - print time2str("%D",$date); - print '' if $target && $target{$target} == 1; - print "", - "$desc", - "", - ( $charge ? "\$".sprintf("%.2f",$charge) : '' ), - "", - "", - ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ), - "", - "", - ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ), - "", - "", - ( $refund ? "\$".sprintf("%.2f",$refund) : '' ), - "", - "\$" . $balance, - "", - "\n"; -} - -#formatting -print ""; - -#end - -#formatting -print < - -END - -#subroutiens -sub keyfield_numerically { (split(/\t/,$a))[0] <=> (split(/\t/,$b))[0] ; } - -%> diff --git a/httemplate/view/cust_pkg.cgi b/httemplate/view/cust_pkg.cgi deleted file mode 100755 index 09a2a7a8b..000000000 --- a/httemplate/view/cust_pkg.cgi +++ /dev/null @@ -1,157 +0,0 @@ - -<% - -my $conf = new FS::Conf; - -my %uiview = (); -my %uiadd = (); -foreach my $part_svc ( qsearch('part_svc',{}) ) { - $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi"; - $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi"; -} - -my ($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $pkgnum = $1; - -#get package record -my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); -die "No package!" unless $cust_pkg; -my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')}); - -my $custnum = $cust_pkg->getfield('custnum'); -print header('Package View', menubar( - "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum", - 'Main Menu' => popurl(2) -)); - -#print info -my ($susp,$cancel,$expire)=( - $cust_pkg->getfield('susp'), - $cust_pkg->getfield('cancel'), - $cust_pkg->getfield('expire'), -); -my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment')); -my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill')); -my $otaker = $cust_pkg->getfield('otaker'); - -print < -function areyousure(href) { - if (confirm("Permanently delete included services and cancel this package?") == true) - window.location.href = href; -} - -END - -print "Package information"; -print ' (unsuspend)' - if ( $susp && ! $cancel ); - -print ' (suspend)' - unless ( $susp || $cancel ); - -print ' (cancel)' - unless $cancel; - -print ' (edit dates)'; - -print &ntable("#cccccc"), '', &ntable("#cccccc",2), - 'Package number', - $pkgnum, '', - 'Package', - $pkg, '', - 'Comment', - $comment, '', - 'Setup date', - ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '', - 'Next bill date', - ( $bill ? time2str("%D",$bill) : " " ), '', -; -print 'Suspension date', - time2str("%D",$susp), '' if $susp; -print 'Expiration date', - time2str("%D",$expire), '' if $expire; -print 'Cancellation date', - time2str("%D",$cancel), '' if $cancel; -print 'Order taker', - $otaker, '', - '' -; - -# print < -# -#Expire (date): -# -#END - -unless ($cancel) { - - #services - print '
    Service Information', &table(); - - #list of services this pkgpart includes - my $pkg_svc; - my %pkg_svc = (); - foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) { - $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity; - } - - #list of records from cust_svc - my $svcpart; - foreach $svcpart (sort {$a <=> $b} keys %pkg_svc) { - - my($svc)=qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc'); - - my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum, - 'svcpart'=>$svcpart, - }); - - my($enum); - for $enum ( 1 .. $pkg_svc{$svcpart} ) { - - my($cust_svc); - if ( $cust_svc=shift @cust_svc ) { - my($svcnum)=$cust_svc->svcnum; - my($label, $value, $svcdb) = $cust_svc->label; - print <(View/Edit) $svc: $value -END - } else { - print qq!!. - qq!!. - qq!(Provision) $svc!; - - print qq! or !. - qq!(Link to legacy) $svc! - if $conf->exists('legacy_link'); - - print ''; - } - - } - warn "WARNING: Leftover services pkgnum $pkgnum!" if @cust_svc;; - } - - print "", - "Choose (View/Edit) to view or edit an existing service
    ", - "Choose (Provision) to setup a new service
    "; - - print "Choose (Link to legacy) to link to a legacy (pre-Freeside) service" - if $conf->exists('legacy_link'); - - print "
    "; -} - -#formatting -print < - -END - -%> diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi deleted file mode 100755 index f6c1b026c..000000000 --- a/httemplate/view/svc_acct.cgi +++ /dev/null @@ -1,156 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); - -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $svcnum = $1; -my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_acct; - -#false laziness w/all svc_*.cgi -my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } ); -my $pkgnum = $cust_svc->getfield('pkgnum'); -my($cust_pkg, $custnum); -if ($pkgnum) { - $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } ); - $custnum = $cust_pkg->custnum; -} else { - $cust_pkg = ''; - $custnum = ''; -} -#eofalse - -my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); -die "Unknown svcpart" unless $part_svc; - -my $domain; -if ( $svc_acct->domsvc ) { - my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } ); - die "Unknown domain" unless $svc_domain; - $domain = $svc_domain->domain; -} else { - unless ( $mydomain ) { - die "No legacy domain config file and no svc_domain.svcnum record ". - "for svc_acct.domsvc: ". $cust_svc->domsvc; - } - $domain = $mydomain; -} - -%> - - - -<%= header('Account View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) account" => - "javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')" ) - ), - "Main menu" => $p, -)) %> - -<% - -#print qq!
    Send account information!; - -print qq!Edit this information
    !. - &ntable("#cccccc"). ''. &ntable("#cccccc",2). - "Service number". - "$svcnum". - "Service". - "". $part_svc->svc. "". - "Username". - "". $svc_acct->username. "" -; - -print "Domain". - "". $domain, ""; - -print "Password"; -my $password = $svc_acct->_password; -if ( $password =~ /^\*\w+\* (.*)$/ ) { - $password = $1; - print "(login disabled) "; -} -if ( $conf->exists('showpasswords') ) { - print "$password"; -} else { - print "(hidden)"; -} -print ""; -$password = ''; - -if ( $conf->exists('security_phrase') ) { - my $sec_phrase = $svc_acct->sec_phrase; - print 'Security phrase'. - $svc_acct->sec_phrase. ''; -} - -my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum}); -print "Access number". - "". $svc_acct_pop->text. '' - if $svc_acct_pop; - -if ($svc_acct->uid ne '') { - print "Uid". - "". $svc_acct->uid. "", - "Gid". - "". $svc_acct->gid. "", - "GECOS". - "". $svc_acct->finger. "", - "Home directory". - "". $svc_acct->dir. "", - "Shell". - "". $svc_acct->shell. "", - "Quota". - "". $svc_acct->quota. "" - ; -} else { - print "(No shell account)"; -} - -if ($svc_acct->slipip) { - print "IP address". - ( ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' ) - ? "(Dynamic)" - : $svc_acct->slipip - ). ""; - my($attribute); - foreach $attribute ( grep /^radius_/, fields('svc_acct') ) { - #warn $attribute; - $attribute =~ /^radius_(.*)$/; - my $pattribute = $FS::raddb::attrib{$1}; - print "Radius (reply) $pattribute". - "". $svc_acct->getfield($attribute). - ""; - } - foreach $attribute ( grep /^rc_/, fields('svc_acct') ) { - #warn $attribute; - $attribute =~ /^rc_(.*)$/; - my $pattribute = $FS::raddb::attrib{$1}; - print "Radius (check) $pattribute: ". - "". $svc_acct->getfield($attribute). - ""; - } -} else { - print "(No SLIP/PPP account)"; -} - -print 'RADIUS groups'. - join('
    ', $svc_acct->radius_groups). ''; - -print "". - '
    '. joblisting({'svcnum'=>$svcnum}, 1). - ""; - -%> diff --git a/httemplate/view/svc_acct_sm.cgi b/httemplate/view/svc_acct_sm.cgi deleted file mode 100755 index 4e5acc427..000000000 --- a/httemplate/view/svc_acct_sm.cgi +++ /dev/null @@ -1,58 +0,0 @@ - -<% - -my $conf = new FS::Conf; -my $mydomain = $conf->config('domain'); - -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $svcnum = $1; -my $svc_acct_sm = qsearchs('svc_acct_sm',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_acct_sm; - -my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -my $pkgnum = $cust_svc->getfield('pkgnum'); -my($cust_pkg, $custnum); -if ($pkgnum) { - $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - $custnum=$cust_pkg->getfield('custnum'); -} else { - $cust_pkg = ''; - $custnum = ''; -} - -my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ) - or die "Unkonwn svcpart"; - -print header('Mail Alias View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) account" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)); - -my($domsvc,$domuid,$domuser) = ( - $svc_acct_sm->domsvc, - $svc_acct_sm->domuid, - $svc_acct_sm->domuser, -); -my $svc = $part_svc->svc; -my $svc_domain = qsearchs('svc_domain',{'svcnum'=>$domsvc}) - or die "Corrupted database: no svc_domain.svcnum matching domsvc $domsvc"; -my $domain = $svc_domain->domain; -my $svc_acct = qsearchs('svc_acct',{'uid'=>$domuid}) - or die "Corrupted database: no svc_acct.uid matching domuid $domuid"; -my $username = $svc_acct->username; - -print qq!Edit this information!, - "
    Service #$svcnum", - "
    Service: $svc", - qq!
    Mail to !, ( ($domuser eq '*') ? "(anything)" : $domuser ) , qq!\@$domain forwards to $username\@$mydomain mailbox.!, - '' -; - -%> diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi deleted file mode 100755 index b70ac8f90..000000000 --- a/httemplate/view/svc_domain.cgi +++ /dev/null @@ -1,106 +0,0 @@ - -<% - -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $svcnum = $1; -my $svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_domain; - -my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -my $pkgnum = $cust_svc->getfield('pkgnum'); -my($cust_pkg, $custnum); -if ($pkgnum) { - $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - $custnum=$cust_pkg->getfield('custnum'); -} else { - $cust_pkg = ''; - $custnum = ''; -} - -my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ); -die "Unknown svcpart" unless $part_svc; - -my $email = ''; -if ($svc_domain->catchall) { - my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } ); - die "Unknown svcpart" unless $svc_acct; - $email = $svc_acct->email; -} - -my $domain = $svc_domain->domain; - -%> - -<%= header('Domain View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) domain" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)) %> - -Service #<%= $svcnum %> -
    Service: <%= $part_svc->svc %> -
    Domain name: <%= $domain %> -
    Catch all email (change): -<%= $email ? "$email" : "(none)" %> -

    View whois information. -

    - - -<% my @records; if ( @records = $svc_domain->domain_record ) { %> - <%= ntable("",2) %> - ZoneTypeData - - <% foreach my $domain_record ( @records ) { - my $type = $domain_record->rectype eq '_mstr' - ? "(slave)" - : $domain_record->recaf. ' '. $domain_record->rectype; - %> - - <%= $domain_record->reczone %> - <%= $type %> - <%= $domain_record->recdata %> - - <% unless ( $domain_record->rectype eq 'SOA' ) { %> - (delete) - <% } %> - - <% } %> - -<% } %> - -
    -
    - - - IN - - -


    or

    -
    - - -<% if ( @records ) { %> Delete all records and <% } %> -Slave from nameserver IP - - - - - -
    -

    <%= joblisting({'svcnum'=>$svcnum}, 1) %> - diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi deleted file mode 100755 index c8d1d6213..000000000 --- a/httemplate/view/svc_forward.cgi +++ /dev/null @@ -1,69 +0,0 @@ - -<% - -my $conf = new FS::Conf; - -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $svcnum = $1; -my $svc_forward = qsearchs('svc_forward',{'svcnum'=>$svcnum}); -die "Unknown svcnum" unless $svc_forward; - -my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum}); -my $pkgnum = $cust_svc->getfield('pkgnum'); -my($cust_pkg, $custnum); -if ($pkgnum) { - $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum}); - $custnum=$cust_pkg->getfield('custnum'); -} else { - $cust_pkg = ''; - $custnum = ''; -} - -my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } ) - or die "Unkonwn svcpart"; - -print header('Mail Forward View', menubar( - ( ( $pkgnum || $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) account" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)); - -my($srcsvc,$dstsvc,$dst) = ( - $svc_forward->srcsvc, - $svc_forward->dstsvc, - $svc_forward->dst, -); -my $svc = $part_svc->svc; -my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$srcsvc}) - or die "Corrupted database: no svc_acct.svcnum matching srcsvc $srcsvc"; -my $source = $svc_acct->email; -my $destination; -if ($dstsvc) { - my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$dstsvc}) - or die "Corrupted database: no svc_acct.svcnum matching dstsvc $dstsvc"; - $destination = $svc_acct->email; -}else{ - $destination = $dst; -} - -print qq!Edit this information!. - ntable("#cccccc",2). - 'Service number'. - qq!$svcnum!. - 'Service'. - qq!$svc!. - qq!Email to!. - qq!$source!. - qq!Forwards to !. - qq!$destination!. - '
    '. joblisting({'svcnum'=>$svcnum}, 1). - '' -; - -%> diff --git a/httemplate/view/svc_www.cgi b/httemplate/view/svc_www.cgi deleted file mode 100644 index 9fa9661b1..000000000 --- a/httemplate/view/svc_www.cgi +++ /dev/null @@ -1,59 +0,0 @@ - -<% - -my($query) = $cgi->keywords; -$query =~ /^(\d+)$/; -my $svcnum = $1; -my $svc_www = qsearchs( 'svc_www', { 'svcnum' => $svcnum } ) - or die "svc_www: Unknown svcnum $svcnum"; - -#false laziness w/all svc_*.cgi -my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } ); -my $pkgnum = $cust_svc->getfield('pkgnum'); -my($cust_pkg, $custnum); -if ($pkgnum) { - $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } ); - $custnum = $cust_pkg->custnum; -} else { - $cust_pkg = ''; - $custnum = ''; -} -#eofalse - -my $usersvc = $svc_www->usersvc; -my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } ) - or die "svc_www: Unknown usersvc $usersvc"; -my $email = $svc_acct->email; - -my $domain_record = qsearchs('domain_record', { 'recnum' => $svc_www->recnum } ) - or die "svc_www: Unknown recnum ". $svc_www->recnum; - -my $www = $domain_record->reczone; -unless ( $www =~ /\.$/ ) { - my $svc_domain = qsearchs('svc_domain', { svcnum=>$domain_record->svcnum } ); - $www .= '.'. $svc_domain->domain; -} - -print header('Website View', menubar( - ( ( $custnum ) - ? ( "View this package (#$pkgnum)" => "${p}view/cust_pkg.cgi?$pkgnum", - "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", - ) - : ( "Cancel this (unaudited) website" => - "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, -)). - qq!Edit this information
    !. - ntable("#cccccc"). ''. ntable("#cccccc",2). - qq!Service number!. - qq!$svcnum!. - qq!Website name!. - qq!$www!. - qq!Account!. - qq!$email!. - ''. - '
    '. joblisting({'svcnum'=>$svcnum}, 1). - '' -; -%> diff --git a/init.d/freeside-init b/init.d/freeside-init deleted file mode 100644 index d3016b289..000000000 --- a/init.d/freeside-init +++ /dev/null @@ -1,58 +0,0 @@ -#! /bin/sh -# -# chkconfig: 345 86 16 -# description: Freeside daemons - -QUEUED_USER=%%%QUEUED_USER%%% - -FREESIDE_PATH="%%%FREESIDE_PATH%%%" - -PASSWD_USER=%%%PASSWD_USER%%% -PASSWD_MACHINE=%%%PASSWD_MACHINE%%% - -SIGNUP_USER=%%%SIGNUP_USER%%% -SIGNUP_MACHINE=%%%SIGNUP_MACHINE%%% -SIGNUP_AGENTNUM=%%%SIGNUP_AGENTNUM%%% -SIGNUP_REFNUM=%%%SIGNUP_REFNUM%%% - -case "$1" in - start) - # Start daemons. - echo -n "Starting freeside-queued: " - freeside-queued $QUEUED_USER - echo "done." - - echo -n "Starting fs_passwd_server: " - su freeside -c "$FREESIDE_PATH/fs_passwd/fs_passwd_server $PASSWD_USER $PASSWD_MACHINE" & - echo "done." - - echo -n "Starting fs_signup_server: " - su freeside -c "$FREESIDE_PATH/fs_signup/fs_signup_server $SIGNUP_USER $SIGNUP_MACHINE $SIGNUP_AGENTNUM $SIGNUP_REFNUM" & - echo "done." - ;; - stop) - # Stop daemons. - echo -n "Stopping freeside-queued: " - kill `cat /var/run/freeside-queued.pid` - echo "done." - - echo -n "Stopping fs_passwd_server: " - killall fs_passwd_server - echo "done." - - echo -n "Stopping fs_signup_server: " - killall fs_signup_server - echo "done." - ;; - - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: freeside {start|stop|restart}" - exit 1 -esac - -exit 0 - diff --git a/rt/ChangeLog b/rt/ChangeLog deleted file mode 100644 index 549a5cac7..000000000 --- a/rt/ChangeLog +++ /dev/null @@ -1,16016 +0,0 @@ -2002-07-19 22:47 jesse - - * README: - - Fixed the readme about fastcgi - -2002-07-19 22:42 jesse - - * Makefile: - - Bumped the version to 2.0.14 - -2002-07-19 01:22 jesse - - * Makefile, bin/rt, webrt/Search/Bulk.html: - - RT-Ticket: 1547 - - Bumping the version to 2.0.14-pre4 - Fixing a typo that pdh caught in Tickets/Bulk.html - -2002-07-13 00:22 jesse - - * Makefile: - - Bumped to 2.0.14-pre3 - -2002-07-13 00:19 jesse - - * bin/webmux.pl: - - modperl handler now speaks Mason 1.11 properly. - -2002-07-13 00:00 jesse - - * etc/config.pm: - - Shifted some config defaults to make things easier for newbie users - -2002-07-12 13:31 jesse - - * lib/RT/Interface/Web.pm: - - Now we properly strip long pathnames from attachments uploaded from windows boxes. - -2002-07-11 01:41 jesse - - * lib/RT/Interface/Web.pm: - - Fixing a typo in the mason 11 handler - -2002-07-10 14:41 jesse - - * Makefile: - - Bumping the version to 2.0.14-pre2 - -2002-07-10 14:36 jesse - - * lib/RT/User.pm: - - [no log message] - -2002-07-10 14:35 jesse - - * lib/RT/: Queue.pm, Ticket.pm: - - RT-Ticket: 1418 - RT-Status: resolved - - minor perldoc cleanups from pdh@snapgear - -2002-07-10 14:32 jesse - - * bin/rt-mailgate, lib/RT/Action/SendEmail.pm: - - RT-Ticket: 1425 - RT-Status: resolved - RT-Milestone: 2.0.x - RT-Subsystem: Mail Sending - - Fixes to create more proper message ids. - -2002-07-10 14:28 jesse - - * lib/RT/Ticket.pm: - - RT-Ticket: 1431 - RT-Status: resolved - - Importing tickets now lets you set the "Resolved" date - -2002-07-10 14:17 jesse - - * lib/RT/Tickets.pm: - - RT-Ticket: 1434 - RT-Status: resolved - RT-Subsystem: Core - RT-Milestone: 2.0.x - - RT is now smarter about letting you do "or" searches on single-value - keyword selections. Thanks to sam hartman. - -2002-07-10 14:15 jesse - - * webrt/Ticket/: Display.html, ModifyAll.html: - - RT-Ticket: 1433 - RT-Status: resolved - RT-Milestone: 2.0.x - RT-Subsystem: HTML::Mason frontend - RT-Severity: Nice to have - RT-Broken In: 2.0.13 - RT-Broken In: 2.0.12 - RT-Broken In: 2.0.11 - RT-Broken In: 2.0.10 - RT-Broken In: 2.0.0 - RT-Broken In: 2.0.1 - RT-Broken In: 2.0.2 - RT-Broken In: 2.0.3 - RT-Broken In: 2.0.4 - RT-Broken In: 2.0.5 - RT-Broken In: 2.0.6 - RT-Broken In: 2.0.7 - RT-Broken In: 2.0.8 - RT-Broken In: 2.0.9 - - Some signatures weren't setting off the "don't record comments if the update - is only a signature" code. Fixed. - -2002-07-10 13:59 jesse - - * lib/RT/Transaction.pm: - - RT-Ticket: 1501 - RT-Status: resolved - - Fixing docs in Transaction.pm's Message method - -2002-07-10 13:19 jesse - - * bin/rt: - - RT-Ticket: 1528 - RT-Milestone: 2.0.x - RT-Subsystem: CLI - RT-Severity: Normal - RT-Status: resolved - - Fixed docs for cli to say that --limit-status=dead isn't a valid option - -2002-06-26 15:22 jesse - - * lib/RT/Interface/Web.pm: - - support for mason 1.1 - -2002-06-26 15:19 jesse - - * Makefile, bin/mason_handler.fcgi, bin/webmux.pl, - webrt/Admin/Queues/GroupRights.html, - webrt/Admin/Queues/UserRights.html, webrt/Elements/ListActions, - webrt/Ticket/Elements/ShowBasics, webrt/Ticket/Elements/ToolBar: - - Adding support for mason 1.10 - -2002-06-26 15:15 jesse - - * lib/RT/Action/Notify.pm: - - Fixed notify cc behavior - -2002-06-26 15:13 jesse - - * lib/RT/Action/SendEmail.pm: - - Fixed pseudo-list syntax in To: lines - -2002-06-26 15:09 jesse - - * webrt/Search/Bulk.html: - - Added support for bulk comment/reply - -2002-05-03 02:07 jesse - - * lib/RT/Ticket.pm: - - RT-Ticket: 1369 - RT-Status: resolved - - When a ticket has another merged into it, it now has its "LastUpdated" date - updated - -2002-05-03 01:58 jesse - - * lib/RT/Ticket.pm: - - RT-Ticket: 1412 - RT-status: resolved - - Fixed a docs bug in Ticket->Import which didn't make it clear that Import - took an "Id" parameter and "Create" didn't. - -2002-05-03 01:54 jesse - - * webrt/autohandler: - - rt-ticket: 1410 - rt-status: resolved - - Applied a patch from rich lafferty which prevented NoAuth from not - requiring authentication on some fastcgi setups. - - A similar bug bit SelfService. - - This commit fixes that one too. - -2002-05-03 01:51 jesse - - * Makefile: - - RT-Ticket: 1272 - rt-status: resolved - - Applied a patch from Ilya Martynov which allows make insert to work - in a scenario where DESTDIR is being set to something funny This may be necessary when installing into AFS - -2002-05-03 01:36 jesse - - * lib/RT/Action/SendEmail.pm: - - RT-Ticket: 1367 - RT-Status: resolved - - Added a check which only sets precedence to bulk if it's not already set, - say by a template. - -2002-05-03 01:30 jesse - - * lib/RT/Interface/Email.pm: - - RT-Ticket: 1370 - RT-Status: resolved - - From: Jason Edgecombe - To: rt-devel@lists.fsck.com - Subject: [rt-devel] An oversite in Interface/Email.pm - - Hi, - - I found an problem in Interface/Email.pm when I was modifying - enhanced mailgate. I have attached a diff of the modifications. - - In the function MailError, it assumes MIMIEOBJ is defined. I added a - simple "if" test to only run $MIMEOBJ->sync_headers if $MIMEOBJ is defined. - -2002-05-03 01:24 jesse - - * lib/RT/Action/SendEmail.pm: - - RT-Ticket: 1348 - RT-Status: resolved - - Fixed a bug in mail sending that improperly quoted the usernames of users - who had " in their names - -2002-04-29 00:39 jesse - - * lib/RT.pm: - - Fixed a tiny typo - -2002-04-28 23:46 jesse - - * lib/RT.pm: - - Fixed up the rt log messages. - -2002-04-21 02:14 jesse - - * lib/RT/Interface/Web.pm: - - Fixed a couple bugs in setting owners that were only revealed by the poor data - validation on rt.cpan.org - -2002-04-21 02:06 jesse - - * lib/RT/Ticket.pm: - - Fixed a couple bugs in setting owners that were only revealed by the poor data - validation on rt.cpan.org - -2002-04-19 00:32 jesse - - * Makefile: - - Adding a new Makefile target to ease packaging. - -2002-04-18 12:47 jesse - - * lib/RT/GroupMember.pm: - - RT-Ticket: 1385 - RT-Broken-In: 2.0.0 - RT-Broken-In: 2.0.1 - RT-Broken-In: 2.0.2 - RT-Broken-In: 2.0.3 - RT-Broken-In: 2.0.4 - RT-Broken-In: 2.0.5 - RT-Broken-In: 2.0.6 - RT-Broken-In: 2.0.7 - RT-Broken-In: 2.0.8 - RT-Broken-In: 2.0.9 - RT-Broken-In: 2.0.10 - RT-Broken-In: 2.0.11 - RT-Broken-In: 2.0.12 - RT-Broken-In: 2.0.13 - RT-Status: resolved - - GroupMemmber was looking for the "ModifyGroups" right, when it should have - been looking for the "AdminGroups" right - -2002-04-05 10:24 jesse - - * webrt/Ticket/Update.html: - - RT-Ticket: 1330 - RT-Status: Resolved - - Fixed an html escaping bug in Ticket/Update.html - -2002-03-27 22:59 jesse - - * Makefile, lib/RT/User.pm: - - Fixed a CRITICAL security bug that allowed remote administrative access - to RT without a password. (Security advisory to follow) - -2002-03-14 16:15 jesse - - * Makefile: - - Bumped the version to 2.0.12 - -2002-03-06 18:57 jesse - - * Makefile: - - Bumped the version to 2.0.12pre6 - -2002-03-06 18:57 jesse - - * lib/RT/Transaction.pm: - - Added an update that will make dates changed as parts of transaction updates show up in local time - -2002-03-06 18:56 jesse - - * webrt/Admin/Queues/Modify.html: - - Added a note to the queue creation screen about defaults. - -2002-03-01 01:41 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - This patch fixes a small problem with printing a message.It checks if themessage is true, not if it has length, so a message containing 0 will notbe printed. From Blair Zajac - -2002-03-01 01:39 jesse - - * bin/rt: - - RT-Ticket:438 - RT-Status: resolved - - Added brandon's patch to allow searching for tickets by keyword on the commandline - -2002-02-28 02:03 jesse - - * bin/rt: - - RT-Ticket: 1258 - RT-Milestone: 2.0.x - RT-Subsystem: CLI - RT-Severity: normal - RT-Broken in: 2.0-beta3 - RT-Broken in: 2.0.1 - RT-Broken in: 2.0.2 - RT-Broken in: 2.0.3 - RT-Broken in: 2.0.4 - RT-Broken in: 2.0.5 - RT-Broken in: 2.0.6 - RT-Broken in: 2.0.7 - RT-Broken in: 2.0.8 - RT-Broken in: 2.0.9 - RT-Broken in: 2.0.10 - RT-Broken in: 2.0.11 - - Removed a line that make --limit-priority and --limit-final-priority not - work - -2002-02-28 01:49 jesse - - * lib/RT/Action/: Autoreply.pm, SendEmail.pm: - - RT-Ticket: 1196 - RT-Status: resolved - -2002-02-28 01:38 jesse - - * lib/RT/Interface/Web.pm: - - RT-Ticket: 1246 - RT-Status: resolved - -2002-02-28 01:38 jesse - - * tools/testdeps: - - Added a couple explicit dependencies to testdeps that should have been there - forever ago. you'll only run into this if your cpan doesn't do recursive deps. - -2002-02-20 20:45 jesse - - * Makefile, lib/RT/Interface/Web.pm, webrt/Admin/Users/index.html, - webrt/Ticket/Update.html: - - Bumped the version to 2.0.12-pre5. - - Web: Fixed a typo in user administration that prevented user listing - - Web: fixed recieve to receive in ticket/update - -2002-02-19 03:23 jesse - - * lib/RT/Scrips.pm: - - Fixed a typo. (Added a missing ;) - -2002-02-19 01:04 jesse - - * Makefile: - - Bumped version to 2.0.12pre4 - -2002-02-18 18:35 jesse - - * lib/RT/Condition/Generic.pm: - - RT-Ticket: 1194 - - cleaned up a reference to "ApplicableTypes", a nonexistent parameter to Condition->new - -2002-02-18 18:30 jesse - - * webrt/Elements/Login: - - RT-Ticket: 1226 - RT-Status: resolved - - Added an explicit reset of the content-type to 'text/html' when displaying hte login page - -2002-02-18 18:25 jesse - - * webrt/Admin/Users/index.html: - - rt-ticket: 1190 - rt-status: resolved - - Modified administrative userlist to make it easier to click on users who have no Name attribute defined - -2002-02-18 18:18 jesse - - * webrt/: Elements/Header, SelfService/Elements/Header: - - rt-ticket: 1176 - rt-status: resolved - - Applied tom's patch which hides the preferences link if the user doesn't have the right to "modify self" - -2002-02-18 18:14 jesse - - * lib/RT/Interface/Email.pm: - - RT-Ticket: 1165 - RT-Status: resolved - - exporting the ParseAddressFromHeader subroutine so others can play with it - -2002-02-18 18:06 jesse - - * webrt/Ticket/Update.html: - - RT-Ticket:1209 - RT-Milestone: 2.0.x - RT-Status: resolved - - Removed a bogus font tag from the Ticket update screen - -2002-02-18 18:00 jesse - - * lib/RT/Interface/Web.pm, webrt/Search/Listing.html: - - RT-Ticket: 1243 - RT-Status: resolved - RT-Milestone: 2.0.x - RT-Broken-In: 2.0.8 - RT-Broken-In: 2.0.9 - RT-Broken-In: 2.0.10 - RT-Broken-In: 2.0.11 - RT-Subsystem: HTML::Mason Frontend - RT-Severity: Normal - - Switched the web frontend to use an in-core scalar for uploaded attachment content, - rather than a tempfile which wasn't getting cleaned up properly - -2002-02-18 16:53 jesse - - * webrt/Search/Listing.html: - - RT-Ticket: 1245 - Rt-status: resolved - - Applied a patch to nuke duplicate restrictions in the webui. - -2002-02-18 16:47 jesse - - * webrt/Admin/Groups/Members.html: - - RT-Ticket: 1421 - RT-Status: resolved - - moved a label inside a loop to make the ui easier to understand - -2002-02-18 16:36 jesse - - * etc/config.pm: - - Set Default for UseFriendlyToLines to 0 by default, to deal with users running - redhat who have trouble configuring RT. - -2002-02-18 16:31 jesse - - * Makefile, lib/RT/Scrip.pm, tools/insertdata: - - Edited insertdata to insert scrips by default, so that users don't need - to go through the configuration task themselves. - - Change the Makefile's WEB_GROUP to www by default for redhat and OSX. - - Correced docs for lib/RT/Scrip new() method - -2002-02-08 01:23 jesse - - * webrt/SelfService/Display.html: - - cleanup to "last trans" in SelfService - -2002-02-08 00:53 jesse - - * lib/RT/Interface/Web.pm: - - Generalized "Abort" function to allow other non-html error messages with - proper handlers - -2002-02-08 00:49 jesse - - * etc/: schema.Pg, schema.mysql: - - removed duplicate indices - -2002-02-07 16:41 jesse - - * etc/config.pm: - - Added some docs to the config file from Rich Lafferty - -2002-02-04 12:37 jesse - - * lib/RT/Template.pm: - - Output template content to core rather than disk when parsing. - -2002-01-28 01:01 jesse - - * webrt/Ticket/Elements/ShowHistory: - - closing lasttrans anchor - -2002-01-28 00:59 jesse - - * webrt/Ticket/Elements/ShowHistory: - - Closing the #lasttrans anchor - -2002-01-28 00:58 jesse - - * lib/RT/Record.pm: - - RT-Ticket: 1156 - - Pulling forward the patch for 1156 - -2002-01-28 00:57 jesse - - * lib/RT/Record.pm: - - RT-Ticket: 1156 - RT-Status: resolved - -2002-01-28 00:47 jesse - - * bin/mason_handler.fcgi: - - Small fix to the fastcgi handler to make attachment display work better, - thanks to rich lafferty. - -2002-01-28 00:47 jesse - - * etc/config.pm: - - Removed some extraneous slashes from the config file. - -2002-01-28 00:46 jesse - - * README: - - Clarified some readme stuff - -2002-01-28 00:44 jesse - - * bin/rt-commit-handler: - - Bringing forward a fix to the cvs commit handler to deal with branched - version #s. - -2002-01-28 00:40 jesse - - * Makefile: - - Bumped the version to 2.1.1 - -2002-01-28 00:27 jesse - - * etc/RT_Config.pm: - - file RT_Config.pm was initially added on branch rt-2-1. - -2002-01-28 00:27 jesse - - * bin/enhanced-mailgate: - - file enhanced-mailgate was initially added on branch rt-2-1. - -2002-01-28 00:27 jesse - - * bin/rt-commit-handler: - - file rt-commit-handler was initially added on branch rt-2-1. - -2002-01-28 00:27 jesse - - * Makefile, bin/enhanced-mailgate, bin/mason_handler.fcgi, bin/rt, - bin/rt-commit-handler, bin/rt-mailgate, bin/rtadmin, bin/webmux.pl, - etc/RT_Config.pm, etc/acl.Oracle, etc/acl.Pg, etc/acl.mysql, - etc/config.pm, lib/RT.pm, lib/RT/Handle.pm, lib/RT/User.pm, - lib/RT/Watcher.pm, lib/RT/Interface/CLI.pm, - lib/RT/Interface/Email.pm, tools/cpan2rpm, tools/initdb, - tools/insertdata, tools/testdeps: - - First RT 2.1 checkin. don't expect this to run. (though it does here) - -2002-01-25 17:37 jesse - - * README: - - Added a warning to the readme that 2.1 is scary and people shouldn't use it - -2002-01-25 17:24 jesse - - * Makefile: - - Branching 2.1.0 and incrementing the makefile to 2.1. - - Welcome to the future. - -2002-01-24 13:30 jesse - - * lib/RT/Transaction.pm: - - RT-Ticket: 1201 - RT-Status: resolved - - Better transaction display for "text" and "message" parts. - -2002-01-24 13:00 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - RT-Ticket: 1166 - RT-Status: resolved - - Implemented better URL regexp matching. - -2002-01-24 10:39 jesse - - * bin/rt-mailgate: - - Fixed a typo in a debug message in rt-mailgate - -2002-01-24 10:34 jesse - - * lib/RT/Template.pm: - - Switched from bogus mime parsing to using MIME::Parser like we should have - from the get-go. - - Used perltidy to clean up template.pm before we started working on it. - -2002-01-24 10:28 jesse - - * lib/RT/Record.pm: - - Added a check to LoadByCols which causes postgres mode to not try to lookup - lc(undef) - -2002-01-24 10:23 jesse - - * webrt/NoAuth/webrt.css: - - Added a new style to the stylesheet to support some new reports - -2002-01-24 10:21 jesse - - * lib/RT/Interface/Email.pm: - - mail gateway now unfolds long headers on parse. - -2002-01-11 15:20 jesse - - * Makefile, lib/RT/Transaction.pm: - - RT-Ticket: 950 - - Aoolyed the recommended patch to make blank bodies not get - mailed in lieu of the real message - -2002-01-11 15:00 jesse - - * Makefile, webrt/Ticket/ModifyAll.html: - - Fixed a small bug that broke the "jumbo" page after 2.0.11 - -2002-01-11 01:17 jesse - - * bin/rt-mailgate: - - Added a new flag to rt-mailgate to enable setting the owner of new tickets based on +extension - -2002-01-11 01:13 jesse - - * webrt/Ticket/: Modify.html, ModifyAll.html: - - Adding a couple ACL checks to better deal with moving tickets to queues the user can't see - -2002-01-11 01:11 jesse - - * webrt/Admin/Queues/index.html: - - Fixed typo in ACL check that resulted in "Create Queue" being more restrictive than - it needed to be - -2002-01-10 19:07 jesse - - * webrt/Ticket/Update.html: - - more tweaking - -2002-01-10 19:05 jesse - - * webrt/Ticket/Update.html: - - Cleaned up the Ticekt Update ui some - -2002-01-10 19:02 jesse - - * lib/RT/: Attachment.pm, Action/Notify.pm, Condition/Generic.pm: - - Cleanups to make Also-Cc and Also-Bcc go - -2002-01-10 19:01 jesse - - * lib/RT/Queue.pm: - - Changed a test to work the way that Test::Inline does now - -2002-01-10 18:34 jesse - - * lib/RT/Attachment.pm: - - Changes to attachment to provide the header frobbing necessary to send mail to ccs and bccs - -2002-01-10 18:32 jesse - - * Makefile, README, lib/RT/Ticket.pm, tools/insertdata, - webrt/Ticket/Update.html, lib/RT/Action/Notify.pm: - - Work on "Explicit Cc" and "Explicit Bcc" for a client - -2002-01-10 18:27 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - abstracting out a number to a named variable - -2002-01-09 02:24 jesse - - * webrt/Admin/: Groups/index.html, Keywords/index.html: - - A couple tiny ui cleanups (removed some object ids from the UI where they were just being clutter - -2002-01-02 21:58 jesse - - * Makefile, README, webrt/Elements/Login: - - Bumped some copyright notices to 2002. bumped version to 2.0.11 - -2001-12-26 14:59 jesse - - * Makefile: - - Bumping version to 2.0.11pre1 - -2001-12-26 14:51 jesse - - * lib/RT/Tickets.pm: - - Merges were being over-zealous in what they twiddled the effective id of. - - this meant that far too many tickets would show up in ticket listings. - -2001-12-24 18:58 jesse - - * Makefile: - - Bumped the version to 2.0.10 - -2001-12-19 00:24 jesse - - * Makefile: - - Bumped version to 2.0.10pre4 - - fix to makefile to genereate changelog for head - -2001-12-18 03:58 jesse - - * lib/RT/Tickets.pm: - - The "null search" was finding all tickets in 2.0.10pre3. Fixed in CVS - -2001-12-18 03:53 jesse - - * bin/rt: - - fixed typos in bin/rt that stopped --limit-subject --limit-requestors and --limit-body from - working - -2001-12-17 15:13 jesse - - * Makefile: - - Bumped the version to 2.0.10-test3 - -2001-12-17 14:58 jesse - - * lib/RT/User.pm, tools/insertdata, webrt/Admin/Users/Modify.html: - - RT-Ticket: 935 - RT-Status: resolved - - cleaned up seph's patch. this enabled me to actually really properly support - users with no email address, which meant there were a couple other cleanups - to go through too. - -2001-12-17 14:26 jesse - - * lib/RT/Ticket.pm: - - Some small cleanups to the IsWatcher stuff. - - Added checks to make sure that watchers aren't duplicated to ticket.pm - -2001-12-17 13:04 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - Fixed an unclosed anchor which caused IE to render ticket listings wrong. - -2001-12-14 18:29 jesse - - * lib/Makefile.PL, tools/testdeps: - - Bumped DBIx::SearchBuilder dependency to 0.48 - -2001-12-14 18:28 jesse - - * tools/testdeps, webrt/Elements/Login: - - Removed code to special case for bugs in mason < 1.01. - Moved us up to a mason 1.02 dependency - -2001-12-14 18:26 jesse - - * bin/rt: - - bin/rt: added support for --version, fixed --status = !closed, docced --merge-into - -2001-12-14 18:25 jesse - - * Makefile: - - Some stylistic cleanups to the makefile from blair. - -2001-12-14 16:42 jesse - - * bin/rtadmin: - - rtadmin had some issues where it would assume a 'name' if called without --name for user group and queue editing. - -2001-12-14 16:06 jesse - - * lib/RT/Tickets.pm: - - - Ticket listings will no longer show tickets which have been merged into others. - - -j - -2001-12-14 15:27 jesse - - * lib/RT/User.pm: - - Prevent users from futzing with nobody or rt_System, unless you're setting an email address. - (Arguably, that's a bug too) - -2001-12-14 14:03 jesse - - * lib/RT/: ACE.pm, Group.pm, GroupMember.pm, Keyword.pm, - KeywordSelect.pm, Queue.pm, Scrip.pm, Template.pm, Ticket.pm: - - Standardised on "Permission Denied" instead of having some "Permission denied". Thanks simon. - - -j - -2001-12-14 13:46 jesse - - * lib/RT/Interface/Web.pm: - - Reordered the order that Basics actions are committed, so that Queue changes - come after other changes, so that users don't move tickets out of a queue before they have a - chance to update them. - -2001-12-13 02:18 jesse - - * lib/RT/Ticket.pm: - - Addition to Ticket->Import, so you can set owner by name. - - Fix for a bug in Ticket->AddWatcher that would let privileged watchers without - email addresses add others as watchers. - -2001-12-03 20:13 jesse - - * Makefile, lib/RT/EasySearch.pm, lib/RT/Keyword.pm, - lib/RT/Record.pm, lib/RT/Tickets.pm, lib/RT/User.pm: - - more work on making sure that only the things we want are case sensitive - (IE name, content email address should always be insensitive. when loading a row by any field other than ID, that should be case-insensitive) - -2001-12-03 19:17 jesse - - * Makefile: - - bumped the version to 2.0.10-test1 - -2001-12-03 19:14 jesse - - * lib/RT/EasySearch.pm: - - We now default to case sensitive searches, rather than case-insensitive ones. - (This should speed up Pg a LOT. We'll be adding in case-insensitive searching - for the 13 attributes that matter: - - Watcher->Email - User->name - User->email - User->gecos - Ticket->Subject - Queue->name - KeywordSelect->name - Keyword->Name - ObjectKeyword->Name - Attachment->Subject - Attachment->Content - Attachment->Headers - -2001-12-03 19:13 jesse - - * webrt/: Admin/Queues/Modify.html, Admin/Queues/People.html, - Elements/GotoTicket: - - Some small UI cleanups from Hakke - -2001-11-29 03:50 jesse - - * webrt/: Elements/SelectEqualityOperator, Elements/SelectOwner, - Search/PickRestriction: - - SelectOwner now passes a ticket up the line. - - Priority can now have = and != searches - -2001-11-29 03:49 jesse - - * tools/insertdata: - - Cleaned up a template to display Ticket subject, if no transaction subject is given. - -2001-11-29 03:48 jesse - - * webrt/Ticket/: Update.html, Elements/EditPeople: - - Now pass in ticket Id, so that "owner" can be someone who only has rights to that tikcet. - -2001-11-29 03:47 jesse - - * lib/RT/Ticket.pm: - - FinalPriority should never get set to null if a ticket doesn't have the attribute set on create - - Untake's arguments were debognifed - -2001-11-29 03:45 jesse - - * webrt/SelfService/Elements/Header: - - "Logout" no longer shows up when using external auth with SelfService - -2001-11-29 03:44 jesse - - * bin/rt: - - Fix for setting priority when creating tickets with the cli - -2001-11-29 03:42 jesse - - * bin/rt-mailgate: - - Added support for --ticket-id-from-extension to rt-mailgate - -2001-11-14 14:28 jesse - - * Makefile: - - Bumped the version to 2.0.9 - -2001-11-13 11:33 jesse - - * Makefile, bin/initacls.Pg, bin/rt: - - rt-ticket:1007 - rt-status: resolved - - initacls.pg no longer has extranious spaces which break variable assignment for port and host. - - Bumped version to 2.0.9pre9 - -2001-11-12 13:19 jesse - - * Makefile, bin/initacls.Pg: - - Fix for #1007 (Typo in bin/initacls.Pg) - Bumped version to 2.0.9pre8 - -2001-11-09 18:24 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - URL higlighting should now work with mailto: urls - -2001-11-09 18:15 jesse - - * Makefile, webrt/Ticket/Elements/ShowTransaction: - - Cleaned up the url highlighting code - - Bumped the version to 2.0.9pre7 - -2001-11-09 17:27 jesse - - * Makefile: - - Fixing the new taggy stuff - -2001-11-09 17:23 jesse - - * Makefile: - - Fixing the new branchy stuff - -2001-11-09 17:07 jesse - - * Makefile, bin/rtadmin, etc/config.pm, - webrt/Ticket/Elements/ShowTransaction: - - Added a bit of doc to etc/config.pm - - Modified ShowTransaction to more properly escape html - - Fixed some of the cli help for rtadmin - - Added support for branch specification to the makefile - -2001-11-08 15:15 jesse - - * lib/RT/Interface/Web.pm: - - I can commit on the head. really. - -2001-11-08 15:06 jesse - - * lib/RT/Interface/Web.pm: - - Dealing with defined but blank Owner fields - -2001-11-06 18:06 jesse - - * tools/cpan2rpm, tools/initdb, tools/insertdata, tools/testdeps, - webrt/autohandler, webrt/index.html, webrt/Admin/index.html, - webrt/Admin/Elements/CreateQueueCalled, - webrt/Admin/Elements/CreateUserCalled, - webrt/Admin/Elements/EditUserComments, - webrt/Admin/Elements/GrantQueueRightsTo, - webrt/Admin/Elements/GroupTabs, webrt/Admin/Elements/Header, - webrt/Admin/Elements/ListGlobalKeywordSelects, - webrt/Admin/Elements/ListGlobalScrips, - webrt/Admin/Elements/ModifyKeyword, - webrt/Admin/Elements/ModifyKeywordSelect, - webrt/Admin/Elements/ModifyQueue, - webrt/Admin/Elements/ModifyTemplate, - webrt/Admin/Elements/ModifyUser, - webrt/Admin/Elements/QueueRightsForUser, - webrt/Admin/Elements/QueueTabs, - webrt/Admin/Elements/SelectKeywordSelect, - webrt/Admin/Elements/SelectModifyGroup, - webrt/Admin/Elements/SelectModifyKeyword, - webrt/Admin/Elements/SelectModifyKeywordSelect, - webrt/Admin/Elements/SelectModifyQueue, - webrt/Admin/Elements/SelectModifyUser, - webrt/Admin/Elements/SelectQueueRights, - webrt/Admin/Elements/SelectRights, - webrt/Admin/Elements/SelectScrip, - webrt/Admin/Elements/SelectScripAction, - webrt/Admin/Elements/SelectScripCondition, - webrt/Admin/Elements/SelectSingleOrMultiple, - webrt/Admin/Elements/SelectTemplate, - webrt/Admin/Elements/SelectUsers, webrt/Admin/Elements/SystemTabs, - webrt/Admin/Elements/Tabs, webrt/Admin/Elements/UserTabs, - webrt/Admin/Global/GroupRights.html, - webrt/Admin/Global/Keywords.html, webrt/Admin/Global/Scrips.html, - webrt/Admin/Global/Template.html, - webrt/Admin/Global/Templates.html, - webrt/Admin/Global/UserRights.html, webrt/Admin/Global/index.html, - webrt/Admin/Groups/Members.html, webrt/Admin/Groups/Modify.html, - webrt/Admin/Groups/Rights.html, webrt/Admin/Groups/index.html, - webrt/Admin/KeywordSelects/Modify.html, - webrt/Admin/KeywordSelects/index.html, - webrt/Admin/Keywords/Modify.html, webrt/Admin/Keywords/index.html, - webrt/Admin/Queues/Create.html, - webrt/Admin/Queues/GroupRights.html, - webrt/Admin/Queues/Keywords.html, webrt/Admin/Queues/Modify.html, - webrt/Admin/Queues/People.html, webrt/Admin/Queues/Scrips.html, - webrt/Admin/Queues/Template.html, - webrt/Admin/Queues/Templates.html, - webrt/Admin/Queues/UserRights.html, webrt/Admin/Queues/index.html, - webrt/Admin/Users/Modify.html, webrt/Admin/Users/Prefs.html, - webrt/Admin/Users/Rights.html, webrt/Admin/Users/index.html, - webrt/Elements/Checkbox, webrt/Elements/CreateTicket, - webrt/Elements/CustomHomepageHeader, webrt/Elements/Error, - webrt/Elements/Footer, webrt/Elements/GotoTicket, - webrt/Elements/Header, webrt/Elements/ListActions, - webrt/Elements/Login, webrt/Elements/MessageBox, - webrt/Elements/MyRequests, webrt/Elements/MyTickets, - webrt/Elements/Quicksearch, webrt/Elements/Refresh, - webrt/Elements/Section, webrt/Elements/SelectBoolean, - webrt/Elements/SelectDate, webrt/Elements/SelectDateRelation, - webrt/Elements/SelectDateType, webrt/Elements/SelectKeyword, - webrt/Elements/SelectKeywordOptions, webrt/Elements/SelectLinkType, - webrt/Elements/SelectMatch, webrt/Elements/SelectNewTicketQueue, - webrt/Elements/SelectOwner, webrt/Elements/SelectQueue, - webrt/Elements/SelectResultsPerPage, - webrt/Elements/SelectSortOrder, webrt/Elements/SelectStatus, - webrt/Elements/SelectTicketSortBy, webrt/Elements/SelectUsers, - webrt/Elements/SelectWatcherType, webrt/Elements/ShadedBox, - webrt/Elements/Submit, webrt/Elements/Tabs, - webrt/Elements/TitleBoxEnd, webrt/Elements/TitleBoxStart, - webrt/Elements/ViewUser, webrt/Elements/dayMenu, - webrt/Elements/monthMenu, webrt/Elements/yearMenu, - webrt/NoAuth/Logout.html, webrt/NoAuth/Reminder.html, - webrt/NoAuth/webrt.css, webrt/NoAuth/images/rt.jpg, - webrt/NoAuth/images/spacer.gif, webrt/Search/Bulk.html, - webrt/Search/Listing.html, webrt/Search/PickRestriction, - webrt/Search/RestrictSearch.html, webrt/Search/TicketCell, - webrt/SelfService/Closed.html, webrt/SelfService/Create.html, - webrt/SelfService/Display.html, webrt/SelfService/Error.html, - webrt/SelfService/Prefs.html, webrt/SelfService/Update.html, - webrt/SelfService/index.html, - webrt/SelfService/Attachment/dhandler, - webrt/SelfService/Elements/GotoTicket, - webrt/SelfService/Elements/Header, - webrt/SelfService/Elements/MyRequests, - webrt/SelfService/Elements/Tabs, webrt/Ticket/Create.html, - webrt/Ticket/Display.html, webrt/Ticket/History.html, - webrt/Ticket/Modify.html, webrt/Ticket/ModifyAll.html, - webrt/Ticket/ModifyDates.html, webrt/Ticket/ModifyLinks.html, - webrt/Ticket/ModifyPeople.html, webrt/Ticket/Update.html, - webrt/Ticket/Attachment/dhandler, - webrt/Ticket/Elements/AddWatchers, - webrt/Ticket/Elements/EditBasics, webrt/Ticket/Elements/EditDates, - webrt/Ticket/Elements/EditKeywordSelects, - webrt/Ticket/Elements/EditLinks, webrt/Ticket/Elements/EditPeople, - webrt/Ticket/Elements/EditWatchers, - webrt/Ticket/Elements/ShowBasics, webrt/Ticket/Elements/ShowDates, - webrt/Ticket/Elements/ShowDependencies, - webrt/Ticket/Elements/ShowHistory, - webrt/Ticket/Elements/ShowKeywordSelects, - webrt/Ticket/Elements/ShowLinks, - webrt/Ticket/Elements/ShowMemberOf, - webrt/Ticket/Elements/ShowMembers, - webrt/Ticket/Elements/ShowPeople, - webrt/Ticket/Elements/ShowReferences, - webrt/Ticket/Elements/ShowRequestor, - webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction, webrt/Ticket/Elements/Tabs, - webrt/Ticket/Elements/ToolBar, webrt/User/Prefs.html: - - Merging rt-1-1 to the head. - - RT 1.0 now lives on the rt-1-0 branch. - -2001-11-06 18:03 jesse - - * Makefile, NEWS, README, TODO, bin/initacls.Oracle, - bin/initacls.Pg, bin/initacls.mysql, bin/mason_handler.fcgi, - bin/mason_handler.scgi, bin/rt, bin/rt-mailgate, bin/rtadmin, - bin/rtmux.pl, bin/testdeps.pl, bin/webmux.pl, docs/FAQ, - docs/FAQ.html, docs/README.docs, docs/Security, - docs/rt-templates.html, docs/rt_users_guide.html, - docs/design_docs/CARS, docs/design_docs/TransactionTypes.txt, - docs/design_docs/acls, docs/design_docs/basic-definitions.txt, - docs/design_docs/cli_spec, docs/design_docs/cvs_integration, - docs/design_docs/evil_plans, docs/design_docs/link-definitions.txt, - docs/design_docs/local_hacking, - docs/design_docs/subscription-definitions.txt, - docs/design_docs/users, etc/acl.Oracle, etc/acl.Pg, etc/acl.mysql, - etc/config.pm, etc/mysql.acl, etc/rt.spec, etc/schema, - etc/schema.Oracle, etc/schema.Pg, etc/schema.mysql, etc/schema.pm, - etc/suidrt.c, lib/MANIFEST, lib/MANIFEST.SKIP, lib/Makefile.PL, - lib/RT.pm, lib/test.pl, lib/RT/ACE.pm, lib/RT/ACL.pm, - lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/CurrentUser.pm, - lib/RT/Date.pm, lib/RT/EasySearch.pm, lib/RT/Group.pm, - lib/RT/GroupMember.pm, lib/RT/GroupMembers.pm, lib/RT/Groups.pm, - lib/RT/Handle.pm, lib/RT/Keyword.pm, lib/RT/KeywordSelect.pm, - lib/RT/KeywordSelects.pm, lib/RT/Keywords.pm, lib/RT/Link.pm, - lib/RT/Links.pm, lib/RT/ObjectKeyword.pm, lib/RT/ObjectKeywords.pm, - lib/RT/Queue.pm, lib/RT/Queues.pm, lib/RT/Record.pm, - lib/RT/Scrip.pm, lib/RT/ScripAction.pm, lib/RT/ScripActions.pm, - lib/RT/ScripCondition.pm, lib/RT/ScripConditions.pm, - lib/RT/Scrips.pm, lib/RT/Template.pm, lib/RT/Templates.pm, - lib/RT/TestHarness.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm, - lib/RT/Transaction.pm, lib/RT/Transactions.pm, lib/RT/User.pm, - lib/RT/Users.pm, lib/RT/Watcher.pm, lib/RT/Watchers.pm, - lib/RT/Action/Autoreply.pm, lib/RT/Action/Generic.pm, - lib/RT/Action/Notify.pm, lib/RT/Action/NotifyAsComment.pm, - lib/RT/Action/OpenDependent.pm, lib/RT/Action/README.hackers, - lib/RT/Action/ResolveMembers.pm, lib/RT/Action/SendEmail.pm, - lib/RT/Action/SendPasswordEmail.pm, - lib/RT/Action/StallDependent.pm, - lib/RT/Condition/AnyTransaction.pm, lib/RT/Condition/Generic.pm, - lib/RT/Condition/NewDependency.pm, - lib/RT/Condition/StatusChange.pm, lib/RT/Interface/CLI.pm, - lib/RT/Interface/Email.pm, lib/RT/Interface/Web.pm: - - Merging rt-1-1 to the head. - - RT 1.0 now lives on the rt-1-0 branch. - -2001-11-06 17:57 jesse - - * rt.spec, etc/rt.spec: - - Cleaned up spec file goodness - -2001-11-06 16:28 jesse - - * Makefile: - - Bumped version to 2.0.9pre5 - -2001-11-05 00:55 jesse - - * rt.spec, lib/Makefile.PL, tools/testdeps: - - Bumped the searchbuilder dependency to 0.47 - -2001-11-05 00:54 jesse - - * webrt/Ticket/Update.html: - - Named the ticket update form. - -2001-11-05 00:52 jesse - - * etc/config.pm, lib/RT/Handle.pm: - - Added support for postgres' connections-over-ssl - -2001-11-05 00:49 jesse - - * webrt/Admin/Elements/SelectRights: - - Updated ACL selecting UI to work properly with browsers that try to auto-select - a value in a SELECT - -2001-11-02 01:39 jesse - - * Makefile: - - bumped the version to 2.0.9pre4 - -2001-11-02 01:31 jesse - - * webrt/Ticket/: Display.html, ModifyAll.html: - - Fix to not automatically record comments if nothing was typed. - -2001-11-02 00:52 jesse - - * lib/RT/Ticket.pm: - - Fix for duplicated requestors on merge. #791 - -2001-11-01 17:40 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - More tweaking transaction display - -2001-11-01 17:36 jesse - - * webrt/: Admin/Users/Modify.html, Ticket/Elements/ShowTransaction: - - Fixed newlines between ticket body and headers. - - Fix for 934: creating users doesn't completely fail (new) - -2001-11-01 17:24 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - Cleanups to ShowTransaction - -2001-11-01 17:10 jesse - - * lib/RT/: Keyword.pm, Interface/Web.pm: - - Fix for loading queue (post 2.0.8) when called by name - Fix for _not_ trying to load keywords when called with no value. - -2001-10-31 17:38 jesse - - * Makefile: - - Fixed the make dist - -2001-10-31 02:56 jesse - - * Makefile: - - Bumped the version to 2.0.9pre3 - -2001-10-31 02:54 jesse - - * lib/RT/Action/SendPasswordEmail.pm: - - file SendPasswordEmail.pm was initially added on branch rt-1-1. - -2001-10-31 02:54 jesse - - * lib/RT/Action/SendPasswordEmail.pm: - - Added an action to mail a password to the user. - -2001-10-31 02:54 jesse - - * bin/rt-mailgate: - - added support to rt-mailgate for putting the queue name in a +extension - -2001-10-31 02:52 jesse - - * lib/RT/Ticket.pm: - - Tickets which are created in a "resolved" state will now have their "resolved" - date set right. - -2001-10-31 02:51 jesse - - * lib/RT/User.pm: - - Started work on "Email password to user" - -2001-10-31 02:48 jesse - - * lib/RT/Watcher.pm: - - Added a patch from Simon Cozens which makes sure that a requestor is always a user, rather than an email address. - -2001-10-31 02:47 jesse - - * lib/RT/Keyword.pm: - - Added a helper Load function to Keyword to load by Id or Path - -2001-10-31 02:42 jesse - - * lib/RT/Template.pm: - - - Template got new helper functions for loading queue and system templates. - -2001-10-31 02:40 jesse - - * bin/rt, bin/rtadmin, lib/RT/Interface/CLI.pm, - lib/RT/Interface/Email.pm: - - Bringing forward a security fix from 2.0.8_01. (nonusers could get superuser permissions from the CLI) - -2001-10-31 02:37 jesse - - * webrt/: Elements/MyRequests, Elements/MyTickets, - Ticket/Create.html: - - Fixed a display bug in mytickets and myrequests which prevented clicking on - subjectless email - -2001-10-31 02:04 jesse - - * etc/: config.pm, schema.Pg, schema.mysql, schema.pm: - - Lengthened queue name and email addresses in the default DB schema - -2001-10-31 02:02 jesse - - * webrt/Ticket/Update.html, lib/RT/Interface/Web.pm: - - Now show the current ticket subject by default in the update subject box. - But don't include it in the transaction if it hasn't changed. - -2001-10-31 01:09 jesse - - * Makefile, bin/rt, bin/rt-mailgate, bin/rtadmin, - lib/RT/Interface/CLI.pm, lib/RT/Interface/Email.pm: - - Security fixes per Jay at mojomole - -2001-10-25 17:40 jesse - - * webrt/Search/Listing.html: - - Fixed a bug in new listing display. introduced after 2.0.8 - -2001-10-24 14:10 jesse - - * Makefile, lib/RT/Ticket.pm: - - Fixed the ticket status changes from open to open bug, thanks to raphael - at linkvest. - -2001-10-23 17:34 jesse - - * webrt/Ticket/Create.html: - - Some cleanups to the Create form. No new functionality, just a little bit prettier - -2001-10-23 17:34 jesse - - * webrt/Elements/SelectTicketSortBy: - - Elements/SelectTicketsSortBy now uses new list of sortable Tickets fields - in Tickets.pm - -2001-10-23 17:32 jesse - - * webrt/Search/Listing.html: - - Column headings in searches are now clicky, where possible - -2001-10-23 17:31 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - URLs in ticket history should now be clicky - -2001-10-23 17:26 jesse - - * webrt/Elements/CustomHomepageHeader: - - file CustomHomepageHeader was initially added on branch rt-1-1. - -2001-10-23 17:26 jesse - - * webrt/: index.html, Elements/CustomHomepageHeader: - - Added a hook for sites to put their own html in the top of the "Home" page - -2001-10-23 17:24 jesse - - * webrt/Elements/: SelectNewTicketQueue, SelectQueue: - - Frefactored SelectQueue to elimintate dupicate code and enable a "too many queues" option - -2001-10-23 17:22 jesse - - * lib/: RT.pm, RT/Date.pm, RT/Keyword.pm, RT/KeywordSelect.pm, - RT/Keywords.pm, RT/Link.pm, RT/Links.pm, RT/ObjectKeywords.pm, - RT/Record.pm, RT/Scrip.pm, RT/ScripActions.pm, - RT/ScripConditions.pm, RT/Ticket.pm, RT/Action/SendEmail.pm, - RT/Condition/Generic.pm, RT/Interface/CLI.pm, - RT/Interface/Email.pm: - - Simple fixes to POD from Feargal Reilly to fix complaints from pod2man - -2001-10-23 17:08 jesse - - * lib/RT/Tickets.pm: - - Refactored Tickets.pm a bit to provide better access to fields - that tickets can be sorted on. - -2001-10-23 17:06 jesse - - * etc/: config.pm, schema.Pg, schema.mysql, schema.pm: - - Added some new indices, based on recommendations from Nobel Tse at Outblaze - - Started to cleanup config.pm to not use deprecated methods when displaying - ticket columns. - -2001-10-19 15:44 jesse - - * Makefile, bin/initacls.Pg, bin/initacls.mysql, tools/initdb: - - Reverting last patch. it lead to too much brokenness - -2001-10-19 15:16 jesse - - * Makefile, bin/initacls.Pg, bin/initacls.mysql, tools/initdb: - - Work on the install procedure to automate it some more. (automatically supply - passwords defined in the makefile) - -2001-10-19 00:49 jesse - - * Makefile: - - Bumped version to 2.0.9pre1 - -2001-10-19 00:46 jesse - - * docs/design_docs/cvs_integration: - - file cvs_integration was initially added on branch rt-1-1. - -2001-10-19 00:46 jesse - - * webrt/NoAuth/images/rt.jpg: - - file rt.jpg was initially added on branch rt-1-1. - -2001-10-19 00:46 jesse - - * rt.spec, docs/design_docs/cvs_integration, etc/config.pm, - webrt/rt.jpg, webrt/Elements/Header, webrt/Elements/TitleBoxEnd, - webrt/Elements/TitleBoxStart, webrt/NoAuth/images/rt.jpg, - webrt/SelfService/Elements/Header: - - Refactored images path to have a configurable URL, so it will work with fastcgi ;) - -2001-10-19 00:37 jesse - - * webrt/: Elements/Footer, autohandler: - - Added support for timing of page display with &Debug=1 - -2001-10-19 00:29 jesse - - * lib/RT/User.pm: - - User.pm: a fix to allow you to create multiple users with no email address. - -2001-10-19 00:25 jesse - - * lib/RT/Tickets.pm: - - Added sub Due to Tickets.pm. fixes #910 - -2001-10-19 00:17 jesse - - * etc/rt.spec: - - file rt.spec was initially added on branch rt-1-1. - -2001-10-19 00:17 jesse - - * Makefile, rt.spec, etc/rt.spec: - - Some work on the rpm build infrastructure - -2001-10-19 00:03 jesse - - * tools/cpan2rpm: - - cpan2rpm doesn't repeat builds of the same distribution, even if we're looking for differnet modules - -2001-10-18 23:30 jesse - - * tools/cpan2rpm: - - cpan2rpm has been cleaned up a whole lot. it should actually be somewhat smarter about not doing the same work twice - -2001-10-18 22:42 jesse - - * tools/cpan2rpm: - - Added cpan2rpm to the tools directory, for autogenerating rpms of cpan modules - -2001-10-18 22:42 jesse - - * tools/cpan2rpm: - - file cpan2rpm was initially added on branch rt-1-1. - -2001-10-18 21:20 jesse - - * Makefile, rt.spec: - - Added support for autobuilding an rpm with "make rpm" - -2001-10-18 02:15 jesse - - * tools/insertdata: - - Fixed templates to include the ticket subject if it was otherwise blank - -2001-10-18 02:14 jesse - - * lib/RT/Interface/Web.pm, webrt/Ticket/Display.html: - - work on web-based ticket creation. fixed bugs setting due dates, etc - -2001-10-18 02:13 jesse - - * lib/RT/Interface/Email.pm: - - fixed a user creation race condition in the mail gateway - -2001-10-18 02:11 jesse - - * webrt/Elements/SelectStatus: - - use the new status abstraction in the web ui - -2001-10-18 02:08 jesse - - * tools/testdeps: - - moved to a dbix::searchbuilder 0.46 dependency - -2001-10-18 02:07 jesse - - * lib/RT/Tickets.pm: - - Movign away from a deprecated API - -2001-10-18 02:07 jesse - - * tools/initdb: - - initdb won't whine if you don't set a host - -2001-10-18 02:05 jesse - - * docs/design_docs/evil_plans: - - Added some docs about what 2.2 might hold - -2001-10-18 02:00 jesse - - * lib/RT/: Ticket.pm, Queue.pm: - - Abstracted out status enumeration and validation - -2001-10-18 01:57 jesse - - * webrt/Ticket/Elements/EditLinks: - - added WebPath to fix some links in showlinks - -2001-10-17 16:34 jesse - - * lib/Makefile.PL: - - Bumped searchbuilder dependency to 0.46 - -2001-10-17 16:33 jesse - - * webrt/Ticket/Elements/ShowHistory: - - Added an optional bit of configuration to not show the "History" header - -2001-10-06 03:01 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - Added a new option "Show commands" to show tranasaction - -2001-10-06 03:00 jesse - - * webrt/Admin/: Keywords/index.html, Queues/index.html: - - Added support for reenabling deleted queues and keywords - -2001-10-06 02:57 jesse - - * lib/RT/Condition/Generic.pm: - - Added test harness glue - -2001-10-06 02:55 jesse - - * lib/RT/Interface/Web.pm: - - Added code to detect bogus ticket update types - -2001-10-06 02:54 jesse - - * lib/RT/Interface/: CLI.pm, Email.pm: - - Added support for unit testing - -2001-10-06 02:51 jesse - - * lib/RT/Handle.pm: - - Added support for unit testing - - Added a test for Database Port definition to stop perl from whining - -2001-10-06 02:49 jesse - - * lib/RT/: ACE.pm, ACL.pm, Action/Generic.pm, Action/SendEmail.pm, - Attachment.pm, Attachments.pm: - - Added support for unit testing - -2001-10-06 02:46 jesse - - * lib/RT/: Tickets.pm, Transaction.pm, Transactions.pm, User.pm, - Users.pm, Watcher.pm, Watchers.pm, Queues.pm, Record.pm, Scrip.pm, - ScripAction.pm, ScripActions.pm, ScripCondition.pm, - ScripConditions.pm, Scrips.pm, Template.pm, Templates.pm: - - Added support for unit testing - -2001-10-06 02:43 jesse - - * lib/RT/: Keyword.pm, KeywordSelect.pm, KeywordSelects.pm, - Keywords.pm, Link.pm, Links.pm, ObjectKeyword.pm, - ObjectKeywords.pm, CurrentUser.pm, Date.pm, EasySearch.pm, - Group.pm, GroupMember.pm, GroupMembers.pm, Groups.pm: - - Added support for unit testing - -2001-10-06 02:38 jesse - - * lib/RT.pm: - - Added the beginnings of test support to RT.pm - -2001-10-06 02:22 jesse - - * lib/RT/TestHarness.pm: - - file TestHarness.pm was initially added on branch rt-1-1. - -2001-10-06 02:22 jesse - - * lib/: Makefile.PL, RT/TestHarness.pm: - - First bits of glue for new RT unit testing infrastructure - -2001-10-06 02:19 jesse - - * bin/rt: - - bin/rt: Documentation cleanups. removing an unnecessary data tainting check - -2001-10-06 02:18 jesse - - * bin/initacls.Pg: - - Fixes to initacls.Pg to allow installation with Unix Domain sockets - -2001-10-04 02:01 jesse - - * Makefile: - - Bumped the version to 2.0.8 - -2001-10-01 02:44 jesse - - * rt.spec: - - Revved the version of DBIx::SearchBuilder needed in the .spec file - -2001-10-01 02:42 jesse - - * Makefile, lib/RT/Interface/Email.pm: - - Fixed the call to MIME::Entity::Build in Email.pm - - Bumped the version to 2.0.8pre3 - -2001-09-30 23:03 jesse - - * README, bin/rt, lib/RT/Tickets.pm, lib/RT/Interface/Email.pm, - webrt/Search/PickRestriction, webrt/Ticket/History.html, - webrt/Ticket/Elements/EditBasics, - webrt/Ticket/Elements/ShowHistory: - - Code refactoring to allow searching for nonlocal links - Cleanup to the Loop prevention stuff (v. 2.0.8pre2) - Readme cleanup - CLI cleanups. changed "return" to "exit" - -2001-09-26 16:31 jesse - - * tools/testdeps: - - Bumped the searchbuilder dependency. to 0.43 - -2001-09-26 16:28 jesse - - * Makefile, bin/rt, lib/RT/Tickets.pm, - webrt/Admin/Queues/Scrips.html: - - Added a fix for ItemsArrayRef to Tickets which causes the Next/Prev links in - the web ui to be smarter. - - Fixed a typo in SCrips.html - - Bumped the version to 2.0.8pre2 - -2001-09-24 20:10 jesse - - * rt.spec: - - file rt.spec was initially added on branch rt-1-1. - -2001-09-24 20:10 jesse - - * Makefile, rt.spec: - - Added destdir support to allow building of RPMS. - added rt.spec for building of RPMS. - -2001-09-21 16:51 jesse - - * Makefile: - - Bumped makefule version to 2.0.8pre1 - -2001-09-21 16:45 jesse - - * bin/rt, lib/RT/Ticket.pm, lib/RT/Transaction.pm, - lib/RT/Interface/Web.pm, webrt/Ticket/Elements/ShowTransaction: - - Fixed a typo in the bin/rt docs - Allowed "Force owner change" from bulk update screen. - -2001-09-20 22:34 jesse - - * bin/rt, lib/RT/Action/SendEmail.pm, lib/RT/Interface/Email.pm, - webrt/Search/Bulk.html, webrt/Ticket/Elements/ShowTransaction: - - Fixes for: - - 888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888862 Re: [rt-users] how does rt --limit-last-updated work? - - 863 Ticket/Elements/ShowTransaction doesn't show headers sometimes - - Fix for a bug in the code that prevents RT from looping with itself. - - Start of work for "force change owner" in Bulk.html - -2001-09-19 16:49 jesse - - * bin/initacls.Pg, bin/rt, etc/config.pm, lib/RT/Queue.pm, - lib/RT/Ticket.pm, lib/RT/Tickets.pm, webrt/Elements/Header, - webrt/Search/Listing.html, webrt/Ticket/Create.html, - webrt/Ticket/Display.html, webrt/Ticket/ModifyAll.html, - webrt/Ticket/Update.html, webrt/Ticket/Elements/ShowLinks: - - Fixed a bug that would cause installation on postgres to lose if $PORT wasn't - specified - - Changed " to ' in a few places in the config file, to make file and variable - names with embedded metacharacters not lose as badly - - Set some logical defaults for Queue->Create, so it's not as likely to fail - to create a queue if you leave out some fields - - Ticket->Create: now takes a Starts date. Also, fixed some API docs. - - Tickets: Negative searching on fields like "subject" should now work - - WebUI: Added a pragma NO-CACHE pseudo-header, to stop overzealous browsers from caching RT's pages - - WebUI: changed the "Bookmark this search" link to "Bookmarkable URL for this search" - - WebUI: ticket create now has a "more detail" section - - WebUI: ticket updates no longer have a default subject preset. - - WebUI: fixed a bug in ShowLinks that generated bogus urls within RT if RT wasn't at / on your server - -2001-09-13 00:03 jesse - - * Makefile: - - Bumping the version to 2.0.7 - -2001-09-10 02:18 jesse - - * Makefile: - - Bumped the makefile version to 2.0.7pre1 - -2001-09-10 02:11 jesse - - * bin/mason_handler.fcgi, lib/RT/User.pm: - - Fixed #883, a permissions caching bug. - - Added the Text::Wrapper dependency to mason_handler.fcgi - -2001-09-06 15:59 jesse - - * lib/RT/Ticket.pm: - - Reverted reopen on correspondence to 1.0 behaviour - -2001-09-06 15:41 jesse - - * webrt/SelfService/Display.html: - - make row coloring alternate in selfservice transaction history - -2001-09-06 15:39 jesse - - * webrt/SelfService/Display.html: - - Fixed cell spacing in selfservice transaction display - -2001-09-06 15:33 jesse - - * bin/webmux.pl, webrt/SelfService/Display.html, - webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowHistory, - webrt/Ticket/Elements/ShowKeywordSelects, - webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction: - - Cleaned up the web ticket transaction display. - -2001-09-06 15:32 jesse - - * lib/RT/: ObjectKeyword.pm, Queue.pm: - - Added some docs. - Started refactoring Ticket statuses. - -2001-09-06 15:32 jesse - - * lib/RT/Ticket.pm: - - $Ticket->SetTold now optionally takes a date to set it to. - -2001-09-06 15:30 jesse - - * bin/rt: - - Fixing some docs in bin/rt - -2001-09-05 11:00 jesse - - * webrt/Elements/: Header, Refresh: - - Fix for #823 from martin@schapendonk.org - Refresh now allows you to turn off refresh. - -2001-09-01 19:01 jesse - - * webrt/Elements/MessageBox: - - Fix for [fsck.com #803] Jumbo recording comments accidentally - -2001-09-01 18:23 jesse - - * Makefile: - - Bumped the version to 2.0.6 - -2001-08-28 15:49 jesse - - * Makefile: - - Bumped the version to pre7, fixed a typo in the makefile's install instructions. - -2001-08-24 00:13 jesse - - * lib/RT/Attachment.pm: - - importing the Crit->crit typo fix from 2.0.5_01 - -2001-08-24 00:08 jesse - - * Makefile, lib/RT/Interface/Email.pm: - - Rolled in the 2.05 perl 5.005 compatibility fix. - bumped the version to 2.0.6pre6 - -2001-08-23 19:49 jesse - - * bin/rt-mailgate, tools/initdb: - - fixed initdb to not append a port= to the db connect string unless it needs one. - - added support for $SenderMustExistInExternalDatabase to mailgate. - -2001-08-23 19:46 jesse - - * lib/RT/Groups.pm: - - Added a default alphabetical sort order to lib/RT/Groups - -2001-08-23 19:45 jesse - - * etc/: config.pm, schema.Pg, schema.mysql, schema.pm: - - Added new indices to schema. Regenerated mysql and postgres schema. - - Cleaned up etc/config.pm's docs some more, based on comments from Christian Gimore - Added a default value for RT::OwnerEmail, which was documented by not defined - by default - -2001-08-22 18:48 jesse - - * bin/rt, lib/RT/Ticket.pm, webrt/Ticket/Update.html: - - bin/rt --create now deals with watchers. - - fixed a typo in Ticket/Update.html introduced after 2.0.5_03 - -2001-08-22 01:37 jesse - - * Makefile, lib/RT/Tickets.pm, webrt/Admin/Global/Keywords.html: - - Bumped version to 2.0.6-pre5 - - Fixed 'deep' merges. - - Fixed a typo in Global/Keywords - -2001-08-22 00:41 jesse - - * Makefile, lib/RT/Interface/Email.pm: - - Fixed a couple of bugs in the new email db lookups - -2001-08-21 23:57 jesse - - * Makefile, bin/initacls.Oracle, bin/initacls.Pg, - bin/initacls.mysql, tools/initdb: - - Added support for setting the database port for postgres and mysql - -2001-08-21 23:48 jesse - - * README: - - Updated jesse's email address and shuffled things around a bit. - -2001-08-21 23:45 jesse - - * etc/config.pm: - - Added more docs and updated the default config for the external db lookups - -2001-08-21 23:35 jesse - - * webrt/: index.html, NoAuth/webrt.css, Search/Listing.html, - Search/PickRestriction, Ticket/ModifyDates.html, - Ticket/Update.html, Ticket/Elements/ShowHistory, - Ticket/Elements/ShowTransaction: - - Added support for autorefresh to / and /Search/Listing.html - - Tightened up Transaction display. Fixed 'full headers' display. - - Cleaned up the ui in ModifyDates a bit - - Cleaned up the ui in Ticket/Update.html - - fixed a few typos in the css file - -2001-08-21 23:30 jesse - - * lib/RT/Attachment.pm: - - Added some documentation - -2001-08-21 23:25 jesse - - * bin/rt-mailgate: - - Bringing forward a patch to the mailgate from 2.0.5_01 - -2001-08-21 23:19 jesse - - * webrt/Elements/Refresh: - - file Refresh was initially added on branch rt-1-1. - -2001-08-21 23:19 jesse - - * webrt/Elements/Refresh: - - Commiting a Refresh control to cvs - -2001-08-21 23:17 jesse - - * bin/rtadmin: - - Fixed cli group creation - -2001-08-21 23:12 jesse - - * webrt/Elements/MessageBox: - - Fixed transaction quoting to use the new transaction content quoting method. - -2001-08-21 23:07 jesse - - * webrt/Elements/Login: - - Display a version string in the login box. - -2001-08-21 23:06 jesse - - * webrt/Elements/Header: - - Added support for refresh to webrt/Elements/Header - Don't display the logout link if using external auth. - -2001-08-21 23:05 jesse - - * webrt/Admin/Users/Modify.html: - - Little bit of ui and code cleanup to the User editing page - -2001-08-21 23:04 jesse - - * lib/RT/Record.pm: - - Fixed broken caching of the CreatorObj - -2001-08-21 23:03 jesse - - * lib/RT/Handle.pm: - - Added support for Database port to Handle.pm - -2001-08-21 22:50 jesse - - * lib/RT/Interface/Web.pm: - - Added vivek khera's patch to clean up newline processing for incoming messages - - Removed debugging output from file attachment subroutine - - Added support for setting refresh interval to the search page - -2001-08-21 22:46 jesse - - * lib/RT/Interface/Email.pm: - - Fixed the bug fixed in 2.0.5_?? which called the wrong function for finding - sender name - - Altered the mail interface's external user lookup function to be returned - a hash of parameters - -2001-08-21 22:43 jesse - - * lib/RT/Transaction.pm: - - Added support for Quoting a transaction to the Content sub. - -2001-08-16 00:23 jesse - - * Makefile, tools/testdeps: - - dependency on CGI::Cookie 1.20 had reverted. - Bumped version to 2.0.5_03 - -2001-08-15 16:44 jesse - - * Makefile, bin/rt-mailgate, lib/RT/Interface/Email.pm: - - A couple of fixes to the mail gateway to deal with proper processing - of sender email addresses - -2001-08-15 16:12 jesse - - * lib/RT/Interface/Email.pm: - - Trying for 2.0.5-01 again - Fixed a perl 5.6ism in Interface/Email - Fixed a bug in Attachment.pm that would cause a DIE on a fatal error - -2001-08-15 16:12 jesse - - * lib/RT/Attachment.pm: - - Trying for 2.0.5-01 again - Fixed a bug in Attachment.pm that would cause a DIE on a fatal error - -2001-08-15 16:12 jesse - - * Makefile: - - Trying for 2.0.5-01 again - -2001-08-15 15:44 jesse - - * lib/RT/Interface/Email.pm: - - Fixed an error message in Attachment that should never be reached - Bumped the Makefile version to 2.0.5_01 - Fixed an inadvertent perl 5.6ism in the mail gateway. - -2001-08-15 15:42 jesse - - * lib/RT/Attachment.pm: - - Fixed an error message in Attachment that should never be reached - - Bumped the Makefile version to 2.0.5_01 - -2001-08-15 15:42 jesse - - * Makefile: - - Bumped the Makefile version to 2.0.5_01 - -2001-08-15 01:01 jesse - - * Makefile: - - Bumped version to 2.0.6-pre1 - -2001-08-15 01:00 jesse - - * webrt/: autohandler, Admin/Users/Modify.html, Elements/Login, - SelfService/Prefs.html, User/Prefs.html: - - Added support for external authentication to the web ui - -2001-08-15 01:00 jesse - - * bin/rt-mailgate, lib/RT/Interface/Email.pm: - - Added support for looking up new users in an external datasource - -2001-08-15 00:58 jesse - - * etc/config.pm: - - Added new configuration variables for external authentication for the web ui and - to support looking up new users in the mail gateway from a site-defined external datasource. - -2001-08-15 00:17 jesse - - * tools/testdeps: - - Fixed testdeps to depend on the right version of CGI.pm - -2001-08-14 23:55 jesse - - * Makefile: - - Released RT 2.0.5 No changes since 2.0.5-test3. - -2001-08-12 21:13 jesse - - * Makefile, bin/webmux.pl: - - Fixed a typo in webmux.pl created after 2.0.4 - Bumped the version to 2.0.5-test3 - -2001-08-12 20:00 jesse - - * docs/manual.pod, lib/RT/Transaction.pm: - - Core: Updated Transaction->Content to be smarter about showing the first - message in the transaction. - - Removed the old manual skeleton in docs in favor of the web based docs. - -2001-08-12 19:58 jesse - - * lib/RT/Attachment.pm: - - Core: Added a convenience function to RT::Attachemnt to find Children of this attachment. - Core: Added code to RT::Attachemnt to allow access to the 'Parent' attribute - -2001-08-12 19:55 jesse - - * lib/RT/Attachments.pm: - - Core: A convenience function to search for Attachments by ContentType. - Core: Added some docs to RT::Attachments - -2001-08-12 19:53 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - WebUI: Show 'comment' and 'correspond' for multipart messages in the per-transaction listing. - -2001-08-10 23:59 jesse - - * README: - - README: added more pointers to the 'complete' docs. - README: Removed the little bit of configuration info in the readme in favor of the 'complete' docs on the web - -2001-08-10 23:58 jesse - - * bin/rt-mailgate: - - mailgate: RT is now less likely to try to send mail to senders which will cause loops - -2001-08-10 23:57 jesse - - * webrt/index.html: - - Webui: [home] now gets greyed out when you're there - -2001-08-10 15:32 jesse - - * Makefile, webrt/Elements/MessageBox: - - Added a pair of () in webrt/Elements/MessageBox to correct a typo in an if - Bumped version to 2.0.5-test2 - -2001-08-10 00:24 jesse - - * Makefile: - - Bumped version to 2.0.5test1 - -2001-08-10 00:24 jesse - - * lib/RT/Users.pm, webrt/Elements/MessageBox, - webrt/Ticket/Elements/AddWatchers, webrt/Ticket/Elements/EditDates: - - Cleanup to date editing ui - - Code cleanups to Elements/MessageBox for more readable and maintainable code - Code cleanups to TicketElements/AddWatchers for more readable and maintainable code - -2001-08-10 00:23 jesse - - * webrt/Ticket/Elements/: EditLinks, ShowLinks: - - Cleanup to Relationship editing and display ui - -2001-08-10 00:21 jesse - - * webrt/Ticket/ModifyDates.html: - - UI cleanups in Ticket/ModifyDates.html - -2001-08-10 00:20 jesse - - * webrt/Ticket/ModifyAll.html: - - Jumbo no longer loses ticket update contents. - -2001-08-09 20:07 jesse - - * webrt/Admin/Users/index.html: - - Cleaned up Admin/Users search functionality and made it look more like - other user searching screens and enables searching for disabled users. - -2001-08-09 20:02 jesse - - * lib/RT/Interface/Web.pm: - - Properly strip trailing spaces from things we're trying to link to. - -2001-08-09 20:00 jesse - - * lib/RT/Links.pm: - - By default, try to sort Links by something intelligent when displaying them - -2001-08-03 01:52 jesse - - * lib/RT/Action/Autoreply.pm: - - Autoreplies are now from "Queuename" rather than from "RT" - -2001-08-02 04:57 jesse - - * webrt/: Admin/Queues/People.html, Elements/Quicksearch, - Elements/SelectResultsPerPage, Elements/SelectStatus, - Search/PickRestriction: - - WebUI: Fixed a typo in hte 'bookmark this search' link display. - WebUI: By default, limit displayed results to 50 per page. - -2001-08-02 04:57 jesse - - * lib/RT/Interface/Web.pm: - - Documented a function in the web ui library - -2001-08-02 04:56 jesse - - * etc/config.pm: - - Fixed a typo in the docs in the config file, thanks to sheeri. - -2001-08-02 04:55 jesse - - * bin/rt-mailgate: - - rt-mailgate: bug-fix to properly grab 'from' addresses for purposes of determinigng whether something's a mailer-daemon - -2001-08-02 04:54 jesse - - * bin/rt: - - Added support for merging to the CLI - Cli now works as described when linking tickets. Formerly, you couldn't admit the "+" before an added link - -2001-08-02 04:53 jesse - - * webrt/User/Prefs.html: - - Bugfix to allow users to fully delete their rt signatures - -2001-07-30 03:54 jesse - - * docs/design_docs/evil_plans: - - file evil_plans was initially added on branch rt-1-1. - -2001-07-30 03:54 jesse - - * Makefile, docs/design_docs/evil_plans: - - bumped the version, so as not to get confused users complaining to the lists - - added some notes about what may happen for 2.2 - -2001-07-30 03:52 jesse - - * webrt/SelfService/Display.html: - - file Display.html was initially added on branch rt-1-1. - -2001-07-30 03:52 jesse - - * bin/mason_handler.fcgi, bin/webmux.pl, lib/RT/Interface/Web.pm, - webrt/SelfService/Create.html, webrt/SelfService/Details.html, - webrt/SelfService/Display.html, webrt/SelfService/Update.html, - webrt/SelfService/Elements/GotoTicket, - webrt/SelfService/Elements/MyRequests, webrt/Ticket/Create.html, - webrt/Ticket/Display.html, webrt/Ticket/Modify.html, - webrt/Ticket/ModifyAll.html, webrt/Ticket/ModifyDates.html, - webrt/Ticket/ModifyLinks.html, webrt/Ticket/ModifyPeople.html, - webrt/Ticket/Update.html, webrt/Ticket/Elements/EditBasics, - webrt/Ticket/Elements/ShowTransaction: - - Switched SelfService/Details to SelfService/Display to better jibe - with the regular UI. - - Added better current-page navigation hints to most per-ticket pages. - - Added support for uploading attachments on ticket create or update. - -2001-07-30 03:51 jesse - - * webrt/Admin/Elements/ListGlobalScrips: - - file ListGlobalScrips was initially added on branch rt-1-1. - -2001-07-30 03:51 jesse - - * webrt/Admin/: Elements/ListGlobalKeywordSelects, - Elements/ListGlobalScrips, Global/Scrips.html, - Queues/Keywords.html, Queues/Scrips.html: - - Added some ui to show global scrips and keywordselects in the queue - uis for adminning the same. - -2001-07-30 03:51 jesse - - * webrt/Admin/Elements/ListGlobalKeywordSelects: - - file ListGlobalKeywordSelects was initially added on branch rt-1-1. - -2001-07-30 03:49 jesse - - * TODO: - - Clarified the errata urls - -2001-07-30 03:48 jesse - - * lib/RT/Ticket.pm: - - Cleaned up the return values from Ticket->CreateLink. (always return $status, $msg); - -2001-07-30 03:48 jesse - - * lib/RT/Action/SendEmail.pm: - - changed the case of the Managed-by header to be less grating - -2001-07-30 03:45 jesse - - * bin/rt-mailgate, lib/RT/Interface/Email.pm: - - Moving a bunch of mail gateway library routines to the library where they - belong - -2001-07-27 01:06 jesse - - * README: - - fixed a typo in the cronjob - -2001-07-25 01:05 jesse - - * bin/rt-mailgate, lib/RT/Tickets.pm: - - Fix for mailgateway being unable to send error mail with 'sendmailpipe' mailing - Fix for 'blank' searches when using search bookmarking. - -2001-07-25 01:00 jesse - - * Makefile: - - Bumped version to 2.0.4 - Fixed bookmarkable searches - Fix for sendmailpipe errors in mailgateway - -2001-07-24 12:10 jesse - - * Makefile, webrt/Search/PickRestriction: - - Fixed a bug in Search/PickRestriction, thanks to Vivek Khera - Bumped version to 2.0.3 - -2001-07-24 00:28 jesse - - * Makefile: - - Bumped version to 2.0.2 - -2001-07-24 00:21 jesse - - * lib/RT/Tickets.pm, webrt/Elements/Submit, - webrt/Search/Listing.html, webrt/Search/PickRestriction: - - Bookmarked searches now keep track of sorting and record count limits - New "Refine" button to allow faster updates of search criteria. - -2001-07-24 00:01 jesse - - * bin/rt: - - Added support for --limit-queue to RT cli tool - -2001-07-23 10:43 jesse - - * Makefile, tools/testdeps: - - Testdeps was accidentally looking for Freeze::Thaw, rather than FreezeThaw - -2001-07-23 00:31 jesse - - * Makefile: - - bumped version to 2.0.2test2 - -2001-07-23 00:30 jesse - - * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, tools/testdeps, - webrt/Search/Listing.html: - - Added support for bookmarkable searches. - -2001-07-22 22:12 jesse - - * lib/RT/: KeywordSelect.pm, User.pm: - - Better error checking in User ACL checking - - Fixed an ACL check bug in KeywordSelect.pm, thanks to Matthew Stock. - -2001-07-22 22:09 jesse - - * webrt/Admin/Users/index.html: - - Fix for a users search bug and a clarification of another search option. - -2001-07-22 22:06 jesse - - * lib/RT/: Keywords.pm, Queues.pm, Users.pm: - - By default, order Queues, Users and Keywords alphabetically - -2001-07-22 22:05 jesse - - * Makefile: - - Permissions fix for the data dirs for the fastcgi handler - - rt/etc is now mode 755, rather than 555. - -2001-07-22 22:03 jesse - - * bin/mason_handler.fcgi: - - fastcgi handler no longer drops setgidness, so it can deal with session files. - -2001-07-22 21:55 jesse - - * etc/config.pm: - - Cleaned up the config file a bit to make installation easier. - -2001-07-22 21:52 jesse - - * webrt/Elements/MyRequests: - - Clean up phrasing of the "Tickets I own dialogbox" - -2001-07-19 00:57 jesse - - * Makefile: - - Changed Makefile to not use MAN[13]INSTALLSITEPATH per Robert Shaw's changes - -2001-07-18 16:20 jesse - - * Makefile, lib/RT/Queue.pm: - - Added a newline to Queue.pm to fix a pod bug - - Bumped version to 2.0.2-test1 to get some feedback - -2001-07-18 16:16 jesse - - * lib/RT/User.pm: - - RT should now honor queue-level pseudogroup memebership for ACL checks. - Also, simplified some of the queue related ACL checking code. - - Reduced the ACL permissions cache from 30sec to 10sec. - -2001-07-18 16:13 jesse - - * lib/RT/Transaction.pm: - - Added BriefDescription, which is just like Description without the "By actor" - at the end - - Descriptions Keyword operations should include _which_ keyword select from - here on in (also touched the last update to Ticket.pm) - -2001-07-18 16:06 jesse - - * lib/RT/Ticket.pm: - - TTicket->Create no longer just adds admin ccs..unless the person doing the add - has the right to do so. otherwise, there was an ACL related attack that - could happen. luckily none of the UI exposedd this hole yet. - - Ticket->Create should now be able to set keywords on create - - Ticket->Create now reports back non-fatal errors and how they were dealt with - - Ticket->AddKeyword got split into AddKeyword and _AddKeyword. The former - has the acl check and calls the latter. the latter just does the adding. - - Ticket->AddKeyword got a Silent flag, which causes a transaction not - to be written. useful on ticket create. - -2001-07-18 15:59 jesse - - * tools/testdeps: - - Added tests for Apache::Cookie - and DBI 1.18 to testdeps - -2001-07-18 15:53 jesse - - * webrt/SelfService/: Details.html, Update.html: - - Added the ability for requestors to use the self-service ui to comment on / reply to tickets. - -2001-07-18 15:53 jesse - - * webrt/SelfService/Update.html: - - file Update.html was initially added on branch rt-1-1. - -2001-07-17 22:12 jesse - - * webrt/Admin/Queues/People.html: - - Fixed a link to Users/Modify.html in Queue/People.html - -2001-07-17 22:01 jesse - - * bin/webmux.pl: - - Fix to the solaris chown problem - -2001-07-17 18:37 jesse - - * README: - - Fixed typo in the cron job description - -2001-07-13 02:17 jesse - - * lib/RT/Tickets.pm: - - Work on tickets.pm to support some new searching options - -2001-07-12 19:43 jesse - - * Makefile: - - Bumped version to 2.0.1 - -2001-07-11 23:17 jesse - - * etc/config.pm: - - No longer log things of less than 'error' to the logfile - -2001-07-11 23:16 jesse - - * Makefile, bin/mason_handler.fcgi, bin/rt, bin/rt-mailgate, - bin/rtadmin, lib/Makefile.PL, lib/RT.pm, lib/RT/Interface/CLI.pm, - lib/RT/Interface/Email.pm: - - Make sure that the setgid programs don't drop setgidness before trying to open logfiles - -2001-07-10 20:15 jesse - - * Makefile, lib/Makefile.PL, lib/RT/Tickets.pm, - lib/RT/Interface/Web.pm, tools/testdeps: - - Fixes to allow search-by-requestor to search for requestors who don't have RT accounts - -2001-07-10 13:53 jesse - - * bin/webmux.pl: - - Fix for the weird sessiondata permissions bug folks have seen on solaris - -2001-07-10 11:47 jesse - - * lib/RT/Tickets.pm: - - Change to Tickets.pm to fix description of watcher limits - -2001-07-10 11:36 jesse - - * bin/webmux.pl, webrt/Elements/SelectMatch: - - Fixed a bug in webmux.pl that prevented Apache::Cookie support from working - - Fixed a bug in the enw SelectMatch code - -2001-07-10 11:20 jesse - - * lib/RT/Ticket.pm, webrt/Elements/SelectMatch, - webrt/Search/PickRestriction: - - Cleanup to SelectMatch and PickRestriction to clear up the UI issues - with searching for Tickets from a give nrequestor - -2001-07-09 10:36 jesse - - * lib/RT/Template.pm: - - Fixed a typo in Template.pm that squashed templates on outgoing mail. (Bug in my untainting fix) - - Bumped version to 2.0.1-test2 - -2001-07-09 10:36 jesse - - * Makefile: - - Fixed a typo in Template.pm that squashed templates on outgoing mail. (Bug in my untainting fix) - -2001-07-08 22:31 jesse - - * README: - - Added some polite comments about supporting the development of RT - with contracts, cash or gifts - -2001-07-08 20:14 jesse - - * Makefile, bin/mason_handler.fcgi, - webrt/SelfService/Elements/ShowTransaction: - - Bumped version to 2.01pre1 - - Fixed mason_handler header newlines - -2001-07-08 20:12 jesse - - * lib/RT/: ScripAction.pm, ScripCondition.pm, Template.pm, - Ticket.pm: - - Taint fixes for ScripAction, ScripCondtion,Template. - Header wrapping fix in Template.pm. - Fix in Ticket.pm to make EffectiveId a public field. - -2001-07-06 18:32 jesse - - * lib/RT/Attachment.pm: - - Applied a patch from ivan to deal with poorly formed mime messages - and clean up the attachment proccessing code. - -2001-07-06 18:26 jesse - - * webrt/SelfService/Attachment/dhandler: - - file dhandler was initially added on branch rt-1-1. - -2001-07-06 18:26 jesse - - * webrt/: SelfService/Details.html, - Ticket/Elements/ShowTransaction, SelfService/Attachment/dhandler: - - ShowTransaction now no longer displays 'Comment' and 'Reply' if the user - doesn't have the right rights. - - SelfService uses the 'standard' ShowTransaction. - - SelfService now displays Attachments - -2001-07-06 18:21 jesse - - * etc/schema.mysql: - - Switched mysql to use LONGTEXT rather than LONGBLOB to get - case insensitive searching. - -2001-07-06 18:19 jesse - - * bin/mason_handler.fcgi, lib/RT/Interface/Web.pm, - webrt/NoAuth/Logout.html: - - Cleanups to deal better with the fastcgi handler. - - Switched to CGI::Fast from FCGI - - ContentType fixes. - - Logging out now clears the session hash, rather than detaching a perfectly good session. (This gets around an obnoxious tainting issue too) - -2001-07-06 16:14 jesse - - * webrt/Ticket/Attachment/dhandler: - - Changed default attachment type to text/plain from text/html - -2001-07-05 16:48 jesse - - * bin/rt-mailgate, lib/RT/Ticket.pm: - - Updates to make Correspondence on a closed or stalled ticket reopen the ticket - -2001-07-04 00:51 jesse - - * bin/rt: - - bin/rt will now show transactions of type 'text' - -2001-07-04 00:36 jesse - - * bin/webmux.pl: - - Minor fixes to webmux.pl for content type stuff. - -2001-07-03 23:15 jesse - - * lib/RT/Interface/Web.pm, webrt/Admin/Queues/index.html, - webrt/Search/PickRestriction: - - Web ui now supports 'SearchByPriority' - -2001-07-03 23:14 jesse - - * etc/config.pm: - - Added a few comments about configuration variables - -2001-07-03 23:12 jesse - - * webrt/SelfService/Elements/ShowTransaction: - - Now SelfService displays attachments of type 'text' - -2001-07-03 23:08 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - With the web ticket display, now display attachments of type 'text' properly. - Also, always have a download link. - -2001-07-03 23:00 jesse - - * webrt/Ticket/Elements/ShowLinks: - - Changed SubTickets/SuperTickets to Parents/Children - -2001-07-03 22:57 jesse - - * Makefile: - - Added notes to the effect that the speedycgi and fastcgi handlers aren't - supported. - -2001-07-03 22:52 jesse - - * bin/webmux.pl, bin/mason_handler.fcgi, - webrt/Ticket/Attachment/dhandler: - - Switched mod_perl hander to use Apache::Cookie - - Refactored mime type handling to properly set the mime type with the modperl - handler and the fastcgi handler - - Added untainting for the requirred parts of the fastcgi wrapper. - I'm not yet confident that it works properly, but it does the right - thing in the trivial case. - -2001-06-27 00:11 jesse - - * Makefile: - - Bumped version to 2.0 for release to the unsuspecting masses - -2001-06-25 16:28 jesse - - * Makefile, lib/RT/Ticket.pm: - - Fix for a bug introduced by RC2 (while fixing another bug with _Links) - which caused Links listings to recurse rather infinitely. - - Bumped RC2 to RC3 - -2001-06-25 16:25 jesse - - * webrt/Admin/Elements/SelectRights: - - Fix for a crashing bug when editing ACLs without permission - -2001-06-25 12:19 jesse - - * Makefile, lib/RT/Ticket.pm: - - Fixed bug in Ticket.pm -> _Links that caused it to return an error - rather than an empty links object if permission denied. - - Bumped version to RC2 - -2001-06-23 02:48 jesse - - * Makefile, README, tools/import-1.0-to-2.0: - - removed 1.0-2.0 importer. (it's now in the contrib archive) - updated readme and makefile to know about the change. - - Bumped the version to 2.0.0-RC1. Yeah. That's right. the major version - number just got incremented. - -2001-06-22 14:50 jesse - - * Makefile, lib/RT/Ticket.pm: - - hopefully a fix for everyone's favorite import bug. - -2001-06-20 23:56 jesse - - * webrt/Search/Bulk.html: - - Display cleanups to Bulk.html. - Removed bogus nav items - -2001-06-20 17:33 jesse - - * NEWS, lib/Makefile.PL: - - Removed the out of date NEWS file. It's been superceeded by the changelog - -2001-06-20 17:27 jesse - - * Makefile, README, lib/RT/Ticket.pm, lib/RT/User.pm, - lib/RT/Interface/Web.pm, tools/import-1.0-to-2.0, tools/testdeps, - webrt/Ticket/Display.html, webrt/Ticket/History.html: - - Fixes for the import problems some folks have been seeing - Fixes for the Can't click on URL issues reported by mixo and Carl Potter. - Turned off some overly verbose debugging. - - Bumped the version to 1.3.105 - -2001-06-19 00:34 jesse - - * Makefile: - - Bumped version to 1.3.104 - -2001-06-19 00:25 jesse - - * lib/RT/Tickets.pm: - - A fix for search based on keywords that don't exist. (Some rows would be lost, due to poorly constructed SELECT statements. This change requires DBIx::SearchBuilder 0.39 - -2001-06-18 15:39 jesse - - * Makefile, README, webrt/Ticket/Elements/ShowTransaction: - - Updated README to note new RT2 Errata list - Bumped version to 1.3.103 - Added comments in ShowTransaction to let you see exact transaction / ticket Ids - if you view source. - -2001-06-18 15:32 jesse - - * bin/rt: - - Better fomating for cli queue listing. - -2001-06-17 16:45 jesse - - * lib/RT/: Transaction.pm, User.pm: - - Added PurgeTransaction datatype for Transactions. - - Removed debugging code from User.pm - -2001-06-17 14:36 jesse - - * webrt/Ticket/Elements/Tabs: - - Fix for webui error when displaying next/prev tabs on new tix. - -2001-06-15 22:23 jesse - - * Makefile, README: - - Bumped the version to a private pre-test 1.3.103 - -2001-06-15 22:19 jesse - - * README, lib/RT/Ticket.pm, lib/RT/User.pm: - - Debugging fixes for import oddness folks are having - -2001-06-15 01:13 jesse - - * webrt/Search/Bulk.html: - - removed debugging output from bulk.html - -2001-06-14 15:53 jesse - - * Makefile, lib/RT/Transactions.pm, - webrt/Ticket/Elements/AddWatchers: - - Installation path of man pages is now configurable - By default Transactions should now be ordered by date, no matter what their id sequence is. - Fixed an html typo in Tickets/Elements/AddWatchers - - Bumped version to 1.3.102 - -2001-06-14 03:21 jesse - - * Makefile: - - Bumped the version to 1.3.101 - -2001-06-14 02:47 jesse - - * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, webrt/Elements/Tabs, - webrt/Ticket/Elements/Tabs: - - Comments in Ticket.pm about less than optimal design - Enhancments to Interface/Web for the bulk ticket manipulation tool. - Search navigation was cleaned up a bunch. - -2001-06-14 01:52 jesse - - * webrt/Search/Bulk.html: - - file Bulk.html was initially added on branch rt-1-1. - -2001-06-14 01:52 jesse - - * webrt/Search/: BuildSearch, Bulk.html, Listing.html, QueueFooter, - QueueHeader, QueueItem: - - Be vewwy vewwy quiet. I'm hunting cweeping features. - Like the brand new Bulk Ticket manipulator - - Removed some cruft from the repository. (unused files from tobix' first - search implementation) - -2001-06-13 03:53 jesse - - * Makefile: - - Bumped version to 1.3.100 - -2001-06-13 03:52 jesse - - * bin/mason_handler.fcgi: - - The fastcgi handler works for everything except attachment viewing. I'm going to have to think a bit about how to set - content type properly in a nice handler-agnostic manner. - -2001-06-13 03:51 jesse - - * bin/rt-mailgate: - - Fixed a warn -> warning in mailgate's logging - -2001-06-13 03:50 jesse - - * lib/RT/Interface/Web.pm: - - Adjusting spacing - -2001-06-13 03:50 jesse - - * webrt/Ticket/Elements/Tabs: - - - Added an error check to the new navigation bars to deal with a possible lack of active search - -2001-06-12 21:28 jesse - - * etc/config.pm: - - Clarified required permissions for the RT Logdir - -2001-06-12 19:12 jesse - - * etc/config.pm, lib/RT/Queue.pm, lib/RT/Transaction.pm: - - Cleaned up some docs in config.pm and Queue.pm - Updated the Transaction Descriptions in transaction.pm to make sure - that the Actor is listed. - -2001-06-12 18:08 jesse - - * webrt/Ticket/Elements/Tabs: - - Added links to navigate within an existing search. - -2001-06-08 23:57 jesse - - * webrt/Ticket/Elements/EditKeywordSelects: - - Made "(empty)" the same between "EditKeywordSelects" and "SearchByKeywordSelect" - -2001-06-08 23:51 jesse - - * lib/RT/Ticket.pm: - - Ability to set owner by name when creating tickets. - Ability to set timeleft when creating tickets - -2001-06-08 23:00 jesse - - * Makefile, README, etc/schema.Pg, lib/RT/Ticket.pm: - - Added an index to etc/schema.Pg - Ticket.pm->Create now passes through a few more values that were missing. - - Added doc on imports w/ postgres to the readme. - - bumped the version to 1.3.99 - -2001-06-08 18:32 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Fix for merging more than one ticket. - Fix for req2rt which imported transactions in reverse order. - -2001-06-07 16:02 jesse - - * Makefile, lib/RT/Queue.pm, tools/import-1.0-to-2.0: - - Catch a possibly undefined value in Queue::AddWatcher - Bumped verion to 1.3.97 - another attempt at fixing the owner change generation code in import. - -2001-06-07 14:59 jesse - - * tools/import-1.0-to-2.0: - - The importer now imports the root user and the general queue. - -2001-06-07 12:44 jesse - - * Makefile, etc/config.pm, lib/RT/Interface/Web.pm: - - Support for a seperate local component root for local WebRT mods and additions. - -2001-06-06 17:25 jesse - - * README: - - Added instructions for migrating 1.0 instances to 2.0 - -2001-06-06 16:15 jesse - - * Makefile: - - Bumped version to 1.3.95 - -2001-06-06 16:15 jesse - - * tools/import-1.0-to-2.0: - - Importer should now import tickets created by the req importer - -2001-06-06 16:12 jesse - - * bin/initacls.Pg: - - initacls.Pg should now handle pg database on remote machine - -2001-06-06 16:05 jesse - - * webrt/Ticket/Elements/ShowRequestor: - - Don't show the 'About this Requestor' box if the user is privileged. - -2001-06-06 15:37 jesse - - * lib/RT/Date.pm: - - Now date comparisons against never dtrt. - -2001-06-06 15:30 jesse - - * lib/RT/Interface/Web.pm: - - Search by content now works on the web - -2001-06-06 14:22 jesse - - * webrt/Admin/Groups/Members.html: - - Fix for #552: spurious warning when going into group membership editor - -2001-06-06 14:14 jesse - - * webrt/Ticket/Elements/EditKeywordSelects: - - keywordSelect selction fix (fsck #555) - -2001-06-06 10:57 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Removed spurious 'u' from line 1 of importer. - bumped version to 1.3.95-test2 - -2001-06-06 09:39 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Possible fix for jens' user import troubles. - bounced version to 1.3.95-test1 - -2001-06-06 02:12 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Importer wasn't properly grabbing ACLs. Bumped version to 1.3.94 - -2001-06-06 01:33 jesse - - * tools/import-1.0-to-2.0: - - Fixed a bug in the 'Make users superusers' code in the importer - -2001-06-06 00:41 jesse - - * lib/RT/Ticket.pm: - - fixed a missing =cut (end of perldoc in ticket.pm - -2001-06-06 00:40 jesse - - * Makefile, tools/import-1.0-to-2.0: - - fixing a typo in importer's mime parser - -2001-06-06 00:19 jesse - - * Makefile, lib/Makefile.PL, lib/RT/Action/Notify.pm, - lib/RT/Action/SendEmail.pm, tools/testdeps: - - Cleaned up some dependencies - RT should no longer send mail when there are no recipients. thanks to the nice folks at Sensarray.com for some good debugging. - -2001-06-05 23:16 jesse - - * Makefile, bin/webmux.pl, tools/import-1.0-to-2.0: - - Fixed some bogus header parsing in import. - web mux now tries to chown files again. (christian's going to test it again ;) - Bumped to 1.3.91 for a release - -2001-06-05 11:34 jesse - - * webrt/Admin/Users/Modify.html: - - Rephrased the "Privileged" checkbox in AdminUsers. - -2001-06-05 11:18 jesse - - * Makefile, bin/webmux.pl, tools/import-1.0-to-2.0, - webrt/NoAuth/Logout.html: - - webmux no longer tries to chown its data directories on startup - import now handles final_priority - Logout.html now refreshes to a login page - -2001-06-05 10:42 jesse - - * Makefile, tools/import-1.0-to-2.0: - - When we added support for 'priority' transactions, we accidentally broke - support for 'subject' transactions. fixed now. - -2001-06-05 03:25 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Import tool now handles priority changes. - -2001-06-05 02:56 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Minor tweak to importer to try even harder to find users in the database before creating new ones. - -2001-06-05 02:32 jesse - - * Makefile, tools/import-1.0-to-2.0: - - importer is now less likely to try to greate nonexitent empty users. - - Makefile now chgrps web ui datafiles - -2001-06-05 00:06 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Removed out of date comments in the importer - Made the importer grab its libraries from the makefile. (Turned off testing code) - -2001-06-05 00:01 jesse - - * Makefile: - - Bumped the version # to 1.3.84 for immediate release - -2001-06-04 23:50 jesse - - * Makefile, lib/RT/Ticket.pm, tools/import-1.0-to-2.0: - - Cleanups to Ticket->Import - import-1.0-to-2.0 now deals with dates right. - -2001-06-04 20:52 jesse - - * lib/RT/Link.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - tools/import-1.0-to-2.0: - - Cleanup to Ticket, Link and User. - - merge now works on import. - - most everything in import other than ticket dates should work now. - -2001-06-04 01:34 jesse - - * tools/import-1.0-to-2.0: - - more cleanup - -2001-06-04 00:03 jesse - - * tools/import-1.0-to-2.0: - - First cut at importing queue adminccs and acls - -2001-06-03 22:16 jesse - - * tools/import-1.0-to-2.0: - - Cleanup and better progress indication - -2001-06-03 13:33 jesse - - * lib/RT/Record.pm, lib/RT/Ticket.pm, tools/import-1.0-to-2.0: - - More work on the importer. now it gets transaction creators right and catches requestor email addreses. - -2001-06-03 03:43 jesse - - * lib/RT/Ticket.pm, lib/RT/Transaction.pm, tools/import-1.0-to-2.0: - - Transaction.pm now allows the caller to turn off scrips (for import) - Ticket.pm now has a mostly working import method. - import-1.0-to-2.0 seems to have some basic functionality. it's not _working_ yet, but it - will do most of what we want it to. - -2001-06-02 20:36 jesse - - * webrt/Ticket/Display.html: - - Fix for Ticket #537 Crash when creating ticket without permission to view ticket - -2001-06-02 14:22 jesse - - * tools/import-1.0-to-2.0: - - added a couple of todos to the import tool - -2001-06-02 14:14 jesse - - * Makefile, tools/import-1.0-to-2.0: - - Work on the importer. it now runs. (note that it probably won't yet _import_ anything) - -2001-06-02 12:58 jesse - - * Makefile, bin/webmux.pl, lib/RT/Ticket.pm, lib/RT/Transaction.pm: - - Bumped the version to 1.3.84 - - Once again chown mason data directory in webmux.pl, this time - using more reliable, dynamic userids, rather than compiled in defaults. - - Added an 'import' method to Ticket, for the RT1 importer. - - Added a Subject method to transaction, to simplify the lives of template authors - -2001-06-01 23:38 jesse - - * tools/: import-1.0-to-2.0, insertdata: - - Cleaned up some names and descriptions in insertdata - - First checkin of outline of code of import tool. It's never been run. - It's incomplete. - -2001-06-01 23:38 jesse - - * tools/import-1.0-to-2.0: - - file import-1.0-to-2.0 was initially added on branch rt-1-1. - -2001-05-31 23:27 jesse - - * lib/RT/Tickets.pm: - - Cleaned up Tickets->LimitQueue a bit - -2001-05-31 21:22 jesse - - * Makefile, tools/testdeps: - - Fixed testdeps to use new searchbuilder. bumped version to 1.3.83 - -2001-05-31 21:14 jesse - - * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, - webrt/Elements/SelectKeyword: - - Logic fixes for keyword select negation - -2001-05-31 20:30 jesse - - * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, - webrt/Elements/SelectKeyword: - - Added support for "Tickets without keyword 'foo'. - -2001-05-31 17:32 jesse - - * bin/webmux.pl, lib/RT/Interface/Web.pm, - webrt/Ticket/Attachment/dhandler: - - Fix for #522: attachments without names got short shrift. - webRT now dies rather than run when users can't log in due to a permissions - bug. - -2001-05-31 02:57 jesse - - * etc/: schema.Pg, schema.mysql: - - Cleaned up the table indices a bit. for mysql, yanked duplicate indices. - for Pg, added an index (we need to regen the schema for pg soon) - -2001-05-31 02:46 jesse - - * Makefile, lib/RT/Interface/Web.pm, webrt/Ticket/ModifyAll.html, - webrt/Ticket/ModifyPeople.html, webrt/Ticket/Elements/AddWatchers, - webrt/Ticket/Elements/EditPeople: - - You can now add watchers by email address - Bumped version to 1.3.82 - -2001-05-29 15:58 jesse - - * webrt/Ticket/Attachment/dhandler: - - Fixed the attachments display bug. - -2001-05-29 15:48 jesse - - * lib/RT/Ticket.pm: - - Fix for #513 - status update without permissions returns no error message - -2001-05-29 00:38 jesse - - * Makefile: - - Bumped version to 1.3.81 - -2001-05-28 20:39 jesse - - * bin/webmux.pl: - - Removed a bogus line from webmux - -2001-05-28 20:29 jesse - - * lib/RT/: Ticket.pm, Interface/Web.pm: - - Work to solve 325: updating detritus in update listing - -2001-05-28 17:35 jesse - - * bin/rt, etc/schema.mysql, etc/schema.pm, lib/RT/Ticket.pm, - lib/RT/Interface/CLI.pm, webrt/Ticket/Attachment/dhandler: - - Work on the CLI to resolve #482. Can't add content when creating tix with the CLI - Do a bunch of better error checking on ticket creation. - - Generalized the ticket status checking code. - - Added another index on Attachments for increased speed. - -2001-05-28 15:49 jesse - - * lib/RT/Ticket.pm: - - Removed code which auto-opened tickets that were new. It should - be a scrip and it's too late in teh release cycle to do this right now. - -2001-05-28 15:24 jesse - - * webrt/SelfService/: Details.html, Elements/MyRequests: - - Fixed #506. Non-priv user can't see tickets - -2001-05-23 23:53 jesse - - * webrt/SelfService/Elements/MyRequests: - - Fixed MyRequest so it shows your tickets. - -2001-05-23 23:18 jesse - - * Makefile: - - Bumped the version to 1.3.80 - -2001-05-23 23:01 jesse - - * bin/webmux.pl, docs/manual.pod, webrt/Elements/MyRequests, - webrt/Elements/MyTickets, webrt/NoAuth/Logout.html, - webrt/Ticket/ModifyAll.html: - - Fixed logout bug from 1.3.79 http://fsck.com/rt2/Ticket/Display.html?id=500 - Fixed bug in jumbo from 1.3.79 http://fsck.com/rt2/Ticket/Display.html?id=496 - Added a bit of docs about templates to the manual - - Cleaned up the ui for MyRequests and MyTickets a bit. - -2001-05-23 12:34 jesse - - * webrt/SelfService/: Prefs.html, index.html: - - Little bit of cleanup to SelfService. added prefs. - -2001-05-23 12:34 jesse - - * webrt/SelfService/Prefs.html: - - file Prefs.html was initially added on branch rt-1-1. - -2001-05-23 12:07 jesse - - * Makefile: - - Bumped version to 1.3.79. - -2001-05-23 12:06 jesse - - * README, tools/testdeps: - - Added dependecy on DBIx::SearchBuilder 0.34 - -2001-05-23 11:43 jesse - - * bin/: rt-mailgate, webmux.pl: - - Made sure that the webui always writes sessions to disk - Fixed a typo in the mail gateway. - -2001-05-23 00:09 jesse - - * Makefile, bin/rt-mailgate: - - Added a bit of code to rt-mailgate to deal with not properly loading users on - ticket creation. - -2001-05-22 23:01 jesse - - * lib/RT/Ticket.pm: - - Within Ticket->Create, always get a Queue object as SystemUser for like, defaults and stuff. - -2001-05-21 18:12 jesse - - * etc/config.pm: - - Added comments from Feargal about how to configure RT for http urls. - -2001-05-21 16:37 jesse - - * Makefile: - - bumped version to 1.3.78 - -2001-05-21 16:36 jesse - - * lib/RT/Ticket.pm, webrt/Ticket/Display.html: - - Tickets now open when they're new and get acted on. - -2001-05-21 16:09 jesse - - * lib/RT/Action/: Autoreply.pm, SendEmail.pm: - - Fix for Ticket #481 $CorrespondAddress= variable in config.pm doesn't work - -2001-05-21 15:54 jesse - - * webrt/Elements/MessageBox: - - Added a space at teh end of the line, per the standard convention for signature - dashes. - -2001-05-21 15:54 jesse - - * webrt/Elements/MessageBox: - - If the user doesn't have a signature, don't include signature dashes - -2001-05-21 15:17 jesse - - * lib/RT/Tickets.pm, webrt/Ticket/ModifyAll.html: - - Dead tickets aren't searchable via the ui anymore. - ModifyAll is a bit smarter about what to let people do. - -2001-05-21 14:02 jesse - - * lib/RT/Keyword.pm, webrt/Admin/Keywords/index.html: - - Editing keywords without permission now actually tells you so. - -2001-05-21 13:32 jesse - - * webrt/Admin/: Global/Scrips.html, Queues/Scrips.html: - - Users without permission to delete scrips now get a proper permission denied. - -2001-05-21 13:20 jesse - - * webrt/Ticket/: Update.html, Elements/Tabs: - - The ticket update form is now a little smarter about only letting people perform - updates that they have the right to perform. - -2001-05-17 23:09 jesse - - * Makefile: - - Chmod the makefile in the make dist procedure. - -2001-05-17 23:05 jesse - - * README: - - Cleaned up some instructions. Thanks Feargal. - -2001-05-17 22:50 jesse - - * Makefile, lib/RT/Transaction.pm, lib/RT/Action/SendEmail.pm, - tools/insertdata: - - Fixed scrip actions to activate when there's a missing scripcontent. - - Added a Content method to Transaction.pm - Fixed Tempates to use new Content method. - -2001-05-17 16:19 jesse - - * lib/RT/Transaction.pm, lib/RT/Action/SendEmail.pm, - webrt/Ticket/Display.html, webrt/Ticket/Update.html: - - Better debugging info for some scrips. - - Fixed bugs which prevented status and owner to change on correspondence - and comment. - -2001-05-17 12:36 jesse - - * Makefile, README: - - Bumped the version. Added Mark Vevers to the thansk in the readme. - -2001-05-17 12:34 jesse - - * lib/RT/Interface/Web.pm: - - Removed some obsolete code. fixed a bug in Comment recording from Mark Vevers - -2001-05-16 18:51 jesse - - * Makefile, tools/testdeps: - - Fixed testdeps to not install bogus new DBD::mysql rev. - Bumped rev to 1.3.75 - -2001-05-16 17:30 jesse - - * Makefile: - - bumped to 1.3.74 - -2001-05-16 17:30 jesse - - * webrt/Admin/Groups/Modify.html: - - Fixed a small bug in Groups editing - -2001-05-16 17:21 jesse - - * tools/testdeps: - - Bumped version to 1.3.73. - Bumped dependency on searchbuilder to 0.33 - -2001-05-16 17:15 jesse - - * webrt/: Elements/TitleBoxStart, Ticket/Update.html, - Ticket/Elements/Tabs: - - The quick link for 'Resolve' now requests that the user enter a ticket update - -2001-05-16 15:45 jesse - - * README, lib/RT/Interface/Web.pm, tools/testdeps, - webrt/Ticket/Display.html: - - Added some documentation about what to do if the install fails. - - Specified a minimum working version of DBD::mysql. - - Fixed support for entering updates via the webui. - -2001-05-15 00:55 jesse - - * lib/RT/Action/Autoreply.pm: - - Fixed a typo that broke autoreplies - -2001-05-15 00:37 jesse - - * tools/testdeps: - - added Errno dependency - -2001-05-14 23:44 jesse - - * etc/config.pm, tools/insertdata, webrt/Admin/Queues/People.html: - - Cleaned up a bit of phrasing. cleaned up some extra /s in urls. - -2001-05-14 22:49 jesse - - * Makefile, bin/mason_handler.fcgi, bin/mason_handler.scgi, bin/rt, - bin/webmux.pl, lib/Makefile.PL, lib/RT/Date.pm, - lib/RT/Interface/Web.pm, tools/testdeps: - - Switched from Date::Manip To Graham Barr's Date::Parse - -2001-05-14 18:58 jesse - - * lib/RT/Scrips.pm, lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, - webrt/Ticket/Display.html, webrt/Ticket/Elements/Tabs: - - Work on the web frontend. the "quick" links have been cleaned up and decomplexified. - -2001-05-14 17:11 jesse - - * lib/RT/User.pm, lib/RT/Interface/Web.pm, - webrt/Admin/Groups/Modify.html, webrt/Admin/Users/Modify.html: - - Cleaned up bugs related to spurious extra display of information in user and group modification and ACL deletion - when the user didn't have the right to do so. - -2001-05-13 23:05 jesse - - * webrt/Admin/Users/index.html: - - no longer provide a link to create a new user to someone who doesn't have rights to do so. - -2001-05-13 22:49 jesse - - * lib/RT/Ticket.pm, tools/insertdata, webrt/Ticket/Modify.html: - - yanked bogus Ticket Queue caching - rephrased ticket creation autoreply - -2001-05-13 22:15 jesse - - * webrt/User/Prefs.html: - - Added a hack to make sure that session gets written to disk - -2001-05-13 22:11 jesse - - * webrt/User/Prefs.html: - - more work on letting users edit their own passwords - -2001-05-13 21:40 jesse - - * webrt/Ticket/: Attachment/dhandler, Elements/ShowTransaction: - - Fix for #433. now attachements are displayable after merges. - -2001-05-12 17:46 jesse - - * Makefile, lib/Makefile.PL, tools/testdeps, webrt/User/Prefs.html: - - Started work on user prefs. password changing is untested - - Fixed dependency on SB to .31 and bumped version - -2001-05-11 12:32 jesse - - * lib/RT/Record.pm: - - turned on use of DBIx::SearchBuilder::Record::Cachable - -2001-05-11 12:30 jesse - - * lib/RT/User.pm, webrt/Elements/Quicksearch: - - Redid how the ACL checking works for great perf gains. - Added stalled lists to quicksearch. - -2001-05-09 20:11 jesse - - * Makefile: - - Bumping the version # so people working off cvs get less confused. - -2001-05-09 20:11 jesse - - * bin/rt-mailgate, lib/RT/Queue.pm, lib/RT/Action/Autoreply.pm, - lib/RT/Action/Notify.pm, lib/RT/Action/NotifyAsComment.pm, - lib/RT/Action/SendEmail.pm: - - Cleanup in the mail sending stuff. - fix for ticket 403: RT should no longer send mail when it has - no recipients - - fix for #404: Squelch-Replies-To should be a bit more intelligent, - since it was rewritten from scratch - - RT should now properly send mail to queue ccs and queue admin ccs - when you ask it to - - internally, RT's mail sending stuff now lets you pass around - arrays of addresses to send mail to, rather than comma delimited - strings. More flexible down the line. - -2001-05-09 16:39 jesse - - * README: - - Updated the readme to note the dependency on setuid perl - -2001-05-09 16:08 jesse - - * webrt/Ticket/Elements/ShowLinks: - - fix for RT/fsck.com: Ticket #440 [rt-devel] 'Depended on by' doesn't work - -2001-05-08 20:48 jesse - - * etc/schema.mysql, etc/schema.pm, lib/RT/Ticket.pm, - lib/RT/Transaction.pm, webrt/Admin/Elements/UserTabs, - webrt/Admin/Queues/People.html, webrt/Elements/MyRequests, - webrt/Elements/MyTickets, webrt/Elements/Tabs, - webrt/Ticket/Elements/ShowBasics, - webrt/Ticket/Elements/ShowRequestor: - - Schema.pm now has a few more indices. the mysql schema has been regenerated, but not - the Pg or oracle schemas. - - in Ticket.pm, a message got the queue id replaced with the queue name - - removed a spurious variable localization in Transaction.pm - - Removed a pointer to a nonexistent page on admin/user/modify - - Modifying queue watchers now has a more coherent title - - "This user's tickets, My requests and My tickets are now limited to the 25 highest priority items - attached to you. - - The "Administration" tab has been changed to the "Configuration" tab - -2001-04-04 16:55 jesse - - * lib/RT/Interface/Web.pm: - - Fixing a comment in the web interface. no functional changes. - -2001-04-04 16:52 jesse - - * Makefile: - - - Bumping the version to 1.3.70 for release - -2001-04-04 16:51 jesse - - * lib/RT/User.pm: - - lib/RT/User no longer treats "ModifySelf" as equivalent to "AdminUsers" for the current user. - -2001-04-04 15:08 jesse - - * lib/RT/KeywordSelect.pm, lib/RT/Action/Autoreply.pm, - webrt/Admin/Global/Keywords.html, webrt/Admin/Queues/Keywords.html: - - Fixed a crashing bug and an ACL violation on keywordselect deletion - -2001-04-04 00:19 jesse - - * Makefile: - - bumping version for release - -2001-04-03 21:14 jesse - - * Makefile: - - Bumped the version - -2001-04-03 21:08 jesse - - * etc/config.pm, lib/RT/Action/Notify.pm: - - Added configuration tweak to not set a :; To header if the user doesn't want it. - -2001-04-03 17:32 jesse - - * lib/RT/Action/Notify.pm: - - Fix for sendmail null list syntax. : ; is not the same as :; to sendmail - -2001-04-03 17:05 jesse - - * webrt/Admin/Queues/: GroupRights.html, UserRights.html: - - removed a couple of stray 's in the html - -2001-04-03 16:50 jesse - - * webrt/Elements/Header: - - Dropped doctype back to 4.0 because 4.01 makes mozilla render things funny - -2001-04-03 16:47 jesse - - * webrt/Elements/Quicksearch: - - - should have been
    - -2001-04-03 16:30 jesse - - * webrt/Elements/Quicksearch: - - Added a feature request/patch from nick@netability.ie - http://fsck.com/rt2/Ticket/Display.html?id=345 - -2001-04-03 16:01 jesse - - * tools/testdeps: - - Adding in testing for params::validate 0.02 - -2001-04-03 15:46 jesse - - * Makefile: - - Bumped the version slightly for a prerelease - -2001-04-03 15:40 jesse - - * lib/RT/Action/Autoreply.pm, lib/RT/Action/SendEmail.pm, - tools/insertdata: - - Fixed autoreply by adding a new scrip. some misc. cleanup in SendEmail (method calls were on the wrong object) - -2001-04-03 15:40 jesse - - * lib/RT/Action/Autoreply.pm: - - file Autoreply.pm was initially added on branch rt-1-1. - -2001-04-03 15:15 jesse - - * lib/RT/Action/SendEmail.pm: - - Fixed a bug in the 'blacklist' regexp - -2001-04-03 15:04 jesse - - * etc/config.pm, lib/RT/Action/SendEmail.pm, - lib/RT/Interface/Web.pm, webrt/Ticket/Elements/ShowRequestor: - - Two seperate fixes for the "RT doesn't send mail" problem. One that helps fix Mail::Internet->send - and one that provides an alternative. - - A fix for a bad link in ShowRequestor. - - Updating fields via the web ui should now be a bit more descriptive - -2001-04-03 02:31 jesse - - * webrt/Ticket/ModifyPeople.html: - - Missed one of the mason fixes - -2001-04-03 02:31 jesse - - * Makefile, bin/rt-mailgate, etc/config.pm, lib/RT/Date.pm, - lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/Watcher.pm, - lib/RT/Interface/Web.pm, webrt/Admin/Global/GroupRights.html, - webrt/Admin/Global/Keywords.html, webrt/Admin/Global/Scrips.html, - webrt/Admin/Global/UserRights.html, - webrt/Admin/Keywords/index.html, - webrt/Admin/Queues/GroupRights.html, - webrt/Admin/Queues/Keywords.html, webrt/Admin/Queues/People.html, - webrt/Admin/Queues/Scrips.html, webrt/Admin/Queues/UserRights.html, - webrt/Ticket/Modify.html, webrt/Ticket/ModifyAll.html, - webrt/Ticket/ModifyDates.html, webrt/Ticket/ModifyPeople.html: - - Added support for parsing Cc and To in the mail gateway - (resolves the last work item for beta 2 - #219) - - Ticket due date is no longer set to "right now" if the queue has an - undefined "default due in" - - Cleanup warnings in date, ticket and watcher - - fixes for a bunch of mason 1.01 related bugs (Mason changed handling of combined GET and POST, thus breaking RT) - -2001-04-02 23:15 jesse - - * README, bin/webmux.pl: - - Cleanup for mason 1.01. - Moved Apache::DBI out of the webmux into the instructions - -2001-04-02 17:56 jesse - - * tools/initdb: - - Typo fix from "Nick Hilliard" - -2001-04-02 15:32 jesse - - * Makefile, lib/RT/Keyword.pm, webrt/NoAuth/Logout.html: - - Makefile cleanup. - Fix for #342 - reported by ivan - - Fix for a bug that clobbered logouts. - -2001-04-02 03:09 jesse - - * Makefile: - - Bumped version for release - -2001-04-01 19:19 jesse - - * bin/rtadmin, lib/RT/ACE.pm, lib/RT/Interface/Web.pm, - webrt/Admin/Elements/SelectRights, - webrt/Admin/Global/GroupRights.html, - webrt/Admin/Global/UserRights.html, - webrt/Admin/Queues/GroupRights.html, - webrt/Admin/Queues/UserRights.html: - - Redid the ACL editor so that it's much much faster. and easier to use...if not quite as pretty. - -2001-04-01 17:31 jesse - - * webrt/Ticket/Elements/: ShowDates, ShowRequestor: - - fixing a couple of html typos - -2001-03-31 03:07 jesse - - * Makefile: - - fixing Changelog generation - -2001-03-31 02:52 jesse - - * Makefile: - - Bumped the version. - -2001-03-31 02:52 jesse - - * webrt/User/Prefs.html: - - Cleaned up user preferences somewhat. removed things that don't do anything. - - -j - -2001-03-31 01:59 jesse - - * bin/rt: - - Fix for #88 RT now lets you use the CLI to search for tickets, based on links to other tickets - -2001-03-31 01:20 jesse - - * README: - - Fix for #216: Web session files need better handling and cleanup - -2001-03-31 00:49 jesse - - * Makefile, README, bin/rtadmin, bin/webmux.pl, etc/config.pm: - - Moved RT Session data out of /tmp to somewhere that makes more sense. - This is the first half of the fix for #216. Now we just need to document the cronjob reaper to kill old sessions - - Cleaned up creation of queues and users in bin/rtadmin - - Updates to the README - -2001-03-30 23:44 jesse - - * lib/RT/Ticket.pm: - - Fix for http://fsck.com/rt2/Ticket/Display.html?id=324 - mail from requestors does not reopen ticket - -2001-03-30 23:19 jesse - - * bin/rtadmin, lib/RT/Queue.pm, lib/RT/Watcher.pm: - - Work on Watchers and editing watchers from the CLI tool. added support for --list-{queues|users|groups} - -2001-03-30 19:31 jesse - - * bin/rt, lib/RT/ACE.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm, - lib/RT/Tickets.pm, lib/RT/Watcher.pm, lib/RT/Action/SendEmail.pm, - lib/RT/Interface/Web.pm: - - A bunch of reworking of access control for watchers. should be much more robust - and more flexible. - - Resolves http://fsck.com/rt2/Ticket/Display.html?id=253 by adding the "Watch" and "WatchAsAdminCc" rights. - -2001-03-30 15:41 jesse - - * lib/RT/: Action/Notify.pm, Interface/Web.pm: - - Tiny cleanup in Interface/Web.pm. no functional difference there just being more explicit. - - Fix for #292: Sender of a message is no longer notified of that message. - -2001-03-30 02:55 jesse - - * Makefile: - - Bumped the version - -2001-03-30 02:37 jesse - - * webrt/Elements/SelectDate: - - Fixed an as-yet-untickled bug in SelectDate that incremented things too much - -2001-03-30 02:32 jesse - - * lib/RT/Template.pm, webrt/Admin/Global/Scrips.html: - - Fixes to template creation. stupid typo. - Global scrips creation should now work better - -2001-03-30 02:12 jesse - - * webrt/: Admin/Elements/GroupTabs, Admin/Groups/Members.html, - Admin/Groups/Modify.html, Admin/Users/Modify.html, - Elements/ListActions: - - Fix for PseudoGroups having a prompt to add members. - some cleanups to not make the "Results" box pop up when it's not wanted. - -2001-03-30 01:41 jesse - - * lib/RT/Ticket.pm: - - Attached is a patch to implement the ShowTicketComments in the - display of transactions of a ticket. - - Arthur de Jong - -2001-03-30 01:34 jesse - - * lib/RT/Scrip.pm, webrt/Admin/Global/Scrips.html, - webrt/Admin/Queues/Scrips.html: - - Fix for 328: Re: [rt-users] 1.3.64 & postgres & scrips - there was an ACL bug. - -2001-03-28 22:15 jesse - - * Makefile, webrt/autohandler: - - Fixed a tiny bug in the new authandler that caused logout to fail - -2001-03-27 22:30 jesse - - * webrt/index.html: - - fixed index.html - -2001-03-27 22:26 jesse - - * Makefile, webrt/Admin/Groups/Members.html, - webrt/Ticket/Update.html: - - Added a couple of fixes from Arthur at west.nl - Groups/Members deals better with multiple selections - Ticket/Update now displays queue watchers. - bumped the version to 1.3.63 - -2001-03-27 04:25 jesse - - * docs/manual.pod, webrt/autohandler, webrt/index.html, - webrt/Admin/Users/index.html, webrt/Elements/ShadedBox, - webrt/Search/Listing.html: - - Lots of cleanup of the auothandler. - a tiny bit of doc about an alternative apache configuration. - some web ui cleanup so that when you are on a page, your location is more properly hilighted. - admin/users includes some more verbiage explaining what's going on. - -2001-03-25 00:44 jesse - - * Makefile, lib/RT/Interface/Web.pm: - - Bumped the version. - cosmetic fix in Interface/Web.pm - -2001-03-23 20:33 jesse - - * lib/RT/: Action/SendEmail.pm, Interface/Web.pm: - - Fixed for TEXTAREA newline bug and Correspondence subject bug. - -2001-03-23 00:34 jesse - - * lib/RT/Action/Notify.pm: - - : goes outside the '' in undisclosed recipients - -2001-03-23 00:30 jesse - - * lib/RT/: ACL.pm, ObjectKeywords.pm: - - Removed some very loud uneccesary debugging statements - -2001-03-23 00:27 jesse - - * Makefile, lib/RT/Action/Notify.pm, lib/RT/Action/SendEmail.pm: - - Work on mail sending routines to be more careful about newlines in subjects. - And about Undisclosed recipients - -2001-03-22 23:17 jesse - - * lib/RT/Action/Notify.pm: - - yet another typo in notify.pm - -2001-03-22 23:12 jesse - - * lib/RT/Action/Notify.pm: - - typo fix - -2001-03-22 23:09 jesse - - * lib/RT/Action/: Notify.pm, SendEmail.pm: - - Cleanups and fixes to Notify and SendEmail - -2001-03-22 19:46 jesse - - * webrt/Ticket/ModifyAll.html: - - TicketObj->Ticket - -2001-03-22 19:42 jesse - - * lib/RT/Action/Notify.pm: - - A more functional Undisclosed Recipients; - -2001-03-22 19:28 jesse - - * webrt/Ticket/: ModifyAll.html, Elements/Tabs: - - Elements/Tabs now does better access control checking before making - buttons available to people. - - ModifyAll.html has a better title and should now update objectkeywords. - -2001-03-22 18:18 jesse - - * lib/RT/: Date.pm, Ticket.pm: - - Added a routine to Date.pm to advance the date N days - - Started using queue defaults on Ticket->Create - -2001-03-22 18:17 jesse - - * webrt/: autohandler, Elements/Login, NoAuth/Login.html, - Search/autohandler, Ticket/autohandler: - - Cleanup of the login process. now you can't accidentally call "Login.html" - when you're already logged in. - removed a couple of bogus old autohandlers - -2001-03-22 18:17 jesse - - * webrt/Elements/Login: - - file Login was initially added on branch rt-1-1. - -2001-03-22 14:45 jesse - - * webrt/Ticket/Elements/EditPeople: - - EditPeople should now enforce a list of possible owners reasonably - -2001-03-21 21:40 jesse - - * Makefile: - - bumped the version to .60 - -2001-03-21 21:22 jesse - - * docs/manual.pod: - - Adding some content to the manual. and even more places where the manual is - missing content. :/ - -2001-03-21 12:21 jesse - - * lib/RT/Action/NotifyAsComment.pm: - - NotifyAsComment should now DTRT and send mail from the comments email address - -2001-03-21 02:46 jesse - - * Makefile: - - yanked some cruft from the ChangeLog creator - -2001-03-21 02:44 jesse - - * Makefile, README: - - Bumped the version. added some people to the readme - -2001-03-21 02:39 jesse - - * webrt/Ticket/Elements/ShowBasics: - - Fix for 242: time left displayed via the web ui is now more intuitive - -2001-03-21 02:37 jesse - - * bin/rt, bin/rt-mailgate, lib/RT.pm, lib/RT/Attachment.pm, - lib/RT/Date.pm, lib/RT/Tickets.pm, lib/RT/User.pm: - - Added more error checking and error handling to the mail gateway - finished code in Attachment.pm to handle too-long attachments - - added support for limiting by date to the CLI - - fixed little bugs in user, date and tickets. - -2001-03-20 19:02 jesse - - * docs/manual.pod: - - file manual.pod was initially added on branch rt-1-1. - -2001-03-20 19:02 jesse - - * docs/manual.pod: - - actually adding the outline of the manual - -2001-03-20 19:01 jesse - - * Makefile, bin/rt, docs/API, docs/README.docs, docs/Security, - docs/keywords, etc/config.pm: - - Starting the doc cleanup - -2001-03-20 15:26 jesse - - * webrt/Elements/SelectTicketSortBy: - - LastUpdated, not LastUpdate - -2001-03-20 15:21 jesse - - * webrt/Elements/: SelectDate, SelectTicketSortBy: - - more things to sort by. - select date shouldn't insert spurious null dates. - -2001-03-20 13:27 jesse - - * lib/RT/Action/SendEmail.pm: - - fixed a typo. $defined is not useful perl ;) - -2001-03-20 13:21 jesse - - * lib/RT/Action/: Notify.pm, SendEmail.pm: - - Fixed a couple bugs in Notify and SendEmail that should get mail flowing - for transactions without content. - -2001-03-20 13:08 jesse - - * webrt/Ticket/: Attachment/dhandler, Elements/ShowTransaction: - - Making web based attachment display deal nicely with too-long message bodies - -2001-03-20 04:26 jesse - - * Makefile: - - bumping the version - -2001-03-20 04:20 jesse - - * lib/RT/Action/SendEmail.pm: - - regexps with three /s need a leading s ;) - -2001-03-20 04:16 jesse - - * bin/rt-mailgate, lib/RT/Template.pm: - - fixing scrips-related mailing stuff. some transaction mailing used to bomb out. - -2001-03-20 02:46 jesse - - * Makefile, bin/rt-mailgate, etc/config.pm, - lib/RT/Action/SendEmail.pm, tools/insertdata: - - Work on robustification of the mail gateway. including single-transaction - blacklisting of addresses that might generate bounces. - -2001-03-20 00:41 jesse - - * lib/RT/User.pm: - - Work on user.pm to allow users to be disabled. - -2001-03-19 18:03 jesse - - * webrt/: autohandler, Elements/MyRequests, NoAuth/Login.html, - NoAuth/Reminder.html: - - fixed the MyRequests bug that caused them not to be listed. - nonexistent users no longer get shunted to SelfService. - -2001-03-19 15:30 jesse - - * Makefile, bin/mason_handler.fcgi, bin/mason_handler.scgi, bin/rt, - bin/rt-mailgate, bin/rtadmin, webrt/Admin/Elements/ModifyTemplate, - webrt/Admin/Elements/ModifyUser, webrt/Admin/Global/Template.html, - webrt/Admin/Queues/Template.html, webrt/Admin/Users/Modify.html, - webrt/Elements/MessageBox: - - Fixes for perl path and textarea bugs noted by Arthur de Jong - -2001-03-18 14:58 jesse - - * lib/RT/Attachment.pm: - - Removed an extra signature attachment - -2001-03-17 14:57 jesse - - * Makefile: - - bumped version - -2001-03-17 14:55 jesse - - * lib/Makefile.PL, lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, - webrt/Elements/Quicksearch, webrt/Elements/SelectDate, - webrt/Elements/SelectDateType, webrt/Elements/TitleBoxEnd, - webrt/Search/PickRestriction: - - Fixed a bug on simple actions reported by christian. - Implemented search by date via web ui - -2001-03-16 03:55 jesse - - * Makefile, lib/RT/Interface/Web.pm, webrt/Elements/Header: - - Fixed a tiny typo that prevented objectkeyword editing - -2001-03-16 02:29 jesse - - * Makefile: - - Bumped the version. - -2001-03-16 02:27 jesse - - * Makefile, README, bin/initacls.Oracle, bin/initacls.Pg, - bin/initacls.mysql, bin/initdb.Oracle, tools/initdb: - - some clarifications to the install procedure. - -2001-03-16 02:10 jesse - - * lib/RT/Tickets.pm, webrt/Search/Listing.html: - - Fixed #2 WebRT doesn't refresh searches properly. the oldest bug in the bug tracking - system ;) - - Fixed Tickets->Count - -2001-03-16 01:39 jesse - - * webrt/Admin/: Global/Template.html, Global/Templates.html, - Queues/Modify.html, Queues/Template.html, Queues/Templates.html: - - now you can create templates with the web ui. - -2001-03-16 00:39 jesse - - * webrt/Ticket/Elements/EditLinks: - - file EditLinks was initially added on branch rt-1-1. - -2001-03-16 00:39 jesse - - * webrt/Ticket/ModifyAll.html: - - file ModifyAll.html was initially added on branch rt-1-1. - -2001-03-16 00:39 jesse - - * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, webrt/Elements/Tabs, - webrt/Ticket/Modify.html, webrt/Ticket/ModifyAll.html, - webrt/Ticket/ModifyDates.html, webrt/Ticket/ModifyLinks.html, - webrt/Ticket/ModifyPeople.html, webrt/Ticket/ValidateUpdate.html, - webrt/Ticket/Elements/EditKeywordSelects, - webrt/Ticket/Elements/EditLinks, webrt/Ticket/Elements/EditPeople, - webrt/Ticket/Elements/Tabs: - - A bunch of Ticket modification refactoring and cleanup. - Added a "ModifyAll" at sam hartman's suggestion - -2001-03-14 21:20 jesse - - * bin/rt: - - --id=43-45 should now work. there was a regex typo - -2001-03-14 04:37 jesse - - * Makefile, bin/initacls.Oracle, etc/acl.Oracle, etc/acl.mysql, - etc/schema.Oracle, etc/user.Oracle, tools/initdb, tools/testdeps: - - reworked init procedures, oracle schema and - acl setup for mysql and postgres and oracle. - - RT2 now runs on oracle. - -2001-03-14 02:08 jesse - - * etc/acl.Oracle, etc/schema.Oracle, tools/initdb: - - hacking to make oracle work. we're much of the way there. next up: - schema updates - -2001-03-14 02:08 jesse - - * etc/acl.Oracle: - - file acl.Oracle was initially added on branch rt-1-1. - -2001-03-14 01:03 jesse - - * webrt/Admin/Queues/GroupRights.html: - - file GroupRights.html was initially added on branch rt-1-1. - -2001-03-14 01:03 jesse - - * webrt/Admin/Queues/UserRights.html: - - file UserRights.html was initially added on branch rt-1-1. - -2001-03-14 01:03 jesse - - * Makefile, lib/RT/ACE.pm, lib/RT/Interface/Web.pm, tools/initdb, - webrt/Admin/Elements/QueueTabs, - webrt/Admin/Global/GroupRights.html, webrt/Admin/Queues/ACL.html, - webrt/Admin/Queues/GroupRights.html, - webrt/Admin/Queues/UserRights.html, webrt/Elements/Tabs, - webrt/NoAuth/webrt.css: - - Cleanup to the ACL editors (consistency) - a bit of web ui tuning. - - fixes for initdb issues (thanks, jhutz) - - minor cleanups to ACE.pm - -2001-03-13 22:44 jesse - - * lib/RT/Transaction.pm, lib/RT/Transactions.pm, tools/testdeps: - - Updated DBIx::SearchBuilder dependency - - code cleanup and sketching in Transaction.pm and Transactions.pm - -2001-03-12 21:14 jesse - - * Makefile, etc/schema.Pg, etc/schema.mysql, tools/initdb, - tools/testdeps: - - initdb now caches schema, eliminating the install-time dependency on DBIx::DBSchema. - - this is 1.3.50, folks. it has what I believe to be functional postgres support - -2001-03-11 21:58 jesse - - * etc/config.pm, etc/schema.pm, lib/RT/Attachment.pm, - lib/RT/Ticket.pm, tools/initdb: - - Cleanup in Ticket.pm - Bugfixes to Attachment.pm (for postgres mimencoding supporT) - - reconfigured to use the new DBIx::DBSchema (which isn't out yet. but should - be soon) - - still need to do a bit more work on attachments configuration. - -2001-03-11 02:45 jesse - - * bin/rt-mailgate: - - file rt-mailgate was initially added on branch rt-1-1. - -2001-03-11 02:45 jesse - - * Makefile, README, bin/rt-mailgate, bin/rtmux.pl, bin/webmux.pl, - etc/config.pm, etc/schema.Oracle, etc/schema.pm, lib/RT.pm, - lib/RT/Attachment.pm, lib/RT/ScripAction.pm, lib/RT/Ticket.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Interface/CLI.pm, - lib/RT/Interface/Email.pm, tools/insertdata: - - This is a bit more of a 'comprehensive' diff than I'd intended. That's what - I get for working for 1/2 a week at my parents place without real net ;) - - Cleanups in the makefile and readme to make installation simpler and more - sensical. - - removed outdated rtmux.pl - moved old Interface/Email.pm to bin/rt-mailgate - started new baseclass for new mail gateways (Interface/Email.pm) - - first cut implementation of attachment size limits. - - switched mysql to use 'longblob' rather than just 'blob', so - that users can submit > 64k attachments. with the next release - of DBIx::DBSchema, we should have what we need to get - PG attachmetns of more reasonable sizes working. - - first cut implementation of base64 encoding for MIME objects - on databases that don't support BLOBs (postgres) - - restructured initdb so we'll be able to support databases - for which we need to hand-hack schema. - - added the 'Owner' pseudogroup to insertdata - - fixed the bug in logging for the mail gateway that caused - lots of warnings about joins. - - lots of work on the mail gateway to start to clean up and restructure - things. - -2001-03-10 18:53 jesse - - * tools/initdb: - - Refactoring initdb to make it easier to do things like add oracle support. yay - -2001-03-09 15:19 jesse - - * lib/RT/Condition/StatusChange.pm: - - file StatusChange.pm was initially added on branch rt-1-1. - -2001-03-09 15:19 jesse - - * Makefile, etc/config.pm, lib/RT/Attachment.pm, lib/RT/Link.pm, - lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/Watcher.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Condition/AnyTransaction.pm, - lib/RT/Condition/Generic.pm, lib/RT/Condition/StatusChange.pm, - tools/insertdata, tools/testdeps: - - OnResolve scrip now works. - some cleanup on Scrips and Watchers. - commented out some debug messages that aren't immediately useful - -2001-03-09 15:15 jesse - - * webrt/Ticket/: ModifyDates.html, Elements/EditWatchers: - - Two bugfixes: - one, editdates no longer errors out on 5.005 - two, links from watchers to the ModifyUser page now work properly - -2001-03-08 15:21 jesse - - * Makefile, lib/RT/User.pm, tools/insertdata: - - - Fixed a bootstrapping bug introduced with the new acls on Create. - bumped version to 1.3.49_01 - -2001-03-07 00:40 jesse - - * lib/: test.pl, RT/ACE.pm, RT/CurrentUser.pm, RT/Group.pm, - RT/GroupMember.pm, RT/Keyword.pm, RT/KeywordSelect.pm, RT/Link.pm, - RT/Queue.pm, RT/Scrip.pm, RT/ScripAction.pm, RT/Template.pm, - RT/Ticket.pm, RT/Transaction.pm, RT/User.pm, RT/Watcher.pm: - - acls for Delete methods that needed them. - flat lockouts on Delete methods that needed them. - - test.pl got 'use *' added to it - -2001-03-06 18:07 jesse - - * lib/RT/Attachment.pm: - - Backing out changes that broke ->Content - -2001-03-06 17:42 jesse - - * Makefile, lib/RT/Attachment.pm, lib/RT/Record.pm, - lib/RT/Interface/Web.pm, webrt/Elements/SelectSortOrder, - webrt/Search/Listing.html, webrt/Search/PickRestriction: - - work on Attachments. - cleanup on sorting and limiting. - -2001-03-06 16:26 jesse - - * webrt/Search/PickRestriction: - - adding a header - -2001-03-04 19:46 jesse - - * etc/schema.pm: - - Schema change to support postgres - -2001-03-04 19:44 jesse - - * lib/RT/Record.pm: - - Small change for new DBIx::SearchBuilder::Record PrimaryKey behaviors.. - -2001-03-04 19:15 jesse - - * bin/rt: - - rt --id= should work now - -2001-03-02 00:26 jesse - - * etc/config.pm, lib/RT/Date.pm, lib/RT/Ticket.pm, - webrt/Ticket/ModifyDates.html: - - first pass on dates and timezones...seems to work. for common ops - -2001-02-28 16:34 jesse - - * lib/RT/User.pm: - - fix for RT/fsck.com: Ticket #208 User->Create needs more argument checking - added a check to User->Create to make sure a name was specified - -2001-02-28 08:56 jesse - - * Makefile, bin/rtadmin: - - Enabled the ability to set a user's password via the CLI - -2001-02-27 22:09 jesse - - * lib/Makefile.PL, tools/testdeps: - - Bumping required version of searchbuilder in testdeps and lib/Makefile.pl - -2001-02-27 22:00 jesse - - * webrt/Elements/SelectKeyword: - - allowing undef keywords - -2001-02-27 21:43 jesse - - * webrt/Admin/Queues/Scrips.html: - - Fix for ticket #50. grammar in per queue scrip descriptions - -2001-02-27 21:41 jesse - - * tools/insertdata: - - resolving ticket #181- extra \s in the autoreply template - -2001-02-27 21:36 jesse - - * Makefile, lib/RT/Transaction.pm, tools/testdeps: - - testdeps now erorrs out if you don't specify a db type. - - queue change transaction descriptions are better. - - bumped the version - -2001-02-27 21:12 jesse - - * webrt/Elements/SelectTicketSortBy: - - file SelectTicketSortBy was initially added on branch rt-1-1. - -2001-02-27 21:12 jesse - - * webrt/Elements/SelectSortOrder: - - file SelectSortOrder was initially added on branch rt-1-1. - -2001-02-27 21:12 jesse - - * lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, - webrt/Elements/SelectKeyword, webrt/Elements/SelectResultsPerPage, - webrt/Elements/SelectSortOrder, webrt/Elements/SelectTicketSortBy, - webrt/Search/Listing.html, webrt/Search/PickRestriction: - - Basic ticket sorting has been implemented. - Ticket listing by pages works too. - - a bit of cleanup in the ticket listing. now select by keywords uses the component designed for that purpose - -2001-02-26 15:44 jesse - - * lib/RT/Ticket.pm: - - No longer generate spurious watchers transactions when merging tickets. - -2001-02-26 03:08 jesse - - * lib/RT/Ticket.pm: - - fixed a typo in a debug message that prevented compilation - -2001-02-26 02:53 jesse - - * Makefile: - - bumped the version for release. again. - -2001-02-26 02:52 jesse - - * lib/RT/: ACE.pm, Ticket.pm: - - Fixed a variable redef in ticket and an acl granting bug in ACE - -2001-02-26 01:24 jesse - - * Makefile, webrt/Ticket/ModifyLinks.html: - - A bit more merging support. - Bumped version for release - -2001-02-25 22:28 jesse - - * webrt/Ticket/Elements/: ShowHistory, ShowTransaction: - - Cleaning up the transaction display. - -2001-02-25 22:22 jesse - - * lib/RT/: Scrip.pm, ScripCondition.pm, Ticket.pm: - - Some bug fixes for merging. - Fixed a bug in Scrips that caused an infinite loop if the user had no rights. - -2001-02-24 02:42 jesse - - * Makefile, lib/RT/Ticket.pm: - - Fixed a bug that prevented ticket loading from appearing to work - -2001-02-23 19:17 jesse - - * Makefile, lib/RT/Ticket.pm, lib/RT/Interface/Web.pm: - - Fixed a typo in Ticket.pm that prevented transaction lists from working - fixed a paste error in Web.pm - -2001-02-23 17:41 jesse - - * Makefile: - - Bumped the version # for release - -2001-02-23 17:31 jesse - - * Makefile, README, bin/initacls.mysql, bin/webmux.pl, - lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/Link.pm, lib/RT/Queue.pm, - lib/RT/Ticket.pm, lib/RT/User.pm, lib/RT/Interface/Web.pm, - tools/initdb, tools/testdeps: - - Fixed a bug that made a first install with mysql fail - yanked a UNIVERSAL::AUTOLOADER handler I inserted to test things out. - Fixed several ACL creation bugs. - Initial implementation of merge for the core. - Testdeps now does database testing. - - Made Ticket->Load smarter. (nolonger needs a seperate LoadByURI sub. - - fixed bugs in the readme - -2001-02-22 01:03 jesse - - * tools/testdeps: - - Updated dependencies. - -2001-02-21 17:49 jesse - - * lib/RT/: Ticket.pm, Tickets.pm: - - Cache Queue in Ticket.pm for added perf. - formatting cleanup in Tickets.pm - -2001-02-20 14:38 jesse - - * webrt/Ticket/Display.html: - - Uncompressed history on summary page... - -2001-02-20 14:18 jesse - - * lib/RT/ScripCondition.pm: - - fixed a pod typo - -2001-02-20 14:07 jesse - - * Makefile, etc/schema.pm, lib/MANIFEST, tools/insertdata, - webrt/Admin/Users/Modify.html, - webrt/SelfService/Elements/ShowTransaction, - webrt/Ticket/Elements/ShowTransaction: - - removed a false unique index from schema. pm. - make web interface and insertdata deal properly with the fact that email addresses - should be unique. - - cleaned up ShowTransaction for the webui. (now uses CreatorObj rather than Creator, - as it was confusing - -2001-02-20 01:42 jesse - - * lib/RT/: ACE.pm, ACL.pm, Attachment.pm, Attachments.pm, - CurrentUser.pm, EasySearch.pm, Group.pm, GroupMember.pm, - GroupMembers.pm, Groups.pm, Keyword.pm, KeywordSelect.pm, - Keywords.pm, Link.pm, Links.pm, ObjectKeyword.pm, - ObjectKeywords.pm, Queue.pm, Queues.pm, Record.pm, Scrip.pm, - ScripAction.pm, ScripActions.pm, ScripCondition.pm, - ScripConditions.pm, Scrips.pm, Template.pm, Templates.pm, - Ticket.pm, Tickets.pm, Transaction.pm, Transactions.pm, User.pm, - Users.pm, Utils.pm, Watcher.pm, Watchers.pm, Action/SendEmail.pm: - - A major security audit of the codebase has taken place. I was primarily out for - ACL related issues, but took care of a number of other minor cleanups at the same time. - -2001-02-19 17:16 jesse - - * NEWS: - - fixed a typo in cli_respond_req - -2001-02-15 18:02 jesse - - * webrt/SelfService/: Details.html, Error.html: - - fixing bug #90: SelfService calls to Abort use the 'standard' handler. which includes the wrong header. - -2001-02-15 18:02 jesse - - * webrt/SelfService/Error.html: - - file Error.html was initially added on branch rt-1-1. - -2001-02-15 17:39 jesse - - * webrt/Admin/Elements/SelectSingleOrMultiple: - - file SelectSingleOrMultiple was initially added on branch rt-1-1. - -2001-02-15 17:39 jesse - - * lib/RT/Keyword.pm, lib/RT/KeywordSelect.pm, - webrt/Admin/Elements/SelectKeywordSelect, - webrt/Admin/Elements/SelectSingleOrMultiple, - webrt/Admin/Global/Keywords.html, webrt/Admin/Queues/Keywords.html, - webrt/Elements/SelectKeyword, webrt/Elements/SelectKeywordOptions, - webrt/Ticket/Elements/ModifyTicket: - - KeywordSelect.pm got an ACL bug fixed. - Keyword.pm now does recursive searches in Descendants properly. - - KeyworSelect editing via the webui is now much smarter. and cleaner. and better. and faster, and resolving bug 123 - -2001-02-15 17:39 jesse - - * webrt/Admin/Elements/SelectKeywordSelect: - - file SelectKeywordSelect was initially added on branch rt-1-1. - -2001-02-13 22:54 jesse - - * lib/: Makefile.PL, RT/ACE.pm, RT/Keyword.pm, RT/KeywordSelect.pm, - RT/Scrip.pm: - - Better ACL handling for ACEs, Keywords and KeywordSelects. - specified more accurate versions of some dependencies in lib/Makefile.PL - -2001-02-13 12:51 jesse - - * bin/rtadmin, etc/schema.pm, lib/RT/Keyword.pm, - lib/RT/KeywordSelect.pm, lib/RT/KeywordSelects.pm, - lib/RT/Keywords.pm, lib/RT/Queue.pm, lib/RT/Queues.pm, - lib/RT/User.pm, lib/RT/Users.pm, webrt/Admin/Global/Keywords.html, - webrt/Admin/Keywords/index.html, webrt/Admin/Queues/Keywords.html, - webrt/Admin/Queues/Modify.html, webrt/Admin/Users/Modify.html: - - Implemented 'Disabled' for Keywords, KeywordSelects, Queues and Users. - This supplants 'Delete' for these objects which need to exist to guarantee - referential integrity. - - Implemented cli and web interfaces to support the new code. - -2001-02-12 18:27 jesse - - * README, bin/rtadmin, etc/schema.pm, lib/RT/Attachment.pm, - lib/RT/EasySearch.pm, lib/RT/Link.pm, lib/RT/ObjectKeyword.pm, - lib/RT/Queue.pm, lib/RT/Queues.pm, lib/RT/Record.pm, - lib/RT/ScripAction.pm, lib/RT/ScripCondition.pm, - lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm, - lib/RT/Watcher.pm, tools/testdeps: - - Cleaned up LastUpdated / Created/ LastUpdatedBy / Creator to all get set on - create for all relevant objects. - - Based on discussions with ivan, changed the 'Deleted' flag on various objects to 'Disabled' - to better represent its purpose. - - Fully implemented Disable for queue as a prototype. - - fixed queue attribute editing in cli. - -2001-02-12 13:59 jesse - - * tools/testdeps: - - specified a minimum known good version of Getopt::Long - -2001-02-12 12:38 jesse - - * lib/RT/Queue.pm, webrt/Ticket/Elements/ShowTransaction: - - transaction links work again. - admin ccs get listed. - -2001-02-11 22:16 jesse - - * Makefile: - - bumped the version # for a new release - -2001-02-11 22:13 jesse - - * lib/RT/Queue.pm, lib/RT/Template.pm, tools/insertdata: - - cleaning up queue create. - -2001-02-11 22:12 jesse - - * etc/schema.pm: - - started the work on dealing with Deleting records that need to exist to guarantee ref. integrity - -2001-02-11 18:40 jesse - - * NEWS: - - imported brandon's url importing code - -2001-02-06 22:59 jesse - - * lib/RT/Queue.pm, webrt/Admin/Queues/Modify.html, - webrt/Admin/Users/index.html: - - Fixes to Queue.pm to stop it from clobbering the Name. - - fixed a typo in the webui Admin/Users/index.html - -2001-02-06 15:22 jesse - - * lib/RT/Queue.pm, webrt/Admin/Elements/QueueRightsForUser, - webrt/Admin/Elements/SelectRights, - webrt/Ticket/Elements/ShowMembers: - - ACL fixes in Queue.pm. - ACL search fies for the web ui. - fixed a recursive subticket display bug. - -2001-02-06 12:49 jesse - - * Makefile: - - removed the old rt 1.0 lib/rt directory forever. yay - -2001-02-06 12:48 jesse - - * lib/RT/Interface/Email.pm: - - Added a tiny patch from ivan to not extract nested messages. not totally sure about this one yet. - -2001-02-02 01:26 jesse - - * Makefile: - - version bumpin - -2001-02-02 01:11 jesse - - * bin/rtadmin, lib/RT/Keyword.pm: - - keyword creation, editing and deletion now works via the cli tool. - - This means that for alpha 4, we're *gasp* feature complete. now to fix lots of bugs. - -2001-02-01 02:46 jesse - - * bin/rtadmin, lib/RT/Group.pm, lib/RT/Keyword.pm, - lib/RT/KeywordSelect.pm, tools/testdeps, webrt/Ticket/Display.html, - webrt/Ticket/Elements/ShowHistory, - webrt/Ticket/Elements/ShowTransaction: - - Commandline editing of keywordselects now works. - - Added in a patch to collapse history on the ticket listing - page from Byron Ellacott - - Bumped a few dependecy versions. added a File::Spec dependency, since File::Temp - gets it not quote right. - -2001-01-31 02:08 jesse - - * bin/rtadmin, lib/RT/Group.pm, webrt/Admin/Groups/Members.html: - - Commandline group editing now works. yay. group membership even. - the api changed to be easier to work with and more consistent with other functions - -2001-01-30 23:12 jesse - - * lib/RT/Interface/Email.pm, webrt/Ticket/Elements/ShowLinks, - webrt/Ticket/Elements/ShowRequestor: - - The email interface now uses tempdir from File::Temp for increased security. - - A couple of webui cleanups to display more sensible things. - -2001-01-30 16:42 jesse - - * etc/config.pm, lib/RT/User.pm, lib/RT/Interface/Email.pm: - - Added mail-on-error to the mail gateway. now it should tell you when it fails. - - turned off debugging output from ACLs.... - -2001-01-29 23:58 jesse - - * bin/rtadmin, lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/Scrip.pm, - lib/RT/ScripAction.pm, lib/RT/ScripCondition.pm, lib/RT/Scrips.pm, - lib/RT/Template.pm, lib/RT/Templates.pm, lib/RT/User.pm, - lib/RT/Interface/CLI.pm, lib/RT/Interface/Web.pm, - webrt/Admin/Elements/SelectTemplate, - webrt/Admin/Global/Template.html, - webrt/Admin/Global/Templates.html, - webrt/Admin/Queues/Template.html: - - A bunch of work on the admin cli (acl editor now works) - - a couple API changes to standardize method names across classes - template editing via the web should work better now. - -2001-01-29 23:56 jesse - - * webrt/Elements/: TitleBoxEnd, TitleBoxStart: - - Futzing with the title box to make it a bit more consistent - -2001-01-29 23:54 jesse - - * lib/RT/Record.pm: - - Removed a redundant sub new - -2001-01-29 22:22 jesse - - * lib/RT/Group.pm: - - Groups can now be loaded by name. - -2001-01-23 15:46 jesse - - * bin/rtadmin, etc/schema.pm, lib/RT/Queue.pm, lib/RT/Template.pm, - lib/RT/Ticket.pm, lib/RT/User.pm, lib/RT/Interface/CLI.pm, - tools/initdb: - - initdb now punts on database creation for oracle. - - Ticket->Name removed from code (retargeted to post 2.0 and its own table) - Some better error checking in User and Queue. - - Can now edit templates (And create them) from the CLI. - -2001-01-22 12:51 jesse - - * lib/RT/Action/Notify.pm: - - - It's amazing how much effect 3 little letters can have. with this patch, - scrips that depend on notify (most everything other than autoreply) - just work. woo! - -2001-01-22 06:18 jesse - - * lib/RT/Template.pm: - - Fixed a couple ACL bugs in Template::_Set - -2001-01-22 05:04 jesse - - * Makefile: - - Bumped the version # because of the schema change - -2001-01-22 04:51 jesse - - * lib/RT/Interface/CLI.pm: - - file CLI.pm was initially added on branch rt-1-1. - -2001-01-22 04:51 jesse - - * lib/RT/Interface/CLI.pm: - - Added CLI.pm, which rt and adminrt are dependant on - -2001-01-22 04:46 jesse - - * bin/rtadmin, lib/MANIFEST, lib/RT/Template.pm: - - a bit more work on rtadmin (the start of template editing) - - added Interface/CLI to the manifest. - added a comment to Template.pm - -2001-01-22 02:51 jesse - - * Makefile, TODO, bin/mason_handler.scgi, bin/rt, bin/rtadmin, - bin/rtmux.pl, bin/webmux.pl, etc/config.pm, etc/schema.Oracle, - etc/schema.pm, lib/RT.pm, lib/RT/Attachment.pm, - lib/RT/CurrentUser.pm, lib/RT/Group.pm, lib/RT/Link.pm, - lib/RT/ObjectKeywords.pm, lib/RT/Queue.pm, lib/RT/Template.pm, - lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm, - lib/RT/User.pm, lib/RT/Users.pm, lib/RT/Watchers.pm, - lib/RT/Interface/Email.pm, tools/insertdata, - webrt/Admin/Elements/CreateQueueCalled, - webrt/Admin/Elements/CreateUserCalled, - webrt/Admin/Elements/GrantQueueRightsTo, - webrt/Admin/Elements/ModifyKeywordSelect, - webrt/Admin/Elements/ModifyQueue, - webrt/Admin/Elements/ModifyTemplate, - webrt/Admin/Elements/ModifyUser, - webrt/Admin/Elements/SelectModifyQueue, - webrt/Admin/Elements/SelectModifyUser, - webrt/Admin/Elements/SelectTemplate, - webrt/Admin/Elements/SelectUsers, webrt/Admin/Global/Scrips.html, - webrt/Admin/Global/Template.html, - webrt/Admin/Global/Templates.html, - webrt/Admin/Global/UserRights.html, - webrt/Admin/Groups/Members.html, - webrt/Admin/KeywordSelects/index.html, webrt/Admin/Queues/ACL.html, - webrt/Admin/Queues/Create.html, webrt/Admin/Queues/Keywords.html, - webrt/Admin/Queues/Modify.html, webrt/Admin/Queues/People.html, - webrt/Admin/Queues/Scrips.html, webrt/Admin/Queues/Template.html, - webrt/Admin/Queues/Templates.html, webrt/Admin/Queues/index.html, - webrt/Admin/Users/Modify.html, webrt/Admin/Users/Prefs.html, - webrt/Admin/Users/index.html, webrt/Elements/Header, - webrt/Elements/MyRequests, webrt/Elements/MyTickets, - webrt/Elements/Quicksearch, webrt/Elements/SelectNewTicketQueue, - webrt/Elements/SelectOwner, webrt/Elements/SelectQueue, - webrt/Elements/SelectUsers, webrt/SelfService/Details.html, - webrt/SelfService/Elements/Header, - webrt/SelfService/Elements/MyRequests, - webrt/SelfService/Elements/ShowTransaction, - webrt/Ticket/Create.html, webrt/Ticket/ModifyLinks.html, - webrt/Ticket/autohandler, webrt/Ticket/Elements/AddWatchers, - webrt/Ticket/Elements/ShowBasics, webrt/Ticket/Elements/ShowDates, - webrt/Ticket/Elements/ShowDependencies, - webrt/Ticket/Elements/ShowLinks, webrt/Ticket/Elements/ShowPeople, - webrt/Ticket/Elements/ShowReferences, - webrt/Ticket/Elements/ShowTransaction: - - In prep for a true schema freeze, I fixed a number of attribute names that were troublesome for - one reason or another. - - Queue->QueueId and User->UserId have been changed to Queue->Name and User->Name, so - as not to conflict with queue->id and user->id any more. A number of tables - used "Alias" and "Title" and things like that, rather than the somewhat - more standard "Name" and "Description" - - Abstracted a bunch of the CLI setup stuff out into lib/RT/Interface/CLI - - Abstracted some of the core DB startup code into RT.pm - - fixed the makefile to handle the new rtadmin. - - lots of updates to the new rtadmin (which works for user editing!) - - fixed a bug in ObjectKeywords->LoadByName.... - -2001-01-19 04:23 jesse - - * bin/rtadmin: - - A bit of cleanup and a bit more docs. it's now actually implementable with getopt::long - -2001-01-19 04:16 jesse - - * bin/rtadmin: - - file rtadmin was initially added on branch rt-1-1. - -2001-01-19 04:16 jesse - - * bin/rtadmin: - - Docced the proposed cli for the new rtadmin tool. It's rather more intense than I'd intended - -2001-01-19 02:15 jesse - - * lib/RT/User.pm: - - Fixed ACL bug that prevented by-group auth from working - -2001-01-19 00:52 jesse - - * lib/RT/Ticket.pm, lib/RT/User.pm, webrt/SelfService/Details.html: - - Work on SelfService (fixing the a permission denied bug) - -2001-01-19 00:21 jesse - - * webrt/NoAuth/webrt.css: - - file webrt.css was initially added on branch rt-1-1. - -2001-01-19 00:21 jesse - - * webrt/: webrt.css, Elements/Header, NoAuth/webrt.css, - SelfService/Details.html, SelfService/Elements/Header: - - webui cleanups - -2001-01-19 00:07 jesse - - * bin/rt: - - bug-fixing in bin/rt - -2001-01-18 23:47 jesse - - * lib/RT/Link.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm, - webrt/Ticket/ModifyLinks.html, webrt/Ticket/Elements/ShowLinks, - webrt/Ticket/Elements/ShowMembers, - webrt/Ticket/Elements/ShowReferences, - webrt/Ticket/Elements/ShowSummary: - - A bunch of work on links. - API cleanups. - Ticket-> Members and MemberOf now return Links objects rather than Tickets Objects - Edit links via the webui works now - -2001-01-18 15:11 jesse - - * HACKING, docs/API: - - Added a bit more documentation and philosophy - to the API file. yanked tobix' old out of date "HACKING" - doc - -2001-01-18 03:18 jesse - - * Makefile, NEWS: - - Headers in incoming mail are now parsed case insensitively. - - Version is now 1.0.7 - -2001-01-17 16:41 jesse - - * Makefile, tools/testdeps: - - updated searchbuilder dependency in testdeps - - revved version in Makefile for release. - -2001-01-17 14:27 jesse - - * Makefile, bin/rt, lib/RT/Date.pm: - - Fixed #45 Permissions bug on redhat 6.0 - Fixed #51 RT CLI doesn't check for valid user - - Implemented a bunch more searching in bin/rt - - Refactored RT::Date a bit. - - Fixed some unreported permissions eits. - -2001-01-16 11:43 jesse - - * webrt/Ticket/Elements/: ShowLinks, ShowMemberOf, ShowMembers, - ShowPeople, ShowSummary: - - Cleaned up and shortened the Ticket Display screen - -2001-01-16 10:56 jesse - - * lib/RT/Ticket.pm, webrt/Ticket/Modify.html: - - Cleaned up and better documented Ticket->SetStatus - Ticket/Modify.html got rid of a whole bunch of evals. - -2001-01-15 23:57 jesse - - * Makefile, lib/MANIFEST, lib/RT/Tickets.pm: - - Removed a deleted file from the manifest. revved the version - -2001-01-15 15:19 jesse - - * lib/RT/: KeywordSelect.pm, Queue.pm: - - Adding the ability to load keyword selects by name. - -2001-01-15 03:49 jesse - - * lib/RT/Ticket.pm, webrt/Ticket/Elements/EditKeywordSelects: - - keyword display now cleaner. doesn't force you to select a keyword if none - is selected yet. - -2001-01-15 03:36 jesse - - * lib/RT/Ticket.pm: - - SetQueue is no-longer heinously broken. thanks eoin - -2001-01-15 03:10 jesse - - * lib/RT/: Queue.pm, User.pm, Action/Notify.pm, Action/Spam.pm: - - removed an old RT::Action that didn't actually do anything useful these days. it'll get replaced later. - - Scrips which sign watchers up for things _actually seem to work_ - (required some frobbing of watchers) - -2001-01-15 02:44 jesse - - * bin/rt, etc/schema.pm, lib/RT/ObjectKeywords.pm, lib/RT/Queue.pm, - lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm, - lib/RT/Watchers.pm, webrt/Elements/ViewUser, - webrt/Ticket/Elements/ShowRequestor: - - Added a 'Type' column to templates, to more easily allow for insertable templates for quick responses from customer service folks ,etc. - Reworked a bunch of the watchers code to not do its own potentially very bogus caching and to reuse more core code. - Oh. and it always returns the expected object type now. - - Redid tobias' old "ViewUser" box to use a set of tickets, rather than a bogus search for watchers (ignoring tickets). - - Fixed a bug in searching for tickets by watcher. - -2001-01-15 00:53 jesse - - * bin/rt, webrt/Elements/SelectOwner, webrt/Elements/TitleBoxStart, - webrt/NoAuth/Login.html, webrt/Ticket/Elements/ShowSummary: - - Added a bunch of doc to bin/rt. probably should have check to see if it runs ;) - TitleBoxStart got the attributes: class, title_href and titleright_href. makes calls to it cleaner. - showsummary got a few more links to the places things should go. - selectOwner now will actually default to nobody if that's the right value. - -2001-01-13 03:22 jesse - - * TODO: - - Changed the TODO file to point to the current TODO list - -2001-01-13 03:18 jesse - - * Makefile: - - Bumped version # for release - -2001-01-13 03:11 jesse - - * bin/rtmux.pl, lib/RT/Queue.pm, lib/RT/Action/SendEmail.pm: - - Fixing a couple minor things in rtmux and Queue.pm so that the mail interfaces work ok. - -2001-01-13 02:34 jesse - - * lib/RT/User.pm: - - Added the ability to generate a random password to RT::User. we don't yet - have a nice way to email this information to the user. which is a real bummer. - -2001-01-12 17:35 jesse - - * etc/config.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - lib/RT/Interface/Web.pm, webrt/Admin/Users/Modify.html, - webrt/SelfService/Create.html, webrt/SelfService/Details.html, - webrt/SelfService/Elements/Header, webrt/SelfService/Elements/Tabs: - - Made ACLs for 'Everyone' work. fixed a few other small ACL bugs. - Made the 'Requestor-mode' ticket create tool work. - -2001-01-12 12:27 jesse - - * webrt/Elements/: SelectDate, SelectOwner: - - Commented out unimplemented select relative date bits. - SelectOwner now lets you pick nobody. - -2001-01-12 03:16 jesse - - * bin/rt, bin/rtmux.pl, lib/RT/Ticket.pm, tools/testdeps: - - Comments and Correspondence work from the cli now. with and without --source (for source data) and --no-edit (to disable invocation of $EDITOR) - - rt and rtmux.pl now drop setgidness as soon as they can. it's happier this - way. really :) - - testdeps now installs File::Temp, which is needed to do safe tempfile usage. - -2001-01-12 00:11 jesse - - * webrt/Elements/: MyRequests, MyTickets: - - Bug fix for #47 (Id flows into subject on 'home' screen) - -2001-01-11 03:34 jesse - - * webrt/Elements/Header: - - Removed extra spaces from the header - -2001-01-11 02:57 jesse - - * webrt/Elements/SelectOwner: - - Made SelectOwner actually show all the right people - -2001-01-11 02:53 jesse - - * tools/testdeps: - - Added a requirement for the current DBIx::SearchBuilder to testdeps - -2001-01-11 02:28 jesse - - * Makefile: - - revved the version for distribution - -2001-01-11 02:28 jesse - - * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, - webrt/Elements/Quicksearch, webrt/Elements/TitleBoxStart, - webrt/Ticket/Display.html, webrt/Ticket/Elements/EditBasics: - - fixed a couple of UI bugs. the 'quick' links in the web ticket view should now all work. - Logger->warn -> Logger->warning in the web ui - -2001-01-10 17:42 jesse - - * Makefile: - - Bumped to 1.3.33 - -2001-01-10 01:46 jesse - - * webrt/Ticket/Attachment/dhandler: - - Date: Wed, 10 Jan 2001 16:22:43 +1000 (EST) From: Byron Ellacott To: rt-devel@fsck.com Subject: Re: [rt-devel] [rt-announce] RT 1.3.30 released List-Id: RT Development [-- Attachment #1 --] [-- Type: text/PLAIN, Encoding: 7bit, Size: 0.7K --] On Wed, 3 Jan 2001, Jesse wrote: [snip] I noticed 1-3-31 sitting around, so I installed that. I'm giving a demonstration tomorrow, so I've been running through the web UI. I noticed a problem with attachments - HTML::Mason was munging everything to be HTML-nice, but a jpg doesn't display if its < characters are changed to <, and it's not good to have on the end of binary attachments. - -2001-01-10 00:24 jesse - - * Makefile: - - Revved the version to 1.3.32 - -2001-01-09 23:57 jesse - - * webrt/Admin/Users/Rights.html: - - file Rights.html was initially added on branch rt-1-1. - -2001-01-09 23:57 jesse - - * lib/RT/Record.pm, lib/RT/User.pm, lib/RT/Interface/Email.pm, - tools/insertdata, webrt/Admin/Elements/UserTabs, - webrt/Admin/Users/Modify.html, webrt/Admin/Users/Rights.html, - webrt/Elements/Quicksearch, webrt/Elements/TitleBoxEnd, - webrt/Elements/TitleBoxStart: - - Did some work on User creation to check for duplicate userids on create. - Better user create error checking. - Switched the TitleBox UI to a compromise between new and old. - - Did a bit of ui work on web based user modification - -2001-01-09 02:15 jesse - - * Makefile, lib/RT/User.pm, tools/insertdata, - webrt/Admin/Users/Modify.html: - - shuffling around hte user password stuff. hopefully the user modification issues seen in 1.3.30 will be fixed. - -2001-01-09 00:48 jesse - - * webrt/Ticket/History.html: - - file History.html was initially added on branch rt-1-1. - -2001-01-09 00:48 jesse - - * docs/keywords: - - file keywords was initially added on branch rt-1-1. - -2001-01-09 00:48 jesse - - * bin/mason_handler.scgi: - - file mason_handler.scgi was initially added on branch rt-1-1. - -2001-01-09 00:48 jesse - - * Makefile, bin/mason_handler.scgi, bin/webmux.pl, docs/keywords, - lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, - webrt/Admin/Elements/GrantQueueRightsTo~, - webrt/Ticket/History.html: - - Started to write out notes on a testsuite. - Started work on a CGI/SpeedyCGI frontend - added a file that was missing in 1.3.30 - -2001-01-08 14:04 jesse - - * NEWS, README: - - Added a web based due-date patch. - -2001-01-06 15:17 jesse - - * etc/schema.pm: - - Added 'Deleted' attributes for tables whose entries can not be safely - removed from the database for ref. integrity problems. - -2001-01-03 23:07 jesse - - * Makefile: - - Bumped version to 1.3.30 - -2001-01-03 23:02 jesse - - * tools/testdeps: - - file testdeps was initially added on branch rt-1-1. - -2001-01-03 23:02 jesse - - * README, bin/testdeps.pl, lib/Makefile.PL, tools/testdeps, - webrt/Elements/TitleBoxStart: - - a bit of quick UI work. - an update to depend on DBIx::SearchBuilder 0.15 (just releaseD) - testdeps moved to tools - -2001-01-03 03:21 jesse - - * bin/rt, lib/RT/Tickets.pm: - - ticket searches for integers are a bit more flexible now (and the code's tighter) - - the rtq section of the new bin/rt appears functional, if underdocced. - -2001-01-02 22:55 jesse - - * lib/RT/Tickets.pm, lib/RT/Interface/Web.pm, - webrt/Search/PickRestriction: - - Imported ivan's keyword search patch, along with a modification to allow - for _not_ selecting keywords. - -2001-01-02 21:45 jesse - - * Makefile, bin/testdeps.pl, lib/RT/KeywordSelect.pm, - lib/RT/ObjectKeyword.pm, lib/RT/ObjectKeywords.pm, - lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Watchers.pm, - lib/RT/Interface/Web.pm, tools/insertdata, webrt/webrt.css, - webrt/Elements/Header, webrt/Elements/TitleBoxStart, - webrt/Elements/ViewUser, webrt/Search/Listing.html, - webrt/Search/PickRestriction, webrt/Ticket/Create.html, - webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowBasics, - webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction, webrt/Ticket/Elements/Tabs: - - Fixed a warning in testdeps (Well, worked around it, anyway) - Added some helper functions for keywords and keyword selects. - - did a bunch of UI cleanup. started to color-code the webui - - started work on a generic queue listing format in Tickets.pm - -2001-01-02 15:02 jesse - - * webrt/SelfService/Elements/ShowTransaction: - - file ShowTransaction was initially added on branch rt-1-1. - -2001-01-02 15:02 jesse - - * webrt/SelfService/: Create.html, Details.html, - Elements/GotoTicket, Elements/Header, Elements/ShowTransaction, - Elements/Tabs: - - Fleshed out more of the requestor UI. - It's good enough for the alpha. yay! - -2001-01-02 15:02 jesse - - * webrt/SelfService/Elements/GotoTicket: - - file GotoTicket was initially added on branch rt-1-1. - -2001-01-01 19:06 jesse - - * webrt/Ticket/: Modify.html, ModifyDates.html, ModifyPeople.html, - Elements/EditBasics, Elements/EditKeywordSelects, - Elements/ShowDates, Elements/ShowSummary: - - Even yet still more Technicolor! - -2001-01-01 18:42 jesse - - * webrt/NoAuth/images/spacer.gif: - - file spacer.gif was initially added on branch rt-1-1. - -2001-01-01 18:42 jesse - - * webrt/NoAuth/Reminder.html: - - file Reminder.html was initially added on branch rt-1-1. - -2001-01-01 18:42 jesse - - * webrt/Elements/Section: - - file Section was initially added on branch rt-1-1. - -2001-01-01 18:42 jesse - - * lib/RT/CurrentUser.pm, lib/RT/KeywordSelect.pm, webrt/webrt.css, - webrt/Admin/Keywords/index.html, webrt/Admin/Queues/People.html, - webrt/Elements/Header, webrt/Elements/ListActions, - webrt/Elements/MyRequests, webrt/Elements/MyTickets, - webrt/Elements/Section, webrt/Elements/Submit, - webrt/Elements/TitleBoxEnd, webrt/Elements/TitleBoxStart, - webrt/NoAuth/Login.html, webrt/NoAuth/Reminder.html, - webrt/NoAuth/images/spacer.gif, webrt/Ticket/Display.html, - webrt/Ticket/ModifyPeople.html, webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction: - - A bunch of UI work. - Ticket Display is significantly different. and _much_ faster loading. - A color style guide for the web ui is forthcoming. - - removed a Die from CurrentUser. - -2000-12-30 03:27 jesse - - * webrt/Elements/Tabs: - - fixed a ui nit from ivan - -2000-12-30 03:03 jesse - - * webrt/Ticket/Elements/ShowSummary: - - fixed a hyperlink. - -2000-12-30 00:07 jesse - - * Makefile: - - bumped version for release - -2000-12-30 00:03 jesse - - * etc/config.pm, lib/RT/User.pm, - webrt/Admin/Elements/ModifyKeywordSelect, - webrt/Admin/Global/Keywords.html, - webrt/Admin/KeywordSelects/index.html, - webrt/Admin/Keywords/Modify.html, webrt/Admin/Keywords/index.html, - webrt/Admin/Queues/Keywords.html, webrt/Admin/Users/index.html: - - Fixed a bug in keyword creation that caused urls and param values to get buggered. - - Passwords are now encrypted in the database - -2000-12-29 05:54 jesse - - * bin/rt, lib/RT/Link.pm, lib/RT/Ticket.pm, - lib/RT/Interface/Web.pm, webrt/Ticket/Display.html, - webrt/Ticket/Elements/ShowDependencies, - webrt/Ticket/Elements/ShowLinks: - - Did a bunch of work on the linking interface. It's now got - a much easier API. and it's twice as functional (you can delete links) - - Did the proof-of concept for the link code in the CLI. it'll need - fleshing out tomorrow. - - Fleshed out other parts of the CLI. - - stayed up way too late. - -2000-12-29 00:30 jesse - - * Makefile, bin/rt, lib/RT/Keyword.pm, lib/RT/Ticket.pm: - - Added keyword support to the CLI. - fixed a couple of Keyword core bugs - -2000-12-28 03:56 jesse - - * bin/rt, bin/testdeps.pl, lib/RT/Keyword.pm, - lib/RT/KeywordSelect.pm, lib/RT/User.pm: - - Removed unused keyword related code. added in a bit of - new keyword related code to get "relative" paths of keywords. - - fixed a longstanding warning in ACL checking. - - first 1/2 of keywords support for the new rt cli. - - added Tie::IxHash to testdeps.pl (keywords needs it) - -2000-12-27 02:19 jesse - - * webrt/Ticket/Elements/ShowTransaction: - - missed a comma - -2000-12-27 01:21 jesse - - * webrt/Admin/Global/Keywords.html: - - file Keywords.html was initially added on branch rt-1-1. - -2000-12-27 01:21 jesse - - * etc/schema.pm, lib/RT/ACE.pm, lib/RT/KeywordSelect.pm, - lib/RT/KeywordSelects.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm, - lib/RT/Transaction.pm, webrt/Admin/Elements/SystemTabs, - webrt/Admin/Global/Keywords.html, webrt/Admin/Queues/Keywords.html, - webrt/Ticket/Create.html, webrt/Ticket/ModifyPeople.html, - webrt/Ticket/Elements/EditKeywordSelects, - webrt/Ticket/Elements/ShowKeywordSelects, - webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction: - - Added the ability to name keyword selects. - first round of ACLing for keywords. - - Added the ability to create KeywordSelects which apply to all queues (Rather than just - a single queue) - - misc bigfixes. - -2000-12-26 02:56 jesse - - * webrt/Elements/SelectKeywordOptions: - - file SelectKeywordOptions was initially added on branch rt-1-1. - -2000-12-26 02:56 jesse - - * webrt/Admin/Keywords/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-12-26 02:56 jesse - - * webrt/Admin/Queues/Keywords.html: - - file Keywords.html was initially added on branch rt-1-1. - -2000-12-26 02:56 jesse - - * webrt/Elements/SelectKeyword: - - file SelectKeyword was initially added on branch rt-1-1. - -2000-12-26 02:56 jesse - - * bin/webmux.pl, etc/schema.pm, lib/RT/Keyword.pm, - lib/RT/KeywordSelect.pm, lib/RT/KeywordSelects.pm, - lib/RT/Keywords.pm, lib/RT/ObjectKeyword.pm, - lib/RT/ObjectKeywords.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm, - lib/RT/Watchers.pm, webrt/Admin/Elements/ModifyKeyword, - webrt/Admin/Elements/ModifyKeywordSelect, - webrt/Admin/Elements/QueueTabs, webrt/Admin/Elements/Tabs, - webrt/Admin/KeywordSelects/index.html, - webrt/Admin/Keywords/Modify.html, webrt/Admin/Keywords/index.html, - webrt/Admin/Queues/Keywords.html, webrt/Elements/SelectKeyword, - webrt/Elements/SelectKeywordOptions, webrt/Ticket/Modify.html, - webrt/Ticket/Elements/EditKeywordSelects, - webrt/Ticket/Elements/ShowKeywordSelects: - - My first pass at making the keywords stuff work more like the rest of the RT core. - A couple of minor fixes on non-keywords things, but mostly this was an - edit of the keywords code to: - 1. make the admin UI work more like the rest of the admin ui - (still need to do "global" keyword selections) - - 2. bring the coding style of the keywords stuff more into line - with the rest of the codebase - - 3. flesh out the helper methods in the keywords modules. - -2000-12-24 02:04 jesse - - * lib/RT/: Keyword.pm, KeywordSelect.pm, ObjectKeyword.pm: - - A first round of commentary and cleanup on a few modules - -2000-12-24 01:34 jesse - - * webrt/Ticket/Elements/ShowKeywordSelects: - - file ShowKeywordSelects was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Ticket/Elements/EditKeywordSelects: - - file EditKeywordSelects was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Admin/: KeywordSelects/Modify.html, Keywords/Modify.html: - - file Modify.html was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Admin/KeywordSelects/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Admin/Elements/ModifyKeyword: - - file ModifyKeyword was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Admin/Elements/ModifyKeywordSelect: - - file ModifyKeywordSelect was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Admin/Elements/SelectModifyKeyword: - - file SelectModifyKeyword was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * webrt/Admin/Elements/SelectModifyKeywordSelect: - - file SelectModifyKeywordSelect was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT/ObjectKeyword.pm: - - file ObjectKeyword.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT/Keyword.pm: - - file Keyword.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT/KeywordSelect.pm: - - file KeywordSelect.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/test.pl: - - file test.pl was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT/ObjectKeywords.pm: - - file ObjectKeywords.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT/KeywordSelects.pm: - - file KeywordSelects.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT/Keywords.pm: - - file Keywords.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * Makefile, etc/acl.Pg, etc/schema.pm, lib/MANIFEST, - lib/MANIFEST.SKIP, lib/Makefile.PL, lib/RT.pm, lib/test.pl, - lib/RT/Keyword.pm, lib/RT/KeywordSelect.pm, - lib/RT/KeywordSelects.pm, lib/RT/Keywords.pm, - lib/RT/ObjectKeyword.pm, lib/RT/ObjectKeywords.pm, - lib/RT/Ticket.pm, webrt/Admin/Elements/ModifyKeyword, - webrt/Admin/Elements/ModifyKeywordSelect, - webrt/Admin/Elements/SelectModifyKeyword, - webrt/Admin/Elements/SelectModifyKeywordSelect, - webrt/Admin/Elements/Tabs, webrt/Admin/KeywordSelects/Modify.html, - webrt/Admin/KeywordSelects/index.html, - webrt/Admin/Keywords/Modify.html, webrt/Ticket/Modify.html, - webrt/Ticket/Elements/EditBasics, - webrt/Ticket/Elements/EditKeywordSelects, - webrt/Ticket/Elements/ShowKeywordSelects, - webrt/Ticket/Elements/ShowSummary: - - Importing two largish patches from ivan@420.am: - First up, ivan switched lib/RT over to using MakeMaker..so now - we get man pages for the core modules and a bunch of other cool stuff. - - Second: ivan handed us an almost complete keywords system. Over the next - week or two, I'm going to be adding ACL support to the keywords system - and starting to integrate bits of it better into the rest of the core - (though it's nearly all done already). - - Thanks, ivan! - -2000-12-24 01:34 jesse - - * lib/MANIFEST: - - file MANIFEST was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/Makefile.PL: - - file Makefile.PL was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/RT.pm: - - file RT.pm was initially added on branch rt-1-1. - -2000-12-24 01:34 jesse - - * lib/MANIFEST.SKIP: - - file MANIFEST.SKIP was initially added on branch rt-1-1. - -2000-12-23 23:45 jesse - - * Makefile, webrt/Ticket/Elements/Tabs: - - made the links in the ticket tool bar point to the right places. - -2000-12-23 23:15 jesse - - * lib/RT/Ticket.pm: - - fixing a typo and the docs. - -2000-12-23 23:12 jesse - - * lib/RT/Ticket.pm: - - the internal function _SetTold shouldn't be hitting an ACL check. - -2000-12-23 17:37 jesse - - * lib/RT/Ticket.pm, webrt/Ticket/Display.html, - webrt/Ticket/Modify.html, webrt/Ticket/ModifyDates.html, - webrt/Ticket/ModifyLinks.html, webrt/Ticket/ModifyPeople.html, - webrt/Ticket/Update.html, webrt/Ticket/Elements/Tabs, - webrt/Ticket/Elements/TicketToolBox: - - Cleaned up a bit of date diff related functionality. - - Did work on the ticket tool bar. - -2000-12-23 16:46 jesse - - * lib/RT/Record.pm: - - Lets try that again.. - -2000-12-23 16:39 jesse - - * lib/RT/Record.pm: - - LongSinceUpdatedAsString is now actually relative :) - -2000-12-23 16:09 jesse - - * lib/RT/Tickets.pm: - - added a default to LimitStatus. - -2000-12-23 01:47 jesse - - * bin/: rt, testdeps.pl: - - updated testdeps to require the latest mason (for ease of debugging) - the new combined bin/rt actually implements the behavior of rtq and rt -show - fully (I believe). next up, more ticket modification and a code cleanup - -2000-12-22 18:37 jesse - - * Makefile: - - bumped to 1.3.28 for release - -2000-12-19 22:38 jesse - - * lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm, - lib/RT/Interface/Web.pm, webrt/Elements/Tabs, - webrt/Ticket/ModifyPeople.html, webrt/Ticket/Elements/EditPeople, - webrt/User/Prefs.html: - - Removed outdated CC request to and BCC request to - did some UI touchups. - - started a bit of work in tickets.pm for the new CLI (more explicit searching) - -2000-12-19 21:50 jesse - - * bin/rt: - - Modifying ticket requestors from the commandline works. yay. - Simplified the commandline arguments a bit too. - -2000-12-19 18:37 jesse - - * bin/: mason_handler.fcgi, webmux.pl: - - updaes to webmux.pl to work on with new versions of HTML::Mason - -2000-12-19 14:05 jesse - - * webrt/Ticket/Display.html: - - Fixed a bug in Ticket/Display.html that caused navigation not to work within new tickets. - -2000-12-19 04:03 jesse - - * bin/rt: - - implemented --history (show ticket history) - and --limit-status (limit to a ticket status) - just to make sure that this works at all. it does. - - With the new ui, you'll be able to trivially perform actions on large #s of tickets. - -2000-12-19 03:38 jesse - - * bin/rt: - - After playing with a few Getopt variants, I've settled on Getopt::Long for now... - and implemented the skeleton of the new RT cli. I suspect that with another day's work, - it should be mostly functional. yay. - -2000-12-19 03:38 jesse - - * bin/rt: - - file rt was initially added on branch rt-1-1. - -2000-12-18 19:34 jesse - - * docs/design_docs/cli_spec: - - file cli_spec was initially added on branch rt-1-1. - -2000-12-18 19:34 jesse - - * docs/design_docs/cli_spec: - - Added the CLI spec from deborah. - -2000-12-18 02:11 jesse - - * webrt/Elements/: CreateTicket, GotoTicket: - - Fixed a basepath error. - -2000-12-18 01:19 jesse - - * webrt/Elements/CreateTicket: - - file CreateTicket was initially added on branch rt-1-1. - -2000-12-18 01:19 jesse - - * webrt/Elements/GotoTicket: - - file GotoTicket was initially added on branch rt-1-1. - -2000-12-18 01:19 jesse - - * README, webrt/Admin/Queues/Modify.html, - webrt/Admin/Users/Modify.html, webrt/Elements/CreateTicket, - webrt/Elements/GotoTicket, webrt/Search/Listing.html: - - A few more changes from Lee Ann and a couple of files I missed on the earlier checkins. - -2000-12-18 01:14 jesse - - * webrt/Admin/Groups/Rights.html: - - file Rights.html was initially added on branch rt-1-1. - -2000-12-18 01:14 jesse - - * webrt/Admin/Groups/: Members.html, Rights.html: - - a couple UI tweaks from Lee Ann Goldstein - -2000-12-18 00:51 jesse - - * webrt/: Admin/Elements/SystemTabs, Admin/Groups/index.html, - Admin/Users/index.html, Elements/Submit, Elements/Tabs: - - More UI hacking. whee - -2000-12-17 23:55 jesse - - * webrt/: Elements/SelectNewTicketQueue, Elements/SelectOwner, - Elements/Tabs, Ticket/Create.html, Ticket/Elements/Tabs: - - ui hacking to add the "Create Ticket" and "Goto Ticket" ui elements at the top. - -2000-12-17 22:17 jesse - - * lib/RT/Ticket.pm, lib/RT/Transaction.pm, - webrt/Elements/MessageBox, webrt/Ticket/Modify.html, - webrt/Ticket/ModifyPeople.html: - - Fixing bugs 7,8,28 - -2000-12-17 02:38 jesse - - * webrt/Ticket/Elements/ShowDates: - - *sigh* typo in ShowDates. - -2000-12-17 02:34 jesse - - * lib/RT/Date.pm, webrt/Ticket/Elements/EditDates, - webrt/Ticket/Elements/ShowDates: - - A bit of work on Dates. a postgres fix from ivan and some display prettification. - -2000-12-17 02:15 jesse - - * Makefile, webrt/Ticket/Elements/TicketToolBox: - - commeted out some toolbar actions which don't work yet. - - bumped the version to 1.3.27 for imminent release. - -2000-12-17 01:51 jesse - - * lib/RT/Attachment.pm: - - The ACL problem on attachments was a bootstrapping issue. couldn't check acls because it - couldn't necessarily see what to check - -2000-12-17 01:44 jesse - - * lib/RT/Attachment.pm: - - acl fix for attachments. - -2000-12-17 01:15 jesse - - * lib/RT/Ticket.pm: - - fixing ugly disgusting ACL bugs - -2000-12-17 00:35 jesse - - * lib/RT/Transaction.pm, lib/RT/User.pm, - webrt/Ticket/Elements/ShowTransaction: - - Fixing bugs in Transaction ACLs. - -2000-12-16 03:56 jesse - - * webrt/Admin/Groups/Members.html: - - ui nit in admin/groups/members. - -2000-12-16 03:31 jesse - - * lib/RT/: Group.pm, GroupMember.pm: - - $object->$SUPER::Foo is wrong. $object->SUPER::Foo is not. - -2000-12-16 03:28 jesse - - * lib/RT/Ticket.pm: - - Rights checks for ticket ownership work best when the right that's set is the same - as the right that's checked for *sigh* - -2000-12-16 03:26 jesse - - * webrt/Admin/Groups/Members.html: - - Fixed a couple bugs in Group mebership administration code. - -2000-12-16 03:04 jesse - - * webrt/: Admin/Elements/GroupTabs, Admin/Elements/QueueTabs, - Admin/Elements/SystemTabs, Admin/Elements/Tabs, - Admin/Elements/UserTabs, Admin/Global/index.html, - Admin/Groups/Modify.html, Admin/Groups/index.html, - Admin/Queues/People.html, Admin/Queues/index.html, - Admin/Users/Modify.html, Admin/Users/index.html, - Elements/SelectWatcherType, Elements/Tabs, Ticket/Create.html, - Ticket/Display.html, Ticket/Elements/Tabs: - - Bugfix in user admin (no longer automatically revokes "privileged status) - a bunch of tab-related UI cleanup. the start of tabs that reflect the current page. - - added the ability to configure queue watchers from the web ui - -2000-12-16 03:04 jesse - - * webrt/Admin/Queues/People.html: - - file People.html was initially added on branch rt-1-1. - -2000-12-16 00:58 jesse - - * webrt/Admin/Users/index.html: - - typo fixing. - -2000-12-15 19:12 jesse - - * webrt/Admin/Global/GroupRights.html: - - file GroupRights.html was initially added on branch rt-1-1. - -2000-12-15 19:12 jesse - - * webrt/Admin/Global/UserRights.html: - - file UserRights.html was initially added on branch rt-1-1. - -2000-12-15 19:12 jesse - - * webrt/Admin/Elements/GroupTabs: - - file GroupTabs was initially added on branch rt-1-1. - -2000-12-15 19:12 jesse - - * lib/RT/ACE.pm, lib/RT/Group.pm, lib/RT/Groups.pm, - lib/RT/Record.pm, lib/RT/Scrip.pm, lib/RT/ScripAction.pm, - lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/User.pm, - lib/RT/Users.pm, tools/insertdata, webrt/Admin/Elements/GroupTabs, - webrt/Admin/Elements/SystemTabs, webrt/Admin/Global/ACL.html, - webrt/Admin/Global/GroupRights.html, - webrt/Admin/Global/UserRights.html, - webrt/Admin/Groups/Members.html, webrt/Admin/Groups/Modify.html, - webrt/Admin/Groups/index.html, webrt/Admin/Users/Modify.html, - webrt/Admin/Users/index.html: - - A bunch of cleanup work on Users and Groups (and a couple of small bugfixes, one - which might prevent install of Alpha 2) mostly aimed at improving the admin ui. - - We now have two levels of "Privileged" for a user, 1 which means "can be granted rights" - and 2 which means "should not be futzed with by the user" - -2000-12-14 23:04 jesse - - * webrt/Ticket/Attachment/dhandler: - - Accidentally left out of the last rev. sorry about that. - -2000-12-14 23:04 jesse - - * webrt/Ticket/Attachment/dhandler: - - file dhandler was initially added on branch rt-1-1. - -2000-12-12 20:44 jesse - - * Makefile: - - Bumped version to 1.3.26. This is RT2 Alpha 2, folks. - -2000-12-12 20:34 jesse - - * lib/RT/Attachment.pm, lib/RT/Record.pm, lib/RT/Ticket.pm, - lib/RT/Transaction.pm, lib/RT/User.pm, - webrt/Ticket/Elements/ShowTransaction: - - Attachment display in the webui now just works [tm] RT2 Alpha 2 will be rolled later tonight. - -2000-12-12 19:03 jesse - - * webrt/Admin/Global/Template.html: - - file Template.html was initially added on branch rt-1-1. - -2000-12-12 19:03 jesse - - * webrt/Admin/Global/Templates.html: - - file Templates.html was initially added on branch rt-1-1. - -2000-12-12 19:03 jesse - - * README, bin/webmux.pl, lib/RT/Attachment.pm, lib/RT/Template.pm, - lib/RT/Transaction.pm, webrt/Admin/Elements/SelectTemplate, - webrt/Admin/Elements/SystemTabs, webrt/Admin/Global/Template.html, - webrt/Admin/Global/Templates.html, - webrt/Admin/Queues/Templates.html, - webrt/Ticket/Elements/ShowTransaction: - - Working on attachments support. - - did some work on global templates - -2000-12-12 15:15 jesse - - * lib/RT/Template.pm, lib/RT/Templates.pm, tools/insertdata: - - Core support for system-scoped templates - -2000-12-12 14:12 jesse - - * webrt/Admin/: Queues/Modify.html, Users/Create.html, - Users/Modify.html: - - Fixed queue and user creation problems. - -2000-12-12 03:05 jesse - - * webrt/Ticket/: Link.html, ModifyLinks.html, Elements/ShowSummary, - Elements/Tabs: - - Brought the still basic link editing ui into conformance with the rest of the ticket ui - -2000-12-12 03:05 jesse - - * webrt/Ticket/ModifyLinks.html: - - file ModifyLinks.html was initially added on branch rt-1-1. - -2000-12-12 02:41 jesse - - * webrt/Ticket/: ModifyDates.html, ModifyPeople.html: - - split out the ticket modify screen into 3 more bite-sized pages. - -2000-12-12 02:41 jesse - - * webrt/Ticket/ModifyPeople.html: - - file ModifyPeople.html was initially added on branch rt-1-1. - -2000-12-12 02:41 jesse - - * webrt/Ticket/ModifyDates.html: - - file ModifyDates.html was initially added on branch rt-1-1. - -2000-12-12 02:41 jesse - - * webrt/Ticket/: Modify.html, Elements/Tabs: - - [no log message] - -2000-12-11 15:01 jesse - - * webrt/NoAuth/Login.html: - - file Login.html was initially added on branch rt-1-1. - -2000-12-11 15:01 jesse - - * webrt/NoAuth/Logout.html: - - file Logout.html was initially added on branch rt-1-1. - -2000-12-11 15:01 jesse - - * webrt/: Login.html, Logout.html, autohandler, Elements/Footer, - Elements/Header, NoAuth/Login.html, NoAuth/Logout.html: - - Moving Login and Logout around so they work right with the new NoAuth scheme - -2000-12-11 05:00 jesse - - * webrt/: Login.html, autohandler: - - fixed a couple login bugs. implemented some logic to deal with different auth classes: - /NoAuth/ and /SelfService/ - -2000-12-11 01:46 jesse - - * webrt/: rt.jpg, Elements/Header, Elements/MyRequests, - Elements/MyTickets, Search/Listing.html, Ticket/Create.html, - Ticket/Create_Detail.html, Ticket/Display.html, Ticket/Modify.html, - Ticket/Update.html, Ticket/Elements/ShowTransaction, - Ticket/Elements/Tabs, Ticket/Elements/TicketToolBox: - - Work on ticket display. we're getting there. - -2000-12-10 23:53 jesse - - * webrt/Admin/Queues/Template.html: - - file Template.html was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/Queues/Templates.html: - - file Templates.html was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/Elements/QueueTabs: - - file QueueTabs was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/Elements/SystemTabs: - - file SystemTabs was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/: Global/Scrips.html, Queues/Scrips.html: - - file Scrips.html was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/Elements/UserTabs: - - file UserTabs was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/: Global/ACL.html, Queues/ACL.html: - - file ACL.html was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * webrt/Admin/Global/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-12-10 23:53 jesse - - * Makefile, webrt/index.html, webrt/Admin/ModifyUser, - webrt/Admin/index.html, webrt/Admin/Elements/Header, - webrt/Admin/Elements/QueueTabs, webrt/Admin/Elements/SystemTabs, - webrt/Admin/Elements/Tabs, webrt/Admin/Elements/UserTabs, - webrt/Admin/Global/ACL.html, webrt/Admin/Global/Scrips.html, - webrt/Admin/Global/index.html, webrt/Admin/Queues/ACL.html, - webrt/Admin/Queues/Modify.html, webrt/Admin/Queues/Scrips.html, - webrt/Admin/Queues/Template.html, - webrt/Admin/Queues/Templates.html, webrt/Admin/Queues/index.html, - webrt/Admin/Users/Modify.html, webrt/Admin/Users/index.html, - webrt/Elements/Header, webrt/Elements/Tabs: - - Bunch of work on the web administration framework. - Lots of stuff should be much cleaner now. - -2000-12-10 01:21 jesse - - * Makefile: - - Bumped version to 1.3.25 for release - -2000-12-10 01:15 jesse - - * webrt/: Elements/TitleBoxEnd, Elements/TitleBoxStart, - SelfService/Elements/MyRequests, SelfService/Elements/Tabs, - Ticket/Update.html, User/Prefs.html: - - Work on SSRI and a bit of overall UI tweaking - -2000-12-09 22:48 jesse - - * webrt/SelfService/Elements/Header: - - file Header was initially added on branch rt-1-1. - -2000-12-09 22:48 jesse - - * webrt/SelfService/Elements/: Header, MyRequests, Tabs: - - Missed a couple files for SSRI - -2000-12-09 22:48 jesse - - * webrt/SelfService/Elements/MyRequests: - - file MyRequests was initially added on branch rt-1-1. - -2000-12-09 22:48 jesse - - * webrt/SelfService/Elements/Tabs: - - file Tabs was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/SelfService/Create.html: - - file Create.html was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/SelfService/Details.html: - - file Details.html was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/SelfService/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/SelfService/Closed.html: - - file Closed.html was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/Elements/SelectNewTicketQueue: - - file SelectNewTicketQueue was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/Admin/Groups/Members.html: - - file Members.html was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * webrt/Admin/Elements/SelectUsers: - - file SelectUsers was initially added on branch rt-1-1. - -2000-12-09 22:43 jesse - - * lib/RT/CurrentUser.pm, lib/RT/Group.pm, lib/RT/GroupMember.pm, - lib/RT/Record.pm, lib/RT/User.pm, lib/RT/Users.pm, - webrt/Login.html, webrt/autohandler, - webrt/Admin/Elements/SelectModifyGroup, - webrt/Admin/Elements/SelectUsers, webrt/Admin/Groups/Members.html, - webrt/Admin/Groups/Modify.html, webrt/Admin/Groups/index.html, - webrt/Admin/Users/Modify.html, webrt/Admin/Users/index.html, - webrt/Elements/Header, webrt/Elements/SelectNewTicketQueue, - webrt/SelfService/Closed.html, webrt/SelfService/Create.html, - webrt/SelfService/Details.html, webrt/SelfService/index.html, - webrt/User/Prefs.html: - - First rev of SSRI, the Self Service Requestor Interface. - Did a bunch of work on groups and the admin UI - -2000-12-05 23:24 jesse - - * webrt/Admin/Groups/Modify.html: - - file Modify.html was initially added on branch rt-1-1. - -2000-12-05 23:24 jesse - - * webrt/Admin/Groups/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-12-05 23:24 jesse - - * webrt/Admin/Elements/SelectModifyGroup: - - file SelectModifyGroup was initially added on branch rt-1-1. - -2000-12-05 23:24 jesse - - * lib/RT/Action/NotifyAsComment.pm: - - file NotifyAsComment.pm was initially added on branch rt-1-1. - -2000-12-05 23:24 jesse - - * lib/RT/Group.pm, lib/RT/GroupMembers.pm, lib/RT/Scrip.pm, - lib/RT/Action/Notify.pm, lib/RT/Action/NotifyAsComment.pm, - lib/RT/Action/SendEmail.pm, tools/insertdata, - webrt/Admin/Elements/SelectModifyGroup, - webrt/Admin/Groups/Modify.html, webrt/Admin/Groups/index.html, - webrt/Admin/Queues/Modify.html, webrt/Admin/Queues/index.html: - - Lots of work on groups. I think the core is basically set. UI has been started - - Scrips got even more work and more code. they now work at least as well as - they ever have _and_ they now do it for the right reasons. - -2000-12-02 13:44 jesse - - * Makefile: - - - fixed a local customization in the makefile - -2000-12-02 13:34 jesse - - * Makefile: - - bumped version to 1.0.6 - -2000-12-02 03:22 jesse - - * webrt/Ticket/Link.html: - - file Link.html was initially added on branch rt-1-1. - -2000-12-02 03:22 jesse - - * lib/RT/Scrip.pm, lib/RT/ScripActions.pm, lib/RT/Scrips.pm, - webrt/Ticket/Link.html: - - catching some stragglers. - -2000-12-02 03:22 jesse - - * lib/RT/ScripActions.pm: - - file ScripActions.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * webrt/Admin/Elements/SelectScripAction: - - file SelectScripAction was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * webrt/Admin/Elements/SelectScripCondition: - - file SelectScripCondition was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * lib/RT/: Action/Generic.pm, Condition/Generic.pm: - - file Generic.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * lib/RT/Condition/AnyTransaction.pm: - - file AnyTransaction.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * lib/RT/Condition/NewDependency.pm: - - file NewDependency.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * lib/RT/ScripAction.pm: - - file ScripAction.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * lib/RT/ScripCondition.pm: - - file ScripCondition.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * lib/RT/ScripConditions.pm: - - file ScripConditions.pm was initially added on branch rt-1-1. - -2000-12-02 03:20 jesse - - * bin/webmux.pl, docs/design_docs/subscription-definitions.txt, - etc/schema.pm, lib/RT/Action.pm, lib/RT/Scrip.pm, - lib/RT/ScripAction.pm, lib/RT/ScripCondition.pm, - lib/RT/ScripConditions.pm, lib/RT/ScripScope.pm, - lib/RT/ScripScopes.pm, lib/RT/Scrips.pm, lib/RT/Transaction.pm, - lib/RT/Action/Generic.pm, lib/RT/Action/Notify.pm, - lib/RT/Action/OpenDependent.pm, lib/RT/Action/ResolveMembers.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Action/SendEmailOnResolve.pm, - lib/RT/Action/StallDependent.pm, - lib/RT/Condition/AnyTransaction.pm, lib/RT/Condition/Generic.pm, - lib/RT/Condition/NewDependency.pm, tools/insertdata, - webrt/Admin/Elements/SelectScripAction, - webrt/Admin/Elements/SelectScripCondition: - - Major major major work on scrips - scrips now specify a 'Stage' which has only one value for now but should be easier to add in other - points in the code where they get called - - What used to be called Scrip got split into ScripCondition and ScripAction - - ScripScope got renamed 'Scrip', like it should have been from the getgo. - - Did some work to the scrip mailing routines.All in all, scrips are much - cleaner and more flexible. and at least as functional as they were last night. - - I'll be adjusting the templates as I get to them - -2000-12-01 14:02 jesse - - * NEWS: - - fixed a display bug in how we split messages for the webui - -2000-11-30 02:18 jesse - - * lib/RT/Action/AutoReply.pm, lib/RT/Action/SendEmail.pm, - tools/insertdata: - - Working on cleaning up the Scrips system. The whole templating system - was really, really incredibly overdesigned and badly implemented on the first go-round. - Over the next few checkins, I'll be cleaning it up and cleaning it out... - -2000-11-29 16:31 jesse - - * bin/testdeps.pl: - - updated apache::session dependency - -2000-11-29 01:32 jesse - - * lib/RT/ACE.pm, lib/RT/ScripScope.pm, lib/RT/Ticket.pm, - lib/RT/Transaction.pm, lib/RT/User.pm, lib/RT/Action/AutoReply.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Interface/Email.pm, - webrt/Admin/Elements/SelectScrip, - webrt/Admin/Elements/SelectTemplate, - webrt/Ticket/Create_Detail.html: - - Work on scrips all around: - web ui cleanups - Action::SendEmail cleanups - - work on acls for Ticket creation. - now users who only have "CreateTicket" can actually create tickets, - even if they can't see the ticket once created. - RT1's "allow nonmembers to create requests" can be replicated by - granting the metagroup 'requestors' the right "CreateTicket". - - Mail gateway got a lot of debugging stubs. mail gateway now uses - modern semantics for Create. - -2000-11-28 17:46 jesse - - * lib/RT/User.pm: - - cacheed acl decisions are now properly granular. - -2000-11-28 17:39 jesse - - * lib/RT/User.pm: - - Cached ACL decisions are now expire after 2 minutes. - -2000-11-28 03:37 jesse - - * etc/config.pm, lib/RT/Ticket.pm, webrt/Ticket/Update.html, - webrt/Ticket/Elements/ShowReferences, - webrt/Ticket/Elements/ShowTransaction: - - fixed a small bug in ticket update. - fixed a set of bugs in "external" links that were discovered when my roommate suggested - that RT could be used as an mp3 playlist server. Now it can. no, you really don't want to. - At least until we have asset managment. - -2000-11-28 00:20 jesse - - * Makefile, lib/RT/Ticket.pm, lib/RT/Transaction.pm, - lib/RT/Action/SendEmail.pm: - - a couple little tweask to transaction and sendemail. - - bumped the version # - -2000-11-28 00:12 jesse - - * webrt/Ticket/: Display.html, LinkIt.html, ProcessUpdate.html, - Update.html, Elements/ShowSummary, Elements/ShowTransaction, - Elements/TicketToolBox: - - Work on cleaning up the web ui. got rid of processupdate.html. - cleaned up the code in display.html.. linking is no longer nearly as offensive. - -2000-11-27 20:26 jesse - - * webrt/Ticket/Elements/ShowRequestor: - - small display fix to not show nobody as a possible requestor - -2000-11-27 20:05 jesse - - * lib/RT/Ticket.pm, lib/RT/User.pm, webrt/Ticket/Display.html: - - Updates to how Create handles Requestor, Cc and Admin Cc. - it's now much more flexible, cleaner and simpler. yay. - -2000-11-27 04:01 jesse - - * webrt/Elements/: Error, Header, MyRequests: - - Web error reporting tweaks. - added MyRequests to the front page - -2000-11-27 04:01 jesse - - * webrt/Elements/MyRequests: - - file MyRequests was initially added on branch rt-1-1. - -2000-11-27 03:30 jesse - - * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, - webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowHistory: - - more work on ACLs - - Ticket.pm has been fully ACLed. - Did work on web ticket create. it's no longer a festering pile of garbage. - Now it's more of an office wastepaper basket full of clean white 20lb paper. - Seriously, though, it's cleaner. I got rid of some of Tobias' temporary ticket creation - code. - -2000-11-26 23:45 jesse - - * lib/RT/ACE.pm, lib/RT/GroupMember.pm, lib/RT/Queue.pm, - lib/RT/Queues.pm, lib/RT/Template.pm, lib/RT/Ticket.pm, - lib/RT/User.pm, lib/RT/Interface/Web.pm, tools/insertdata, - webrt/Admin/Elements/ModifyQueue, webrt/Elements/Header, - webrt/Elements/Tabs: - - - - lots more ACL work. - a little bit of UI cleanup. - -2000-11-25 01:56 jesse - - * lib/RT/Tickets.pm, webrt/index.html, - webrt/Ticket/Elements/ShowDates: - - made "my requests" doable. - fixed some ui in showdates. - -2000-11-24 20:14 jesse - - * lib/RT/: Queue.pm, User.pm: - - Fixed a couple of bugs in HasSystemRight that make RT install correctly again. - -2000-11-24 19:21 jesse - - * etc/schema.pm: - - schema fix to make pg happy - -2000-11-22 03:08 jesse - - * webrt/Ticket/Update.html: - - cleaned up the ticket udpdate form. made it more concise.:: - -2000-11-22 03:04 jesse - - * webrt/Ticket/Update.html: - - cleaning up the ticket update form - -2000-11-22 02:49 jesse - - * bin/testdeps.pl: - - bumped searchbuilder dependency to the version now in CPAN... - -2000-11-22 02:31 jesse - - * Makefile, lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/Action.pm, - lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/CurrentUser.pm, - lib/RT/Date.pm, lib/RT/EasySearch.pm, lib/RT/Group.pm, - lib/RT/GroupMember.pm, lib/RT/GroupMembers.pm, lib/RT/Groups.pm, - lib/RT/Handle.pm, lib/RT/Link.pm, lib/RT/Links.pm, lib/RT/Queue.pm, - lib/RT/Queues.pm, lib/RT/Record.pm, lib/RT/Scrip.pm, - lib/RT/ScripScope.pm, lib/RT/ScripScopes.pm, lib/RT/Scrips.pm, - lib/RT/Template.pm, lib/RT/Templates.pm, lib/RT/Ticket.pm, - lib/RT/Tickets.pm, lib/RT/Transaction.pm, lib/RT/Transactions.pm, - lib/RT/User.pm, lib/RT/Users.pm, lib/RT/Utils.pm, - lib/RT/Watcher.pm, lib/RT/Watchers.pm: - - Bumped version to 1.3.23 - Added pod headers to most core modules? - -2000-11-21 23:05 jesse - - * webrt/Ticket/Elements/ShowSummary: - - removed a dead link - -2000-11-21 04:07 jesse - - * Makefile, lib/RT/Queue.pm, lib/RT/Scrip.pm, lib/RT/ScripScope.pm, - lib/RT/Transaction.pm, lib/RT/User.pm: - - tmp logfiles now go in /tmp - oh. and SCRIPS NOW WORK. RT can send mail. - and recieve mail. life is good. - -2000-11-21 02:55 jesse - - * lib/RT/Ticket.pm: - - Implemented Ticket->IsWatcher. - This is what we needed to make pseudogroup based ACLs work - -2000-11-21 00:55 jesse - - * lib/RT/Queue.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - webrt/Elements/Tabs: - - fixed a couple of bugs while I was out and about. - Oh. and most of the rest of the ACL core is implemented now. - rights for requestor/owner/cc/admincc should now work. - -2000-11-20 11:59 jesse - - * lib/RT/ACE.pm, lib/RT/User.pm, tools/insertdata: - - Added "Requestor" and "Everyone" metagroups to tools/insertdata - - Fixed a bug with yet another way to call HasQueueRight. - -2000-11-20 00:39 jesse - - * Makefile: - - bumped to 1.3.22 for release - -2000-11-20 00:24 jesse - - * webrt/Search/Listing.html: - - fixed a big triggered when clearing empty ticket searches - -2000-11-19 23:55 jesse - - * bin/webmux.pl, lib/RT/User.pm: - - fixed a bug that stopped you from specifying an owner on ticket create - Watcher and Watchers are now preloaded in the App server. - -2000-11-19 23:20 jesse - - * webrt/Ticket/Elements/Tabs: - - file Tabs was initially added on branch rt-1-1. - -2000-11-19 23:20 jesse - - * webrt/: index.html, Admin/Elements/Tabs, Elements/Header, - Elements/Tabs, Search/Listing.html, Search/RestrictSearch.html, - Ticket/Create.html, Ticket/Create_Detail.html, Ticket/Display.html, - Ticket/EditWatchers.html, Ticket/Modify.html, Ticket/Update.html, - Ticket/Elements/Tabs: - - more UI tweaking. yay. - -2000-11-19 17:57 jesse - - * webrt/Elements/Quicksearch: - - file Quicksearch was initially added on branch rt-1-1. - -2000-11-19 17:57 jesse - - * webrt/Elements/MyTickets: - - file MyTickets was initially added on branch rt-1-1. - -2000-11-19 17:57 jesse - - * webrt/rt.jpg: - - file rt.jpg was initially added on branch rt-1-1. - -2000-11-19 17:57 jesse - - * lib/RT/ACE.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm, - lib/RT/Interface/Web.pm, webrt/index.html, webrt/rt.jpg, - webrt/Elements/MyTickets, webrt/Elements/Quicksearch, - webrt/Search/Listing.html: - - A bunch of UI work. we now have a placeholder logo - -2000-11-18 03:03 jesse - - * lib/RT/: User.pm, Interface/Web.pm: - - ACL change messages are now properly scoped. so now they don't hang out - between sessions - - if a user has a system right, that right now applies to all queues. - -2000-11-17 00:19 jesse - - * Makefile: - - Rolled rev 1.3.21. now with an ACL editor. - -2000-11-17 00:15 jesse - - * webrt/Admin/Elements/SelectRights: - - file SelectRights was initially added on branch rt-1-1. - -2000-11-17 00:15 jesse - - * lib/RT/ACE.pm, lib/RT/Group.pm, lib/RT/Queue.pm, - lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - lib/RT/Interface/Web.pm, webrt/Admin/Elements/SelectRights: - - Woo! the ACL editor is now much cleaner. and it works. :) - -2000-11-16 01:17 jesse - - * lib/RT/: ACE.pm, ACL.pm, Attachment.pm, Attachments.pm, - CurrentUser.pm, EasySearch.pm, Group.pm, GroupMember.pm, - GroupMembers.pm, Groups.pm, Link.pm, Links.pm, Queue.pm, Queues.pm, - Record.pm, Scrip.pm, ScripScope.pm, ScripScopes.pm, Scrips.pm, - Template.pm, Templates.pm, Ticket.pm, Transaction.pm, - Transactions.pm, User.pm, Users.pm, Watcher.pm, Watchers.pm, - Interface/Web.pm: - - - LEANED UP A WHOLE BUNCH OF NEW ROUTINES. FIXED A FREW ACL BUGS. - -2000-11-15 02:29 jesse - - * lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/CurrentUser.pm, - lib/RT/Queue.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - webrt/Admin/Elements/Tabs, webrt/Elements/Submit: - - refactored ACLS to take out a layer of complexity or two. - -2000-11-14 13:17 jesse - - * Makefile: - - bumped the makefuile version - -2000-11-13 23:19 jesse - - * bin/webmux.pl, lib/RT/ACL.pm, lib/RT/EasySearch.pm, - lib/RT/Group.pm, lib/RT/GroupMember.pm, lib/RT/Record.pm, - lib/RT/User.pm: - - A bunch of refactoring to make ACL editable. Lots of work on the ACL editor. - Basic user ACLs are now editable. - It needs some more refactoring, since I stopped being on quite as much crack - over the wekeend and figured out a much less intense way to do a bunch of stuff. Yay. - -2000-11-08 14:55 jesse - - * Makefile, NEWS: - - all mail sent out is now sent out precedence "bulk" like it should be. - -2000-11-08 01:24 jesse - - * webrt/Admin/Elements/SelectScrip: - - file SelectScrip was initially added on branch rt-1-1. - -2000-11-08 01:24 jesse - - * webrt/Admin/Elements/SelectTemplate: - - file SelectTemplate was initially added on branch rt-1-1. - -2000-11-08 01:24 jesse - - * etc/schema.pm, lib/RT/ACE.pm, lib/RT/ACL.pm, - lib/RT/CurrentUser.pm, lib/RT/Group.pm, lib/RT/Ticket.pm, - lib/RT/Tickets.pm, lib/RT/Transaction.pm, lib/RT/User.pm, - lib/RT/Users.pm, tools/insertdata, - webrt/Admin/Elements/SelectScrip, - webrt/Admin/Elements/SelectTemplate: - - A whole slew of work on ACLs and assorted other related things. - This involved a lot of cleanup of ACL related code and things it touched. - ACL decisions are now being made. (Yes, you're all still superusers) but I - think I've got a bunch of the infrastructure cleaned up, so it should be - easier to finish off the ACL editor. yay! - - As part of this, I had to add more groups support. all you groups-maniacs should be pleased ;) - -2000-11-06 11:55 jesse - - * Makefile: - - Fixed yet another typo in manipulate.pm. - - Bumped version to 1.0.5 - -2000-11-05 15:24 jesse - - * Makefile: - - A fix for action vs actions in mail manipulate. - fixed a typo normailize -> normalize in database/manipulate.pm - -2000-11-03 17:54 jesse - - * README, etc/schema.pm, lib/RT/ACE.pm, lib/RT/ACL.pm, - lib/RT/CurrentUser.pm, lib/RT/GroupMember.pm, lib/RT/Queue.pm, - lib/RT/Ticket.pm, lib/RT/User.pm, lib/RT/Users.pm, - lib/RT/Interface/Email.pm, lib/RT/Interface/Web.pm, - tools/insertdata, webrt/Admin/ModifyUser, - webrt/Admin/Elements/QueueRightsForUser, webrt/Admin/Elements/Tabs, - webrt/Elements/SelectOwner: - - A bunch of work on the ACLs. we're getting closer to having a workable ACL - editor. - -2000-11-03 15:37 jesse - - * Makefile, NEWS: - - We now deal better with merging merged tickets. - - We now properly ignore Precedence: {junk|bulk} headers - -2000-10-31 00:06 jesse - - * lib/RT/: ACE.pm, ScripScope.pm: - - Added ACL support to the ScripScope system. - -2000-10-29 21:31 jesse - - * Makefile, README, bin/webmux.pl, lib/RT/ACE.pm, lib/RT/Group.pm, - lib/RT/Groups.pm, lib/RT/Queue.pm, lib/RT/ScripScope.pm, - lib/RT/ScripScopes.pm, lib/RT/Scrips.pm, lib/RT/Template.pm, - lib/RT/Templates.pm, lib/RT/Transaction.pm, tools/insertdata: - - A bunch of hacking to the ScripScopes system. - - You can now edit scrips for a given queue. - but hey, scrips have no ACL checking yet. - -2000-10-29 17:51 jesse - - * etc/schema.pm: - - Added a whole lot of documentation to schema.pm. - -2000-10-25 21:09 jesse - - * Makefile, bin/testdeps.pl, etc/schema.pm: - - Updated schema.pm and testdeps to jibe with the current CPAN versions of things. - And I bumped the version to 1.3.20 - -2000-10-23 16:53 jesse - - * Makefile, lib/RT/Date.pm: - - Reverted to using mysql by default. - Finished off the postgresql support in the rt core. (well, at least finished the initial support) - -2000-10-23 16:35 jesse - - * Makefile, lib/RT/ACE.pm, lib/RT/Ticket.pm, tools/insertdata: - - Cleanups related to making postgres support work right. - -2000-10-22 20:57 jesse - - * Makefile, bin/initacls.Pg, bin/testdeps.pl, etc/acl.Pg, - etc/config.pm, etc/schema.pm, lib/RT/Link.pm, lib/RT/Ticket.pm, - lib/RT/Tickets.pm, tools/initdb, tools/insertdata, - webrt/Ticket/Display.html: - - merged in ivan's postgres patches. - made local ticket links work again. *sigh* SQL evil. eeeeevil. - -2000-10-16 16:32 jesse - - * docs/Security: - - file Security was initially added on branch rt-1-1. - -2000-10-16 16:32 jesse - - * docs/Security: - - some initial notes on security. targetted at RT admins. - -2000-10-16 03:01 jesse - - * lib/RT/: Link.pm, Links.pm, Ticket.pm: - - Fixed a couple of typos in link and links. - Ticket->Load will now do the right hting with ticket uris or aliases. - -2000-10-16 00:47 jesse - - * etc/config.pm, lib/RT/Link.pm, lib/RT/Links.pm, lib/RT/Ticket.pm: - - The linking interface now uses URIs internally. and it does lots of - sanity checking. - - Tickets now understand what their uris should be. you can load tickets by - uri. and by alias. - - We need a bit more work to make alias support just transparent, but we're - getting really close. - - You shouldn't be able to link to nonexistent local objects any mroe. - -2000-10-15 01:57 jesse - - * lib/RT/CurrentUser.pm: - - Added CurrentUser->LoadByGecos. - The CLI now uses LoadByGecos to load the currentuser. - This means that users other than root might actually be able to use the cli now - VS: ---------------------------------------------------------------------- - -2000-10-15 01:11 jesse - - * Makefile: - - Significantly redid the installation procedure. we're now _much_ - more careful about what gets installed where and what's owned by whom. - - Oh. and RT's now setgid, rather than setuid. and there's no setuid wrapper anymore - -2000-10-15 01:08 jesse - - * etc/: config.pm, suidrt.c: - - Yanked suidrt.c, since we now run setgid. - - rt now logs to /tmp/rt.log.pid.userid - -2000-10-14 02:56 jesse - - * bin/rtmux.pl, bin/webmux.pl, etc/schema.pm, - lib/RT/CurrentUser.pm, lib/RT/Interface/Email.pm, tools/initdb, - tools/insertdata: - - CurrentUser.pm had LoadByEmail and LoadByUserId methods added and they're now - actually used most everywhere. - - insertdata doesn't force ids for users now. - - the schema now actually enforces a lot of important uniqueness constraints. - -2000-10-13 10:59 jesse - - * etc/schema.mysql: - - Removed the old schema.mysql, lest it lead people astray - -2000-10-13 02:27 jesse - - * webrt/Ticket/Elements/: EditPeople, ShowMembers: - - Removed some old warning text that's not true any more. - Fixed a relative url problem in "show memebers" - -2000-10-12 23:22 jesse - - * Makefile, bin/testdeps.pl: - - updated testdeps. - Makefile now defaults to installing rt2 in /opt/rt2 - -2000-10-12 22:54 jesse - - * Makefile, lib/RT/ACL.pm, lib/RT/Queue.pm, lib/RT/Ticket.pm, - lib/RT/User.pm, lib/RT/Users.pm, tools/insertdata, - webrt/index.html: - - A couple of links on the front page. - Makefile now assumes www-data instead of nobody as the web user. this is not quite right. - - Fixed a little bit of the POD in User.pm. - - Redid how Ticket.pm deals with Owner on create. the new logic should actually catch errors - instead of easily letting referential integrity checks just _fail_. - - Insertdata got cleaned up a little bit. - - ACL got its cleaned up a bit - -2000-10-11 23:22 jesse - - * webrt/Admin/Elements/QueueRightsForUser: - - file QueueRightsForUser was initially added on branch rt-1-1. - -2000-10-11 23:22 jesse - - * lib/RT/Users.pm, webrt/Admin/Elements/QueueRightsForUser: - - Work on ACLs. and the ACL editor - -2000-10-11 21:23 jesse - - * tools/insertdata: - - gave root a password - -2000-10-11 12:28 jesse - - * Makefile, tools/initdb: - - Databasename changed from RT2 to rt2 to make postgres happier. - - initdb quoting bug fixed. - - debug mode in initdb turned off. - - If you're using mysql and running with ivan's current CVS version of DBIx::DBSchema, RT should once again work. - -2000-10-09 02:32 jesse - - * etc/schema.pm, tools/initdb: - - a debugging hook in initdb and defaults (though they don't work just right yet) - in schema.pm. Note that we now need DBIx::DBSchema from CVS. - -2000-10-09 01:59 jesse - - * Makefile, NEWS, etc/suidrt.c: - - Jan Kujawa fixed a bug in the setuid wrapper - Jan Okrouhly fixed some bugs in the merged ticket resolution in the cli. - - Rolled 1.0.5pre3 - -2000-10-05 17:30 jesse - - * lib/RT/: ACE.pm, ACL.pm: - - more work on RT's acl core - -2000-10-05 17:30 jesse - - * webrt/Admin/Elements/: GrantQueueRightsTo, GrantQueueRightsTo~, - SelectQueueRights: - - more acl work - -2000-10-05 17:30 jesse - - * webrt/Admin/Elements/GrantQueueRightsTo~: - - file GrantQueueRightsTo~ was initially added on branch rt-1-1. - -2000-10-05 17:30 jesse - - * webrt/Admin/Elements/GrantQueueRightsTo: - - file GrantQueueRightsTo was initially added on branch rt-1-1. - -2000-10-05 17:30 jesse - - * webrt/Admin/Elements/SelectQueueRights: - - file SelectQueueRights was initially added on branch rt-1-1. - -2000-10-05 15:49 jesse - - * etc/suidrt.c: - - reordering things in suidrt.c seemed to make them happier. - -2000-10-05 15:39 jesse - - * etc/suidrt.c: - - missed a comma - -2000-10-05 15:03 jesse - - * bin/testdeps.pl: - - added a dependency test script to make installation by newbies easier. - -2000-10-05 15:03 jesse - - * Makefile, README, etc/suidrt.c: - - Major rewrite of suidrt.c by jan kujawa. - A couple of bugfixes from Jan Okrouhly - Public history should now work right in the cli - Web viewing of merged tickets by their old # should now work better. - -2000-10-03 20:22 jesse - - * bin/testdeps.pl: - - cleaned up testedeps.pl output - -2000-10-03 02:41 jesse - - * tools/insertdata: - - file insertdata was initially added on branch rt-1-1. - -2000-10-03 02:41 jesse - - * tools/initdb: - - file initdb was initially added on branch rt-1-1. - -2000-10-03 02:41 jesse - - * etc/schema.pm: - - file schema.pm was initially added on branch rt-1-1. - -2000-10-03 02:41 jesse - - * Makefile, bin/initdb.Oracle, bin/initdb.Pg, bin/initdb.mysql, - bin/testdeps.pl, etc/schema.Pg, etc/schema.pm, lib/RT/ACE.pm, - lib/RT/Queue.pm, lib/RT/Scrip.pm, lib/RT/User.pm, tools/initdb, - tools/insertdata: - - Fairly massive installation changes. - We now use ivan's really cool DBIx::DBschema, which, when things - settle out a bit mean that the oracle and postgres (and possibly other) ports - get their schema updated automatically. - - The initial seed data is now inserted by tools/insertdata through the RT API. - - ACE::Create now actually works. - Same with Scrip::Create. - and Queue::Create. - - There are a couple of new installation-only dependencies. One of them (DBSchema) may become a build-only - dependency if people whine enough :) - - date/time handling was a casualty of the changes. some things will be handled oddly for now. - Once Ivan releases the next DBSchema update, this should get better again. it was - the result of a namespace collision between pg and mysql. the timestamp column has - different behavior. go fig. - - This version will require DBIx::SearchBuilder 0.06 (aka what I'm about to check in) - -2000-10-03 02:07 jesse - - * tools/test: - - blew away old, crufty "extras" - -2000-09-28 13:55 jesse - - * lib/RT/Group.pm: - - file Group.pm was initially added on branch rt-1-1. - -2000-09-28 13:55 jesse - - * lib/RT/: Group.pm, GroupMember.pm, GroupMembers.pm, Groups.pm: - - Long overdue adding of completely untested (and unused) code for groups in RT. - note that this implementation does not assume recursive group membership - -2000-09-28 13:55 jesse - - * lib/RT/GroupMember.pm: - - file GroupMember.pm was initially added on branch rt-1-1. - -2000-09-28 13:55 jesse - - * lib/RT/GroupMembers.pm: - - file GroupMembers.pm was initially added on branch rt-1-1. - -2000-09-28 13:55 jesse - - * lib/RT/Groups.pm: - - file Groups.pm was initially added on branch rt-1-1. - -2000-09-18 01:57 jesse - - * lib/RT/: ACE.pm, Queue.pm, Ticket.pm: - - Lots of work on Queue.pm Most cleanups related to queue watchers, but I - also added a bit more documentation and fixed a bug that could cause DelWatcher - in ticket.pm to delete watchers it shouldn't - -2000-09-18 00:03 jesse - - * docs/API, docs/FAQ, docs/README.oracle, lib/RT/Ticket.pm, - lib/RT/Transaction.pm: - - More documentation. removed outdated docs. - - docs/API now talks about what those of you writing your own RT client - code shouldn't be doing. (Which objects you shouldn't touch). - -2000-09-18 00:00 jesse - - * README: - - Clarified license terms. RT is available under Version 2 of the GPL. - Not version 1. Not some as-yet-unwritten version 3 that says you can only - use it if you agree to license your children under the GPL. Version 2. - -2000-09-17 19:57 jesse - - * lib/RT/: TicketCollection.pm, User.pm, Interface/Email.pm: - - Removed bogus signature code. - Documented User->IsPassword - removed --area flag from Mailgateway (We ain't got no stinking areas) - -2000-09-17 19:21 jesse - - * etc/schema.Oracle, etc/schema.mysql, lib/RT/ACE.pm, - lib/RT/ACL.pm, lib/RT/Scrip.pm, lib/RT/User.pm: - - Ugh. Mysql isn't respecting SQL92 reserved words. which meant that I didn't - notice that I was using "Type" and "Action" in my schema. - This required a bit of churn to the ACE and User modules. - -2000-09-17 17:38 jesse - - * Makefile: - - Ok. I think I've got it now. This is RT 1.3.18. aka RT2 - Alpha 1. - The "Bear Suit" Release. - - A formal release announcement is forthcoming. - -2000-09-17 17:29 jesse - - * Makefile: - - work on the changelog generator - -2000-09-17 17:19 jesse - - * HACKING, Makefile, README, bin/initdb.mysql, bin/testdeps.pl: - - Bumped the required version of SearchBuilder in testdeps, now that it's - propagated throughout CPAN - - Replaced initdb.mysql with ivan's new version. - - Tweaked ivan's initdb.mysql to be a little friendlier, create the schema - (it was missing a FILEHANDLE in a print statement and deal - better with omitted passwords. - - Updated the readme some more. - - Added experimental ChangeLog generation to the make dist process - - Bumped the version number to 1.3.18 for release as alpha1 for RT2 today. - -2000-09-17 01:40 jesse - - * Makefile, README, bin/initacls.mysql, bin/testdeps.pl, - bin/webmux.pl: - - Bumped the Mason version requirement up, so we avoid the poisoned v 0.88 - Applied ivan's alpha-1 patches. - Did some tweaking for the alpha 1 release. - Cleaned up the readme a bit - -2000-09-15 01:21 jesse - - * Makefile: - - [no log message] - -2000-09-15 01:17 jesse - - * lib/RT/Interface/Email.pm: - - Mail gateway now handles followup correspondence properly - (It gets the ticket # right) - -2000-09-15 01:06 jesse - - * lib/RT/Watcher.pm: - - fixed a typo (left off a > ) in Watcher.pm - -2000-09-15 00:59 jesse - - * lib/RT/Ticket.pm, lib/RT/Watcher.pm, webrt/Ticket/Modify.html: - - Editing ticket watchers from the webui now works. - this required a bunch of work on the internal wathers stuff - in ticket.pm. - Also added documentation and watcher-related sanity checks - -2000-09-14 00:04 jesse - - * lib/RT/Ticket.pm, lib/RT/Watcher.pm, - webrt/Elements/SelectWatcherType, webrt/Ticket/Elements/EditPeople, - webrt/Ticket/Elements/EditWatchers, - webrt/Ticket/Elements/ModifyTicket: - - Some cleanup to Watcher and Ticket. (mainly documentation updates) - Added an IsUser sub to Watcher.pm (which tells you if the watcher - object refers to a local user or a remote email address) - - the ui for editing tickets should work now. - note that the backend for the watchers side of this isn't there - yet. - - -j - -2000-09-13 18:10 jesse - - * etc/config.pm: - - fixed a configfile typo that would break a new installation - -2000-09-12 01:28 jesse - - * lib/RT/Date.pm, lib/RT/Ticket.pm, webrt/Elements/ListActions, - webrt/Elements/SelectDate, webrt/Elements/SelectUsers, - webrt/Elements/SelectWatcherType, webrt/Ticket/Modify.html, - webrt/Ticket/Elements/AddWatchers, webrt/Ticket/Elements/EditDates, - webrt/Ticket/Elements/EditPeople, - webrt/Ticket/Elements/ModifyTicket: - - TimeWorked is now read/write (which may be a bad idea. but I'm willing to try it. - RT::Date now better understands that "never" doesn't mean 1970. - - The web modify interface is getting closer to working. - I mainly need to finish making the watchers column go. - -2000-09-11 00:37 jesse - - * etc/config.pm: - - Some sanity cleanups to the web queue listing. - -2000-09-11 00:35 jesse - - * webrt/Ticket/Elements/EditDates: - - file EditDates was initially added on branch rt-1-1. - -2000-09-11 00:35 jesse - - * webrt/Ticket/Elements/EditWatchers: - - file EditWatchers was initially added on branch rt-1-1. - -2000-09-11 00:35 jesse - - * webrt/Ticket/Elements/AddWatchers: - - file AddWatchers was initially added on branch rt-1-1. - -2000-09-11 00:35 jesse - - * webrt/Ticket/Elements/EditBasics: - - file EditBasics was initially added on branch rt-1-1. - -2000-09-11 00:35 jesse - - * webrt/Ticket/Elements/EditPeople: - - file EditPeople was initially added on branch rt-1-1. - -2000-09-11 00:35 jesse - - * webrt/Ticket/Elements/ModifyTicket: - - file ModifyTicket was initially added on branch rt-1-1. - -2000-09-11 00:35 jesse - - * webrt/: Login.html, webrt.css, Elements/SelectDate, - Elements/SelectMatch, Elements/SelectQueue, Elements/SelectUsers, - Elements/ShadedBox, Ticket/EditWatchers.html, Ticket/Modify.html, - Ticket/Elements/AddWatchers, Ticket/Elements/EditBasics, - Ticket/Elements/EditDates, Ticket/Elements/EditPeople, - Ticket/Elements/EditWatcherList, Ticket/Elements/EditWatchers, - Ticket/Elements/ModifyTicket, Ticket/Elements/ShowBasics, - Ticket/Elements/ShowDates, Ticket/Elements/ShowDependencies, - Ticket/Elements/ShowHistory, Ticket/Elements/ShowPeople, - Ticket/Elements/ShowSummary, Ticket/Elements/TicketToolBox: - - Lots and lots of work on the webui. - The display UI has been cleaned up a bit and the modify UI has been started. - It's not in its final for yet, nor is there any logic backing many of the new ui features, but those will come next. - - If I'm remebering my list correctly, this is the one "biggie" before Alpha 1. - - Yay! - -2000-09-11 00:35 jesse - - * webrt/Elements/SelectUsers: - - file SelectUsers was initially added on branch rt-1-1. - -2000-09-07 00:52 jesse - - * webrt/: Login.html, autohandler, Ticket/Elements/ShowSummary: - - Replaced tobias' web arg preservation code with something that's actually based on _mason_ rather than the external apache object. This should make the fastcgi port easier - - Fixed a bug in showsummary (unqualified WebPath) - -2000-09-07 00:30 jesse - - * Makefile, bin/rtmux.pl, lib/RT/Handle.pm: - - Look ma! it should install again (i'd flubbed a bit of the - fastcgi mason handler install. - - Oh. and oracle support should work now. - -2000-09-06 00:52 jesse - - * webrt/Logout.html: - - Logout.html links you to the right place now - -2000-09-05 23:47 jesse - - * webrt/Search/Listing.html: - - YA typo fix - -2000-09-05 23:45 jesse - - * webrt/Search/Listing.html: - - Damn I wish I could type tonight. :/ missed an $RT:: - -2000-09-05 23:43 jesse - - * webrt/: Search/Listing.html, Ticket/Elements/ShowSummary: - - Fixed a few more Absolute url bugs - -2000-09-05 23:35 jesse - - * webrt/Elements/Tabs: - - Tabs needed / as the final character for transparent proxying - -2000-09-05 22:39 jesse - - * webrt/: Login.html, Admin/Elements/CreateUserCalled, - Admin/Elements/ModifyQueue, Admin/Elements/ModifyTemplate, - Admin/Elements/ModifyUser, Admin/Users/index.html: - - more work on proper absolute pathing - -2000-09-05 22:08 jesse - - * webrt/: Login.html, Admin/Elements/CreateQueueCalled, - Admin/Elements/CreateUserCalled, Admin/Elements/ModifyUser, - Admin/Users/index.html: - - A bunch of the admin tools weren't properly dealing with absolute pathed requests. it made it impossible to have RT2 anywhere other than at the / of your webserver - -2000-09-05 21:40 jesse - - * lib/RT/Handle.pm: - - file Handle.pm was initially added on branch rt-1-1. - -2000-09-05 21:40 jesse - - * bin/mason_handler.fcgi: - - file mason_handler.fcgi was initially added on branch rt-1-1. - -2000-09-05 21:40 jesse - - * Makefile, bin/mason_handler.fcgi, bin/testdeps.pl, - lib/RT/Handle.pm: - - Updated testdeps to ask for the new version of mailtools - Added in the new fastcgi handler (not working yet) - and RT::Handle, which is a wrapper for SearchBuilder::Handle - -2000-09-04 22:52 jesse - - * Makefile, TODO, bin/rtmux.pl, bin/webmux.pl, etc/config.pm, - lib/RT/Record.pm, lib/RT/User.pm, lib/RT/Interface/Web.pm, - webrt/Ticket/Display.html, webrt/Ticket/Elements/ShowRequestor, - webrt/Ticket/Elements/TicketToolBox: - - A couple of bugfixes related to the switch to SearchBuilder. - A few webui cleanups. - A bit of abstraction to make the eventual fastcgi port easier. - -2000-09-04 12:48 jesse - - * bin/testdeps.pl, lib/RT/Attachments.pm, lib/RT/Ticket.pm, - lib/RT/Transaction.pm, lib/RT/Watcher.pm, lib/RT/Watchers.pm, - lib/RT/Interface/Web.pm, webrt/Ticket/Elements/ShowDates: - - Several batched updates from when pallas was off-net - - UpdateTold changed to SetTold. - A bunch of work to get Scrips working. - Lots more POD in Ticket.pm - Transaction->Describe is better about printing what really happened. - Attachments.pm had a typo that prevented it from dealing with multipart messages. - -2000-08-31 02:18 jesse - - * Makefile, NEWS, etc/suidrt.c: - - Added ENV squashing to suidrt.c - -2000-08-30 14:46 jesse - - * bin/rtmux.pl: - - Rolling in some oracle changes...they're not done yet, but nothing should - break with mysql. fixed a typo in rtmux.pl that was introduced with the switch to searchbuilder. - -2000-08-29 17:02 jesse - - * README, bin/rtmux.pl, bin/testdeps.pl, bin/webmux.pl, - lib/RT/EasySearch.pm, lib/RT/Record.pm: - - MAJOR CHANGE: Switched to the new name of the DBIx:: modules. - We now use DBIx::SearchBuilder rather than DBIx::EasySearch and friends. - Note that this is only a name and structure change for the module set. - The functionality is the same...though seperating out oracle and mysql - specific features comes soon. - -2000-08-29 16:57 jesse - - * etc/schema.Oracle: - - updated the schema.Oracle - -2000-08-29 02:02 jesse - - * webrt/: Elements/SelectWatcherType, Ticket/EditWatchers.html, - Ticket/Update.html: - - Started hacking on watchers and ticket update webui a bit. - they need a lot more work - -2000-08-29 01:51 jesse - - * webrt/Ticket/: Display.html, DisplayHistory, DisplayTransaction, - Elements/ShowHistory, Elements/ShowTransaction: - - Made FullHeaders/BriefHeaders work in the webui - -2000-08-28 01:46 jesse - - * webrt/Admin/Elements/: CreateUserCalled, ModifyUser: - - Fixed some display buglets from tobi oetiker - -2000-08-28 01:31 jesse - - * webrt/Ticket/Update.html: - - Removed some text that harassed the user. that's generally bad policy - -2000-08-27 23:56 jesse - - * webrt/: Admin/Elements/Header, Admin/Elements/ModifyTemplate, - Admin/Elements/Tabs, Elements/ListActions, Elements/Tabs: - - A few more added helper elements from the webui - -2000-08-27 23:56 jesse - - * webrt/Admin/Elements/Header: - - file Header was initially added on branch rt-1-1. - -2000-08-27 23:56 jesse - - * webrt/: Admin/Elements/Tabs, Elements/Tabs: - - file Tabs was initially added on branch rt-1-1. - -2000-08-27 23:56 jesse - - * webrt/Admin/Elements/ModifyTemplate: - - file ModifyTemplate was initially added on branch rt-1-1. - -2000-08-27 23:56 jesse - - * webrt/Elements/ListActions: - - file ListActions was initially added on branch rt-1-1. - -2000-08-27 23:54 jesse - - * webrt/Admin/Users/Prefs.html: - - file Prefs.html was initially added on branch rt-1-1. - -2000-08-27 23:54 jesse - - * webrt/Admin/: Queues/Create.html, Users/Create.html: - - file Create.html was initially added on branch rt-1-1. - -2000-08-27 23:54 jesse - - * webrt/Admin/: Queues/Modify.html, Users/Modify.html: - - file Modify.html was initially added on branch rt-1-1. - -2000-08-27 23:54 jesse - - * webrt/Admin/: Queues/index.html, Users/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-08-27 23:54 jesse - - * bin/webmux.pl, lib/RT/Area.pm, lib/RT/Areas.pm, lib/RT/Queue.pm, - lib/RT/ScripScopes.pm, lib/RT/Template.pm, lib/RT/Templates.pm, - webrt/Admin/CreateQueue.html, webrt/Admin/CreateUser.html, - webrt/Admin/EditUser.html, webrt/Admin/ModifyQueue.html, - webrt/Admin/ModifyUser.html, webrt/Admin/index.html, - webrt/Admin/Elements/CreateQueueCalled, - webrt/Admin/Elements/CreateUserCalled, - webrt/Admin/Elements/ModifyQueue, webrt/Admin/Elements/ModifyUser, - webrt/Admin/Elements/SelectModifyQueue, - webrt/Admin/Elements/SelectModifyUser, - webrt/Admin/Queues/Create.html, webrt/Admin/Queues/Modify.html, - webrt/Admin/Queues/index.html, webrt/Admin/Users/Create.html, - webrt/Admin/Users/Modify.html, webrt/Admin/Users/Prefs.html, - webrt/Admin/Users/index.html: - - Lots of work on the web admin ui. basic user and queue editing working. - and template editing - -2000-08-24 15:53 jesse - - * Makefile, README, bin/rtmux.pl, etc/config.pm, - lib/RT/Action/SendEmail.pm, webrt/Elements/Footer, - webrt/Elements/Header, webrt/Elements/ViewUser, - webrt/Ticket/Elements/EditWatcherList: - - The first cut at better configuration. - - Updated the readme - - Made the mail send routine in lib/RT/Action/Email.pm somewhat - more configurable (though we're still using printing to a pipe - because Mail::Mailer is busted :/) - - Most options moved out of the makefile..this will make packaging - possible. - - Fixed a couple places where tobias had been using a non-relative - url unnecessarily. - -2000-08-22 03:08 jesse - - * Makefile: - - Getting version #s in sync for RT 1.3.15 - -2000-08-22 03:05 jesse - - * lib/RT/: Scrip.pm, Transaction.pm, Action/AutoReply.pm, - Action/SendEmail.pm: - - Work on making sure mail gets sent. It's not "right" yet but it's getting - closer. - -2000-08-21 19:46 jesse - - * webrt/autohandler: - - Fixed a minor issue that let people "log in as ''" - -2000-08-21 01:12 jesse - - * bin/rtmux.pl, etc/config.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm: - - Set a default type in ticket.pm - allowed restriction based on type in tickets.pm - - now set the timezone in the config file rather than the rtmux. - means it effects webmux.pl too. - -2000-08-20 23:41 jesse - - * etc/schema.mysql, lib/RT/Date.pm, webrt/Elements/SelectOwner: - - Standardized StartsBy to Starts. - Removed a warning from SelectOwner - Fixed a bug in RT::Date->Set(Format => 'unknown') - -2000-08-20 01:46 jesse - - * lib/RT/Ticket.pm, webrt/Search/Listing.html, - webrt/Ticket/Elements/ShowMemberOf, - webrt/Ticket/Elements/ShowMembers: - - Work on MemberOf and Members in Ticket.pm - they're both now Tickets objects rather than links objects. - and the things that use them have been updated - -2000-08-19 03:03 jesse - - * Makefile: - - Bumped the version 1.3.14 - -2000-08-19 02:49 jesse - - * README, etc/config.pm, lib/RT/Ticket.pm: - - Did some work on logging. switched some carping to some logging. - -2000-08-18 02:04 jesse - - * Makefile, README: - - Minor readme updates. - - Bumped the version to 1.3.13 - -2000-08-18 01:04 jesse - - * lib/RT/Transaction.pm: - - CurrentUser objects act on things. not user Objects. Thanks, Jens - -2000-08-17 23:55 jesse - - * webrt/Elements/: SelectOwner, Submit: - - notes in select owner. a bit of tweaking in submit ot make it more visible - -2000-08-17 16:16 jesse - - * Makefile: - - Changes to rt-mailgate to properly respect authenticated users - when performing %RT RESOLVE commands. - -2000-08-17 03:01 jesse - - * lib/RT/Interface/Web.pm: - - Missed a checkin on Web.pm. sorry about that - -2000-08-17 02:53 jesse - - * bin/webmux.pl, lib/RT/Database.pm, lib/RT/Date.pm, - lib/RT/Ticket.pm, lib/RT/Interface/Web.pm: - - Yanked the ancient lib/RT/Database.pm. It never served any purpose - added some functionality to RT::Date. it can now take a date type - of 'unknown.' This will "require" Date::Manip and parse it into - an ISO style date. note that this should NEVER be called from RT's - core due to overhead. It is useful from web interfaces and CLI tools.... - - added date::manip as a requirement to webmux.pl (so it gets loaded before - client hits) - - cleaned up Interface/Web.pm - - rationalized some of the routines dealing with date stuff in ticket.pm. - - Actual working web date changing should be coming "soon." (where soon is - defined as sometime this week) - -2000-08-16 14:46 jesse - - * webrt/Elements/Submit: - - file Submit was initially added on branch rt-1-1. - -2000-08-16 14:46 jesse - - * webrt/: Login.html, index.html, Elements/Footer, Elements/Header, - Elements/Submit, Ticket/Elements/ShowBasics, - Ticket/Elements/ShowTransaction: - - Various bits of webui cleanup - -2000-08-16 14:16 jesse - - * lib/RT/: Tickets.pm, Interface/Email.pm: - - We can now search for tickets by relationship - -2000-08-16 13:18 jesse - - * lib/RT/CurrentUser.pm: - - the real oneline patch that should make rt-mailgate work for new users again. - -2000-08-15 01:17 jesse - - * lib/RT/: Tickets.pm, Interface/Web.pm: - - The first round of convenience methods in RT/Tickets.pm - Still need to do the ticket relations methods and the - date methods - -2000-08-14 23:47 jesse - - * webrt/Elements/SelectDateType: - - file SelectDateType was initially added on branch rt-1-1. - -2000-08-14 23:47 jesse - - * webrt/Elements/SelectDateType: - - ack. missed this in the wackiness with tonight's earlier checkin. - -2000-08-14 19:35 jesse - - * webrt/: Elements/Header, Elements/SelectDate, - Elements/SelectQueue, Elements/TitleBoxStart, Search/Listing.html, - Search/PickRestriction: - - The rest of the previous commit. - -2000-08-14 19:27 jesse - - * etc/config.pm, webrt/Login.html, webrt/Logout.html, - webrt/autohandler, webrt/index.html, webrt/webrt.css, - webrt/Ticket/autohandler, webrt/Ticket/Elements/ShowMemberOf, - webrt/Ticket/Elements/ShowMembers, - webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction: - - Cleaned up the ticket display a bit. - made logout actually properly erase session data - protected _everything_ with an autohandler in / - prettified Login.html - added some options to /Elements/TitleBoxHead...which seems to have been missed - -2000-08-14 14:37 jesse - - * README: - - Added a warning about postmaster from JD - -2000-08-13 21:57 jesse - - * lib/RT/TicketCollection.pm, lib/RT/Tickets.pm, - lib/RT/Interface/Web.pm, webrt/Elements/SelectBoolean, - webrt/Elements/SelectDate, webrt/Elements/SelectMatch, - webrt/Elements/SelectOwner, webrt/Elements/SelectQueue, - webrt/Elements/SelectStatus, webrt/Elements/SelectWatcherType, - webrt/Search/Listing.html, webrt/Search/PickRestriction, - webrt/Search/TicketCell: - - Significant work on the search and display code. - I'm not convinced that this doesn't introduce new bugs. - However, you can now search by ticket content. - - I will be reworking Tickets.pm a bit more to add a bunch of convenience methods - over then next week or so. - -2000-08-12 18:07 jesse - - * lib/RT/Ticket.pm: - - Fixed a bug in WatchersAsString. (RT::Watchers wasn't required early enough) - this whole routine needs to be redone :/ - -2000-08-12 18:06 jesse - - * lib/RT/User.pm: - - User->Create CanManipulate now defaults to 0. - -2000-08-12 18:05 jesse - - * etc/schema.mysql: - - Updated the default user entries in schema.mysql to have the "CanManipulate" - flag set so they'd show up in owner lists. - -2000-08-10 19:16 jesse - - * README: - - updated instructions for Apache install - -2000-08-10 18:59 jesse - - * etc/schema.mysql: - - the queue values for the first queue were wrong - -2000-08-10 17:55 jesse - - * lib/RT/Ticket.pm: - - BUGFIX: _UpdateTold now doesn't record a transaction, as things should be - -2000-08-10 15:43 jesse - - * etc/config.pm, etc/schema.Oracle, etc/schema.mysql, - lib/RT/Attachment.pm, lib/RT/Record.pm, lib/RT/Scrip.pm, - lib/RT/ScripScope.pm, lib/RT/Ticket.pm, lib/RT/TicketCollection.pm, - lib/RT/Tickets.pm, lib/RT/Transaction.pm, lib/RT/User.pm, - lib/RT/Action/AutoReply.pm, lib/RT/Action/Notify.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Interface/Web.pm, - webrt/autohandler, webrt/Elements/Error, - webrt/Elements/SelectStatus, webrt/Ticket/Update.html, - webrt/Ticket/Elements/ShowBasics, - webrt/Ticket/Elements/ShowDependencies, - webrt/Ticket/Elements/ShowMemberOf, - webrt/Ticket/Elements/ShowMembers, - webrt/Ticket/Elements/ShowPeople, - webrt/Ticket/Elements/ShowReferences, - webrt/Ticket/Elements/ShowRequestor, - webrt/Ticket/Elements/TicketToolBox: - - Fixed ACL caching bugs - Finished adding status "new" - cli searching based on status works better. - - API Change. Queue is NO LONGER the Queue Object for a ticket - API Change. Owner is NO LONGER the Owner Object for a ticket - - instead, both point to their proper database values and OwnerObj and QueueObj - do the right thing throughout. This was rather more code churn than I was hoping for, but we've now got a cleaner, more consistent API that's easier to work - with. - - little bits of POD update. - - Cleaned out some unused code. - - Made some error messages more professional. - - We now keep track of date started as well as a "start by" date. these both - need a bit more work. - - Calling convention for _Set changed. Rather than three different calling - conventions which weren't very extensible, DBIx::Record::_Set and all its - subclasses now use paramhash style calling. it's much more extensible and - flexible now. (This was necessary for some ACL work, among other things) - -2000-08-09 01:11 jesse - - * lib/RT/Record.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - webrt/Elements/SelectStatus, webrt/Elements/dayMenu, - webrt/Elements/monthMenu, webrt/Elements/yearMenu: - - ACL Decisions are now cached - date menus have a "never" option in the webui - added a new status. "new" for tickets that aren't yet open - -2000-08-08 01:45 jesse - - * etc/schema.mysql, lib/RT/Queue.pm: - - schema updates. - fixed queue->Create - -2000-08-08 01:44 jesse - - * webrt/Admin/ModifyQueue.html: - - file ModifyQueue.html was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/: CreateQueue.html, CreateUser.html, - ModifyQueue.html, ModifyUser.html, index.html, - Elements/CreateQueueCalled, Elements/CreateUserCalled, - Elements/ModifyQueue, Elements/ModifyUser, - Elements/SelectModifyQueue, Elements/SelectModifyUser: - - Started the new web admin interface. - it can now edit queues and users and create queues and users - I'm fairly leery of its user handling stuff. particularly passwords - -2000-08-08 01:44 jesse - - * webrt/Admin/CreateUser.html: - - file CreateUser.html was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/Elements/SelectModifyUser: - - file SelectModifyUser was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/Elements/ModifyUser: - - file ModifyUser was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/Elements/CreateUserCalled: - - file CreateUserCalled was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/ModifyUser.html: - - file ModifyUser.html was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/index.html: - - file index.html was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/CreateQueue.html: - - file CreateQueue.html was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/Elements/ModifyQueue: - - file ModifyQueue was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/Elements/SelectModifyQueue: - - file SelectModifyQueue was initially added on branch rt-1-1. - -2000-08-08 01:44 jesse - - * webrt/Admin/Elements/CreateQueueCalled: - - file CreateQueueCalled was initially added on branch rt-1-1. - -2000-08-07 22:28 jesse - - * etc/schema.mysql, lib/RT/Date.pm, lib/RT/Ticket.pm, - lib/RT/Users.pm: - - added a few ticket attributes for forwards compatibility - fixed another ACL problem in users.pm - fixed a date display bug - -2000-08-07 01:03 jesse - - * lib/RT/Transaction.pm, webrt/Ticket/Create.html, - webrt/Ticket/Elements/ShowTransaction: - - Transaction.pm had some lingering ACL bugs ($CurrentUser) isn't a reasonable - global in core library routines :/ - - Working on spawning subtickets. - -2000-08-07 00:31 jesse - - * webrt/User/Prefs.html: - - file Prefs.html was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * webrt/Ticket/Elements/ShowDependencies: - - file ShowDependencies was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * webrt/Ticket/Elements/ShowReferences: - - file ShowReferences was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * webrt/Ticket/Elements/ShowMembers: - - file ShowMembers was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * webrt/Ticket/Elements/ShowMemberOf: - - file ShowMemberOf was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * webrt/Admin/EditUser.html: - - file EditUser.html was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * webrt/Admin/Elements/EditUserComments: - - file EditUserComments was initially added on branch rt-1-1. - -2000-08-07 00:31 jesse - - * etc/config.pm, lib/RT/Ticket.pm, webrt/EditUserComments.html, - webrt/ViewUser.html, webrt/webrt.css, webrt/Admin/EditUser.html, - webrt/Admin/ModifyUser, webrt/Admin/Elements/EditUserComments, - webrt/Elements/Error, webrt/Elements/Header, - webrt/Elements/SelectOwner, webrt/Ticket/Create.html, - webrt/Ticket/Create_Detail.html, webrt/Ticket/Display.html, - webrt/Ticket/Elements/EditWatcherList, - webrt/Ticket/Elements/ShowDependencies, - webrt/Ticket/Elements/ShowMemberOf, - webrt/Ticket/Elements/ShowMembers, - webrt/Ticket/Elements/ShowPeople, - webrt/Ticket/Elements/ShowReferences, - webrt/Ticket/Elements/ShowSummary, webrt/User/Prefs.html: - - Did a bunch of work on the webui. cleaned up a lot of the link display stuff - did some work on ticket create - - dependencies and subtickets are now listed in the ticketview. yay! - -2000-08-05 19:47 jesse - - * lib/RT/Ticket.pm, webrt/Ticket/Elements/ShowSummary: - - more Nobody fixes in Ticket.pm - justification fixes in ShowSummary - -2000-08-05 18:50 jesse - - * webrt/Ticket/ProcessUpdate.html: - - The webui can now process updates. - it needed YA currentuser fix - -2000-08-05 18:43 jesse - - * lib/RT/Ticket.pm: - - Ticket::Create(Owner => now takes either a user object or a userid. - and defaults to nobody. - -2000-08-05 17:51 jesse - - * Makefile: - - [no log message] - -2000-08-05 17:49 jesse - - * lib/RT/: Date.pm, Interface/Email.pm: - - fixed a few more bugs in the mailgateway. it can create tickets now. - fixed an undefined default in the cli query - made the date routine not spit out a stupid warning - -2000-08-05 17:21 jesse - - * lib/RT/Interface/Email.pm: - - fixed typos in the mailgate. thanks gary - -2000-08-05 00:16 jesse - - * Makefile, NEWS, webrt/Login.html, webrt/autohandler, - webrt/webrt.css: - - little tweaks to the webui. - bumped the version to 1.3.11 for distribution - -2000-08-04 18:45 jesse - - * README, bin/rtmux.pl, bin/webmux.pl, lib/RT/Areas.pm, - lib/RT/Attachments.pm, lib/RT/Date.pm, lib/RT/Link.pm, - lib/RT/Links.pm, lib/RT/Queue.pm, lib/RT/Queues.pm, - lib/RT/Record.pm, lib/RT/ScripScopes.pm, lib/RT/Scrips.pm, - lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm, - lib/RT/Transaction.pm, lib/RT/Transactions.pm, lib/RT/Users.pm, - lib/RT/Watchers.pm, lib/RT/Interface/Web.pm, - webrt/Admin/ModifyUser, webrt/Elements/SelectOwner, - webrt/Elements/SelectQueue, webrt/Elements/ViewUser, - webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html, - webrt/Ticket/Elements/ShowPeople: - - When creating an object, you ALWAYS need to pass in the current user - or acls break. we were a bit too lax about this before. - - this was a major round of bugfixing for the webui - -2000-08-04 15:41 jesse - - * Makefile, lib/RT/CurrentUser.pm, lib/RT/User.pm, webrt/webrt.css, - webrt/Elements/Header, webrt/Search/Listing.html, - webrt/Search/autohandler, webrt/Ticket/autohandler: - - Queue listing doesn't have that ugly blue any more. And its code for - setting row color is a bit cleaner. - - we now actually _check_ passwords for web logins. - - webrt.css now has slightly darker hyperlinks. - - CurrentUser->IsPassword now uses the UserObj - - users can't use null passwords for authentication. - -2000-08-03 02:19 jesse - - * lib/RT/Interface/Web.pm, webrt/Elements/ShadedBox, - webrt/Elements/TitleBoxStart: - - misc fixes to the webui and a leftover fix to the cli. - - the webui needs to have some of its internals gutted and - put back together. it feels very kludgy and not really "planned" - -2000-08-03 02:04 jesse - - * lib/RT/: Record.pm, Scrip.pm, Ticket.pm, Tickets.pm, - Transaction.pm, Action/SendEmail.pm: - - made status changes work. (RT::Action::SendEmail was being stupid - and not error checking until it was too late) - - removed more use of hardwired SQL "now()" - - moved the handling of LastUpdated into RT::Record. from DBIx::Record - -2000-08-03 01:09 jesse - - * lib/RT/Queue.pm: - - fixed a bug in the cli that kept ticket creates from working. - queue->hasright's calling convention changed. - -2000-08-03 00:59 jesse - - * Makefile: - - fixed a makefile typo. added back the comment about pg - -2000-08-03 00:42 jesse - - * docs/design_docs/users: - - file users was initially added on branch rt-1-1. - -2000-08-03 00:42 jesse - - * etc/user.Oracle: - - file user.Oracle was initially added on branch rt-1-1. - -2000-08-03 00:42 jesse - - * etc/schema.Oracle: - - file schema.Oracle was initially added on branch rt-1-1. - -2000-08-03 00:42 jesse - - * bin/initacls.Oracle, bin/initdb.Oracle, docs/README.oracle, - docs/design_docs/users, etc/schema.Oracle, etc/user.Oracle: - - A first cut at oracle support from Dave Morgan . - It is pretty much untested and guaranteed to break. Among other - things, the schema isn't current. but it's a start. - Thanks, Dave! - -2000-08-03 00:42 jesse - - * docs/README.oracle: - - file README.oracle was initially added on branch rt-1-1. - -2000-08-03 00:42 jesse - - * bin/initacls.Oracle: - - file initacls.Oracle was initially added on branch rt-1-1. - -2000-08-03 00:42 jesse - - * bin/initdb.Oracle: - - file initdb.Oracle was initially added on branch rt-1-1. - -2000-08-03 00:31 jesse - - * docs/design_docs/local_hacking: - - file local_hacking was initially added on branch rt-1-1. - -2000-08-03 00:31 jesse - - * HACKING, Makefile, docs/FAQ.html, docs/actions.html, - docs/admin.html, docs/attributes.html, docs/outline.html, - docs/rt_users_guide.html, docs/design_docs/local_hacking: - - doc updates. removed outdated 1.x docs - -2000-08-02 23:53 jesse - - * etc/config.pm: - - added some comments from tobias - -2000-08-02 00:20 jesse - - * Makefile, NEWS, TODO, etc/config.pm, etc/schema.mysql, - lib/RT/ACE.pm, lib/RT/ACL.pm, lib/RT/CurrentUser.pm, - lib/RT/Date.pm, lib/RT/Queue.pm, lib/RT/Record.pm, - lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/User.pm, - lib/RT/Interface/Email.pm: - - - Weekend of 1 Aug 2000 - --------------------- - I spent the weekend in DC visiting family. This meant I got a bit of - code written ;) Sadly, I have no access to the CVS server, - so I'll be batching a bunch of commits. - - 1. Enabled CLI admin tool - 2. Added ACL listing functionality to the CLI admin tool. - 3. Enhanced RT::Queue->Grant such that it works with the structure of RT2 - ACLs - 4. Made the Logging framework actually log errors to STDERR. - (This makes debugging the CLI tools much easier. It also means - that the cli tools explain _why_ they're dying.) - 5. Fully expunged use of Mysql's SQL keyword "now()". I'd have left this - stuff in, except mysql doesn't seem to deal well with the idea that the - entire world isn't one timezone. On top of that, it doesn't seem to - have a way to force it into GMT mode that doesn't involve modifying init - scripts. *sigh* - 6. Did a whole bunch more work on the ACL checking in RT::User - 7. Wrote up some preliminary docs on local hacks to RT - 8. Added in a routine to allow local canonicalization of email addresses - 9. Added in the concept of "Disabled users" To preserve RT2's database - Integrity, whacking user accounts would be a bad thing. So, instead, - we've got the concept of 'disabled' users. A disabled user fails ANY - ACL check, ANY password check and doesn't appear in any lists of ACLs. - (note that the lastmost statement isn't yet true) - - 10. rtadmin user -enable and rtadmin user -disable now work. - 11. ACLs are now enforced for many ticket related actions. - (this does mean that you'll want to insert some acls like those below) - - INSERT INTO ACL VALUES (1,0,'User','SuperUser','Queue',0); - INSERT INTO ACL VALUES (2,3,'User','CreateTicket','Queue',0); - INSERT INTO ACL VALUES (3,3,'User','ShowTicket','Ticket',0); - INSERT INTO ACL VALUES (4,3,'User','ShowTicketHistory','Ticket',0); - INSERT INTO ACL VALUES (6,3,'User','CreateTicket','Queue',1); - INSERT INTO ACL VALUES (7,3,'User','ModifyTicket','Ticket',1); - INSERT INTO ACL VALUES (8,1,'User','Superuser','System',0); - INSERT INTO ACL VALUES (9,0,'Everyone','Superuser','System',0); - -2000-08-02 00:17 jesse - - * bin/: rtmux.pl, testdeps.pl: - - Bumped us up to requiring Log::Dispatch 1.6. - Cleaned up testdeps a bit. Now, you knwo it passes. - -2000-07-27 03:01 jesse - - * Makefile: - - Bumped the version to 1.3.9 - Rolled RT 1.3.9 - -2000-07-27 02:37 jesse - - * lib/RT/Date.pm, lib/RT/Ticket.pm, webrt/Elements/ViewUser, - webrt/Ticket/Elements/ShowDates, webrt/Ticket/Elements/ShowSummary, - webrt/Ticket/Elements/ShowTransaction, bin/webmux.pl: - - Fixed a bug with null due dates. - Made RT/Date deal with a time of -1 as "Never" - made html escaping on included entities on webrt default. - -2000-07-27 02:01 jesse - - * lib/RT/Date.pm: - - file Date.pm was initially added on branch rt-1-1. - -2000-07-27 02:01 jesse - - * README, lib/RT/Date.pm, lib/RT/Record.pm, lib/RT/Ticket.pm, - bin/testdeps.pl: - - Moved Date managment routines from DBIx::Record to RT::Record. - Initial Checkin of RT::Date, a lightweight Date object capable - of doing everything RT needs. Oh. and it's fully documented in POD. - - Converted RT::Record and RT::Ticket and the cli to use RT::Date instead - of Date::Kronos. The CLI now feels _much_ zippier and code within - RT::Ticket is a bit easier to read. - -2000-07-27 01:55 jesse - - * etc/schema.mysql: - - removed extraneous whitespace - -2000-07-27 01:51 jesse - - * lib/RT/Attachment.pm: - - changed the header on attachment.pm - -2000-07-24 10:17 tobiasb - - * lib/RT/Interface/Web.pm, webrt/ViewUser.html, - webrt/Search/TicketCell, webrt/Ticket/Display.html, - webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Update.html: - - Moved some things to Web.pm, made some nifty options for getting tickets from the listing in a new window - -2000-07-24 06:56 tobiasb - - * lib/RT/User.pm: - - Some TODOs - -2000-07-24 06:54 tobiasb - - * lib/RT/Interface/Email.pm: - - Some comments and TODOs. - - I fixed one simple TODO about putting in pid + rand into the name of - the temp directory needed for parsing the mime entity. - -2000-07-24 00:52 jesse - - * lib/RT/User.pm: - - Added a few comments where they really should be - -2000-07-24 00:48 jesse - - * lib/RT/Interface/Email.pm: - - Did a bunch of cleanup work on Interface/Email.pm - It could still use more. - -2000-07-23 03:50 tobiasb - - * lib/RT/Ticket.pm: - - Added the method 'TimeWorkedAsString'. Ok, I'll start looking into Date::Kronos shortly :) - -2000-07-22 20:10 tobiasb - - * lib/RT/Interface/Email.pm: - - [no log message] - -2000-07-22 20:05 tobiasb - - * lib/RT/Interface/Email.pm: - - Inserted a reference to [fsck 290] in a TODO-comment. - -2000-07-22 13:06 tobiasb - - * lib/RT/Interface/Web.pm, webrt/Search/Listing.html: - - Moved stuff from Listing.html to Web.pm, sub ProcessSearchQuery (suggestions to a better name for the sub?) - -2000-07-21 15:11 tobiasb - - * lib/RT/Ticket.pm, lib/RT/Interface/Web.pm, - webrt/Search/Listing.html: - - bugfixing - -2000-07-21 11:09 tobiasb - - * etc/schema.mysql: - - Bugfix - -2000-07-21 10:57 tobiasb - - * webrt/index.html: - - Now it's possible to select queue from the start page - -2000-07-21 10:35 tobiasb - - * lib/RT/Attachment.pm, lib/RT/Ticket.pm, webrt/Elements/Header, - webrt/Elements/SelectOwner, webrt/Ticket/Elements/EditWatcherList: - - bugfixes, comments. I restricted the Owner-list to those that CanManipulate - this should eventually go away when we have proper access control. Tiny improvement of EditWatcherList - it's now possible to edit user information if the user is found. - -2000-07-21 05:48 tobiasb - - * lib/RT/CurrentUser.pm: - - bugfix - -2000-07-21 00:08 jesse - - * lib/RT/ACE.pm, lib/RT/Attachment.pm, lib/RT/Queue.pm, - lib/RT/Ticket.pm, lib/RT/User.pm, webrt/EditUserComments.html: - - Cleaned up language in EditUserComments - - did work on watchers in ui/cli/admin and Ticket.pm and User.pm - cleaned up code in Ticket.pm - - Start of some work on acls in Queue.pm - -2000-07-20 22:13 tobiasb - - * lib/RT/Interface/Web.pm, webrt/Elements/SelectWatcherType, - webrt/Ticket/Display.html, webrt/Ticket/EditWatchers.html, - webrt/Ticket/Elements/EditWatcherList, - webrt/Ticket/Elements/ShowHistory, webrt/Ticket/Elements/ShowLinks, - webrt/Ticket/Elements/TicketToolBox: - - Some code improvements, added one popular demand here; to avoid spending too much time clicking around, it should be possible to show all histoies of member requests at the same page. - -2000-07-20 18:31 tobiasb - - * lib/RT/CurrentUser.pm: - - Fixing a bit. Please try to remember to test code before committing - it :) - -2000-07-20 18:09 tobiasb - - * webrt/Ticket/ProcessUpdate.html: - - once more I've committed without testing.. - -2000-07-20 18:02 tobiasb - - * lib/RT/CurrentUser.pm: - - Removed a compile-time bug - -2000-07-20 17:48 tobiasb - - * lib/RT/User.pm: - - bugfix - -2000-07-20 17:39 tobiasb - - * etc/config.pm, lib/RT/Ticket.pm, lib/RT/User.pm, - lib/RT/Watcher.pm, lib/RT/Interface/Web.pm, - webrt/Ticket/Display.html: - - bugfixes + conflict resolving at the signature + moved something to Web.pm from Display.html - -2000-07-20 17:31 jesse - - * lib/RT/: CurrentUser.pm, User.pm: - - Culled some not-for-now signature stuff. - Cleaned up and optimised CurrentUser->UserObj - -2000-07-20 16:39 jesse - - * Makefile, NEWS: - - doing some work for a customer. rt-mailgate --help should tell you - about the fabulous new mail mode - -2000-07-20 15:39 tobiasb - - * lib/RT/Interface/Web.pm, webrt/Ticket/Display.html: - - moving things from the template to Web.pm was not as straight-forwarded as I had hoped. - -2000-07-20 15:20 tobiasb - - * lib/RT/Attachment.pm, lib/RT/CurrentUser.pm, lib/RT/User.pm, - lib/RT/Interface/Web.pm, webrt/Ticket/Display.html: - - Started moving stuff to Web.pm, fixed and tested signatures - -2000-07-20 14:50 tobiasb - - * lib/RT/: CurrentUser.pm, User.pm: - - moved signature from currentuser to user (but does it make sense, anyway? Signatures is something 'personal' that belongs only to the current user?) - -2000-07-20 14:43 tobiasb - - * webrt/ViewUser.html: - - bugfix ... hmpf, always test before committing .. always test before committing ... - -2000-07-20 14:33 tobiasb - - * lib/RT/Interface/Web.pm, webrt/ViewUser.html: - - bugfix - -2000-07-20 14:11 tobiasb - - * lib/RT/Interface/Web.pm: - - file Web.pm was initially added on branch rt-1-1. - -2000-07-20 14:11 tobiasb - - * lib/RT/Interface/Web.pm: - - I'm considering to move things from Display.html and ProcessUpdate.html to Web.pm. Comments? - -2000-07-20 14:06 jesse - - * lib/RT/Watcher.pm: - - Removed the bogus code frol lib/RT/Watcher.pm - -2000-07-20 13:39 jesse - - * lib/RT/User.pm: - - reversed some bogus code - -2000-07-20 11:44 tobiasb - - * webrt/Ticket/Elements/EditWatcherList: - - file EditWatcherList was initially added on branch rt-1-1. - -2000-07-20 11:44 tobiasb - - * webrt/Elements/SelectWatcherType: - - file SelectWatcherType was initially added on branch rt-1-1. - -2000-07-20 11:44 tobiasb - - * webrt/: Elements/SelectWatcherType, - Ticket/Elements/EditWatcherList: - - Now it's possible to edit ticket and queue watchers. It's really horrible, but at least it works - -2000-07-20 11:43 tobiasb - - * webrt/Ticket/: EditWatchers.html, Update.html: - - Small comment - -2000-07-20 11:40 tobiasb - - * webrt/Ticket/Update.html: - - Linked in the 'edit watchers' functionality - -2000-07-20 11:27 tobiasb - - * lib/RT/Ticket.pm, lib/RT/Watcher.pm, - webrt/Ticket/EditWatchers.html: - - Now it's possible to edit ticket and queue watchers. It's really horrible, but at least it works - -2000-07-20 11:27 tobiasb - - * lib/RT/User.pm: - - bugfix - -2000-07-20 11:23 tobiasb - - * webrt/Ticket/Elements/ShowTransaction: - - This is sort of a local hack, I guess it should be separated ... but maybe not. if content-type =~ /^text/(?\!plain)/, there is now a link for 'view this as plain text', which might be useful for unknown text formats and for viewing 'code' - -2000-07-20 02:59 jesse - - * lib/RT/: ACE.pm, ACL.pm: - - I'm committing ACE.pm and ACL.pm so people can get a bit of a taste of what I'm doing. They don't work, they probably don't even compile yet, but they're not getting called from the rest of the code yet. - - These aren't the droids you're looking for. - -2000-07-20 02:58 jesse - - * lib/RT/User.pm: - - updated User.pm to match the schema - -2000-07-19 16:45 tobiasb - - * webrt/Ticket/EditWatchers.html: - - file EditWatchers.html was initially added on branch rt-1-1. - -2000-07-19 16:45 tobiasb - - * webrt/Ticket/EditWatchers.html: - - This should be a template for adding and removing watchers; will be completed tomorrow - -2000-07-19 16:10 tobiasb - - * webrt/: Logout.html, ViewUser.html, Search/Listing.html, - Ticket/Display.html, Ticket/Update.html, - Ticket/Elements/ShowPeople, Ticket/Elements/ShowSummary: - - It's now possible to edit user data (realname, userid, email) from the web ui - -2000-07-19 16:04 tobiasb - - * lib/RT/: CurrentUser.pm, Ticket.pm, Watcher.pm, - Interface/Email.pm: - - Worked a bit with requestors; 1) if we already have a user object at the requestor, we should use it. 2) it should be possible to edit the users email without also updating the watcher email if those are the same. 3) if a user enters an email with a different from address, but can be identified as a previous user (by equal real name or other means of authentication), the email field in the watcher table should be used - -2000-07-19 10:06 tobiasb - - * webrt/Elements/Header: - - bugfixing - -2000-07-19 08:53 tobiasb - - * webrt/webrt.css: - - Our web designer didn't like red table borders - -2000-07-19 08:52 tobiasb - - * webrt/: Elements/Header, Search/Listing.html: - - Fun #440: Popular wish: Fixed alternating colours at the lines in Listing.html - -2000-07-19 07:41 tobiasb - - * webrt/webrt.css: - - oddline for use in Listing.html - -2000-07-19 06:54 tobiasb - - * webrt/Elements/Header: - - nicer - -2000-07-19 06:51 tobiasb - - * webrt/: index.html, Elements/Header: - - Fun #666; Form 'view bug #xxx' from display and the front page - -2000-07-18 04:17 tobiasb - - * etc/schema.mysql: - - bug #286; two nines in schema.sql - -2000-07-14 11:40 tobiasb - - * webrt/Search/TicketCell: - - I'm currently trying to fix it so that each user can put in options in the session information (or should it rather be in the DB?) about whether they want tickets to pop up in separate windows or not. - -2000-07-14 10:47 tobiasb - - * etc/schema.mysql, lib/RT/Link.pm, lib/RT/Ticket.pm, - lib/RT/Action/StallDependent.pm, - webrt/Ticket/Elements/TicketToolBox: - - added a scrip for stalling members upon membership linking ... now it's impossible for a request to make a link to itself ... now it's possible to open a request from the ticket display - -2000-07-14 09:29 tobiasb - - * webrt/Ticket/ProcessUpdate.html: - - TODO: Public comments are currently beeing threated as private - comments (that's better than it beeing ignored ... at least at the - moment) - - Now it skips trying to build a MIME entity if there are no message. - -2000-07-14 09:11 tobiasb - - * webrt/ViewUser.html: - - Bugfix - -2000-07-14 09:09 tobiasb - - * webrt/Search/Listing.html: - - Killed a warning - -2000-07-13 13:31 tobiasb - - * webrt/index.html: - - Typo - -2000-07-13 11:44 tobiasb - - * webrt/Elements/Header: - - huh? seems like I've lost the control of CVS a bit today :) - -2000-07-13 11:43 tobiasb - - * webrt/Elements/Header: - - [no log message] - -2000-07-13 11:36 jesse - - * webrt/index.html: - - tobix missed a &> - -2000-07-13 11:08 tobiasb - - * webrt/: Search/RestrictSearch.html, Ticket/Display.html, - Ticket/ProcessUpdate.html, Ticket/Update.html: - - Dealt with the footer; it does not need overriding anywhere, and is thus placed in the autohandler - -2000-07-13 11:04 tobiasb - - * webrt/: Logout.html, ViewUser.html, autohandler, index.html, - Elements/Header, Search/Listing.html, Ticket/Modify.html, - Ticket/ValidateUpdate.html: - - Dealt with the header module; it's now in the .html templates, not in autohandler ... the title should be nice and informative in all the templates ... and the instance name is viewed along with the header - -2000-07-13 07:26 tobiasb - - * lib/RT/Link.pm, lib/RT/Ticket.pm, webrt/index.html, - webrt/Elements/SelectResultsPerPage, webrt/Search/Listing.html, - webrt/Search/PickRestriction: - - small bugfix + better handling of LimitResultsOnPage - -2000-07-12 14:09 tobiasb - - * lib/RT/: Ticket.pm, Transaction.pm: - - bugfix'es. duplicated linking actions are now turned down. - -2000-07-12 01:39 jesse - - * etc/schema.mysql: - - updated the schema for User objects. now they've got _even more_ data. - and better extension capabilities. - -2000-07-12 00:10 tobiasb - - * lib/RT/Attachment.pm, lib/RT/Scrip.pm, lib/RT/ScripScope.pm, - lib/RT/Ticket.pm, lib/RT/Transaction.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Action/StallDependent.pm, - webrt/Elements/SelectResultsPerPage, webrt/Elements/ViewUser, - webrt/Ticket/Create.html, webrt/Ticket/Elements/ShowTransaction: - - Debugged a bit and removed some critical bugs - -2000-07-11 14:43 tobiasb - - * webrt/Elements/ViewUser: - - <% $User->Comments || "No comment entered about this user" |h %> - - "|h" seems like some random noise, or have I misunderstood something? - -2000-07-11 12:19 tobiasb - - * etc/schema.mysql: - - Comments - -2000-07-11 11:30 tobiasb - - * lib/RT/Transaction.pm, lib/RT/Action/AutoReply.pm, - webrt/Logout.html, webrt/ViewUser.html: - - more debug logging + some bugfixing (exception handling) - -2000-07-10 20:09 jesse - - * bin/testdeps.pl, etc/schema.mysql, lib/RT/Ticket.pm: - - work on ACLs. some acl decisions are now made. - -2000-07-10 17:13 jesse - - * etc/schema.mysql, lib/RT/ACL.pm, lib/RT/CurrentUser.pm, - lib/RT/Queue.pm, lib/RT/Record.pm, lib/RT/Ticket.pm, - lib/RT/Transaction.pm, lib/RT/User.pm, lib/RT/Interface/Email.pm, - webrt/Ticket/Display.html: - - Wow. all kinds of work. - - Beginning of implementation of ACLs. lots of code cleanup. - - schema changes for Groups and Acls. - - we now use MIMEObj EVERYWHERE instead of MIMEEntity. - -2000-06-29 20:36 jesse - - * Makefile: - - bumped to 1.0.4pre2 - fixed perms issue for lib/templates - -2000-06-29 16:11 jesse - - * Makefile, etc/schema: - - makefile fixes. bump to 1.0.4pre1 - schema.mysql has a longer phone number field - -2000-06-26 15:35 jesse - - * README: - - [no log message] - -2000-06-26 15:10 jesse - - * Makefile, bin/rtmux.pl, bin/testdeps.pl: - - added Date::Manip to testdeps.pl - set $ENV{'TZ'} in bin/rtmux.pl to deal with a bug in Date::Manip - bumped the version to 1.3.8 - -2000-06-26 14:38 jesse - - * bin/testdeps.pl: - - added Date::Kronos to testdeps.pl - -2000-06-26 14:36 jesse - - * bin/testdeps.pl: - - added Time::Seconds to testdeps.pl - -2000-06-26 14:31 jesse - - * bin/testdeps.pl, webrt/autohandler, webrt/webrt.css, - webrt/Elements/ViewUser, webrt/Ticket/Elements/ShowTransaction: - - various hacking for RTCon pilsen. a much enhanced testdeps.pl - -2000-06-16 10:51 jesse - - * lib/RT/Interface/Email.pm: - - some commentary. - -2000-06-16 08:57 tobiasb - - * lib/RT/Interface/Email.pm: - - Sort of a bugfix - -2000-06-16 08:56 tobiasb - - * lib/RT/Action/SendEmail.pm: - - Removed some old garbage - - TODO: Fix message trailer - -2000-06-16 04:37 tobiasb - - * lib/RT/: Attachment.pm, Record.pm, Ticket.pm, Transaction.pm: - - It's no longer mandatory to have a Creator in every RT table. It's just to set them 'read/auto'-accessible. This should fix bug #275 - -2000-06-15 16:43 tobiasb - - * etc/config.pm, lib/RT/Attachment.pm, lib/RT/Link.pm, - lib/RT/Ticket.pm, webrt/Elements/MessageBox, - webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html, - webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Update.html, - webrt/Ticket/Elements/ShowTransaction: - - some few bugfixes + some work to get 'reply-linking' working. In my local version of RT (only changes in the config.pm) people can now enter a 'FAQ-tag', and the right article from KB is automaticly inserted in the reply. - -2000-06-15 12:22 tobiasb - - * webrt/ViewUser.html: - - file ViewUser.html was initially added on branch rt-1-1. - -2000-06-15 12:22 tobiasb - - * lib/RT/Attachment.pm, lib/RT/CurrentUser.pm, lib/RT/Ticket.pm, - lib/RT/User.pm, lib/RT/Interface/Email.pm, webrt/ViewUser.html, - webrt/autohandler, webrt/Elements/Error, webrt/Elements/Footer, - webrt/Elements/Header, webrt/Elements/ViewUser, - webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Update.html, - webrt/Ticket/Elements/ShowTransaction: - - lots of bugfixes and some enhancements: - - signature in replies - - Creator, LastUpdated etc. should be updated in User.pm - - The message headers of inbound requests is now decoded ... this is - some sort of a hack as it discards charset information in the header. - Anyway, in those cases where the header data will be in the same charset - as the body, this works out nicely. - - I'm allowing a user to see what data is stored at him. We might need ACLs - for the user comment. Also, this one is placed directly on the root, so - it will break if the user is not logged in. Also, the page and the module - is 'ViewUser', 'ShowUser' would be more consistent. - - Prettified the ShowTransaction header - -2000-06-15 09:02 tobiasb - - * etc/schema.mysql: - - Added "Signature" to the Users table and worked a bit at the comments - -2000-06-14 09:24 tobiasb - - * lib/RT/Ticket.pm, lib/RT/Transaction.pm, - webrt/Ticket/Display.html, webrt/Ticket/Elements/TicketToolBox: - - Tons of minor bugfixes and enhancements - -2000-06-14 09:19 tobiasb - - * etc/schema.mysql: - - Added this: - - ##TODO: Get Notify.pm to support OldOwner + fix a template - #INSERT INTO Scrips VALUES (20, 'NotifyOldOwnerOnSteal', - # 'Sends mail to the old owner when the ticket is stolen', - # 'Steal','Notify',10,'OldOwner',1,NULL,1,NULL); - -2000-06-14 06:54 tobiasb - - * etc/schema.mysql, lib/RT/Attachment.pm, lib/RT/Record.pm, - lib/RT/Ticket.pm, webrt/Ticket/Display.html, - webrt/Ticket/Elements/ShowDates: - - minor enhancements and bugfixes - -2000-06-14 03:30 tobiasb - - * etc/schema.mysql: - - I just noticed that Jesse already had a 'resolution' attribute in the ticket. I guess that covers the same as my 'state' attribute - -2000-06-14 00:12 tobiasb - - * lib/RT/Attachment.pm, webrt/Elements/ViewUser, - webrt/Search/Listing.html, webrt/Search/PickRestriction, - webrt/Ticket/Elements/ShowDates: - - Some enhancements and bugfixes - -2000-06-13 23:26 tobiasb - - * webrt/Ticket/Elements/ShowDates: - - improved - -2000-06-13 20:42 tobiasb - - * etc/schema.mysql: - - Bugfix - -2000-06-13 15:53 tobiasb - - * lib/RT/TicketCollection.pm, webrt/Search/Listing.html: - - Trying to get search on requestor to work - unsuccessful so far :/ - -2000-06-13 10:23 tobiasb - - * webrt/: autohandler, Ticket/Display.html, - Ticket/Elements/TicketToolBox: - - Some bugfixes - -2000-06-13 06:41 tobiasb - - * lib/RT/Ticket.pm: - - Bugfix - -2000-06-09 14:43 tobiasb - - * webrt/EditUserComments.html: - - Hm, aaaalways check if everything is working before committing. Argh. - -2000-06-09 14:30 tobiasb - - * webrt/: EditUserComments.html, autohandler, Elements/Error, - Elements/ViewUser: - - added a minimum interface for editing comments about users - -2000-06-09 12:53 tobiasb - - * webrt/Ticket/Elements/ShowRequestor: - - file ShowRequestor was initially added on branch rt-1-1. - -2000-06-09 12:53 tobiasb - - * webrt/Elements/ViewUser: - - file ViewUser was initially added on branch rt-1-1. - -2000-06-09 12:53 tobiasb - - * webrt/EditUserComments.html: - - file EditUserComments.html was initially added on branch rt-1-1. - -2000-06-09 12:53 tobiasb - - * etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/User.pm, - lib/RT/Users.pm, lib/RT/Watcher.pm, lib/RT/Interface/Email.pm, - webrt/EditUserComments.html, webrt/Elements/ViewUser, - webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Elements/ShowPeople, - webrt/Ticket/Elements/ShowRequestor, - webrt/Ticket/Elements/ShowSummary: - - added a large section in the ticket view for earlier requests (stubbed) by the same requestor and comments about the requestor (the interface for editing those comments are stubbed) - -2000-06-09 04:32 tobiasb - - * etc/schema.mysql: - - Added "Lang" to the users table - -2000-06-08 10:17 tobiasb - - * etc/config.pm, etc/schema.mysql, lib/RT/Ticket.pm, - webrt/Elements/SelectMatch, webrt/Ticket/Display.html, - webrt/Ticket/Elements/TicketToolBox: - - Added 'UpdateTold' sub to Tickets. Some minor bugfixes and enhancements. Not much testing done. - -2000-06-08 08:19 tobiasb - - * lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/Watcher.pm, - lib/RT/Action/SendEmail.pm, lib/RT/Interface/Email.pm, - webrt/Ticket/Update.html: - - A bit of debugging, and I managed to remove some annoying warnings - -2000-06-08 08:10 tobiasb - - * etc/schema.mysql: - - bugfix - -2000-06-08 07:59 tobiasb - - * etc/schema.mysql: - - Removed the area in one template. - -2000-06-08 07:55 tobiasb - - * etc/schema.mysql: - - # I think it might make sense replacing "TIMESTAMP" with "DATETIME" - # for mysql. Yes, indeed, I'll do that right away. - -2000-06-08 06:53 tobiasb - - * lib/RT/Ticket.pm: - - Removed some redundant lines. - -2000-06-08 06:38 tobiasb - - * etc/schema.mysql: - - Inserted table AlternateEmails (commented out as for now). - - One bugfix (typo) in the ACL table. - -2000-06-08 06:31 tobiasb - - * etc/schema.mysql: - - Grouped into folders - -2000-06-08 05:47 tobiasb - - * lib/RT/Attachment.pm, lib/RT/Ticket.pm, webrt/Login.html, - webrt/Search/Listing.html, webrt/Ticket/ProcessUpdate.html, - webrt/Ticket/Elements/ShowTransaction, - webrt/Ticket/Elements/TicketToolBox: - - bugfixes + improvements requested from the support team; kill & take link from the front page, table borders in listing, reduced header printing ... - -2000-06-07 16:15 tobiasb - - * lib/RT/Ticket.pm, lib/RT/Transaction.pm, - webrt/Elements/MessageBox, webrt/Ticket/Elements/ShowTransaction: - - bugfixes - -2000-06-07 15:46 tobiasb - - * etc/schema.mysql: - - bugfix - -2000-06-07 15:42 tobiasb - - * lib/RT/: Ticket.pm, Transaction.pm: - - bugfixes - -2000-06-07 15:22 tobiasb - - * lib/RT/Ticket.pm: - - Now, if some Record decendant can _Accessible('Created', auto) and _Accessible('LastUpdated', auto), they will be set automaticly (at least, that's the theory) - -2000-06-07 14:16 tobiasb - - * etc/schema.mysql: - - mysql autosets the first TIMESTAMP in the table on every - update/insert. - -2000-06-07 12:33 tobiasb - - * webrt/autohandler: - - The error handling here seems to work now ... but only for documents - at the root. I thought those autohandlers were called recursively? - -2000-06-07 12:12 tobiasb - - * etc/config.pm, lib/RT/Record.pm, lib/RT/Ticket.pm: - - working with those pesky dates - -2000-06-07 11:51 tobiasb - - * bin/webmux.pl: - - bugfix - -2000-06-07 08:37 tobiasb - - * README: - - Added Date::Kronos (not on CPAN yet) to README - -2000-06-07 08:17 tobiasb - - * webrt/Ticket/Elements/ShowTransaction: - - Different Comment and Reply links. They link to the same page, but the default - action is changed. - -2000-06-07 07:36 tobiasb - - * webrt/Ticket/Elements/ShowTransaction: - - Now it doesn't display looooong text/plain attachments. - - We have a lot of ~1M text/plain attachments in our RT queue. - - I'm trying to hack my webrt.cgi to show attachments upon a - "PickUpTransaction" parameter. I don't know how to do it in the - mason/mod_perl model. - -2000-06-07 04:09 tobiasb - - * webrt/Elements/MessageBox: - - bugfix - -2000-06-06 18:44 jesse - - * etc/schema.mysql: - - removed an outdated table - -2000-06-06 15:42 jesse - - * webrt/Login.html: - - changed the name of the mason package to RT::Mason, so it didn't conflict with other instances - on the same webserver - - fixed a couple of Log::Dispatch(warn)s to (warning)s - - removed tobix' weird session crunching code that was messign me up - -2000-06-06 15:42 jesse - - * etc/config.pm, lib/RT/Ticket.pm: - - changed the name of the mason package to RT::Mason, so it didn't conflict with other instances - on the same webserver - - fixed a couple of Log::Dispatch(warn)s to (warning)s - -2000-06-06 15:41 jesse - - * bin/webmux.pl: - - changed the name of the mason package to RT::Mason, so it didn't conflict with other instances - on the same webserver - - f - -2000-06-06 15:41 jesse - - * README: - - changed the name of the mason package to RT::Mason, so it didn't conflict with other instances - on the same webserver - -2000-06-06 14:40 tobiasb - - * webrt/Ticket/: Update.html, Elements/TicketToolBox: - - I'm trying to set default action in Update.html dependent on which link the - user clicked at (update, comment or reply). I'll continue tomorrow (dinnertime - now :) - -2000-06-06 14:11 tobiasb - - * webrt/Ticket/ProcessUpdate.html: - - bugfix - -2000-06-06 13:48 jesse - - * etc/config.pm: - - changed Log::Dispatch::VERSION (1.2) which didn't work - to the more standard perl syntax: use Log::Dispatch 1.2; - - \ed an @ that tobix left in rtmux.pl - -2000-06-06 13:47 jesse - - * bin/rtmux.pl: - - \ed an @ that tobix left in rtmux.pl - -2000-06-06 13:32 jesse - - * Makefile: - - :%s/ / / in the makefile (convert spaces to tabs) - -2000-06-06 13:15 tobiasb - - * README: - - Mostly doc changes - -2000-06-06 11:36 tobiasb - - * etc/config.pm: - - bugfix - -2000-06-06 11:15 tobiasb - - * docs/FAQ: - - Added some few tips - -2000-06-06 11:05 tobiasb - - * bin/rtmux.pl: - - putted in some warnings about things that doesn't work - -2000-06-06 04:21 tobiasb - - * README: - - added comments about DBMS'es - -2000-06-05 16:54 tobiasb - - * Makefile: - - more bugfixes - -2000-06-05 16:46 tobiasb - - * Makefile: - - bgfx - -2000-06-05 14:01 jesse - - * Makefile: - - [no log message] - -2000-06-05 09:26 tobiasb - - * README, etc/config.pm, etc/schema.mysql, webrt/autohandler: - - done some documentation fixes - -2000-06-05 07:14 tobiasb - - * README: - - updated the STATUS - -2000-06-02 03:32 tobiasb - - * etc/schema.mysql, lib/RT/Action/SendEmail.pm, - lib/RT/Interface/Email.pm, webrt/autohandler, webrt/Elements/Error: - - bugfix - -2000-06-01 23:28 tobiasb - - * webrt/Ticket/Elements/TicketToolBox: - - file TicketToolBox was initially added on branch rt-1-1. - -2000-06-01 23:28 tobiasb - - * etc/config.pm, etc/schema.mysql, lib/RT/Link.pm, - lib/RT/Ticket.pm, lib/RT/Action/SendEmail.pm, - lib/RT/Interface/Email.pm, webrt/autohandler, webrt/Elements/Error, - webrt/Elements/SelectOwner, webrt/Ticket/Create_Detail.html, - webrt/Ticket/Display.html, webrt/Ticket/ProcessUpdate.html, - webrt/Ticket/Update.html, webrt/Ticket/Elements/TicketToolBox: - - ... better logging (logs a warning when it's dieing during an eval) ... maybe the URL in the mails will work now ... misc bugfixes ... some better foldings ... better error handling in the WebUI (not tested! You should absolutely see this, I have a feeling it's unsmart. Check autohandler and Elements/Error) ... misc features added (default values on selectowners now work, auto-fill-in of requestor on create, auto-fill-in of subject on spawn, viewing actions on the ProcessUpdate, ProcessUpdate fixed up a bit ... hm, that's it) - -2000-06-01 20:54 tobiasb - - * bin/testdeps.pl: - - Added Text::Wrapper for quoting of wide messages - -2000-06-01 20:50 tobiasb - - * lib/RT/Transaction.pm, lib/RT/Action/StallDependent.pm, - lib/RT/Interface/Email.pm, webrt/Login.html, - webrt/Ticket/autohandler, webrt/Ticket/Elements/ShowLinks: - - lots of bugfixes and minor enhancements - -2000-06-01 02:58 jesse - - * Makefile: - - [no log message] - -2000-06-01 02:20 jesse - - * Makefile, NEWS: - - work on the web ui. cleanups to the comment and reply pages as well as the - queue view and the ticket detail page - -2000-05-31 14:28 tobiasb - - * etc/config.pm, webrt/Search/Listing.html, - webrt/Search/TicketCell, webrt/Ticket/Display.html: - - Popular demand: A link for taking an action from the listing page (reduces the change for concurrency problems) - -2000-05-31 13:59 tobiasb - - * webrt/Search/autohandler: - - Uh, some weird debugging stuff came into the last commit - I should - have checked better. - - Some of those autohandlers seems like copies of each other. There - must be better ways to do this (i.e. separating all the common stuff - into some module)? - -2000-05-31 13:52 tobiasb - - * lib/RT/Transaction.pm, lib/RT/Interface/Email.pm, - webrt/Search/Listing.html, webrt/Search/PickRestriction, - webrt/Search/autohandler, webrt/Ticket/Display.html, - webrt/Ticket/Elements/ShowHistory: - - popular demands; more navigation ({back to listing} and {last transaction}) and misc details - -2000-05-31 12:20 tobiasb - - * webrt/Elements/SelectMatch: - - This one is plain ugly at the moment. Anyway, it's ment for a more advanced 'regexp match / glob match / word match / substring match / total match' - -2000-05-31 12:20 tobiasb - - * webrt/Elements/SelectMatch: - - file SelectMatch was initially added on branch rt-1-1. - -2000-05-31 11:55 tobiasb - - * lib/RT/Action/SendEmail.pm: - - bugfix - -2000-05-31 09:53 tobiasb - - * webrt/: Elements/SelectStatus, Ticket/Update.html: - - Some popular demands from the support dept; - - I've made it possible to kill by selecting status dead - - Response is the default action. I've added a cryptical line which - might or might not give a warning. Ideally, I guess we should do the comment / - reply selection through submit buttons rather than through a select menu - what - di you think? - -2000-05-30 22:46 tobiasb - - * etc/config.pm, lib/RT/Attachment.pm: - - Ah ... I had forgotten signatures. Some stubbed work, I'll continue tomorrow - -2000-05-30 22:31 tobiasb - - * lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/Record.pm, - lib/RT/Ticket.pm, lib/RT/Transaction.pm, webrt/Login.html, - webrt/Elements/MessageBox, webrt/Search/Listing.html, - webrt/Ticket/autohandler, webrt/Ticket/Elements/ShowTransaction: - - Quoting works now ... fixed some other misc details + bugfixes ... and I've moved the date handling to RT::Record, it will be completed tomorrow (I hopecvs diff -uw | less) - -2000-05-30 20:31 tobiasb - - * webrt/Ticket/Create_Detail.html: - - Removed those annoying blink tags.. :) - -2000-05-30 20:14 tobiasb - - * webrt/: Elements/MessageBox, Ticket/Create_Detail.html: - - Still working on that MessageBox - -2000-05-30 20:09 tobiasb - - * webrt/: Elements/MessageBox, Ticket/Update.html: - - Separated out the MessageBox - -2000-05-30 20:09 tobiasb - - * webrt/Elements/MessageBox: - - file MessageBox was initially added on branch rt-1-1. - -2000-05-30 19:56 tobiasb - - * webrt/Ticket/Elements/ShowTransaction: - - Changed
    to
     for the message content.
    -	
    -	TODO: We really should HTML'ify and/or HTML-escape the Content.
    -	
    -2000-05-29 06:59  tobiasb
    -
    -	* Makefile:
    -
    -	Some bugfixes, but absolutely not tested.
    -	
    -2000-05-26 12:11  tobiasb
    -
    -	* webrt/Search/Listing.html:
    -
    -	Now it runs /Elements/Header - I was a bit annoyed because it was missing Title
    -	
    -2000-05-26 10:11  tobiasb
    -
    -	* webrt/Ticket/Display.html:
    -
    -	Seems like I had introduced an error here
    -	
    -2000-05-24 21:50  jesse
    -
    -	* lib/RT/Ticket.pm, lib/RT/TicketCollection.pm, lib/RT/Tickets.pm,
    -	webrt/Search/Listing.html, webrt/Ticket/Display.html:
    -
    -	Working on persistable web queries. Introduced RT::TicketCollection
    -	Arguably this should be in RT::Tickets. and may be some day
    -	
    -2000-05-24 21:50  jesse
    -
    -	* lib/RT/TicketCollection.pm:
    -
    -	file TicketCollection.pm was initially added on branch rt-1-1.
    -	
    -2000-05-24 08:00  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	It should also be possible to "unlink" something (i.e. if a link was
    -	wrongly set).  This is not implemented, but at least mails with
    -	an "unlink" command will not bounce now.
    -	
    -2000-05-23 18:49  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	Made the transaction text from a link action a bit more readable,
    -	though this still needs quite some work.
    -	
    -2000-05-23 16:57  jesse
    -
    -	* Makefile:
    -
    -	Bumped to 1.3.7
    -	
    -2000-05-23 10:12  tobiasb
    -
    -	* etc/config.pm, lib/RT/Link.pm, lib/RT/Ticket.pm,
    -	lib/RT/Interface/Email.pm, webrt/Ticket/Display.html:
    -
    -	I've started looking at the mail interface.  Now linking works through the mailgate, though we need some info in the docs.  I'm proposing that it should accept both commands in the headerlines ("RT-Command: Link/Resolve/Whatever blahblah") and traditional commands in the mail ("%RT Link", "%RT Resolve", etc), though I've only supported the first one yet.  Look at the comments in Email.pm for details.
    -	
    -2000-05-23 10:04  tobiasb
    -
    -	* lib/RT/Scrip.pm:
    -
    -	Bugfix/optimalization or something?
    -	
    -2000-05-22 19:09  tobiasb
    -
    -	* lib/RT/Ticket.pm, webrt/Ticket/Create_Detail.html,
    -	webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html:
    -
    -	I'm not very happy about some comprimises, choises and short-cuts I've done here, but anyway linking & spawning seems to work now.
    -	
    -2000-05-22 18:05  tobiasb
    -
    -	* lib/RT/Transaction.pm, lib/RT/Action/AutoReply.pm,
    -	webrt/Ticket/Create.html, webrt/Ticket/Create_Detail.html,
    -	webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html:
    -
    -	all changes here are either related to getting the Create working from the web, or harmless details
    -	
    -2000-05-22 17:39  tobiasb
    -
    -	* webrt/Ticket/Display.html:
    -
    -	$Subject => $Subject||(no subject given)
    -	
    -	TODO: HTML-escape
    -	
    -2000-05-22 17:38  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Removed VerboseSubject and HTMLSubject
    -	
    -2000-05-22 17:24  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	I do use $Ticket->Subject (and other stuff as well) frequently when
    -	I'm editing Mason.  There is two issues;
    -	
    -	1) Things might look freaked if the ticket has no subject, i.e. Display.html
    -	
    -	2) Things might get totally whacko if the subject contains HTML code.
    -	
    -	I could ensure the "right" behaviour all the places by using
    -	HTML::Entities::encode (I've done it one place), and by always using
    -	$Subject||"(No subject)".  Anyway, I think it might be more
    -	appropriate to have a sub RT::Ticket::VerboseSubject and
    -	RT::Ticket::HTMLSubject.
    -	
    -	What do you think?
    -	
    -2000-05-22 16:51  tobiasb
    -
    -	* webrt/Ticket/Display.html:
    -
    -	It seems like it can create and view new transactions now.
    -	
    -	My next step will be to fix linking
    -	
    -2000-05-22 16:47  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	I should never commit before testing ... I should never commit before testing ... I should never commit before ...
    -	
    -	bugfix.
    -	
    -2000-05-22 16:38  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	I'm trying to get a better propagation of error messages.  I'm a bit
    -	amused to find lots of things that shouldn't pass `perl -w' and `use
    -	strict'?
    -	
    -2000-05-22 15:52  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Removed a debug (?) line that was commented out:
    -	
    -	#      print "From is $From\n";
    -	
    -	...and inserted some other logging:
    -	
    -	- logs an info message with ticket id, subject and queue upon
    -	successful message creation.
    -	
    -	- logs a warning if it couldn't be created.
    -	
    -2000-05-22 14:11  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	In RT::Ticket::Create: Defaulting queue to 'general', and warning when it's not set
    -	
    -2000-05-22 14:06  tobiasb
    -
    -	* README:
    -
    -	Added a 'rt-comment' to the recommended mail configuration
    -	
    -2000-05-22 14:04  tobiasb
    -
    -	* Makefile:
    -
    -	added a comment-mail-alias
    -	
    -2000-05-22 14:03  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Hm ... $RT::CorrespondAddress is used in AutoReply.pm, while only
    -	$MailAlias is set in config.pm.  I'm not sure if this is the Right(tm)
    -	solution, but anyway ... I added those two lines, additions to the
    -	Makefile and README file is coming up shortly ...
    -	
    -	$CorrespondAddress=$MailAlias;
    -	$CommentAddress="!!RT_COMMENT_MAIL_ALIAS!!";
    -	
    -2000-05-22 12:53  tobiasb
    -
    -	* webrt/Ticket/Create_Detail.html:
    -
    -	fixed up a bug caused by too quick usage of cut&paste
    -	
    -2000-05-22 12:01  tobiasb
    -
    -	* webrt/Ticket/Create_Detail.html:
    -
    -	Done some work making this page look OK.  Now I will put in some logic
    -	in Display.html for creating and linking requests.
    -	
    -2000-05-22 05:30  tobiasb
    -
    -	* webrt/Elements/SelectOwner:
    -
    -	# TODO: respect the ACLs!!
    -	# This will be a list of some thousands requestors with the current scheme.
    -	
    -2000-05-19 12:37  tobiasb
    -
    -	* webrt/Ticket/Create.html:
    -
    -	Added a box for setting link information.  Only a web mockup, the
    -	logic doesn't work yet.  Feel free to do whatever you'd like with this
    -	one.  It might make sense to move this to the details page.
    -	
    -2000-05-19 12:17  jesse
    -
    -	* webrt/Ticket/LinkIt.html:
    -
    -	Code and formatting cleanups
    -	
    -2000-05-19 11:23  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Removed some weird stuff
    -	
    -2000-05-19 10:59  jesse
    -
    -	* webrt/: index.html, Search/PickRestriction:
    -
    -	fixed some typos
    -	
    -2000-05-19 10:59  jesse
    -
    -	* etc/config.pm:
    -
    -	cleaned up the config file a bit
    -	
    -	CVS: 	etc/config.pm
    -	
    -2000-05-19 08:42  tobiasb
    -
    -	* bin/testdeps.pl, bin/webmux.pl, webrt/Elements/SelectLinkType,
    -	webrt/Ticket/Display.html, webrt/Ticket/LinkIt.html,
    -	webrt/Ticket/ProcessUpdate.html, webrt/Ticket/Elements/ShowSummary,
    -	webrt/Ticket/Elements/ShowTransaction:
    -
    -	Started the work getting links to work.  While the linking doesn't work yet, this is a hint about how I think things might work
    -	
    -2000-05-19 08:42  tobiasb
    -
    -	* webrt/Elements/SelectLinkType:
    -
    -	file SelectLinkType was initially added on branch rt-1-1.
    -	
    -2000-05-19 08:42  tobiasb
    -
    -	* webrt/Ticket/LinkIt.html:
    -
    -	file LinkIt.html was initially added on branch rt-1-1.
    -	
    -2000-05-18 14:46  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	a tiny bit of doc added to Ticket.pm
    -	still not happy with the format
    -	
    -2000-05-18 10:56  tobiasb
    -
    -	* webrt/Ticket/autohandler:
    -
    -	undo of last commit; only local modifications for debugging
    -	
    -2000-05-18 10:51  tobiasb
    -
    -	* webrt/: Search/Listing.html, Ticket/Elements/ShowTransaction:
    -
    -	the previous commit had wrong loginfo; those files are modified according to the latest changes in etc/config.pm
    -	
    -2000-05-18 10:42  jesse
    -
    -	* webrt/Elements/SelectResultsPerPage:
    -
    -	adding missing file
    -	
    -2000-05-18 10:41  tobiasb
    -
    -	* webrt/: index.html, Search/Listing.html, Ticket/autohandler,
    -	Ticket/Elements/ShowTransaction:
    -
    -	A front page for navigation.  This one needs work; Masonifying, generalizing and possibilities for customizations needs to be implemented
    -	
    -2000-05-18 10:41  tobiasb
    -
    -	* webrt/index.html:
    -
    -	file index.html was initially added on branch rt-1-1.
    -	
    -2000-05-18 10:36  tobiasb
    -
    -	* webrt/Elements/SelectResultsPerPage:
    -
    -	Added an empty file as for now
    -	
    -2000-05-18 10:36  tobiasb
    -
    -	* webrt/Elements/SelectResultsPerPage:
    -
    -	file SelectResultsPerPage was initially added on branch rt-1-1.
    -	
    -2000-05-18 05:48  tobiasb
    -
    -	* etc/config.pm:
    -
    -	I'm planning to deal with web customizations with one hash RT::WebOptions in config.pm.  This hash might contain callbacks and maybe names of extra Mason modules to pull in.  What do you think?
    -	
    -2000-05-17 19:08  jesse
    -
    -	* webrt/Search/autohandler:
    -
    -	file autohandler was initially added on branch rt-1-1.
    -	
    -2000-05-17 19:08  jesse
    -
    -	* webrt/Search/: Listing.html, PickRestriction, autohandler:
    -
    -	Work on searches. in the cli  -maxitems  now does the right thing
    -	
    -2000-05-16 17:48  jesse
    -
    -	* webrt/Ticket/Elements/ShowLinks:
    -
    -	file ShowLinks was initially added on branch rt-1-1.
    -	
    -2000-05-16 17:48  jesse
    -
    -	* bin/rtmux.pl, bin/webmux.pl, lib/RT/Link.pm, lib/RT/Ticket.pm,
    -	lib/RT/Action/OpenDependent.pm, lib/RT/Action/ResolveMembers.pm,
    -	lib/RT/Action/Spam.pm, lib/RT/Action/StallDependent.pm,
    -	webrt/Elements/Error, webrt/Ticket/Elements/ShowLinks,
    -	webrt/Ticket/Elements/ShowSummary:
    -
    -	Converted the new link code to a fully oo setup, rahter than a mishmash of
    -	procedural and oo.  seperated out webrt/Ticket/Elements/ShowLinks
    -	
    -	It's by no means done, but it does seem to work.
    -	
    -	jesse
    -	
    -2000-05-16 12:30  tobiasb
    -
    -	* Makefile, etc/config.pm, lib/RT/Link.pm, lib/RT/Ticket.pm,
    -	webrt/Ticket/Elements/ShowSummary:
    -
    -	Done quite some work at the right hand 'Other Links' window (well, it's not good enough, and it also lists dependencies as for now).  Jesse, you might want to do something with ShowSummary, my Mason code seems horribly ugly.
    -	
    -2000-05-16 09:18  tobiasb
    -
    -	* etc/config.pm:
    -
    -	(...)
    -	# A hash table of convertion subs to be used for transforming RT Link
    -	# URIs to URLs in the web interface.  If you want to use RT towards
    -	# locally installed databases, this is the right place to configure it.
    -	# (TODO!)
    -	my %URI2HTML=
    -	    (
    -	     'fsck.com-rt' => sub {warn "stub!";},
    -	     'mozilla.com-bugzilla' => sub {warn "stub!";},
    -	     'fsck.com-kb' => sub {warn "stub!"}
    -	     );
    -	(...)
    -	
    -	I will also make a sub RT::Links::URI2HTML which gives smart links to
    -	internal references, and passes other URIs to this hash table, and
    -	eventually we should make default subs for KB and RT.
    -	
    -	What do you think of this idea?
    -	
    -2000-05-16 04:58  tobiasb
    -
    -	* lib/RT/: Link.pm, Ticket.pm:
    -
    -	Enabled link display in the CLI
    -	
    -2000-05-16 04:43  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	Seems like I had broken something...(bugfix)
    -	
    -2000-05-13 19:56  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Right, we need to work a bit with the links API.
    -	
    -	- we need an AllLinks sub.  How to tell EasySearch to give both links
    -	where we're BASE and were we're TARGET?
    -	
    -	- we need an "unresolved dependencies" according to the current
    -	design.  How to tell if a dependency is unresolved?  Dependencies can
    -	point out of this RT instance!
    -	
    -	- we might need more subs, but not right now anyway.
    -	
    -2000-05-12 11:32  tobiasb
    -
    -	* webrt/Ticket/Elements/ShowTransaction:
    -
    -	partly a bugfix; 'QouteTransaction=attachment-id' doesn't work very well for transactions without attachment.  Maybe that link should only be for attachments, and not for transactions.  Anyway, I changed it to transaction-id instead.  And I also added 'spawn' to the title; I think 'spawning' should be done through the same page.  'spawn' is when creating a new request that is linked up somehow to the old one.  Maybe it rather should be titled 'forward' or 'create new' or something?
    -	
    -2000-05-12 07:54  tobiasb
    -
    -	* webrt/: Elements/Error, Ticket/Display.html:
    -
    -	Bugfixing ... ehrm, why don't I test things before committing? :)
    -	
    -2000-05-12 07:34  tobiasb
    -
    -	* webrt/Elements/Error:
    -
    -	It logs errors now
    -	
    -2000-05-12 07:32  tobiasb
    -
    -	* webrt/Ticket/Display.html:
    -
    -	dies if element can't be loaded
    -	
    -2000-05-12 06:55  tobiasb
    -
    -	* webrt/Login.html:
    -
    -	seems like CGI won't take a combined get+post
    -	
    -2000-05-12 06:51  tobiasb
    -
    -	* etc/config.pm:
    -
    -	bugfix
    -	
    -2000-05-11 12:45  jesse
    -
    -	* webrt/Elements/ShadedBox:
    -
    -	file ShadedBox was initially added on branch rt-1-1.
    -	
    -2000-05-11 12:45  jesse
    -
    -	* webrt/Elements/ShadedBox:
    -
    -	missed this one before. it's somewhat misnamed right now. basically, it
    -	prints a title and content.
    -	
    -2000-05-11 12:39  jesse
    -
    -	* webrt/Elements/: TitleBoxEnd, TitleBoxStart:
    -
    -	the title box for webui
    -	
    -2000-05-11 12:39  jesse
    -
    -	* webrt/Elements/TitleBoxStart:
    -
    -	file TitleBoxStart was initially added on branch rt-1-1.
    -	
    -2000-05-11 12:39  jesse
    -
    -	* webrt/Elements/TitleBoxEnd:
    -
    -	file TitleBoxEnd was initially added on branch rt-1-1.
    -	
    -2000-05-11 12:37  jesse
    -
    -	* webrt/Ticket/: Display.html, Elements/ShowSummary:
    -
    -	hrml cleanup. it's not as pretty, but man does it render faster
    -	
    -2000-05-11 01:07  jesse
    -
    -	* webrt/: Elements/Footer, Elements/Header, Ticket/Display.html,
    -	Ticket/Elements/ShowHistory, Ticket/Elements/ShowSummary,
    -	Ticket/Elements/ShowTransaction:
    -
    -	
    -	Cleanup
    -	\
    -	
    -2000-05-11 00:46  tobiasb
    -
    -	* TODO:
    -
    -	Added a list
    -	
    -2000-05-10 23:43  jesse
    -
    -	* webrt/webrt.css:
    -
    -	file webrt.css was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:43  jesse
    -
    -	* webrt/webrt.css:
    -
    -	The base stylesheet.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ShowSummary:
    -
    -	file ShowSummary was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ShowTransaction:
    -
    -	file ShowTransaction was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ShowDates:
    -
    -	file ShowDates was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ShowHistory:
    -
    -	file ShowHistory was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ToolBar:
    -
    -	file ToolBar was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ShowBasics:
    -
    -	file ShowBasics was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/Ticket/Elements/ShowPeople:
    -
    -	file ShowPeople was initially added on branch rt-1-1.
    -	
    -2000-05-10 23:41  jesse
    -
    -	* webrt/: Elements/Header, Ticket/Display.html,
    -	Ticket/DisplayHeader, Ticket/DisplaySummary, Ticket/DisplayTicket,
    -	Ticket/ProcessUpdate.html, Ticket/ToolBar, Ticket/autohandler,
    -	Ticket/Elements/ShowBasics, Ticket/Elements/ShowDates,
    -	Ticket/Elements/ShowHistory, Ticket/Elements/ShowPeople,
    -	Ticket/Elements/ShowSummary, Ticket/Elements/ShowTransaction,
    -	Ticket/Elements/ToolBar:
    -
    -	Work on the web ui. mostly on the ticket display interface
    -	
    -2000-05-10 15:43  tobiasb
    -
    -	* README:
    -
    -	Added a comment about how to do the CGI :) Well:
    -	
    -		To get it up running even without mod_perl, you will need to
    -	consult Tobix or the rt-devel mailinglist.  Tobix is actively working
    -	on a (Fast)CGI version, but as for now he has been too lazy to update
    -	the template for the cgi executable.
    -	
    -2000-05-10 15:39  tobiasb
    -
    -	* webrt/Ticket/Create_Detail.html:
    -
    -	added a require statement.  No effect for the mod_perl version, but makes sense for a CGI version.
    -	
    -2000-05-09 05:35  tobiasb
    -
    -	* bin/webmux.pl:
    -
    -	Better formatting
    -	
    -2000-05-08 05:01  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	bugfix
    -	
    -2000-05-05 19:20  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	This one shouldn't loop now - though it's not tested :)
    -	
    -2000-05-05 19:15  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	Fixing up the loop control.  When a possible loop occurs, an error
    -	flag is set, and a new header field RT-Loop-Alarm appears.  I feel a
    -	bit bad about the latter, we are indeed changing an email after it
    -	arrived to the system, which I think is a bad thing - but anyway not
    -	as bad as dropping the email completely.  My idea is that the Actions,
    -	particularly the SendEmail.pm Action remain silent when this header
    -	field is set.
    -	
    -2000-05-05 19:01  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Added this about logging to the comments:
    -	
    -	# It might generally make sense to send error and higher by email to
    -	# some administrator.  For heavens sake; be sure that the email goes
    -	# directly to a mailbox, and not via RT :) Mail loops will generate a
    -	# critical log message.
    -	
    -2000-05-05 16:47  jesse
    -
    -	* bin/testdeps.pl:
    -
    -	Added Log::Dispatch to testdeps.pl
    -	
    -2000-05-05 13:04  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	bugfix
    -	
    -2000-05-05 12:47  tobiasb
    -
    -	* etc/config.pm:
    -
    -	I need help, I can't really figure out from this;
    -	
    -	When commenting out the $SIG{__DIE__} stuff, everything works fine.
    -	
    -	When having this line in the config:
    -	
    -	$SIG{__DIE__}  = sub {$RT::Logger->log(level=>'crit',message=>$_[0]); print STDERR $_[0]; exit(-1);};
    -	
    -	I get this error:
    -	
    -	Can't locate Mail/Field/addrlist.pm in @INC (@INC contains: /tmp/FunRT /tmp/DBIx /etc/rt /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .) at (eval 115)[/usr/local/lib/perl5/site_perl/5.6.0/Mail/Field.pm:87] line 3.
    -	
    -	WTF???
    -	
    -2000-05-05 10:29  tobiasb
    -
    -	* bin/rtmux.pl:
    -
    -	I guess this should block that stupid warnings
    -	
    -2000-05-05 10:01  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Added Log::Dispatch.  I also have added those comments, which I would
    -	like comments on (:
    -	
    -	# Most (if not all?) $RT:: global variables should be here.  I'd
    -	# suggest putting session information in another Namespace (main:: or
    -	# RT::main or maybe something like that).
    -	
    -	#use strict;
    -	
    -	#use vars qw/%SitePolicy $dirmode $transactionmode $DatabasePassword $rtname $domain $host $DatabaseHost $DatabaseUser $RT::DatabaseName $DatabaseType $user_passwd_min $MailAlias $WebrtImagePath $web_auth_mechanism $web_auth_cookies_allow_no_path $DefaultLocale $LocalePath $Nobody $Logger/;
    -	
    -	I'm not sure if "use strict" breaks, but at least "use vars" breaks
    -	bigtime as we are using it other places (like rtmux.pl).  I suggest
    -	using another package name for the execution logic.  What do you
    -	think?
    -	
    -2000-05-05 08:07  tobiasb
    -
    -	* Makefile:
    -
    -	Added RT_LOGFILE, and comments on how to fix advanced logging
    -	
    -2000-05-05 02:31  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	a bit of performance hacking. now require mason and cgi rather than 'use'ing them
    -	
    -2000-05-05 02:22  jesse
    -
    -	* lib/RT/: Action.pm, Scrip.pm, ScripScope.pm, Template.pm,
    -	Ticket.pm, Transaction.pm, Action/AutoReply.pm,
    -	Action/SendEmail.pm, Action/Spam.pm:
    -
    -	Cleaned up a couple minor things (like precedence, again) and changed "FixSubject" to "SetSubjectTag"
    -	
    -	Fixed the memory leak in Transaction.pm (it wasn't letting go of Scrip objects)
    -	The fix was a bit of a "large mallet on a small nail" in that I'm now _explicitly_ destroying ScripObjects two different ways and don't quite understand why I have to do it. It does, however, work.
    -	
    -2000-05-04 09:00  tobiasb
    -
    -	* lib/RT/Action/Spam.pm:
    -
    -	Completely untested - but I guess this should do real spamming, that
    -	is one email for each request(or).
    -	
    -2000-05-04 08:59  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	bugfix
    -	
    -2000-05-04 07:04  tobiasb
    -
    -	* lib/RT/Action/: AutoReply.pm, SendEmail.pm:
    -
    -	Precedence: Bulk should only be set for AutoReply
    -	
    -2000-05-04 05:29  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	sub FixSubject sets the RT tag (unless it is already there).  I moved
    -	it out from Prepare because I need to override this behaviour when
    -	Spamming people.
    -	
    -2000-05-04 01:34  jesse
    -
    -	* etc/schema.mysql:
    -
    -	spec some defaults in the schema
    -	
    -2000-05-04 01:32  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Bugfix to ticket.pm for better handling of default values for some queue fields
    -	
    -2000-05-03 14:19  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Sorry, the last commit on this file was not really a bugfix.  I'd say all Ticket (Transaction) Actions should return status, message and eventually optional things after the message.
    -	
    -2000-05-03 14:16  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Bugfix
    -	
    -2000-05-03 14:13  tobiasb
    -
    -	* lib/RT/Action/: ResolveMembers.pm, Spam.pm:
    -
    -	Those actually seems to work :)
    -	
    -2000-05-03 14:13  tobiasb
    -
    -	* lib/RT/Action/Spam.pm:
    -
    -	file Spam.pm was initially added on branch rt-1-1.
    -	
    -2000-05-03 14:13  tobiasb
    -
    -	* lib/RT/Action/ResolveMembers.pm:
    -
    -	file ResolveMembers.pm was initially added on branch rt-1-1.
    -	
    -2000-05-03 14:13  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	gubfix
    -	
    -2000-05-03 14:00  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Bugfix
    -	
    -2000-05-03 13:29  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Commented out the AutoReplies table.
    -	
    -2000-05-03 13:17  tobiasb
    -
    -	* lib/RT/Action/AutoReply.pm:
    -
    -	Putted in "#TODO: " comments for avoiding duplicate AutoReplies.
    -	
    -2000-05-03 13:15  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Added a table AutoReplies to avoid sending the same autoreply template
    -	more than once to each requestor.
    -	
    -	Eventually entries should be removed (i.e. after a week) through the
    -	(upcoming?) timer system (eventually through the good, old crontab(5))
    -	
    -2000-05-03 11:48  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	LinkTo and LinkFrom are tested a bit, and they seem to work OK now.
    -	
    -2000-05-03 11:02  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Bugfix.
    -	
    -2000-05-03 07:40  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	I'm putting ResolveGroupTicket on hold.  It's just not important.
    -	
    -2000-05-02 18:05  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Starting to add a bit of inline pod documentation. the style isn't finalized yet
    -	
    -2000-05-02 14:30  tobiasb
    -
    -	* lib/RT/Action/OpenDependent.pm:
    -
    -	file OpenDependent.pm was initially added on branch rt-1-1.
    -	
    -2000-05-02 14:30  tobiasb
    -
    -	* etc/schema.mysql, lib/RT/Link.pm, lib/RT/Ticket.pm,
    -	lib/RT/Action/OpenDependent.pm, lib/RT/Action/StallDependent.pm:
    -
    -	I just got DependsOn Links to work as they should in the CLI :)
    -	
    -2000-05-02 13:36  tobiasb
    -
    -	* lib/RT/Links.pm:
    -
    -	file Links.pm was initially added on branch rt-1-1.
    -	
    -2000-05-02 13:36  tobiasb
    -
    -	* lib/RT/: Links.pm, Ticket.pm, Action/StallDependent.pm:
    -
    -	[no log message]
    -	
    -2000-05-02 13:07  tobiasb
    -
    -	* lib/RT/Action/StallDependent.pm:
    -
    -	Bugfix.  Also, only Open requests should be Stalled.
    -	
    -2000-05-02 13:01  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Action/StallDependent.pm:
    -
    -	Bugfixing
    -	
    -2000-05-02 12:21  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Action/StallDependent.pm:
    -
    -	bugfixes
    -	
    -2000-05-02 11:55  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Added TobiX-style logic scrips for DependsOn link and MemberOf link.
    -	
    -2000-05-02 07:55  tobiasb
    -
    -	* lib/RT/: Link.pm, Ticket.pm:
    -
    -	oup, forgot to keep a consistant style
    -	base => Base
    -	target => Target
    -	etc
    -	
    -2000-05-02 07:55  tobiasb
    -
    -	* Makefile, etc/config.pm:
    -
    -	forgot to commit those changes ... configuration for the URI method
    -	
    -2000-05-02 05:45  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Agh, compile error.
    -	
    -2000-05-02 05:30  tobiasb
    -
    -	* lib/RT/Action/StallDependent.pm:
    -
    -	file StallDependent.pm was initially added on branch rt-1-1.
    -	
    -2000-05-02 05:30  tobiasb
    -
    -	* lib/RT/Action/: README.hackers, StallDependent.pm:
    -
    -	Ok, so lets put all Actions into one directory - though I'd say it would be better for future hackers to orient themselves if we grouped them somehow.
    -	
    -2000-05-02 00:11  jesse
    -
    -	* Makefile:
    -
    -	Version bumping
    -	
    -2000-05-01 17:16  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	moved URIIsLocal closer to other linking routines.
    -	
    -2000-05-01 10:16  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Made the transaction data a bit "nicer", should look something like:
    -	
    -	THIS DependsOn 4323 as of 342
    -	 DependsOn THIS as of 343
    -	
    -2000-05-01 08:58  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Changed URL -> URI
    -	
    -	Changed NewLink and ReverseLink to LinkTo and LinkFrom
    -	
    -	Added one byte to indicate if it's a From-link or a To-link in the
    -	transaction data.
    -	
    -2000-05-01 01:52  jesse
    -
    -	* etc/schema.mysql:
    -
    -	fixed a few typos in the schema
    -	
    -2000-05-01 01:50  jesse
    -
    -	* lib/RT/ACL.pm:
    -
    -	Initial sketches at RT::ACL.pm. there's no running code here yet.
    -	
    -2000-05-01 01:48  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Fixed Ticket->URL. changed queue->load to queue->Load
    -	
    -2000-05-01 01:04  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	Fixed improper rt program selection code.
    -	
    -2000-05-01 00:14  jesse
    -
    -	* lib/RT/Queue.pm:
    -
    -	a stub for ACL work.
    -	
    -2000-04-30 13:28  tobiasb
    -
    -	* lib/RT/Link.pm:
    -
    -	file Link.pm was initially added on branch rt-1-1.
    -	
    -2000-04-30 13:28  tobiasb
    -
    -	* lib/RT/: Link.pm, Ticket.pm:
    -
    -	Link.pm
    -	
    -2000-04-30 13:13  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Added a static method URIIsLocal which checks if it's a local URI or not.
    -	
    -2000-04-28 14:20  jesse
    -
    -	* lib/RT/Transaction.pm:
    -
    -	Cleaned up some comments and formatting. and did a bit of reorganizing
    -	of routines to more closely model other files. Oh. i finally have
    -	emacs doing proper indenting per perlstyle. so we'll hopefully start
    -	to get better about that :) Tobix has only been bugging me for a year
    -	
    -2000-04-28 09:05  tobiasb
    -
    -	* lib/RT/Action/README.hackers:
    -
    -	Just some documentation for future hackers :)
    -	
    -2000-04-28 09:05  tobiasb
    -
    -	* lib/RT/Action/README.hackers:
    -
    -	file README.hackers was initially added on branch rt-1-1.
    -	
    -2000-04-28 08:20  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Started the work of implementing links
    -	
    -2000-04-28 04:40  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Didn't we once agree that we needed "state" (user-configurable logic)
    -	and "status" (fixed open/stalled/resolved/dead)? :)
    -	
    -2000-04-28 01:17  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	didn't balance parens. grr
    -	
    -2000-04-28 00:54  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	a bunch of cleanup.. a bunch more folding mode braces.
    -	a few minor (still not in any codepath) changes for the start of some
    -	acls work
    -	
    -2000-04-28 00:51  jesse
    -
    -	* docs/design_docs/link-definitions.txt:
    -
    -	a few comments, additions and clarifications. nothing really major
    -	
    -2000-04-27 02:06  jesse
    -
    -	* docs/design_docs/acls:
    -
    -	more thoughts on ACLs. this time including some code snippits.
    -	
    -2000-04-27 02:01  jesse
    -
    -	* etc/schema.mysql:
    -
    -	added the schema for the new ACL system.
    -	responded to tobix' comments about GECOS.
    -	
    -2000-04-26 14:58  tobiasb
    -
    -	* docs/design_docs/subscription-definitions.txt:
    -
    -	marginal updates to reflect that scrips/actions can be used for more things than subscriptions (the whole document might need a rename)
    -	
    -2000-04-26 14:50  tobiasb
    -
    -	* docs/design_docs/link-definitions.txt, etc/schema.mysql:
    -
    -	only insignificant comments - some made weeks ago
    -	
    -2000-04-26 12:59  jesse
    -
    -	* docs/design_docs/link-definitions.txt:
    -
    -	some comments on link definitions
    -	my comments are marked with # as the first character of the line.
    -	
    -2000-04-26 02:27  tobiasb
    -
    -	* docs/design_docs/: link-definitions.txt,
    -	subscription-definitions.txt:
    -
    -	updates
    -	
    -2000-04-26 00:14  jesse
    -
    -	* docs/design_docs/acls:
    -
    -	some more hacking on acls design
    -	
    -2000-04-25 17:58  jesse
    -
    -	* docs/design_docs/acls:
    -
    -	thoughts on acls
    -	
    -2000-04-24 00:17  jesse
    -
    -	* webrt/Ticket/Create_Detail.html:
    -
    -	file Create_Detail.html was initially added on branch rt-1-1.
    -	
    -2000-04-24 00:17  jesse
    -
    -	* webrt/Ticket/Create_Detail.html:
    -
    -	some work on create. nothing ready for consumption yet.
    -	
    -2000-04-24 00:16  jesse
    -
    -	* webrt/: Logout.html, Elements/Footer, Elements/Header,
    -	Elements/SelectQueue, Ticket/Create.html, Ticket/Display.html,
    -	Ticket/ProcessUpdate.html, Ticket/SetOwner, Ticket/SetStatus,
    -	Ticket/Update.html, Ticket/autohandler:
    -
    -	Look ma, $session{'CurrentUser'} contains the current user object.
    -	you can depend on this being set if the user's authenticated.
    -	
    -2000-04-24 00:16  jesse
    -
    -	* webrt/Logout.html:
    -
    -	file Logout.html was initially added on branch rt-1-1.
    -	
    -2000-04-24 00:14  jesse
    -
    -	* Makefile, bin/testdeps.pl, bin/webmux.pl:
    -
    -	Added Apache::Session support to the HTML::Mason version of things.
    -	
    -2000-04-23 19:45  jesse
    -
    -	* bin/testdeps.pl:
    -
    -	added a little script to test perl dependencies.
    -	it should probably get integrated into the makefile
    -	
    -2000-04-23 19:45  jesse
    -
    -	* bin/testdeps.pl:
    -
    -	file testdeps.pl was initially added on branch rt-1-1.
    -	
    -2000-04-23 17:28  jesse
    -
    -	* Makefile, docs/design_docs/acls, etc/schema.mysql:
    -
    -	installation seems to work a bit better now
    -	
    -2000-04-20 02:18  jesse
    -
    -	* webrt/Login.html:
    -
    -	Removing cruft from login.html
    -	
    -2000-04-20 02:17  jesse
    -
    -	* webrt/Ticket/autohandler:
    -
    -	Look ma! this autohandler seems to make webauth (with $pass = $user ) work.
    -	
    -2000-04-20 02:09  jesse
    -
    -	* webrt/: autohandler, Ticket/autohandler:
    -
    -	file autohandler was initially added on branch rt-1-1.
    -	
    -2000-04-20 02:09  jesse
    -
    -	* webrt/Login.html:
    -
    -	file Login.html was initially added on branch rt-1-1.
    -	
    -2000-04-20 02:09  jesse
    -
    -	* Makefile, bin/webmux.pl, webrt/Login.html, webrt/autohandler,
    -	webrt/Ticket/autohandler:
    -
    -	Doing work on cookie-based authentication for WebRT. The basic idea
    -	is that the autohandler in each directory (unless the global handlers can be made to work) will check to see if the user is authenticated. If they are, then it keeps going happily. otherwise, it forces the user to login with the form in /Login.html, which should eventually be smart enough to put them back to where they want to go.
    -	
    -2000-04-18 02:43  jesse
    -
    -	* docs/design_docs/acls:
    -
    -	checking in design work on ACLs. a bit more work, such as notes
    -	on order of evaluation and a rough implementation plan and then I'll
    -	implement
    -	
    -2000-04-13 11:58  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Introduced all columns we need locally, that is all columns as of RT
    -	1.0, except due, area and priorities.  I guess somebody might want to
    -	add those columns as well :)
    -	
    -2000-04-13 11:52  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	hrmwell, you did introduse a slight bug here.. :)
    -	
    -2000-04-13 11:26  tobiasb
    -
    -	* webrt/Search/: Listing.html, TicketCell:
    -
    -	Looks gruesome, but hey - it works\!
    -	
    -2000-04-13 11:26  tobiasb
    -
    -	* webrt/Search/TicketCell:
    -
    -	file TicketCell was initially added on branch rt-1-1.
    -	
    -2000-04-13 10:52  tobiasb
    -
    -	* etc/config.pm:
    -
    -	agh..
    -	
    -2000-04-13 10:50  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Added the site configurable option "QueueListingCols".  It should also
    -	be possible to override this one at least through the query, but it
    -	might not be trivial.  (maybe you have better suggestions?)
    -	
    -2000-04-13 10:23  tobiasb
    -
    -	* webrt/Search/QueueItem:
    -
    -	I think I want to remove this one, I have other thoughts about how to
    -	handle this - let's discuss it more when I've made some implementation :)
    -	
    -2000-04-13 10:05  tobiasb
    -
    -	* webrt/Search/Listing.html:
    -
    -	Added this:
    -	
    -	# TODO: This one should _not_ be here, rather somewhere else
    -	# (suggestions?).  It might eventually read the cookies, user
    -	# configuration information from the DB, queue configuration information
    -	# from the DB, etc.  It should be object oriented.  But what object can
    -	# it belong to, and how should it get access to all this data?
    -	
    -	sub _cfg {
    -	  my $key=shift;
    -	  return $ARGS{$key} || $RT::SitePolicy{$key};
    -	}
    -	
    -2000-04-13 10:05  tobiasb
    -
    -	* etc/config.pm:
    -
    -	Added a hash for "tunable" configurations:
    -	
    -	# This is where RT's preferences are kept track of
    -	
    -	package RT;
    -	
    -	# Different "tunable" configuration options should be in this hash:
    -	%SitePolicy=();
    -	
    -2000-04-13 02:30  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Ticket::clean became Ticket::_CleanAddressesAsString
    -	references to clean changed accordingly. i feel a bit dirty not
    -	making this $self->_CleanAddressesAsString.
    -	
    -2000-04-12 08:53  tobiasb
    -
    -	* webrt/: Elements/SelectStatus, Ticket/ProcessUpdate.html,
    -	Ticket/Update.html:
    -
    -	bugfixes and insignificant enhancements
    -	
    -2000-04-12 07:14  tobiasb
    -
    -	* webrt/Elements/yearMenu:
    -
    -	"Last year" is now (by default) available
    -	
    -2000-04-12 07:11  tobiasb
    -
    -	* webrt/Search/PickRestriction:
    -
    -	Changed the default to select one queue, not select "anything but" a queue.
    -	
    -2000-04-12 07:07  tobiasb
    -
    -	* webrt/Search/PickRestriction:
    -
    -	Added a stupid "under construction" message.
    -	
    -2000-04-12 07:00  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	Ehm .. the last commit message should be more descriptive;
    -	
    -	From the README:
    -	
    -	        rt:     |"/path/to/rt/bin/rt-mailgate general correspond"
    -	                                                    |          |
    -	                                   <----/          |
    -	                                                               |
    -	                <---/
    -	                 "action" here will make this address only
    -	                  parse actions in the message without
    -	                  recording the message as a transaction
    -	                  of its own"
    -	
    -	...while the implementation required "correspond general"
    -	
    -2000-04-12 06:58  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	This was not in sync with the README
    -	
    -2000-04-12 06:50  tobiasb
    -
    -	* webrt/Search/PickRestriction:
    -
    -	Bugfix
    -	
    -2000-04-12 06:45  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Agh, should have tested before committing :)
    -	
    -2000-04-12 06:44  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Fixd SetOwner to allow stealing and to respect the new Nobody user
    -	
    -2000-04-12 05:19  tobiasb
    -
    -	* webrt/Elements/SelectQueue:
    -
    -	Now this one actually works
    -	
    -2000-04-11 07:30  tobiasb
    -
    -	* webrt/Elements/SelectQueue:
    -
    -	This won't work yet.
    -	
    -2000-04-11 07:17  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	Ehr...right.  Still fixing at the same bug; the IsInbound sub didn't work....well
    -	
    -2000-04-11 07:08  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Transaction.pm:
    -
    -	argh .. I should learn to test the bugfixes before committing
    -	
    -2000-04-11 06:46  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	bugfix
    -	
    -2000-04-11 06:42  tobiasb
    -
    -	* lib/RT/Template.pm, lib/RT/Ticket.pm, webrt/Elements/SelectOwner,
    -	webrt/Ticket/ProcessUpdate.html:
    -
    -	bugfixes
    -	
    -2000-04-11 05:47  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	bugfixing
    -	
    -2000-04-11 04:46  tobiasb
    -
    -	* lib/RT/Watchers.pm:
    -
    -	Bugfix
    -	
    -2000-04-11 04:41  tobiasb
    -
    -	* etc/config.pm, lib/RT/Ticket.pm:
    -
    -	I'm trying to fix this nobody user..
    -	
    -2000-04-11 04:36  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	I'm trying to fix this nobody user..
    -	
    -2000-04-11 04:29  tobiasb
    -
    -	* lib/RT/Queue.pm, webrt/Ticket/ProcessUpdate.html:
    -
    -	Bugfixing
    -	
    -2000-04-11 03:16  tobiasb
    -
    -	* webrt/Search/Listing.html:
    -
    -	Insignificant.  Oh, how should errors be trapped?
    -	
    -2000-04-11 00:40  jesse
    -
    -	* lib/RT/: Queue.pm, Ticket.pm, Watchers.pm:
    -
    -	all the watcher types now have AsString methods. this was done by dropping
    -	an EmailsAsString method into RT::Watcher
    -	
    -2000-04-10 23:04  tobiasb
    -
    -	* webrt/Ticket/ProcessUpdate.html:
    -
    -	Added those use statements
    -	
    -	This page seems very broken in Netscape.
    -	
    -2000-04-10 23:00  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Darn, I thought I had tested this.  Well, now it should work!?
    -	
    -2000-04-10 22:54  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	...some work is needed to get Watchers work OK.  I commented out my
    -	try on it, so now it will ignore queue watchers (it simply ignored all
    -	watchers as it was).
    -	
    -2000-04-10 14:29  tobiasb
    -
    -	* webrt/Ticket/: DisplayTicket, DisplayTransaction:
    -
    -	Update and Modify-links
    -	
    -2000-04-10 14:20  tobiasb
    -
    -	* webrt/Ticket/DisplayTransaction:
    -
    -	Added an "act" link and touched the comments
    -	
    -2000-04-10 14:11  tobiasb
    -
    -	* webrt/Ticket/DisplaySummary:
    -
    -	Reinserted the "Last Contact" and "Last Update" lines, but they're "cleaned" a bit.
    -	
    -	(btw, this seems like a crude copy from the cli, does the cli have similar problems?)
    -	
    -2000-04-10 13:51  tobiasb
    -
    -	* webrt/Ticket/DisplaySummary:
    -
    -	Hacking a bit on this
    -	
    -2000-04-10 13:48  tobiasb
    -
    -	* webrt/Ticket/: DisplayTransaction, Update.html:
    -
    -	Hacking a bit on this
    -	
    -2000-04-10 13:18  tobiasb
    -
    -	* webrt/Ticket/Modify.html:
    -
    -	'undo' (well, not really :)
    -	
    -2000-04-10 13:13  tobiasb
    -
    -	* webrt/Ticket/Update.html:
    -
    -	This 'fix' is maybe only temporary?
    -	
    -2000-04-10 13:08  tobiasb
    -
    -	* webrt/Ticket/Modify.html:
    -
    -	I'd daresay this one is superceded by Update.html?
    -	
    -2000-04-10 13:07  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	just added some comments
    -	
    -2000-04-10 12:52  tobiasb
    -
    -	* webrt/Ticket/DisplaySummary:
    -
    -	This 'fix' is maybe only temporary?
    -	
    -2000-04-10 10:35  tobiasb
    -
    -	* webrt/: Elements/SelectBoolean, Search/Listing.html:
    -
    -	insignificant changes
    -	
    -2000-04-10 06:53  tobiasb
    -
    -	* webrt/Elements/SelectOwner:
    -
    -	Insignificant fix (wouldn't work here without)
    -	
    -2000-04-10 05:38  tobiasb
    -
    -	* bin/rtmux.pl:
    -
    -	Might be a bugfix
    -	
    -2000-04-09 16:56  jesse
    -
    -	* lib/RT/Users.pm, webrt/Elements/SelectBoolean,
    -	webrt/Elements/SelectOwner, webrt/Search/Listing.html,
    -	webrt/Search/PickRestriction:
    -
    -	I can now get a listing of tickets whose owner is or isn't a given owner.
    -	and it even lists them. Next, I'll probably make searches for
    -	other attributes work.
    -	the plan of attack is requestor, then probably ticket content (as a test
    -	of whether this whole system works ;)
    -	
    -2000-04-07 20:41  jesse
    -
    -	* webrt/Search/Listing.html:
    -
    -	Added the first bit of code to support queue/owner/requestor/subject search.
    -	This will make up the core of the  web search functionality of the first release of the webui. (not the 2.0 release, but the "tobix needs it now) release.
    -	
    -2000-04-07 14:53  tobiasb
    -
    -	* etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/Watchers.pm,
    -	lib/RT/Action/SendEmail.pm:
    -
    -	hm ... seems like I forgot to commit my last work
    -	
    -2000-04-07 03:55  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Transaction.pm:
    -
    -	it almost works now
    -	
    -2000-04-06 17:40  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	development
    -	
    -2000-04-06 17:21  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Transaction.pm, Action/Notify.pm,
    -	Action/SendEmail.pm:
    -
    -	ouch, found a lot of fatal stubs
    -	
    -2000-04-06 16:54  tobiasb
    -
    -	* etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
    -	lib/RT/Action/Notify.pm, lib/RT/Action/SendEmail.pm:
    -
    -	still fighting with the mail handling
    -	
    -2000-04-06 16:12  tobiasb
    -
    -	* etc/schema.mysql, lib/RT/Scrips.pm, lib/RT/Ticket.pm,
    -	lib/RT/Transaction.pm, lib/RT/Action/Notify.pm:
    -
    -	New snapshot of development.  Note the change I've done in the Type recognizion
    -	when selecting the right Scrips in Transaction::Create - it should be more
    -	flexible this way (replaced "ne" with "!~").  Check the change to schema for
    -	an example of how this is more flexible.
    -	
    -2000-04-06 15:36  tobiasb
    -
    -	* lib/RT/Action/Notify.pm:
    -
    -	Recipient finder
    -	
    -2000-04-06 15:35  tobiasb
    -
    -	* etc/schema.mysql, lib/RT/Template.pm, lib/RT/Action/SendEmail.pm:
    -
    -	Snapshot; I'm not finished debugging yet, but this should (hopefully) be
    -	very close to actually work.
    -	
    -2000-04-06 11:38  tobiasb
    -
    -	* docs/FAQ:
    -
    -	this clearly needs a lot more work ...
    -	
    -2000-04-06 11:31  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	...ah, this felt good.
    -	
    -	Checked the recent version of Mailtools at CPAN, so I used the "right"
    -	method for sending emails.
    -	
    -	I also added back again the SetRecipients method, and documented it in
    -	the POD.
    -	
    -	I think I will get this working in a couple of hours, so please don't
    -	disturb me saying that you disagree very much to those changes.. :)
    -	
    -2000-04-06 10:46  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Bugfixing
    -	
    -2000-04-06 10:40  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	I think that I will get this up working during the next few hours.
    -	
    -	If I eventually get it working, I'd really appreciate that you don't
    -	wreck it until the web interface is working and until we've discussed
    -	the design thoroughly and come down to some consensus about it.
    -	
    -2000-04-06 06:22  tobiasb
    -
    -	* webrt/Elements/Checkbox:
    -
    -	This is not my turf ... and I don't know what I'm doing ... anyway, it didn't work, but now it works (?) :)
    -	
    -2000-04-06 01:49  jesse
    -
    -	* lib/RT/Action/SendEmailOnResolve.pm:
    -
    -	file SendEmailOnResolve.pm was initially added on branch rt-1-1.
    -	
    -2000-04-06 01:49  jesse
    -
    -	* Makefile, etc/schema.mysql, lib/RT/Template.pm,
    -	lib/RT/Action/MailComment.pm, lib/RT/Action/MailCorrespondence.pm,
    -	lib/RT/Action/Notify.pm, lib/RT/Action/NotifyOnResolve.pm,
    -	lib/RT/Action/SendEmail.pm, lib/RT/Action/SendEmailOnResolve.pm:
    -
    -	Ok, i think i significantly cut down the complexity of the actions we've got
    -	so far. I nuked the old notify rules, as they were superceeded by my more
    -	capable SendEmail.pm There are still a few things I'm not happy with...
    -	like, the way that scrips, scripscopes and templates are related. it needs
    -	some thought and cleanup. but i think it'll work just fine for now.
    -	
    -	I redid the templates and scrips to fit with the revised actions and added
    -	some more docs to SendEmail.pm
    -	
    -	the generic RT::Action should deal with templates, not SendEmail, I think,
    -	but I'm leaving that abstraction for another day.
    -	
    -	Oh, the Argument from the scrip is now passed into the template as $T::Argument.
    -	
    -2000-04-05 23:24  jesse
    -
    -	* webrt/Elements/Checkbox:
    -
    -	stylistic cleanup
    -	using an explicit defined ($foo)
    -	
    -2000-04-05 18:02  tobiasb
    -
    -	* webrt/: Elements/Checkbox, Search/PickRestriction:
    -
    -	Only minor corrections
    -	
    -2000-04-05 17:43  tobiasb
    -
    -	* webrt/Search/PickRestriction:
    -
    -	It certainly doesn't work okay ... I think I should look into it a bit ...
    -	
    -2000-04-05 17:08  tobiasb
    -
    -	* webrt/Search/PickRestriction:
    -
    -	Added ugly submit button
    -	
    -2000-04-05 10:34  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Temporary implementation of kill
    -	
    -	As mentionated earlier, I think the right thing is to just set status
    -	'dead' and then eventually do some garbage collection later.
    -	
    -2000-04-05 08:55  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	More error handling
    -	
    -2000-04-05 08:51  jesse
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	added some comments around the dies pointing out that we need better error handling.
    -	
    -2000-04-05 05:34  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	Doh...I'm really stupid sometimes...
    -	
    -2000-04-05 05:31  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	For some weird reason (perl 5.6.0 bug?) it wouldn't work here without this fix.
    -	
    -2000-04-05 00:35  jesse
    -
    -	* docs/design_docs/acls:
    -
    -	initial musings on acls for 2.0
    -	
    -2000-04-05 00:35  jesse
    -
    -	* docs/design_docs/acls:
    -
    -	file acls was initially added on branch rt-1-1.
    -	
    -2000-04-04 09:52  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Language idea
    -	
    -2000-04-04 02:17  jesse
    -
    -	* Makefile, README, bin/rtmux.pl, etc/config.pm:
    -
    -	The first little bits of structure for future L10n support
    -	
    -2000-04-03 12:40  tobiasb
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	Cleaned out yet some more visible configuration bugs
    -	
    -2000-04-03 12:29  tobiasb
    -
    -	* README:
    -
    -	Some fixes
    -	
    -2000-04-03 10:44  tobiasb
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	Just a configuration fix.
    -	
    -2000-04-03 01:26  jesse
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	Ok, I've modified rtmux.pl and Makefile to add in the first bits of stub
    -	code for running Mason as a cgi. it compiles and appears to invoke.
    -	but I haven't tested it under a webserver. I've gotta get to sleep now, but
    -	figured this would give tobias a leg up with his testing today.
    -	
    -	Subject:      RE: [Mason] Mason under CGI (was: replacing storyserver)
    -	Author:       Ilmari Karonen 
    -	Date:         Fri, 17 Sep 1999 15:10:20 +0300 (EET DST)
    -	
    -	On Thu, 16 Sep 1999, Ben Munoz wrote:
    -	> I'm running Apache 1.3.6 on NT.  I'm looking to install HTML::Mason and see
    -	> what it can do, but from what I've read, I can't install mod_perl with the
    -	> current version of ActiveState's Perl, which I have installed on my machine.
    -	
    -	I realize this is probably not what you were asking for, but I'd like to
    -	mention here my recent (yesterday) experience in setting up Mason under
    -	plain ol' CGI.
    -	
    -	Setting: One Mason top level component plus a few subcomponents on a
    -	development server with mod_perl and Mason. One production server with the
    -	least possible selection of modules. (Not even mod_so!)
    -	
    -	Needed to quickly get the Mason component up and running on the second
    -	server. Installing Mason itself and a few other perl modules was easy.
    -	But adding mod_perl was definitely out of the question.
    -	
    -	What I did was take the usual handler.pl, copy it to cgi-bin, deleting
    -	everything from "my $ah = new HTML::Mason::ApacheHandler" onward
    -	inclusive, and replacing it with the following:
    -	
    -	    use CGI;
    -	    my $q = new CGI;
    -	
    -	    # This routine comes from ApacheHandler.pm:
    -	    my (%args);
    -	    foreach my $key ( $q->param ) {
    -	      foreach my $value ( $q->param($key) ) {
    -	        if (exists($args{$key})) {
    -	          if (ref($args{$key})) {
    -	            $args{$key} = [@{$args{$key}}, $value];
    -	          } else {
    -	            $args{$key} = [$args{$key}, $value];
    -	          }
    -	        } else {
    -	          $args{$key} = $value;
    -	        }
    -	    }
    -	
    -	    my $comp = $ENV{'PATH_TRANSLATED'};
    -	    my $root = $interp->comp_root;
    -	    $comp ~= s/^$root//  or die "Component outside comp_root";
    -	
    -	    $interp->exec($comp, %args);
    -	
    -	This, plus an Action line in httpd.conf mapping *.mas to this script, has
    -	so far done the job just fine.
    -	
    -	One problem I noticed was that this all would've been much harder if I
    -	hadn't been familiar with the way ApacheHandler.pm uses CGI.pm and hadn't
    -	known where to find that parsing routine. IMHO it'd be a good idea to
    -	separate this loop into a user-callable subroutine.
    -	
    -	(Note: this was Mason 0.6.mumble - I have no experience with the newer
    -	versions.)
    -	
    -	--
    -	Ilmari Karonen (iltzu@sci.fi)
    -	http://www.sci.fi/~iltzu/
    -	
    -	_______________________________________________
    -	Mason maillist  -  Mason@netizen.com.au
    -	http://netizen.com.au/mailman/listinfo/mason
    -	
    -2000-04-03 00:49  jesse
    -
    -	* bin/rtmux.pl, etc/schema.mysql, lib/RT/Action.pm,
    -	lib/RT/CurrentUser.pm, lib/RT/Scrip.pm, lib/RT/ScripScopes.pm,
    -	lib/RT/Template.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
    -	lib/RT/Watchers.pm, lib/RT/Action/AutoReply.pm,
    -	lib/RT/Action/SendEmail.pm:
    -
    -	Well, that was an exciting afternoon! Er, an exciting evening!
    -	*grin* AutoReply now works. which means that all the infrastructure for
    -	scrips is back in place.  It required refactoring things a bit. as cool
    -	as making RT::Template a MIME::Entity seemed, I just couldn't get it to work
    -	right, so now, it just creates a MIME::Entity when it needs it, which is
    -	probably better anyway.  I simplified templates a bit. Now they only have
    -	access to the Ticket and Transaction. This may not be wise, but we'll see.
    -	
    -	Also, I merged the two blobs per template (headers and body).
    -	
    -2000-03-31 08:25  tobiasb
    -
    -	* bin/webmux.pl:
    -
    -	rmvd dupl line
    -	
    -2000-03-31 02:47  jesse
    -
    -	* Makefile:
    -
    -	removed old webui hooks from the makefile. bumped the version to 1.3.0
    -	
    -2000-03-31 02:32  jesse
    -
    -	* webrt/Elements/Error:
    -
    -	file Error was initially added on branch rt-1-1.
    -	
    -2000-03-31 02:32  jesse
    -
    -	* webrt/Ticket/DisplayTicket:
    -
    -	file DisplayTicket was initially added on branch rt-1-1.
    -	
    -2000-03-31 02:32  jesse
    -
    -	* webrt/: Elements/Error, Elements/SelectStatus,
    -	Ticket/Display.html, Ticket/DisplayTicket,
    -	Ticket/DisplayTransaction, Ticket/ProcessUpdate.html,
    -	Ticket/Update.html:
    -
    -	Ticket/Update.html will now allow you to submit a ticket update.
    -	It's the RT2 equivalent of RT1.0's "comment" and "correspond" pages...
    -	with a bit of added value. it's not a global "modify ticket" page. that comes
    -	next. but it's where 90% of your single-ticket action will take place.
    -	
    -2000-03-31 02:28  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	TimeTaken should increment now
    -	
    -2000-03-31 02:26  jesse
    -
    -	* README:
    -
    -	added the mason dependency to the README
    -	
    -2000-03-31 02:25  jesse
    -
    -	* bin/webmux.pl:
    -
    -	added some uses to the webmux so I don't have to add them to each page that
    -	calls them
    -	
    -2000-03-30 00:44  jesse
    -
    -	* webrt/Search/PickRestriction:
    -
    -	made the variable names in PickRestriction look more like the parameter names
    -	in EasySearch. Wanna guess why?
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Search/RestrictSearch.html:
    -
    -	file RestrictSearch.html was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Search/PickRestriction:
    -
    -	file PickRestriction was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/Footer:
    -
    -	file Footer was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/: Elements/Checkbox, Elements/Footer, Elements/Header,
    -	Elements/SelectBoolean, Elements/SelectDate,
    -	Elements/SelectDateRelation, Elements/SelectOwner,
    -	Elements/SelectQueue, Elements/SelectStatus, Elements/dayMenu,
    -	Elements/monthMenu, Elements/yearMenu, Search/PickRestriction,
    -	Search/RestrictSearch.html:
    -
    -	A bunch of infrasturcture work on the Ticket Search interface. it doesn't
    -	have any real logic behind it. that's next.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/SelectBoolean:
    -
    -	file SelectBoolean was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/dayMenu:
    -
    -	file dayMenu was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/SelectStatus:
    -
    -	file SelectStatus was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/SelectQueue:
    -
    -	file SelectQueue was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/yearMenu:
    -
    -	file yearMenu was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/Checkbox:
    -
    -	file Checkbox was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/Header:
    -
    -	file Header was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/SelectOwner:
    -
    -	file SelectOwner was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/monthMenu:
    -
    -	file monthMenu was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/SelectDateRelation:
    -
    -	file SelectDateRelation was initially added on branch rt-1-1.
    -	
    -2000-03-29 23:52  jesse
    -
    -	* webrt/Elements/SelectDate:
    -
    -	file SelectDate was initially added on branch rt-1-1.
    -	
    -2000-03-29 00:33  jesse
    -
    -	* etc/schema.mysql:
    -
    -	added a generic "RefersTo" ticket type to the comments.
    -	changed the types of Link.Base and Link.Target to VARCHAR(255) from INT(11)
    -	
    -2000-03-28 05:16  tobiasb
    -
    -	* README, tools/test:
    -
    -	darn, it seems like I'll need to install mod-perl ... actually I haven't done that earlier..
    -	
    -2000-03-28 00:13  jesse
    -
    -	* Makefile, lib/RT/Record.pm, lib/RT/Transaction.pm,
    -	webrt/Search/Listing.html, webrt/Search/QueueItem:
    -
    -	webrt/Search/Listing.html now gives a basic listing of all open tickets
    -	It even has links to the _still display only_ Display.html for each ticket
    -	
    -2000-03-27 23:55  jesse
    -
    -	* webrt/Ticket/DisplayTransaction:
    -
    -	missed this one. sorry.
    -	
    -2000-03-27 23:55  jesse
    -
    -	* webrt/Ticket/DisplayTransaction:
    -
    -	file DisplayTransaction was initially added on branch rt-1-1.
    -	
    -2000-03-27 23:54  jesse
    -
    -	* webrt/Ticket/: Display.html, DisplayHistory:
    -
    -	Hey. Look Ticket/Display.html?id= works!
    -	
    -2000-03-27 22:35  jesse
    -
    -	* webrt/Ticket/ToolBar:
    -
    -	file ToolBar was initially added on branch rt-1-1.
    -	
    -2000-03-27 22:35  jesse
    -
    -	* webrt/Ticket/DisplaySummary:
    -
    -	file DisplaySummary was initially added on branch rt-1-1.
    -	
    -2000-03-27 22:35  jesse
    -
    -	* webrt/Ticket/DisplayHistory:
    -
    -	file DisplayHistory was initially added on branch rt-1-1.
    -	
    -2000-03-27 22:35  jesse
    -
    -	* README, webrt/Ticket/DisplayHistory, webrt/Ticket/DisplaySummary,
    -	webrt/Ticket/ToolBar:
    -
    -	Work on WebRT, including a README update!
    -	
    -	check out  http://s.ly/~jesse/2000_03_28_171606_shot.jpg
    -	
    -2000-03-27 22:31  jesse
    -
    -	* lib/RT/Watchers.pm:
    -
    -	Bugfix in Watchers AdministrativeCc -> AdminCc
    -	
    -2000-03-27 22:30  jesse
    -
    -	* webrt/Ticket/: Display.html, Displaysummary, Update.html:
    -
    -	Work on WebUI. Display.html has slight functionality
    -	
    -2000-03-27 22:13  tobiasb
    -
    -	* docs/design_docs/basic-definitions.txt, tools/test:
    -
    -	minor
    -	
    -2000-03-27 21:50  tobiasb
    -
    -	* tools/test:
    -
    -	added some stuff to the test script
    -	
    -2000-03-27 21:32  tobiasb
    -
    -	* lib/RT/: ScripScope.pm, Transaction.pm:
    -
    -	bugfixing
    -	
    -2000-03-27 21:22  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	...well, even more bugs...
    -	
    -2000-03-27 21:09  tobiasb
    -
    -	* lib/RT/: Scrip.pm, ScripScope.pm, Template.pm, Transaction.pm:
    -
    -	First level bugfixing completed; Now the create (from the cli) calls up the action (though as earlier mentionated no emails are sent).
    -	
    -2000-03-27 20:54  tobiasb
    -
    -	* lib/RT/Scrip.pm:
    -
    -	bgfx
    -	
    -2000-03-27 20:47  tobiasb
    -
    -	* lib/RT/Scrip.pm:
    -
    -	Bugfix
    -	
    -2000-03-27 20:22  tobiasb
    -
    -	* lib/RT/ScripScope.pm:
    -
    -	bugfix
    -	
    -2000-03-27 20:19  tobiasb
    -
    -	* docs/design_docs/basic-definitions.txt:
    -
    -	clarified
    -	
    -2000-03-27 18:58  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	The recipients aren't set anywhere as far as I can see ... and I'm really uncertain what you've thought of with SetEnvelopeTo vs SetTo, etc.  You'd better take a look.  Obviously, this won't work until the recipients are set somehow
    -	
    -2000-03-27 18:40  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	I've mostly only added comments.  Anyway, I must say that I like this
    -	code. (maybe I'll say something different when I've tried debugging it
    -	;)
    -	
    -2000-03-27 17:59  tobiasb
    -
    -	* lib/RT/ScripScope.pm:
    -
    -	bugfix
    -	
    -2000-03-27 17:57  tobiasb
    -
    -	* lib/RT/Action.pm:
    -
    -	comment/folding bugfix
    -	
    -2000-03-27 17:56  tobiasb
    -
    -	* docs/design_docs/basic-definitions.txt:
    -
    -	file basic-definitions.txt was initially added on branch rt-1-1.
    -	
    -2000-03-27 17:56  tobiasb
    -
    -	* docs/design_docs/basic-definitions.txt:
    -
    -	(no comment :)
    -	
    -2000-03-27 17:55  tobiasb
    -
    -	* docs/design_docs/link-definitions.txt:
    -
    -	I think maybe those additions might be appreciated by Rouillard ... and this was (hopefully) the last thing I do with design documentation/discussion until 1.3 is finished :)
    -	
    -2000-03-27 17:33  tobiasb
    -
    -	* docs/design_docs/link-definitions.txt:
    -
    -	Doh ... I really shouldn't waste my time on this now ...
    -	
    -2000-03-27 17:17  tobiasb
    -
    -	* lib/RT/Scrip.pm:
    -
    -	Did you ever try to see if those modules would pass `perl -c'? :)
    -	
    -2000-03-27 16:44  jesse
    -
    -	* etc/schema.mysql, lib/RT/Action.pm, lib/RT/Scrip.pm,
    -	lib/RT/ScripScope.pm, lib/RT/Action/AutoReply.pm,
    -	lib/RT/Action/SendEmail.pm:
    -
    -	Lots of works on Scrip, ScripScope, Action. Tobias: wanna take a look?
    -	Basically, now Templates are autoloaded by RT::Scrip.pm and passed into
    -	the Action as TemplateObj.  Also, Templates are now of type MIME::Entity,
    -	which means that they have all the attributes of mail messages and can
    -	just be sent.
    -	
    -2000-03-27 16:20  tobiasb
    -
    -	* docs/design_docs/: TransactionTypes.txt, link-definitions.txt:
    -
    -	Linking definitions
    -	
    -2000-03-27 16:20  tobiasb
    -
    -	* docs/design_docs/link-definitions.txt:
    -
    -	file link-definitions.txt was initially added on branch rt-1-1.
    -	
    -2000-03-27 16:01  tobiasb
    -
    -	* docs/README.docs:
    -
    -	Updated the README to reflect that the docs are old :)
    -	
    -2000-03-27 15:45  tobiasb
    -
    -	* README:
    -
    -	status update
    -	
    -2000-03-27 15:41  tobiasb
    -
    -	* lib/RT/ScripScope.pm:
    -
    -	minor string fix
    -	
    -2000-03-27 15:36  tobiasb
    -
    -	* docs/design_docs/subscription-definitions.txt:
    -
    -	How does the system determinate whom to send mail to?
    -	
    -	The ScripScope table in the DB should indicate whether a Scrip is relevant
    -	for a queue or not /* TobiX thinks that this might eventually be extended to
    -	keywords, tickets, etc, and not only Queues */ ... the Scope table should
    -	indicate whether the Scrip is relevant for a given transaction type ... then
    -	the given Action should determinate whether it applies or not, and finally
    -	the Action has to find out (via the Watchers table) whom it applies to, and
    -	how to contact them ... and the Template tells how the mails that are sent
    -	out should look like.
    -	
    -2000-03-27 12:33  jesse
    -
    -	* lib/RT/ScripScopes.pm:
    -
    -	file ScripScopes.pm was initially added on branch rt-1-1.
    -	
    -2000-03-27 12:33  jesse
    -
    -	* lib/RT/: ScripScope.pm, ScripScopes.pm:
    -
    -	a bit more stub work on ScripScopes for tobias.
    -	more work after lunch
    -	
    -2000-03-27 07:18  tobiasb
    -
    -	* lib/RT/ScripScope.pm:
    -
    -	test..?
    -	
    -2000-03-27 07:04  tobiasb
    -
    -	* lib/RT/: ScripScope.pm, Scrips.pm:
    -
    -	Initiated work to get the code understand the Scrips/Scripscope split
    -	
    -2000-03-27 07:04  tobiasb
    -
    -	* lib/RT/ScripScope.pm:
    -
    -	file ScripScope.pm was initially added on branch rt-1-1.
    -	
    -2000-03-27 06:55  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Added yet a stupid design thought as a comment:
    -	
    -	# {{{ TABLE ScripScope
    -	  (...)
    -	  Queue INT(11), #Queue Id 0 for global
    -			 # (maybe there might be conditions where otherb
    -	                 # Scopes apply, i.e. a ticket, keyword, owner, etc?)
    -	
    -2000-03-27 00:45  jesse
    -
    -	* lib/RT/Action/Notify.pm:
    -
    -	Oops. forgot to commit Notify.pm
    -	
    -2000-03-27 00:45  jesse
    -
    -	* lib/RT/Action/Notify.pm:
    -
    -	file Notify.pm was initially added on branch rt-1-1.
    -	
    -2000-03-27 00:44  jesse
    -
    -	* lib/RT/Action/NotifyOnResolve.pm:
    -
    -	file NotifyOnResolve.pm was initially added on branch rt-1-1.
    -	
    -2000-03-27 00:44  jesse
    -
    -	* etc/schema.mysql, lib/RT/Ticket.pm,
    -	lib/RT/Action/NotifyOnResolve.pm, lib/RT/Action/NotifyWatchers.pm:
    -
    -	Work on Notify (Formerly NotifyWatchers)
    -	Work on NotifyOnResolve (Formerly NotifyWatchersOnResolve)
    -	
    -	They don't _work_ per se. But they're getting closer. I'm wondering
    -	whether we want to do something smarter with all the addresses we're passing
    -	in to make it easier to remove specific ones...for example, we currently
    -	have no way to _not_ send mail to the reuqestor.
    -	
    -2000-03-26 18:13  jesse
    -
    -	* lib/RT/Action/: AutoReply.pm, SendEmail.pm:
    -
    -	AutoReply is now a proper subclass of SendEmail.pm
    -	Maybe tonight, I'll try to get through some work on the Scrips and ScripScope stuff to make it work again.
    -	then to wrok on NotifyWatchers.pm
    -	
    -2000-03-25 01:03  jesse
    -
    -	* Makefile, lib/RT/Template.pm, lib/RT/Ticket.pm,
    -	lib/RT/Action/SendEmail.pm:
    -
    -	Work on the templating system. I actually gutted Template.pm and SendEmail.pm
    -	(sorry tobix :/)  Basically RT::Template is now A MIME::Entity object, which
    -	means that the various things one can do to mail messages can now be done to
    -	RT::Template objects, once you run $TemplateObj->Parse on them..
    -	SendEmail was cleaned up somewhat to be less intimidating to people who aren't
    -	as comfortable with big chunks of fairly dense perl.  Oh and it's a heck of a
    -	lot more subclassable now ;)
    -	
    -	Fixed a tiny bug in Ticket.pm resulting from the changes to Watchers.
    -	
    -2000-03-24 08:29  tobiasb
    -
    -	* tools/test:
    -
    -	I'm making a test suite which is intended to be run off from the Makefile after an install
    -	
    -2000-03-24 08:29  tobiasb
    -
    -	* tools/test:
    -
    -	file test was initially added on branch rt-1-1.
    -	
    -2000-03-24 08:06  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Added some more noise
    -	
    -2000-03-23 23:41  jesse
    -
    -	* subscription-definitions.txt,
    -	docs/design_docs/subscription-definitions.txt, etc/schema.mysql,
    -	lib/RT/Action/NotifyWatchers.pm, lib/RT/Action/SendEmail.pm:
    -
    -	A little bit of cleanup to the SendEmail and NotifyWatchers actions.
    -	I probably did more damage than good, but that's what I get for messing
    -	with code that makes little sense to me.
    -	
    -2000-03-23 23:41  jesse
    -
    -	* docs/design_docs/subscription-definitions.txt:
    -
    -	file subscription-definitions.txt was initially added on branch rt-1-1.
    -	
    -2000-03-23 22:19  jesse
    -
    -	* webrt/Search/BuildSearch:
    -
    -	Testing the setgid repository. commiting an empty file
    -	
    -2000-03-23 22:19  jesse
    -
    -	* webrt/Search/BuildSearch:
    -
    -	file BuildSearch was initially added on branch rt-1-1.
    -	
    -2000-03-23 00:50  jesse
    -
    -	* webrt/Search/QueueFooter:
    -
    -	file QueueFooter was initially added on branch rt-1-1.
    -	
    -2000-03-23 00:50  jesse
    -
    -	* webrt/Search/QueueItem:
    -
    -	file QueueItem was initially added on branch rt-1-1.
    -	
    -2000-03-23 00:50  jesse
    -
    -	* webrt/Search/QueueHeader:
    -
    -	file QueueHeader was initially added on branch rt-1-1.
    -	
    -2000-03-23 00:50  jesse
    -
    -	* webrt/Admin/ModifyUser:
    -
    -	file ModifyUser was initially added on branch rt-1-1.
    -	
    -2000-03-23 00:50  jesse
    -
    -	* lib/RT/Action/NotifyWatchers.pm:
    -
    -	file NotifyWatchers.pm was initially added on branch rt-1-1.
    -	
    -2000-03-23 00:50  jesse
    -
    -	* Makefile, bin/rtmux.pl, etc/schema.mysql, lib/RT/Queue.pm,
    -	lib/RT/Scrip.pm, lib/RT/Ticket.pm, lib/RT/Watcher.pm,
    -	lib/RT/Action/NotifyWatchers.pm, webrt/Admin/ModifyUser,
    -	webrt/Search/Listing.html, webrt/Search/QueueFooter,
    -	webrt/Search/QueueHeader, webrt/Search/QueueItem,
    -	webrt/Ticket/Displaysummary:
    -
    -	Did a bit of hacking on webrt2
    -	Redid the watchers system according to what I posted earlier to rt-devel
    -	Scrips have now broken..but we'll get them working again really soon.
    -	Queue Cc and AdminCc now exist in cli adminrt.
    -	
    -2000-03-22 14:56  tobiasb
    -
    -	* subscription-definitions.txt:
    -
    -	definitions in the subscription system
    -	
    -2000-03-22 14:56  tobiasb
    -
    -	* subscription-definitions.txt:
    -
    -	file subscription-definitions.txt was initially added on branch rt-1-1.
    -	
    -2000-03-22 14:42  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	This is a suggestion about a simple splitting of the Scrips table.  I
    -	think the admin tools will be significantly easier to set up if we do
    -	it this way.  An administrator can through some UI just add and remove
    -	Scrips from a queue.
    -	
    -2000-03-22 01:02  jesse
    -
    -	* lib/RT/: ACE.pm, ACL.pm, Action.pm, Area.pm, Areas.pm,
    -	Attachment.pm, Attachments.pm, CurrentUser.pm, EasySearch.pm,
    -	Queue.pm, Queues.pm, Record.pm, Scrip.pm, Scrips.pm, Template.pm,
    -	Templates.pm, Ticket.pm, Tickets.pm, Transaction.pm,
    -	Transactions.pm, User.pm, Users.pm, Utils.pm, Watcher.pm,
    -	Watchers.pm, Action/AutoReply.pm, Action/MailComment.pm,
    -	Action/SendEmail.pm, Interface/Email.pm:
    -
    -	This may look like a lot of code. but it's not.
    -	It's merely the result of running
    -	
    -	perl -pi.bak -e 's/sub (.*?){\n/# {{{ sub $1\nsub $1 {\n/; s/^}$/}\n# }}}/'
    -	
    -	basically, this adds # {{{ sub function
    -		         and # }}}
    -	around all the function names. The main reason to do this is for
    -	emacs fold-minor-mode.  It makes things a lot easier to read.
    -	In an ideal world, we'd have perl-aware folding editor and there'd be
    -	no need for this markup
    -	
    -2000-03-21 20:38  jesse
    -
    -	* lib/RT/: Queue.pm, Ticket.pm, Watcher.pm, Watchers.pm:
    -
    -	Work on watchers.
    -	
    -2000-03-20 15:21  jesse
    -
    -	* etc/schema.mysql:
    -
    -	Modified the schema for my "New Improved Watchers" system. Basically,
    -	now you'll be able to tie a template to a given watch. along with a
    -	boolean "send mail" flag.  We'll need a special "Mail Watchers" action to
    -	make this all work..but the code should be pretty easy.
    -	
    -		jesse
    -	
    -2000-03-20 05:27  tobiasb
    -
    -	* bin/initdb.mysql:
    -
    -	bugfix
    -	
    -2000-03-17 15:20  jesse
    -
    -	* webrt/Ticket/Create.html:
    -
    -	file Create.html was initially added on branch rt-1-1.
    -	
    -2000-03-17 15:20  jesse
    -
    -	* webrt/Ticket/DisplayHeader:
    -
    -	file DisplayHeader was initially added on branch rt-1-1.
    -	
    -2000-03-17 15:20  jesse
    -
    -	* webrt/Ticket/SetOwner:
    -
    -	file SetOwner was initially added on branch rt-1-1.
    -	
    -2000-03-17 15:20  jesse
    -
    -	* webrt/Ticket/SetStatus:
    -
    -	file SetStatus was initially added on branch rt-1-1.
    -	
    -2000-03-17 15:20  jesse
    -
    -	* webrt/Ticket/: Create.html, Display.html, DisplayHeader,
    -	Displaysummary, SetOwner, SetStatus, Update.html:
    -
    -	More work on the basic webui
    -	
    -2000-03-17 15:20  jesse
    -
    -	* webrt/Ticket/Displaysummary:
    -
    -	file Displaysummary was initially added on branch rt-1-1.
    -	
    -2000-03-17 11:32  tobiasb
    -
    -	* bin/initdb.mysql:
    -
    -	Bugfix, the password passing didn't work as it should.
    -	
    -2000-03-17 10:52  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	- Slashed away the old "MailQueueMembersOn..." junk.
    -	
    -	- Added Scrips to the Watchers table.  ... the Watchers/Scrips system
    -	seems quite flexible .. BUT .. I have a certain feeling that it might
    -	be hard to make administration tools that helps a non-hacking
    -	administrator to find out which mails are sent where, etc.  Well,
    -	that's something we'll have to worry about later :)
    -	
    -2000-03-17 08:47  tobiasb
    -
    -	* Makefile, etc/schema.mysql:
    -
    -	removed some instanses of 'su' that really shouldn't be needed, and which also broke on anything but GNU shellutils
    -	
    -2000-03-17 07:32  tobiasb
    -
    -	* README:
    -
    -	Some additions and changes to reflect that this is, after all, a
    -	development version.  Meri, do you subscribe to cvs-commit? :)
    -	
    -2000-03-17 06:01  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	# Those subscription field are not used in RT 1.1 as I see it.
    -	# I think we should modify the Scrips system so it by default
    -	# respects those fields.
    -	 MailOwnerOnTransaction INT,             # notify owner on transaction
    -	 MailMembersOnTransaction INT,		# notify list members on transaction
    -	 MailRequestorOnTransaction INT,	# notify requestor on transaction
    -	 MailRequestorOnCreation INT,		# notify user on creation
    -	 MailMembersOnCorrespondence INT,		# notify members on creation
    -	 MailMembersOnComment INT,		# notify members on comment
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/: Search/Listing.html, Ticket/Display.html,
    -	Ticket/Modify.html, Ticket/ProcessUpdate.html, Ticket/Update.html,
    -	Ticket/ValidateUpdate.html:
    -
    -	The beginnings of the All New! Web UI based around HTML::Mason
    -	There's nothing functional here yet. but it's a start at a framework.
    -	Ticket/Update.html is probably the closest to "real" code so far.
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/Ticket/ValidateUpdate.html:
    -
    -	file ValidateUpdate.html was initially added on branch rt-1-1.
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/Ticket/Display.html:
    -
    -	file Display.html was initially added on branch rt-1-1.
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/Ticket/Modify.html:
    -
    -	file Modify.html was initially added on branch rt-1-1.
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/Search/Listing.html:
    -
    -	file Listing.html was initially added on branch rt-1-1.
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/Ticket/ProcessUpdate.html:
    -
    -	file ProcessUpdate.html was initially added on branch rt-1-1.
    -	
    -2000-03-16 16:31  jesse
    -
    -	* webrt/Ticket/Update.html:
    -
    -	file Update.html was initially added on branch rt-1-1.
    -	
    -2000-03-16 14:46  tobiasb
    -
    -	* Makefile:
    -
    -	Changed the default database name from rt to RT to avoid confusion with previously installed versions of rt
    -	
    -2000-03-16 02:34  tobiasb
    -
    -	* lib/RT/User.pm:
    -
    -	Bugfixes:  It was impossible not to give requests to somebody.
    -	
    -2000-03-16 01:32  tobiasb
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	Bugfixes
    -	
    -	was
    -	
    -	  if ($CurrentUser->Id == 0) {
    -	    #If it fails, create a user
    -	
    -	now
    -	
    -	  unless ($CurrentUser->Id) {
    -	    #If it fails, create a user
    -	
    -	as Id returned undef.
    -	
    -	Changed 'Queue' to 'QueueTag'.
    -	
    -	Added some few comments
    -	
    -2000-03-14 00:40  jesse
    -
    -	* README:
    -
    -	Modified the README for the beginnings of the new webui
    -	
    -2000-03-14 00:39  jesse
    -
    -	* bin/: rtmux.pl, webmux.pl:
    -
    -	added webmux. modified rtmux.pl to clean out some cruft
    -	
    -2000-03-14 00:39  jesse
    -
    -	* bin/webmux.pl:
    -
    -	file webmux.pl was initially added on branch rt-1-1.
    -	
    -2000-03-13 12:53  jesse
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	rt-mailgate has now recieved and logged correspondence and comments with current schema.
    -	
    -2000-03-08 23:26  jesse
    -
    -	* lib/RT/: Ticket.pm, Transaction.pm:
    -
    -	DBIx cleanups to deal with load by id when id is null
    -	Work on comment and correspond. Eventually, we'll get the
    -	per-transaction cc and bcc working.
    -	
    -2000-03-08 18:22  jesse
    -
    -	* bin/rtmux.pl, lib/RT/Queue.pm, lib/RT/Ticket.pm,
    -	lib/RT/Transaction.pm, lib/RT/User.pm:
    -
    -	rtq works a bit better
    -	rtadmin works again.
    -	rtadmin -user create
    -		-user modify
    -	 both seem to work ok
    -	
    -	rt -create now makes sure a queue exists and permits ticket creation
    -	rt -create now make sure a prospective owner has queue membership.
    -	
    -2000-03-02 17:23  tobiasb
    -
    -	* lib/RT/Ticket.pm, lib/RT/Transaction.pm,
    -	lib/RT/Action/SendEmail.pm, etc/schema.mysql:
    -
    -	resolve, open, take (if unowned, at least) seems to work
    -	
    -2000-03-02 16:10  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Ticket.pm:
    -
    -	Bugfixing
    -	
    -2000-03-02 14:35  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Correspondence almost works
    -	
    -2000-03-02 13:26  tobiasb
    -
    -	* lib/RT/Ticket.pm, lib/RT/Action/MailComment.pm, etc/schema.mysql:
    -
    -	Comments almost work now (from the cli)
    -	
    -2000-03-02 12:38  tobiasb
    -
    -	* lib/RT/Action/: MailComment.pm, MailCorrespondence.pm:
    -
    -	one minor bugfix + some comments
    -	
    -2000-03-01 23:58  jesse
    -
    -	* NEWS:
    -
    -	brought the news up to date.
    -	nuked old /contrib
    -	nuked old /etc/templates.
    -	
    -	bedtime now.
    -	
    -2000-03-01 23:57  jesse
    -
    -	* NEWS:
    -
    -	brought the news up to date (a bit)
    -	
    -2000-03-01 23:50  jesse
    -
    -	* Makefile:
    -
    -	removed a lot of outdated cruft.
    -	Bumped the version to 1.1.11 for a release later this week.
    -	
    -2000-03-01 23:18  jesse
    -
    -	* lib/RT/: Ticket.pm, Interface/Email.pm:
    -
    -	The mail gateway now lets you create, comment and correspond on tickets.
    -	Ticket->Owner now deals better when the owner is NULL
    -	
    -2000-03-01 21:27  jesse
    -
    -	* HACKING:
    -
    -	minor comments added to hacking
    -	
    -2000-03-01 21:20  jesse
    -
    -	* HACKING:
    -
    -	Trivial change to HACKING to test commitinfo
    -	
    -2000-03-01 21:09  jesse
    -
    -	* lib/RT/Interface/Email.pm:
    -
    -	file Email.pm was initially added on branch rt-1-1.
    -	
    -2000-03-01 21:09  jesse
    -
    -	* bin/rtmux.pl, lib/RT/Interface/Email.pm:
    -
    -	work on mailgate
    -	
    -2000-03-01 18:36  tobiasb
    -
    -	* docs/design_docs/TransactionTypes.txt, etc/schema.mysql:
    -
    -	Some loose thoughts only ... as comments and a doc which I'm not sure
    -	if it's possible to understand by others than me anyway :)
    -	
    -	Anyway, it is too complex.  We'll just continue following the current design.
    -	
    -2000-03-01 18:36  tobiasb
    -
    -	* docs/design_docs/TransactionTypes.txt:
    -
    -	file TransactionTypes.txt was initially added on branch rt-1-1.
    -	
    -2000-03-01 17:51  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Seems like it's a lot of things that doesn't work here.
    -	
    -2000-03-01 16:26  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Ehm ... maybe I forgot to commit this one.  It contains some fixes.
    -	
    -2000-03-01 16:08  jesse
    -
    -	* TODO:
    -
    -	ripped a bit of obsolete code from rtmux.pl
    -	updated the TODO to reference the production instance of RT.
    -	
    -2000-03-01 14:48  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	removed the old web ui hooks from rtmux.pl
    -	
    -2000-03-01 12:12  tobiasb
    -
    -	* lib/RT/: Action.pm, Scrip.pm, Template.pm, Ticket.pm,
    -	Watchers.pm, Action/AutoReply.pm, Action/SendEmail.pm:
    -
    -	I've done some debugging and polishing.  I hope it won't break with stuff you're eventually working with
    -	
    -2000-02-29 16:58  tobiasb
    -
    -	* lib/RT/: Queue.pm, Ticket.pm, Watchers.pm:
    -
    -	One sort of bugfix..
    -	
    -2000-02-29 16:35  tobiasb
    -
    -	* lib/RT/: Queue.pm, Template.pm, Ticket.pm, Watcher.pm,
    -	Watchers.pm, Action/SendEmail.pm:
    -
    -	Scrips work for me.  Well, I'm not that sure anyway.  I had actually
    -	expected one email to drop in for each Scrip - but I only got the
    -	AutoReply and the Correspondence.  Maybe I should debug even more.
    -	
    -2000-02-29 14:29  tobiasb
    -
    -	* lib/RT/Watchers.pm:
    -
    -	LimitToTicket updated (not tested, though)
    -	LimitToQueue added     (not tested, though)
    -	
    -2000-02-29 14:27  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	
    -	# Primarly used by RT::Actions::SendEmail as well as some subclasses
    -	# to determinate whom to send emails to.  This scheme should work out
    -	# better than the scheme under RT 1.0, and should suit most users.
    -	# For more fine grained control, it's possible to create tables as you
    -	# like and make a new subclass of RT::Actions::SendEmail where the
    -	# SetRecepients sub is overloaded :)
    -	
    -	CREATE TABLE Watchers (
    -	   id int(11) AUTO_INCREMENT PRIMARY KEY,
    -	   Value int(11),
    -	   Scope varchar(16), # Might be "Queue" and "Ticket" as for now
    -	                      # ... might be extended to "Keywords", "Owners", etc.
    -	   Email VARCHAR(255),
    -	   Type VARCHAR(16), #Requestor, Cc, Bcc
    -	   Creator INT(11),
    -	   Created TIMESTAMP,
    -	   LastUpdatedBy INT(11),
    -	   LastUpdated TIMESTAMP
    -	)\g
    -	
    -2000-02-29 13:40  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	CREATE TABLE Watchers (
    -	   id int(11) AUTO_INCREMENT PRIMARY KEY,
    -	   Ticket int(11), # 0 for all
    -	   Queue int(11), # 0 for all
    -		# We might consider adding more power here,
    -		# i.e. TransactionType, Scrip, etc
    -	   Email VARCHAR(255),
    -	   Type VARCHAR(16), #Requestor, Cc, Bcc
    -	   Creator INT(11),
    -	   Created TIMESTAMP,
    -	   LastUpdatedBy INT(11),
    -	   LastUpdated TIMESTAMP
    -	)\g
    -	
    -2000-02-29 10:43  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Template.{content and title} => Content and Title - since we use
    -	UpperCase in the rest of the DD.
    -	
    -2000-02-29 10:31  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Blob, that is..
    -	
    -2000-02-29 10:12  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Added ExtraHeaders as VARCHAR(255).  255 characters should be enough
    -	for storing some few extra header lines, but anyway maybe it should
    -	have been blob instead?
    -	
    -2000-02-29 09:51  tobiasb
    -
    -	* lib/RT/: Attachment.pm, Action/AutoReply.pm, Action/SendEmail.pm:
    -
    -	I've continued the work on mail sending.  There is still some missing
    -	stuff:
    -	
    -	1. EasySearch/Scrips issue - currently it doesn't properly output "
    -	all scrips that has (queue=0 or queue=this) and (type="any" or type=this)".
    -	
    -	2. A serious stub in RT::Action::SendEmail - I don't know where to find
    -	"interessted parties".  I think it could be nice putting queue watchers
    -	in the same table as ticket watchers.
    -	
    -2000-02-29 09:42  tobiasb
    -
    -	* lib/RT/Scrips.pm:
    -
    -	Hack - everything that applies for a Correspondence action also
    -	applies for a Create action (I'd daresay).
    -	
    -2000-02-29 07:02  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	Some insignificant changes.  Well, one marginally significant; it
    -	shouldn't $Scrip->Commit unless $Scrip->Prepare()
    -	
    -2000-02-29 04:12  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	I've started at general transaction emails.
    -	
    -2000-02-29 03:58  tobiasb
    -
    -	* lib/RT/Watchers.pm:
    -
    -	Added an Emails method.  It can be used like:
    -	
    -	   print join(",", @{$Watchers->Emails("Requestors")});
    -	
    -	or
    -	
    -	   $Watchers->LimitToRequestors;
    -	   $Emails=$Watchers->Emails;
    -	
    -	...
    -	
    -2000-02-29 02:31  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	Sender => RT-Originator
    -	
    -2000-02-29 00:40  jesse
    -
    -	* README:
    -
    -	Added Into Netowrks and Funcom to the thanks at the top of the readme
    -	`
    -	
    -2000-02-28 23:20  jesse
    -
    -	* Makefile:
    -
    -	RT 1.1.10 released. Tobix has autoreply basically working :)
    -	
    -2000-02-28 22:49  jesse
    -
    -	* Makefile, NEWS, README:
    -
    -	Fixed a longstanding bug in the WebRT administrator
    -	added a note about stripmime to the readme.
    -	added a bit of code from curl.com that adds functionality to rtq for reporting
    -	
    -2000-02-28 22:17  jesse
    -
    -	* Makefile, NEWS:
    -
    -	bumped the version for release of 1.0.2
    -	
    -2000-02-28 11:33  tobiasb
    -
    -	* lib/RT/: Template.pm, Transaction.pm, Action/AutoReply.pm,
    -	Action/SendEmail.pm:
    -
    -	AutoReply seems to work now ... except that rtadmin didn't set email
    -	aliases for the queue, so the mail bounces with invalid from address.
    -	I won't look more at this until tomorrow.  You're very welcome to take
    -	over for a while if you feel like it :)
    -	
    -2000-02-28 11:29  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	AutoReply seems to work now
    -	
    -2000-02-28 08:18  tobiasb
    -
    -	* HACKING:
    -
    -	Added some hints and misc.  Please look through.
    -	
    -2000-02-28 05:25  tobiasb
    -
    -	* lib/RT/: Ticket.pm, Transaction.pm, Action/AutoReply.pm,
    -	Action/SendEmail.pm:
    -
    -	- The queue tag rather than queue id is delievered from the cli, this
    -	  broke in Ticket::Create.  Fixed.
    -	
    -	- The Attachments have to be assigned to a transaction before Scrips
    -	   is run.  Now the Attachments are delievered as a part of the parameters
    -	   to Transaction::Create
    -	
    -2000-02-27 23:28  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Fixed the AutoReply template ... still not tested, though.
    -	
    -2000-02-27 22:04  tobiasb
    -
    -	* lib/RT/Action/: AutoReply.pm, SendEmail.pm:
    -
    -	I think we can nuke the old rt/lib/rt/support/mail.pm now - everything
    -	should be located in SendEmail.pm, AutoReply.pm and Template.pm by now :)
    -	
    -	It's not tested yet, and the templates needs upgrading.  Anyway, I will
    -	probably not mess more around with the perl code as for now.
    -	
    -2000-02-27 21:43  tobiasb
    -
    -	* bin/rtmux.pl:
    -
    -	Seems like $rtversion="!!RT_VERSION!!" had disappeared.  I renamed the
    -	variable to $VERSION.
    -	
    -2000-02-27 21:22  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	dates now display in the cli.
    -	
    -2000-02-27 20:53  tobiasb
    -
    -	* lib/RT/Templates.pm:
    -
    -	Fixed DBIx::EasySearch => RT::EasySearch
    -	
    -2000-02-27 20:53  tobiasb
    -
    -	* lib/RT/Template.pm:
    -
    -	Method Template::Parse added, Text::Template used for the moment.
    -	
    -	(sigh ... that means my next worktask will be to update the
    -	templates...)
    -	
    -2000-02-27 20:49  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	so. Ticket->Create now actually figures out ccs and bccs and requestors from the mime
    -	object passed in to it.
    -	
    -2000-02-27 19:05  jesse
    -
    -	* lib/RT/Transaction.pm:
    -
    -	added a comment for tobias about a new line that didn't make sense.
    -	
    -2000-02-27 18:46  jesse
    -
    -	* lib/RT/: Ticket.pm, Watchers.pm:
    -
    -	watchers updates.
    -	
    -2000-02-27 17:25  tobiasb
    -
    -	* lib/RT/Template.pm:
    -
    -	file Template.pm was initially added on branch rt-1-1.
    -	
    -2000-02-27 17:25  tobiasb
    -
    -	* lib/RT/: Attachment.pm, Template.pm, Templates.pm,
    -	Action/AutoReply.pm, Action/SendEmail.pm:
    -
    -	Development snapshot.  I guess I'll have it working in half an hour
    -	with _efficient_ working, that is some four hours working at my
    -	current efficiency rate :/
    -	
    -2000-02-27 17:25  tobiasb
    -
    -	* lib/RT/Templates.pm:
    -
    -	file Templates.pm was initially added on branch rt-1-1.
    -	
    -2000-02-27 16:43  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Added some templates
    -	
    -2000-02-27 11:19  tobiasb
    -
    -	* lib/RT/: Scrip.pm, Transaction.pm:
    -
    -	development snapshot
    -	
    -2000-02-27 10:31  tobiasb
    -
    -	* lib/RT/Action/: AutoReply.pm, MailComment.pm,
    -	MailCorrespondence.pm, SendEmail.pm:
    -
    -	I've started bashing at the mail sending functionallity.  It seemed quite
    -	stubbed to me.
    -	
    -2000-02-24 03:44  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	minor bug in comment
    -	
    -2000-02-24 03:24  tobiasb
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	clearing out a potential weird bug
    -	
    -2000-02-24 00:27  jesse
    -
    -	* lib/RT/Scrips.pm:
    -
    -	Fixed a typo in my code near tobix' changes to Scrips.pm. his changes look good.
    -	
    -2000-02-24 00:03  jesse
    -
    -	* Makefile, NEWS, README:
    -
    -	little fix to mail manipulate from "Heather L. Sherman" 
    -	
    -2000-02-23 17:06  tobiasb
    -
    -	* lib/RT/: Scrips.pm, Action/SendEmail.pm:
    -
    -	Some small fixes.  You'd better look through it, as I'm not completely sure what I'm doing :)
    -	
    -2000-02-23 16:07  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	An insert entry here reffers to SendMail.pm, while the file is SendEmail.pm
    -	
    -2000-02-23 15:26  jesse
    -
    -	* docs/rt-templates.html:
    -
    -	[no log message]
    -	
    -2000-02-23 11:38  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Could not get 'rt -create' working.  It seems more sane now, but I'm not really sure what I'm doing ... so you should have a peek at it.  I changed  $Id->SUPER::_Set("EffectiveId",$id); to $self->SUPER::_Set etc
    -	
    -2000-02-22 23:35  jesse
    -
    -	* lib/RT/InterestedParty.pm:
    -
    -	removed vestigal code
    -	
    -2000-02-22 23:25  jesse
    -
    -	* etc/schema.mysql, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
    -	lib/RT/Transactions.pm, lib/RT/Watchers.pm:
    -
    -	A bit more work on watchers. we're getting close.
    -	rtq works today.
    -	rt -create basically works.
    -	rt -take works.
    -	
    -	rt -show will now start to show ownership changes.
    -	
    -2000-02-22 08:06  jesse
    -
    -	* Makefile, etc/schema.mysql, lib/RT/Ticket.pm:
    -
    -	Work on Watchers.  Most of the code needed to make this work is now
    -	present. sadly I haven't even _tried_ to run it yet.
    -	
    -2000-02-21 01:33  jesse
    -
    -	* lib/RT/Watcher.pm:
    -
    -	file Watcher.pm was initially added on branch rt-1-1.
    -	
    -2000-02-21 01:33  jesse
    -
    -	* lib/RT/: InterestedParties.pm, InterestedParties.pm~,
    -	Notification.pm, Ticket.pm, Watcher.pm, Watchers.pm:
    -
    -	Renamed interested parties to "Watchers"
    -	Watchers are now keyed by EmailAddress rather than UserId. Not every CC will have an rt account, i think
    -	
    -2000-02-21 01:33  jesse
    -
    -	* lib/RT/Watchers.pm:
    -
    -	file Watchers.pm was initially added on branch rt-1-1.
    -	
    -2000-02-20 18:28  jesse
    -
    -	* lib/RT/InterestedParties.pm~:
    -
    -	file InterestedParties.pm~ was initially added on branch rt-1-1.
    -	
    -2000-02-20 18:28  jesse
    -
    -	* lib/RT/InterestedParties.pm:
    -
    -	file InterestedParties.pm was initially added on branch rt-1-1.
    -	
    -2000-02-20 18:28  jesse
    -
    -	* lib/RT/InterestedParty.pm:
    -
    -	file InterestedParty.pm was initially added on branch rt-1-1.
    -	
    -2000-02-20 18:28  jesse
    -
    -	* lib/RT/: InterestedParties.pm, InterestedParties.pm~,
    -	InterestedParty.pm:
    -
    -	[no log message]
    -	
    -2000-02-20 18:24  jesse
    -
    -	* etc/schema.mysql, lib/RT/Ticket.pm:
    -
    -	[no log message]
    -	
    -2000-02-20 15:27  jesse
    -
    -	* etc/schema.mysql, lib/RT/Action.pm, lib/RT/Scrip.pm,
    -	lib/RT/Action/AutoReply.pm, lib/RT/Action/SendEmail.pm:
    -
    -	Work on scrips. stubs for the webui
    -	
    -2000-02-19 17:45  jesse
    -
    -	* lib/RT/: Action.pm, Scrip.pm:
    -
    -	work on actions. checking in for eric to take a look
    -	
    -2000-02-19 16:48  jesse
    -
    -	* lib/RT/Action/AutoReply.pm:
    -
    -	file AutoReply.pm was initially added on branch rt-1-1.
    -	
    -2000-02-19 16:48  jesse
    -
    -	* lib/RT/Action/MailCorrespondence.pm:
    -
    -	file MailCorrespondence.pm was initially added on branch rt-1-1.
    -	
    -2000-02-19 16:48  jesse
    -
    -	* lib/RT/Action.pm:
    -
    -	file Action.pm was initially added on branch rt-1-1.
    -	
    -2000-02-19 16:48  jesse
    -
    -	* lib/RT/Action/MailComment.pm:
    -
    -	file MailComment.pm was initially added on branch rt-1-1.
    -	
    -2000-02-19 16:48  jesse
    -
    -	* lib/RT/: Action.pm, Action/AutoReply.pm, Action/MailComment.pm,
    -	Action/MailCorrespondence.pm, Action/SendEmail.pm:
    -
    -	As it turns out, Action needed to be abstracted a bit and renamed.
    -	
    -	I'm also making the Object syntax a bit.
    -	
    -2000-02-19 16:48  jesse
    -
    -	* lib/RT/Action/SendEmail.pm:
    -
    -	file SendEmail.pm was initially added on branch rt-1-1.
    -	
    -2000-02-17 09:19  jesse
    -
    -	* etc/schema.mysql, lib/RT/Scrip.pm, lib/RT/Scrips.pm,
    -	lib/RT/Transaction.pm:
    -
    -	The base architecture for Scrips to work should now be in place.
    -	Next up: write example "Actions" (gotta move the Scrips directory to Actions)
    -	for the scrip handlers to use.
    -	
    -2000-02-16 09:59  jesse
    -
    -	* lib/RT/: Scrip.pm, Transaction.pm:
    -
    -	Starting to make scrips actually work
    -	
    -2000-02-10 23:24  jesse
    -
    -	* lib/RT/Scrips.pm:
    -
    -	file Scrips.pm was initially added on branch rt-1-1.
    -	
    -2000-02-10 23:24  jesse
    -
    -	* lib/RT/: Scrip.pm, Scrips.pm, Transaction.pm:
    -
    -	more work stubbing scrips. but now my arms hurt badly enough that i'm going to log out.
    -	
    -2000-02-10 23:24  jesse
    -
    -	* lib/RT/Scrip.pm:
    -
    -	file Scrip.pm was initially added on branch rt-1-1.
    -	
    -2000-01-31 02:38  tobiasb
    -
    -	* README, lib/RT/Attachments.pm:
    -
    -	does the commit automail work now?
    -	
    -2000-01-30 23:54  jesse
    -
    -	* NEWS, README, etc/schema.mysql, lib/RT/CurrentUser.pm,
    -	lib/RT/Record.pm, lib/RT/User.pm:
    -
    -	Work on the User object.
    -	The mail gateway now autocreates users. (This will make more sense
    -	once we start tying tickets to users by means of the InterestedParties table.
    -	
    -2000-01-29 01:33  jesse
    -
    -	* Makefile:
    -
    -	makefile cleanup. including removing the C compiler and template and
    -	transaction directories
    -	
    -2000-01-29 01:30  jesse
    -
    -	* Makefile:
    -
    -	removed C compiler from the makefile
    -	
    -2000-01-29 01:25  jesse
    -
    -	* Makefile:
    -
    -	Removed C compiler from the makefile. we just don't need it anymore
    -	
    -2000-01-29 01:22  jesse
    -
    -	* Makefile:
    -
    -	bumped version to 1-1-8
    -	
    -2000-01-29 01:20  jesse
    -
    -	* Makefile:
    -
    -	removed template and transaction paths from the makefile.
    -	(to test new cvs wrappers and cuz they should be gona anyway)
    -	
    -2000-01-29 00:26  jesse
    -
    -	* etc/schema.mysql:
    -
    -	Started to do work on scrips. see the schema for how it would work.
    -	
    -2000-01-28 20:04  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Some modifications and bugfixes on the messages popping up after a `successful' correspondence/comment
    -	
    -2000-01-28 19:47  tobiasb
    -
    -	* lib/RT/Ticket.pm:
    -
    -	Removed some annoying warnings.  I don't know if this is the "right"
    -	way to remove them, but it works (for me, at least), it's an easy
    -	way to do it, and it's harmless;
    -	
    -	instead of writing
    -		$var_that_might_be_undef
    -	I write
    -		$var_that_might_be_undef || ""
    -	eventually with parantheses, and eventually with "" replaced by 0, or maybe
    -	(not tested) even undef.
    -	
    -2000-01-28 13:22  tobiasb
    -
    -	* Makefile:
    -
    -	Two substitution parameters was forgotten in config.pm
    -	
    -2000-01-28 13:12  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	Oups, committed the wrong file
    -	
    -2000-01-28 13:10  tobiasb
    -
    -	* Makefile, etc/schema.mysql:
    -
    -	Two substitution parameters was forgotten in config.pm
    -	
    -2000-01-27 04:09  tobiasb
    -
    -	* Makefile, bin/initdb.mysql:
    -
    -	small password fix
    -	
    -2000-01-25 23:26  jesse
    -
    -	* Makefile:
    -
    -	bumped the version to 1.1.7 for tonight's release.
    -	
    -2000-01-25 23:12  jesse
    -
    -	* lib/RT/: Attachments.pm, Ticket.pm, Transaction.pm:
    -
    -	DBIx::EasySearch now has a -> First method. which is like -> Next, but picks
    -	the first element
    -	
    -	DBIx::Record -> now returns '' rather than undef for null values. it's less
    -	likely to break interfaces.
    -	
    -2000-01-25 16:36  tobiasb
    -
    -	* README:
    -
    -	aargh
    -	
    -2000-01-25 16:31  tobiasb
    -
    -	* TODO:
    -
    -	test
    -	
    -2000-01-25 14:57  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	bugfix
    -	
    -2000-01-25 14:44  tobiasb
    -
    -	* Makefile:
    -
    -	removed obsoleteness
    -	
    -2000-01-25 14:37  tobiasb
    -
    -	* README:
    -
    -	The UPGRADE section of the README was inaccurate
    -	
    -2000-01-25 14:31  tobiasb
    -
    -	* lib/RT/Transaction.pm:
    -
    -	comment bug
    -	
    -2000-01-24 01:45  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -2000-01-24 01:43  jesse
    -
    -	* Makefile, NEWS, lib/RT/Attachment.pm, lib/RT/Attachments.pm,
    -	lib/RT/Record.pm, lib/RT/Ticket.pm, lib/RT/Tickets.pm,
    -	lib/RT/Transaction.pm, lib/RT/Transactions.pm:
    -
    -	
    -	* Attachments support in code. rtq now basically works
    -	  Mailgate creates new tickets
    -	  rt -show now works a bit (doesn't display transaction content yet)
    -	  rt -subject works. several other commandline tools work
    -	
    -2000-01-23 18:32  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -2000-01-23 18:27  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -2000-01-23 18:19  jesse
    -
    -	* etc/schema.mysql, lib/RT/Attachment.pm, lib/RT/Attachments.pm,
    -	lib/RT/Ticket.pm, lib/RT/Transaction.pm:
    -
    -	Work to make attachments work. So far we've got something that puts attachments
    -	in the database.
    -	
    -2000-01-21 12:25  tobiasb
    -
    -	* README:
    -
    -	doc-bugfix
    -	
    -2000-01-18 23:56  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	work on the mail gateway. (mainly disemboweled it)
    -	
    -2000-01-18 00:34  jesse
    -
    -	* lib/RT/Attachments.pm:
    -
    -	file Attachments.pm was initially added on branch rt-1-1.
    -	
    -2000-01-18 00:34  jesse
    -
    -	* docs/API:
    -
    -	file API was initially added on branch rt-1-1.
    -	
    -2000-01-18 00:34  jesse
    -
    -	* lib/RT/Attachment.pm:
    -
    -	file Attachment.pm was initially added on branch rt-1-1.
    -	
    -2000-01-18 00:34  jesse
    -
    -	* HACKING:
    -
    -	file HACKING was initially added on branch rt-1-1.
    -	
    -2000-01-18 00:34  jesse
    -
    -	* HACKING, Makefile, docs/API, etc/schema.mysql,
    -	lib/RT/Attachment.pm, lib/RT/Attachments.pm, lib/RT/CurrentUser.pm,
    -	lib/RT/Queue.pm, lib/RT/Record.pm, lib/RT/Ticket.pm,
    -	lib/RT/Transaction.pm, lib/RT/Utils.pm:
    -
    -	work on attachments.
    -	work on structure
    -	
    -2000-01-17 12:59  jesse
    -
    -	* Makefile, etc/schema.mysql, lib/RT/ACE.pm, lib/RT/ACL.pm,
    -	lib/RT/CurrentUser.pm, lib/RT/Queue.pm, lib/RT/Queues.pm,
    -	lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm,
    -	lib/RT/Transactions.pm, lib/RT/User.pm, lib/RT/Users.pm:
    -
    -	work on create. work on attachments. upcased the table names.
    -	
    -2000-01-14 15:34  jesse
    -
    -	* etc/schema.mysql:
    -
    -	work on schema
    -	
    -2000-01-14 14:47  jesse
    -
    -	* NEWS, etc/schema:
    -
    -	schema change to make long email addresses work better for queue members.
    -	
    -2000-01-14 01:07  jesse
    -
    -	* lib/RT/: EasySearch.pm, Record.pm, Ticket.pm, Tickets.pm,
    -	Transaction.pm:
    -
    -	basic searches now work.
    -	comments almost work.
    -	creates are having an issue with effectiveid not getting set.
    -	
    -2000-01-13 18:04  jesse
    -
    -	* Makefile, lib/RT/EasySearch.pm, lib/RT/Tickets.pm:
    -
    -	[no log message]
    -	
    -2000-01-13 15:03  jesse
    -
    -	* lib/RT/Utils.pm:
    -
    -	file Utils.pm was initially added on branch rt-1-1.
    -	
    -2000-01-13 15:03  jesse
    -
    -	* lib/RT/Utils.pm:
    -
    -	[no log message]
    -	
    -2000-01-09 20:38  jesse
    -
    -	* lib/RT/EasySearch.pm:
    -
    -	file EasySearch.pm was initially added on branch rt-1-1.
    -	
    -2000-01-09 20:38  jesse
    -
    -	* lib/RT/: EasySearch.pm, Queue.pm, Queues.pm, Record.pm,
    -	Tickets.pm:
    -
    -	added RT/EasySearch.pm
    -	
    -	rtadmin queue -list will now show all queues.
    -	removed some debugging output
    -	
    -2000-01-04 01:21  jesse
    -
    -	* etc/schema.mysql, lib/RT/CurrentUser.pm, lib/RT/Queue.pm,
    -	lib/RT/Record.pm, lib/RT/Ticket.pm, lib/RT/Transaction.pm,
    -	lib/RT/User.pm:
    -
    -	Lots of work. first working ticket update.
    -	
    -2000-01-04 01:21  jesse
    -
    -	* lib/RT/CurrentUser.pm:
    -
    -	file CurrentUser.pm was initially added on branch rt-1-1.
    -	
    -2000-01-03 07:40  tobiasb
    -
    -	* README, README:
    -
    -	bugfix
    -	
    -2000-01-03 01:39  jesse
    -
    -	* lib/RT/: Record.pm, Ticket.pm, User.pm:
    -
    -	basic create support working.
    -	more boackend and abstraction work
    -	
    -2000-01-02 22:04  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	[no log message]
    -	
    -2000-01-02 20:31  jesse
    -
    -	* lib/RT/: ACE.pm, Area.pm, Queue.pm, Record.pm, Ticket.pm,
    -	Transaction.pm, User.pm:
    -
    -	work on a buit more abstraction
    -	
    -2000-01-01 19:01  jesse
    -
    -	* etc/schema.mysql, lib/RT/ACE.pm, lib/RT/Ticket.pm,
    -	lib/RT/User.pm:
    -
    -	work on Ticket.pm, schema.
    -	things are starting to use immutable ids when referring to other tables.
    -	
    -1999-12-30 02:13  jesse
    -
    -	* Makefile, etc/schema.mysql, lib/RT/Queue.pm, lib/RT/Record.pm,
    -	lib/RT/User.pm:
    -
    -	reworked things to use autoloaded functions.
    -	
    -1999-12-29 00:24  jesse
    -
    -	* Makefile, bin/rtmux.pl, etc/schema.mysql, lib/RT/ACE.pm,
    -	lib/RT/Area.pm, lib/RT/Queue.pm, lib/RT/Record.pm,
    -	lib/RT/Ticket.pm, lib/RT/Transaction.pm, lib/RT/User.pm:
    -
    -	lots of changes. some of them not quite done perfectly.
    -	but admin is closer
    -	
    -1999-12-28 01:39  jesse
    -
    -	* bin/rtmux.pl, etc/config.pm, lib/RT/ACE.pm, lib/RT/ACL.pm,
    -	lib/RT/Area.pm, lib/RT/Areas.pm, lib/RT/Notification.pm,
    -	lib/RT/Queue.pm, lib/RT/Queues.pm, lib/RT/Record.pm,
    -	lib/RT/Ticket.pm, lib/RT/Tickets.pm, lib/RT/Transaction.pm,
    -	lib/RT/Transactions.pm, lib/RT/User.pm, lib/RT/Users.pm:
    -
    -	rtadmin will now invoke and exit.
    -	
    -1999-12-27 19:54  jesse
    -
    -	* Makefile, bin/initacls.mysql, bin/rtmux.pl, etc/acl.mysql,
    -	etc/config.pm, lib/RT/Record.pm:
    -
    -	first steps toward runability
    -	
    -1999-12-27 01:51  jesse
    -
    -	* Makefile, bin/rtmux.pl, etc/config.pm:
    -
    -	trying to get the config worked out
    -	
    -1999-12-26 21:58  jesse
    -
    -	* Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:55  jesse
    -
    -	* Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:53  jesse
    -
    -	* Makefile, Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:51  jesse
    -
    -	* Makefile, Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:45  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:42  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:34  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 21:19  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-12-26 18:35  jesse
    -
    -	* Makefile:
    -
    -	work on the makefile
    -	
    -1999-12-26 17:42  jesse
    -
    -	* lib/RT/User.pm:
    -
    -	more fixes for the new Handle object
    -	
    -1999-12-26 17:03  jesse
    -
    -	* bin/rtmux.pl, lib/RT/ACL.pm, lib/RT/Areas.pm, lib/RT/Queues.pm,
    -	lib/RT/Tickets.pm, lib/RT/Transactions.pm, lib/RT/Users.pm:
    -
    -	more work on making everything use DBIx::Handle
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Ticket.pm:
    -
    -	file Ticket.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Queue.pm:
    -
    -	file Queue.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Transaction.pm:
    -
    -	file Transaction.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Notification.pm:
    -
    -	file Notification.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/ACE.pm:
    -
    -	file ACE.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Areas.pm:
    -
    -	file Areas.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/ACL.pm:
    -
    -	file ACL.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Users.pm:
    -
    -	file Users.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Database.pm:
    -
    -	file Database.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Tickets.pm:
    -
    -	file Tickets.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Queues.pm:
    -
    -	file Queues.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Transactions.pm:
    -
    -	file Transactions.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Area.pm:
    -
    -	file Area.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/: ACE.pm, ACL.pm, Area.pm, Areas.pm, Database.pm,
    -	Notification.pm, Queue.pm, Queues.pm, Record.pm, Ticket.pm,
    -	Tickets.pm, Transaction.pm, Transactions.pm, User.pm, Users.pm:
    -
    -	moving things to a more sane directory
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/Record.pm:
    -
    -	file Record.pm was initially added on branch rt-1-1.
    -	
    -1999-12-26 15:58  jesse
    -
    -	* lib/RT/User.pm:
    -
    -	file User.pm was initially added on branch rt-1-1.
    -	
    -1999-12-23 01:05  jesse
    -
    -	* Makefile, NEWS:
    -
    -	23 Dec 1999
    -	-----------
    -	
    -	* Enabled a status = unresolved option for the web ui. thanks to
    -	  brandon allbery  and Marion Hakanson 
    -	
    -	* Made most of the permissions and directory changes from Marion
    -	  Hakanson  generally cleaned things up. but DID not
    -	  include the changes to the directory creation, file copying and permission
    -	  fixing code to enable RT_VAR_DIR
    -	
    -	* Made the web ui use $MESSAGE_FONT when putting up the compose window.
    -	    Marion Hakanson 
    -	
    -	* Genericised the templates to not mention the mythical "systems group"
    -	
    -1999-12-19 01:54  jesse
    -
    -	* Makefile, etc/schema.mysql:
    -
    -	work on ticket, transaction.
    -	schema cleanup
    -	
    -1999-12-18 13:25  jesse
    -
    -	* etc/schema:
    -
    -	removed obsolete schema
    -	
    -1999-12-17 01:28  jesse
    -
    -	* Makefile:
    -
    -	set version
    -	
    -1999-12-17 01:27  jesse
    -
    -	* etc/: config.pm, schema.mysql:
    -
    -	more cleanup. we're getting there. just another zillion hours or so
    -	
    -1999-12-15 23:56  jesse
    -
    -	* docs/: FAQ, FAQ.html:
    -
    -	faq updates committed
    -	
    -1999-12-15 23:26  jesse
    -
    -	* README:
    -
    -	updates to tobix' additions
    -	
    -1999-12-15 18:32  tobiasb
    -
    -	* README:
    -
    -	duh
    -	
    -1999-12-15 18:04  tobiasb
    -
    -	* README:
    -
    -	Some few pitfalls mentionated
    -	
    -1999-12-09 00:38  jesse
    -
    -	* etc/schema.mysql:
    -
    -	work on Ticket and Transaction.
    -	we're getting there.
    -	
    -1999-12-08 03:40  tobiasb
    -
    -	* etc/suidrt.c:
    -
    -	bugfixes
    -	
    -1999-12-06 21:41  jesse
    -
    -	* Makefile, NEWS:
    -
    -	[no log message]
    -	
    -1999-12-06 06:27  tobiasb
    -
    -	* Makefile:
    -
    -	insignificant output fix
    -	
    -1999-12-04 03:30  jesse
    -
    -	* NEWS, etc/schema.mysql:
    -
    -	[no log message]
    -	
    -1999-12-04 01:46  jesse
    -
    -	* NEWS:
    -
    -	Fixed tobix-induced bug in lib/rt/database/manipulate.pm
    -	that'll teach him to make untested fixes to the stable branch.
    -	
    -1999-12-02 13:18  tobiasb
    -
    -	* etc/schema:
    -
    -	I'm unfortunately not even half on the way in my merging. I'm in a hurry, some small notes:
    -	
    -	1.1:
    -	- work on dependencies done
    -	- work on mail distribution done.
    -	- requires sub dist_list
    -	- requires sub open_parents
    -	- requires sub add_link
    -	
    -	Dependencies & linking in general.
    -	
    -	Mail distribution. The distribution list is set by a &dist_list
    -	sub. The transaction mail is never sent out for comments and
    -	correspondence, but people who subscribe all transactions will get the
    -	comments and correspondence.
    -	
    -1999-12-02 03:10  tobiasb
    -
    -	* etc/mysql.acl:
    -
    -	This file is renamed
    -	
    -1999-12-02 03:05  tobiasb
    -
    -	* etc/: schema.Pg, schema.mysql:
    -
    -	This file was fucked up, I don't know why. I'll just truncate it for now
    -	
    -1999-12-02 02:56  jesse
    -
    -	* Makefile:
    -
    -	bumped version
    -	
    -1999-12-02 02:54  tobiasb
    -
    -	* etc/schema:
    -
    -	Added links (dependency + knowledge db)
    -	
    -1999-12-02 01:42  jesse
    -
    -	* Makefile:
    -
    -	some makefile cleanup
    -	
    -1999-12-01 23:16  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-12-01 23:10  jesse
    -
    -	* bin/rtmux.pl, etc/schema.mysql:
    -
    -	mots of work on the new backend.
    -	cliadmin is mostly up to date.
    -	no, i haven't run any of the code :)
    -	
    -1999-11-30 21:52  jesse
    -
    -	* etc/: acl.Pg, schema.mysql:
    -
    -	[no log message]
    -	
    -1999-11-23 17:21  jesse
    -
    -	* docs/design_docs/CARS:
    -
    -	file CARS was initially added on branch rt-1-1.
    -	
    -1999-11-23 17:21  jesse
    -
    -	* README, docs/design_docs/CARS, etc/schema.mysql:
    -
    -	schema hacking for rt-1-1 features.
    -	
    -1999-11-18 21:40  jesse
    -
    -	* Makefile, Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1999-11-17 17:36  tobiasb
    -
    -	* NEWS:
    -
    -	merged in changes from 1.0
    -	
    -1999-11-16 23:09  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-11-08 20:54  jesse
    -
    -	* NEWS:
    -
    -	fixed a longstanding bug in cli/query
    -	
    -1999-11-08 18:02  jesse
    -
    -	* Makefile, NEWS, etc/config.pm:
    -
    -	[no log message]
    -	
    -1999-11-05 03:50  tobiasb
    -
    -	* Makefile, NEWS, README, bin/initacls.mysql, bin/initdb.mysql,
    -	etc/acl.mysql, etc/config.pm:
    -
    -	patch from khamer integrated - no testing done, however
    -	
    -1999-10-22 14:09  tobiasb
    -
    -	* etc/schema:
    -
    -	merged 1.1-changes
    -	
    -1999-10-22 12:14  tobiasb
    -
    -	* NEWS, etc/mysql.acl, etc/schema:
    -
    -	Merged in changes from 1.0. I haven't checked that things works quite well, anyway.
    -	
    -1999-10-21 16:21  jesse
    -
    -	* Makefile, NEWS:
    -
    -	changes to date_diff, some of the oldest code in RT
    -	
    -1999-10-21 07:07  tobiasb
    -
    -	* docs/actions.txt, docs/admin.txt, docs/attributes.txt,
    -	docs/outline.txt, docs/rt_users_guide.html, etc/config.pm:
    -
    -	merged from 1.0
    -	
    -1999-10-20 23:16  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-10-20 22:25  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-10-20 21:58  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-10-20 21:43  jesse
    -
    -	* Makefile, NEWS:
    -
    -	[no log message]
    -	
    -1999-10-20 10:33  tobiasb
    -
    -	* Makefile, NEWS, README, README.91UPGRADE, TODO,
    -	bin/initacls.mysql, bin/initdb.mysql, docs/README.docs:
    -
    -	Merged 1.0-development into 1.1
    -	
    -1999-10-20 01:23  jesse
    -
    -	* Makefile, NEWS:
    -
    -	
    -	20 Oct 1999
    -	-----------
    -	* RT now uses a queue's mail alias when sending mail.
    -	
    -1999-10-20 00:44  jesse
    -
    -	* Makefile, NEWS:
    -
    -	
    -	20 Oct 1999
    -	-----------
    -	
    -	* Using the web UI to send correspondence should no longer not
    -	  sent the correspondence if there are CCs, BCCs or the actor is
    -	  the same as the requestor. thanks to  for
    -	  pointing out the deficiency.
    -	
    -1999-10-13 19:32  jesse
    -
    -	* Makefile, TODO:
    -
    -	Released version 1.0 Updated the TODO file.
    -	
    -1999-10-06 18:01  jesse
    -
    -	* Makefile:
    -
    -	bumped version
    -	
    -1999-10-06 17:57  jesse
    -
    -	* Makefile, NEWS, README, docs/README.docs:
    -
    -	[no log message]
    -	
    -1999-10-06 17:48  jesse
    -
    -	* docs/: FAQ, FAQ.html, README.docs, actions.html, actions.txt,
    -	admin.html, admin.txt, attributes.html, attributes.txt,
    -	outline.html, outline.txt, rt_users_guide.html:
    -
    -	major documentation updates from mbrader
    -	
    -1999-10-04 14:22  jesse
    -
    -	* Makefile, NEWS:
    -
    -	bumped the version to 1.0.0pre2
    -	
    -1999-10-01 01:39  jesse
    -
    -	* Makefile:
    -
    -	fixed a makefile typo
    -	
    -1999-10-01 01:37  jesse
    -
    -	* NEWS, README, README.91UPGRADE:
    -
    -	updated readme
    -	
    -1999-10-01 01:07  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-10-01 00:22  jesse
    -
    -	* NEWS, etc/config.pm:
    -
    -	
    -	30 Sep 1999
    -	-----------
    -	
    -	*  Fixed a bug which caused RT to go crazy when comments were submitted
    -	   by may without a ticket #.
    -	
    -	The following changes are from johnl@microware.com
    -	
    -	   1. Directories were not getting created with the correct modes under            /usr/local/rt/transactions.                                                         The umask() takes an octal file mode mask, not a file mode.                                                                                                     In addition I read the comments about $dirmode not working when             doing the mkdir's in content.pm.  I also fixed content.pm to use                $dirmode.  The main problem was the $dirmode was being set to a string          instead of an octal number.
    -	
    -	  Fixes to database.pm
    -	    1.  The first hunk fixes problem where the call to write_content is             passing $time.  This variable does not exist.   It looked like $time was        supposed to be the current time.  ($time always == 0).  I changed all           occurances of $time to time (IE: time()).                                                                                                                       2.  The first hunk also passes $in_time instead of $time.                                                                                                       3.  The rest of the hunks fix $time and replace them with time().
    -	
    -	27 Sep 1999
    -	-----------
    -	Fixed a bug which caused the priority not to get set to the default
    -	when requests were created in the webui. Thanks to 
    -	
    -1999-09-23 23:16  anoncvs
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-09-23 23:09  anoncvs
    -
    -	* Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1999-09-23 23:07  anoncvs
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-09-23 23:01  anoncvs
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-09-23 22:52  anoncvs
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-08-08 22:20  tobiasb
    -
    -	* etc/schema:
    -
    -	ups
    -	
    -1999-08-07 02:27  tobiasb
    -
    -	* etc/schema:
    -
    -	in-work
    -	
    -1999-08-04 02:48  tobiasb
    -
    -	* Makefile, NEWS:
    -
    -	Merge
    -	
    -1999-08-03 22:38  jesse
    -
    -	* NEWS:
    -
    -	first cut of -trans
    -	
    -1999-08-03 22:27  jesse
    -
    -	* Makefile, NEWS:
    -
    -	reved the version to .99.9. tiny mail manipulate fix
    -	
    -1999-08-03 11:31  tobiasb
    -
    -	* bin/initdb.mysql:
    -
    -	file initdb.mysql was initially added on branch rt-1-1.
    -	
    -1999-08-03 11:31  tobiasb
    -
    -	* bin/initdb.Pg:
    -
    -	file initdb.Pg was initially added on branch rt-1-1.
    -	
    -1999-08-03 11:31  tobiasb
    -
    -	* bin/initacls.mysql:
    -
    -	file initacls.mysql was initially added on branch rt-1-1.
    -	
    -1999-08-03 11:31  tobiasb
    -
    -	* bin/: initacls.Pg, initacls.mysql, initdb.Pg, initdb.mysql:
    -
    -	Scripts for initing the DB
    -	
    -1999-08-03 11:31  tobiasb
    -
    -	* bin/initacls.Pg:
    -
    -	file initacls.Pg was initially added on branch rt-1-1.
    -	
    -1999-08-03 10:31  tobiasb
    -
    -	* etc/schema.mysql:
    -
    -	file schema.mysql was initially added on branch rt-1-1.
    -	
    -1999-08-03 10:31  tobiasb
    -
    -	* etc/schema.Pg:
    -
    -	file schema.Pg was initially added on branch rt-1-1.
    -	
    -1999-08-03 10:31  tobiasb
    -
    -	* etc/acl.mysql:
    -
    -	file acl.mysql was initially added on branch rt-1-1.
    -	
    -1999-08-03 10:31  tobiasb
    -
    -	* etc/acl.Pg:
    -
    -	file acl.Pg was initially added on branch rt-1-1.
    -	
    -1999-08-03 10:31  tobiasb
    -
    -	* Makefile, etc/acl.Pg, etc/acl.mysql, etc/mysql.acl, etc/schema,
    -	etc/schema.Pg, etc/schema.mysql:
    -
    -	More work on the move to a DBMS-independent RT. The Makefile and executables _really_ need some testing and eventually debugging.
    -	
    -1999-08-03 02:14  tobiasb
    -
    -	* Makefile, etc/config.pm:
    -
    -	It seems to me that I've somehow managed to go to DBI...WebRT seems to work locally, but that's the only testing I've done
    -	
    -1999-08-02 07:07  tobiasb
    -
    -	* etc/schema:
    -
    -	in-work
    -	
    -1999-07-29 02:55  tobiasb
    -
    -	* etc/schema:
    -
    -	uuuurghh
    -	
    -1999-07-28 10:42  tobiasb
    -
    -	* README:
    -
    -	One small update on the work to link requests...
    -	
    -1999-07-27 07:08  tobiasb
    -
    -	* NEWS:
    -
    -	1.0-gospel
    -	
    -1999-07-27 06:48  tobiasb
    -
    -	* etc/schema:
    -
    -	asdfjlsadfhjkhdfawhi
    -	
    -1999-07-26 21:21  jesse
    -
    -	* Makefile, NEWS:
    -
    -	fixes to the mail gateway header handling
    -	added cli rtq flags to the help
    -	
    -1999-07-26 07:03  tobiasb
    -
    -	* NEWS:
    -
    -	Merge
    -	
    -1999-07-24 20:43  jesse
    -
    -	* Makefile:
    -
    -	bumpted the version
    -	
    -1999-07-24 20:40  jesse
    -
    -	* NEWS:
    -
    -	added a few options to the cli query engine. area limitying and display of due dates.
    -	
    -1999-07-23 03:20  tobiasb
    -
    -	* NEWS:
    -
    -	Some merges
    -	
    -1999-07-23 02:56  tobiasb
    -
    -	* etc/schema:
    -
    -	With generic links
    -	
    -1999-07-22 23:13  jesse
    -
    -	* Makefile, NEWS:
    -
    -	22 Jul 99 (Jesse)
    -	-----------------
    -	Inital cleanup to the web ticket view. I'd like to significantly
    -	compact and simplify that display.  More tables are probably in
    -	order.  Additionally, I want to get rid of all those buttons "I
    -	changed this." There's just no need for them. we can write logic
    -	to do that for us.  Also, I bumped the version to 1.1.1.  I'd like
    -	to do this 'linux-kernel-esque' The 1.1.x
    -	series will be a development series leading toward 1.2.  Once we
    -	get the DB changes in, I'll feel comfortable rolling a 'releaseable'
    -	1.1 version for people who like pain.
    -	
    -1999-07-21 23:47  jesse
    -
    -	* Makefile, NEWS:
    -
    -	21 July 1999
    -	------------
    -	
    -	Fix for [fsck #102] Better checks in is_not_a_requestor. this should fix
    -	        issues with external users being equated with queue members.
    -	
    -	Fix for [fsck #114] Comment from bin/rt was accidentaly access controlled.
    -	
    -	Fix for [fsck #113] Display of requests users can't manipulate should now give
    -	        ian error
    -	
    -1999-07-20 23:40  tobiasb
    -
    -	* etc/schema:
    -
    -	For a general way of linking WebRT requests to other web-based DBs
    -	
    -1999-07-20 21:42  tobiasb
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-07-20 21:11  tobiasb
    -
    -	* NEWS:
    -
    -	Hmf.
    -	
    -1999-07-20 21:07  tobiasb
    -
    -	* README, etc/config.pm:
    -
    -	updated for Internet::Mail
    -	
    -1999-07-20 21:01  tobiasb
    -
    -	* Makefile:
    -
    -	updated for Internet::Mail
    -	
    -1999-07-20 01:21  jesse
    -
    -	* NEWS:
    -
    -	Fix for [fsck #88] WebUI area SELECT bug.
    -	
    -	Fix for [fsck #90] A small html bug in WebRT
    -	
    -	Fix for [fsck #92] "Allow non-members to create requests" appeared twice
    -	        in the WebAdmin
    -	
    -	Fix for [fsck #94] web ui forms are now 78 chars wide
    -	
    -1999-07-20 00:09  jesse
    -
    -	* NEWS:
    -
    -	19 July 1999
    -	------------
    -	Fix for [fsck #104]  We no longer try to reset the user's uid after writing
    -	        transaction content to the filesystem. This should help out Net/OpenBSD
    -	        compatibility
    -	
    -	Removed some legacy support for glimpse searching
    -	
    -	Fix for [fsck #115] The web ticket list should now wrap reasonably, so it's
    -	        printable.
    -	
    -1999-07-19 03:26  tobiasb
    -
    -	* NEWS:
    -
    -	some updates
    -	
    -1999-07-17 13:14  tobiasb
    -
    -	* NEWS:
    -
    -	Updated a bit
    -	
    -1999-07-16 23:42  tobiasb
    -
    -	* Makefile:
    -
    -	Version number 1.pre1.1 - what do you think about it?
    -	
    -1999-07-16 22:49  tobiasb
    -
    -	* bin/rtmux.pl:
    -
    -	Filled in a missing comment
    -	
    -1999-07-16 22:46  tobiasb
    -
    -	* Makefile:
    -
    -	Set version to 1.1.0pre1, and changed /opt/rt to /usr/local/rt, I'd
    -	daresay the next is more widely preffered.
    -	
    -1999-07-16 18:36  tobiasb
    -
    -	* COPYING, Makefile, NEWS, README, README.91UPGRADE, TODO,
    -	bin/rtmux.pl, docs/FAQ, docs/FAQ.html, docs/README.docs,
    -	docs/actions.html, docs/actions.txt, docs/admin.html,
    -	docs/admin.txt, docs/attributes.html, docs/attributes.txt,
    -	docs/outline.html, docs/outline.txt, etc/config.pm, etc/mysql.acl,
    -	etc/schema, etc/suidrt.c:
    -
    -	Imported Tobix' current version
    -	
    -1999-07-08 02:10  jesse
    -
    -	* Makefile, NEWS, TODO:
    -
    -	Rolled .99.8
    -	
    -1999-07-07 15:37  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-07-07 00:45  jesse
    -
    -	* Makefile, NEWS:
    -
    -	updated makefile and news.
    -	
    -1999-07-06 22:58  jesse
    -
    -	* NEWS:
    -
    -	6 Jul 99
    -	--------
    -	Now, if you move a request to a new queue, it won't disown it if the same person can own reqs in the new queue. [fsck #75] (untested)
    -	
    -	Fixed a problem with cli create not properly handling due dates ([fsck #67])
    -	Fixed a duplicate --help entry for bin/rt [fsck #69]
    -	Fixed bugs fsck  #68/77: Odness Merging RT requests
    -	
    -	Transactions from merged requests will now be displayed along with the request id of the request that transaction was originially associated with.
    -	
    -	Fixed [fsck #74], which was reported by charlie brady:
    -	   Messages are sent out from the mail interface with content first, then
    -	   "--- Headers Follow ---", then the headers. In our vanilla sendmail setup,
    -	   before the headers is a UUCP style deliver notification "From blah Tue Jul
    -	   6 18:13:01 1999" line. This is interpreted by many mail agents as a
    -	   message delimiter, so that what is seen in the mail agent is not one, but
    -	   two messages. This is easily fixed by using the conventional quoting
    -	   mechanism...
    -	Fixed [fsck #71] WebRT: "User" should be "Requestor"
    -	
    -1999-07-06 21:35  jesse
    -
    -	* NEWS:
    -
    -	resovled #71, #74. worked on merge functionality
    -	
    -1999-06-29 17:39  jesse
    -
    -	* Makefile, NEWS:
    -
    -	[no log message]
    -	
    -1999-06-29 17:20  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-06-24 00:52  jesse
    -
    -	* Makefile, NEWS, README, TODO:
    -
    -	lots of touchups.
    -	
    -1999-06-23 23:29  jesse
    -
    -	* NEWS:
    -
    -	moved to CGI.pm's form parser.
    -	
    -1999-06-17 01:49  jesse
    -
    -	* NEWS:
    -
    -	edited news
    -	
    -1999-06-16 23:21  jesse
    -
    -	* Makefile, NEWS:
    -
    -	Fixed an auth bug.
    -	
    -1999-06-15 02:13  jesse
    -
    -	* Makefile:
    -
    -	upped the version to .99.8pre5
    -	
    -1999-06-15 02:09  jesse
    -
    -	* Makefile, NEWS:
    -
    -	lots of misc changes. see the diff to the news file
    -	
    -1999-05-12 20:37  jesse
    -
    -	* Makefile, NEWS:
    -
    -	cookies hacked to deal with the fact that netscape can't handle path=/
    -	
    -1999-05-12 01:57  jesse
    -
    -	* Makefile:
    -
    -	bumped the version number to .99.8pre3
    -	
    -1999-05-12 01:56  jesse
    -
    -	* NEWS:
    -
    -	Made error messages on the web admin interface more prominent.
    -	
    -	All the following changes are from tobix:
    -	
    -		Correspondence from RT now properly reflect the name of the sender
    -		in the "from" header.
    -	
    -		Automated messages now properly have a "Precedence: bulk" header
    -	
    -		A stupid error with rt::mail_alias has been fixed
    -	
    -		Tobix' patch removes headers from all correspondence.  I'm relatively
    -		afraid of this change, so I'm going to comment it out for now.
    -	
    -		rtadmin (the commandline has a new tool) :
    -		     -update   []  updates user(s) from the
    -	                   /etc/passwd file. If no users are specified, ALL
    -	                   of /etc/passwd will be processed.
    -	
    -1999-05-11 16:46  jesse
    -
    -	* Makefile, NEWS, README:
    -
    -	mail loop fix from toby
    -	
    -1999-05-09 20:35  jesse
    -
    -	* Makefile:
    -
    -	bumped version numbers
    -	
    -1999-05-09 20:35  jesse
    -
    -	* Makefile, NEWS, README:
    -
    -	updated makefile and news
    -	
    -1999-05-09 20:17  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	modifications to cookies support to md5 hash the password.
    -	modification to allow non-nph web ui
    -	
    -1999-05-05 02:39  jesse
    -
    -	* NEWS:
    -
    -	fixed some cookies/frames problems
    -	
    -1999-05-05 02:10  jesse
    -
    -	* Makefile, NEWS:
    -
    -	fixed bugs in web auth from charlie brady
    -	
    -1999-05-03 21:44  jesse
    -
    -	* Makefile:
    -
    -	bumped the version #
    -	
    -1999-04-28 16:03  jesse
    -
    -	* Makefile:
    -
    -	bumped version
    -	
    -1999-04-28 16:03  jesse
    -
    -	* NEWS:
    -
    -	updated content.pm to spit errors.
    -	
    -1999-04-27 02:58  jesse
    -
    -	* Makefile:
    -
    -	downed the makefile version
    -	
    -1999-04-27 02:57  jesse
    -
    -	* Makefile:
    -
    -	fixed a makefile bug
    -	
    -1999-04-26 21:57  jesse
    -
    -	* NEWS, README:
    -
    -	added configuration info about mod_auth_mysql
    -	
    -1999-04-26 21:45  jesse
    -
    -	* Makefile, etc/config.pm:
    -
    -	Updated authetication stuff with patches from ingo. updated them further.
    -	Added the ability to configure whether external authentication is done for webrt
    -	added the ability to turn off ie compatibility mode
    -	
    -1999-04-23 19:31  jesse
    -
    -	* Makefile, NEWS, README, TODO:
    -
    -	started to update the README and Makefile
    -	
    -1999-04-13 04:00  jesse
    -
    -	* Makefile:
    -
    -	fixed totally fuxored makefile
    -	
    -1999-04-13 03:28  jesse
    -
    -	* README:
    -
    -	noted that there's a dependency on gnu make
    -	
    -1999-04-13 03:07  jesse
    -
    -	* Makefile:
    -
    -	bumped version
    -	
    -1999-04-13 03:06  jesse
    -
    -	* NEWS:
    -
    -	updated news
    -	
    -1999-04-08 04:36  jesse
    -
    -	* docs/rt.gif:
    -
    -	added the gif to the docs
    -	
    -1999-04-08 04:35  jesse
    -
    -	* NEWS:
    -
    -	fixes for new mysql modules
    -	
    -1999-04-07 23:57  jesse
    -
    -	* NEWS:
    -
    -	updates
    -	
    -1999-04-07 02:14  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-04-07 02:09  jesse
    -
    -	* Makefile, README:
    -
    -	fixes for cookie auth from charlie brady
    -	
    -1999-04-06 06:30  jesse
    -
    -	* Makefile, NEWS, README:
    -
    -	misc changes to support cookie authentication
    -	
    -1999-04-03 04:57  jesse
    -
    -	* NEWS, docs/FAQ, docs/FAQ.html, docs/README.docs,
    -	docs/actions.html, docs/actions.txt, docs/admin.html,
    -	docs/admin.txt, docs/attributes.html, docs/attributes.txt,
    -	docs/outline.html, docs/outline.txt:
    -
    -	major update of the docs from adam.
    -	
    -1999-04-03 04:49  jesse
    -
    -	* Makefile:
    -
    -	makefile hackery to ease installs slightly.
    -	
    -1999-03-21 20:24  jesse
    -
    -	* Makefile:
    -
    -	updated makefile
    -	
    -1999-03-21 20:22  jesse
    -
    -	* NEWS, README:
    -
    -	mail changes
    -	
    -1999-03-08 14:50  jesse
    -
    -	* NEWS:
    -
    -	turned off the troll
    -	
    -1999-03-08 14:02  jesse
    -
    -	* Makefile:
    -
    -	fixed makefile bogosity for ACLs
    -	
    -1999-03-04 01:50  jesse
    -
    -	* Makefile, NEWS:
    -
    -	fixed a subject line parsing error.
    -	
    -1999-02-26 22:29  jesse
    -
    -	* NEWS:
    -
    -	added a check to make sure you don't merge ar equest into a non-existent other request
    -	
    -1999-02-26 21:43  jesse
    -
    -	* README.91UPGRADE, README.FIRST, TODO:
    -
    -	moved readme.fdirst to readmne.91upgrade
    -	
    -1999-02-26 19:59  jesse
    -
    -	* Makefile, NEWS:
    -
    -	updated makefile: added upgrade-noclobber
    -	
    -1999-02-24 19:11  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-02-23 14:41  jesse
    -
    -	* NEWS:
    -
    -	updated bnews
    -	
    -1999-02-23 03:20  jesse
    -
    -	* docs/: actions.txt, admin.txt, attributes.txt:
    -
    -	added updates for adam for the docs.
    -	
    -	updated the news
    -	
    -1999-02-23 03:20  jesse
    -
    -	* NEWS:
    -
    -	updated the news
    -	
    -1999-02-21 01:56  jesse
    -
    -	* Makefile:
    -
    -	fixed the .4
    -	
    -1999-02-21 01:53  jesse
    -
    -	* Makefile:
    -
    -	fixed make pre
    -	
    -1999-02-20 23:27  jesse
    -
    -	* Makefile:
    -
    -	addded back predist
    -	
    -1999-02-20 16:36  jesse
    -
    -	* NEWS:
    -
    -	edited the news to reflect changes
    -	
    -1999-02-20 14:56  jesse
    -
    -	* Makefile, NEWS:
    -
    -	bumped the version to .99.4 for testing.
    -	
    -1999-02-20 14:48  jesse
    -
    -	* etc/mysql.acl:
    -
    -	updated acls so they'll work with newer versions of mysql 3.22
    -	
    -1999-01-20 02:21  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1999-01-20 02:13  jesse
    -
    -	* Makefile:
    -
    -	On another note, here is a fix for the "HTML turd" reported by Benji
    -	Cline in lib/rt/ui/web/forms.pm:
    -	==========                                                                      diff -r0.99.2 forms.pm
    -	87c87                                                                           <               $u = 0;
    -	---                                                                             >               $u = 1;
    -	91c91                                                                           <                       $u = 1;                                                 ---                                                                             >                       $u = 0;
    -	==========
    -	
    -	With this patch applied, v0.99.2 (0.99.3?)                                      appears to be as solid as v0.9.18, if not more
    -	so.
    -	
    -	Upgraded the version to .99.3
    -	
    -1999-01-16 20:44  jesse
    -
    -	* NEWS:
    -
    -	[no log message]
    -	
    -1999-01-16 20:39  jesse
    -
    -	* Makefile:
    -
    -	fixed a web acls bug. incremented the version.
    -	
    -1999-01-16 01:22  jesse
    -
    -	* Makefile:
    -
    -	bumped version to .99.1
    -	
    -1999-01-16 01:20  jesse
    -
    -	* Makefile, NEWS:
    -
    -	fixed some web admin sillyness..acls work better.
    -	we no longer dump back to the main menu quite as gratuitously.
    -	acls are no longer broken on the CLI either.
    -	
    -1998-12-16 01:31  jesse
    -
    -	* Makefile:
    -
    -	fixed the following things:
    -	
    -	From owner-rt-users@horked.fsck.com  Tue Nov 24 02:24:03 1998
    -	Return-Path: 
    -	Received: (from majordomo@localhost)
    -		by horked.fsck.com (8.8.7/8.8.7) id CAA11181
    -		for rt-users-outgoing; Tue, 24 Nov 1998 02:24:01 -0500
    -	X-Authentication-Warning: horked.fsck.com: majordomo set sender to owner-rt-users@lists.fsck.com using -f
    -	Received: from modgud.nordicdms.com (h21-168-107.nordicdms.com [207.21.168.107] (may be forged))
    -		by horked.fsck.com (8.8.7/8.8.7) with SMTP id CAA11177
    -		for ; Tue, 24 Nov 1998 02:23:58 -0500
    -	Received: (qmail 6211 invoked by alias); 24 Nov 1998 07:25:59 -0000
    -	Message-ID: <19981124072559.6209.qmail@modgud.nordicdms.com>
    -	Received: (qmail 6197 invoked from network); 24 Nov 1998 07:25:59 -0000
    -	Received: from mail-ftp.nordicdms.com (HELO mail-ftp) (207.21.168.100)
    -	  by mail.nordicdms.com with SMTP; 24 Nov 1998 07:25:59 -0000
    -	From: "Dave Walton" 
    -	Organization: Nordic Entertainment Worldwide
    -	To: Jesse , rt-users@lists.fsck.com
    -	Date: Mon, 23 Nov 1998 23:25:58 -0800
    -	MIME-Version: 1.0
    -	Content-type: text/plain; charset=US-ASCII
    -	Content-transfer-encoding: 7BIT
    -	Subject: Two bugfixes
    -	Reply-to: walton@nordicdms.com
    -	In-reply-to: <19981013013318.H18644@horked.fsck.com>
    -	References: <19981013042506.9798.qmail@modgud.nordicdms.com>; from Dave Walton on Mon, Oct 12, 1998 at 09:25:06PM -0700
    -	X-mailer: Pegasus Mail for Win32 (v3.01d)
    -	Sender: owner-rt-users@lists.fsck.com
    -	Precedence: bulk
    -	
    -	1.  A backwards search was causing lib/rt/ui/web/support.pm to
    -	crash when data that looks like an invalid regex is present in the
    -	message headers.
    -	------------------------------------------------------------
    -	# diff support.old.pm support.pm
    -	44c44
    -	<               ($headers_ignore !~ /$field/i)) {
    -	---
    -	>               ($field !~ /$headers_ignore/i)) {
    -	------------------------------------------------------------
    -	
    -	2.  HTML buglet in lib/rt/ui/web/manipulate.pm.
    -	------------------------------------------------------------
    -	# diff manipulate.old.pm manipulate.pm
    -	894c894
    -	< 
    -	---
    -	> 
    -	------------------------------------------------------------
    -	
    -	Dave
    -	
    -	----------------------------------------------------------------------
    -	Dave Walton
    -	Webmaster, Postmaster                   Nordic Entertainment Worldwide
    -	walton@nordicdms.com                          http://www.nordicdms.com
    -	----------------------------------------------------------------------
    -	
    -	From benji@hnt.com  Fri Nov 20 14:28:44 1998
    -	Return-Path: 
    -	Received: from horked.fsck.com (jesse@localhost [127.0.0.1])
    -		by horked.fsck.com (8.8.7/8.8.7) with ESMTP id OAA04739
    -		for ; Fri, 20 Nov 1998 14:28:44 -0500
    -	Received: from mail.wesleyan.edu
    -		by horked.fsck.com (fetchmail-4.3.2 POP3 run by jrvincent)
    -		for  (single-drop); Fri Nov 20 14:28:44 1998
    -	Received: from columbus.hnt.com (columbus.hnt.com [208.221.11.10]) by mail.wesleyan.edu (8.8.6/8.7.3) with ESMTP id OAA18408 for ; Fri, 20 Nov 1998 14:30:34 -0500 (EST)
    -	Received: from peppermint.hnt.com (peppermint.hnt.com [208.221.11.51])
    -		by columbus.hnt.com (8.9.1/8.9.1/HnT-980729) with ESMTP id OAA26134
    -		for ; Fri, 20 Nov 1998 14:30:32 -0500 (EST)
    -	Received: from localhost by peppermint.hnt.com (8.9.1/8.9.1/HnT-nullclient-980724) with ESMTP id OAA02733
    -		for ; Fri, 20 Nov 1998 14:30:32 -0500 (EST)
    -	X-Authentication-Warning: peppermint.hnt.com: benji owned process doing -bs
    -	Date: Fri, 20 Nov 1998 14:30:31 -0500 (EST)
    -	From: Benjamin Cline 
    -	To: Jesse 
    -	Subject: Re: 0.9.20 is out
    -	In-Reply-To: <19981120005718.F28841@horked.fsck.com>
    -	Message-ID: 
    -	MIME-Version: 1.0
    -	Content-Type: TEXT/PLAIN; charset=US-ASCII
    -	X-UIDL: 4f1695a69f7cdbefcfce9198121fef95
    -	
    -	I think I've found a buglet in 0.9.20, I had to add an extra curly bracket
    -	("}") to the end of lib/rt/database/admin.pm (just before the "1;") to get
    -	it to work right.
    -	
    -		benji
    -	
    -	P.S. Sorry if that's not the most coherent bug report/fix, I'm afraid I'm
    -	not much of a perl hacker.
    -	
    -	On Fri, 20 Nov 1998, Jesse wrote:
    -	
    -	> ftp://horked.fsck.com/pub/rt/devel/rt-0.9.20.tar.gz
    -	>
    -	> 19 Nov 98
    -	> ---------
    -	>
    -	> Incorportated patches from Dave Walton to fix a typo, replace an
    -	> accidentally
    -	> blown away library and add a "last acted" column to the web ui.
    -	> incremented version to .9.20
    -	>
    -	>
    -	> 	jesse
    -	>
    -	> --
    -	> jesse reed vincent -- jrvincent@wesleyan.edu -- jesse@fsck.com
    -	> pgp keyprint:  50 41 9C 03 D0 BC BC C8 2C B9 77 26 6F E1 EB 91
    -	> --------------------------------------------------------------
    -	> They'll take my private key when they pry it from my cold dead fingers!
    -	>
    -	
    -	--
    -	Benjamin R. Cline       Harrison & Troxell, Inc.         benji@hnt.com
    -	                     Quis Custodiet Ipsos Custodes?
    -	
    -	From adam@baz.org  Fri Nov 13 17:07:09 1998
    -	Return-Path: 
    -	Received: from horked.fsck.com (jesse@localhost [127.0.0.1])
    -		by horked.fsck.com (8.8.7/8.8.7) with ESMTP id RAA10943
    -		for ; Fri, 13 Nov 1998 17:07:09 -0500
    -	Received: from mail.wesleyan.edu
    -		by horked.fsck.com (fetchmail-4.3.2 POP3 run by jrvincent)
    -		for  (single-drop); Fri Nov 13 17:07:09 1998
    -	Received: from impei.baz.org (adam@impei.baz.org [139.167.64.229]) by mail.wesleyan.edu (8.8.6/8.7.3) with ESMTP id RAA08425 for ; Fri, 13 Nov 1998 17:08:38 -0500 (EST)
    -	Received: (from adam@localhost)
    -		by impei.baz.org (8.8.7/8.8.8) id RAA18674
    -		for jrvincent@wesleyan.edu; Fri, 13 Nov 1998 17:08:38 -0500
    -	Message-ID: <19981113170837.A18668@baz.org>
    -	Date: Fri, 13 Nov 1998 17:08:37 -0500
    -	From: secret agent man 
    -	To: "J.R.Ewing" 
    -	Subject: RT bug, mebbe?
    -	Mime-Version: 1.0
    -	X-Mailer: Mutt 0.93.2i
    -	Content-Type: text/plain; charset=us-ascii
    -	X-UIDL: 5563064ca159a5eee88e16843932a45f
    -	
    -	 q: If you leave the field blank when clicking on "create new
    -	(queue|user) named", it goes to the create screen with an empty field that
    -	can't be filled. It should either be editable there or it should reject
    -	you.
    -	
    -	A
    -	
    -	--
    -	Everything I needed to know about life I learned       
    -	from killing smarter people and eating their brains.    adam hirsch
    -	
    -1998-11-20 00:45  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1998-11-20 00:28  jesse
    -
    -	* Makefile, NEWS:
    -
    -	19 Nov 98
    -	---------
    -	
    -	Incorportated patches from Dave Walton to fix a typo, replace an accidentally
    -	blown away library and add a "last acted" column to the web ui.
    -	incremented version to .9.20
    -	
    -1998-11-18 02:26  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1998-10-13 03:37  jesse
    -
    -	* Makefile, README, etc/mysql.acl:
    -
    -	shiny:% cat >> changes                                          ~ 10:53PM:tt
    -	2.  Made comments and replies update date_acted.
    -	
    -	        -- Dave Walton
    -	
    -	Ok.. I know this is being picky, but, in rt/lib/ui/web/support.pm, the
    -	subroutine "content_header", at line 290, should have:
    -	    print "WebRT\n";
    -	
    -	Otherwise, when running in frames, you never get a title on the page. :(
    -	
    -	No biggie...
    -	
    -	-Rich
    -	
    -	Oh, one other.
    -	
    -	8.  etc/mysql.acl, line 5
    -	The RT_MYSQL_HOST entry on that line doesn't make any sense
    -	when MySQL is on a different host than RT.  That should be
    -	RT_HOST, or some such thing.
    -	
    -	Dave
    -	
    -	After just upgrading to Apache 1.3.0 from 1.2.5, I figured I would make it
    -	known that, in the file /src/main/util_script.c, you have
    -	to define SECURITY_HOLE_PASS_AUTHORIZATION to allow for RT's authorization
    -	to work properly.
    -	-Rich
    -	
    -	On Tue, Oct 06, 1998 at 09:19:07PM -0700, Dave Walton wrote:
    -	> I just discovered that if there is an error in add_correspondence, the
    -	> mail interface discards the incoming mail without comment.  To
    -	> correct this, I took the following steps:
    -	>
    -	In mail.pm, there's a space before :
    -	
    -	From: $rt::mail_alias
    -	
    -	This causes problems in some mail clients, putting the From: line on the
    -	same line as the subject.  If the spaces are removed this is fixed.
    -	
    -	Regards,
    -	From: "Andrew Foster" 
    -	
    -1998-09-11 01:15  jesse
    -
    -	* docs/README.docs:
    -
    -	updated lists for rt docs.
    -	
    -1998-09-08 03:23  jesse
    -
    -	* NEWS:
    -
    -	updated news
    -	
    -1998-09-08 03:18  jesse
    -
    -	* Makefile, NEWS, README, etc/config.pm:
    -
    -	Final bug fixes for .9.18
    -	
    -1998-08-09 17:43  jesse
    -
    -	* NEWS, README, TODO:
    -
    -	All kinds of crazy updates for .9.18. Mostly from serge zhuk
    -	
    -1998-08-04 03:09  jesse
    -
    -	* NEWS:
    -
    -	first round of updates from serge
    -	
    -1998-06-26 17:07  jesse
    -
    -	* Makefile, NEWS:
    -
    -	modified makefile and news
    -	
    -1998-06-26 16:34  jesse
    -
    -	* docs/: README.docs, actions.txt, admin.txt, attributes.txt,
    -	outline.txt:
    -
    -	Added documentation from 
    -	
    -1998-06-25 17:06  jesse
    -
    -	* Makefile, README, etc/config.pm:
    -
    -	removed refs to glimpse
    -	
    -1998-06-25 15:46  jesse
    -
    -	* Makefile:
    -
    -	dist fixes
    -	
    -1998-06-25 15:44  jesse
    -
    -	* Makefile:
    -
    -	dist fixes
    -	
    -1998-06-25 14:09  jesse
    -
    -	* Makefile:
    -
    -	edited dist. maker
    -	
    -1998-05-21 22:40  jesse
    -
    -	* Makefile:
    -
    -	added httpd.conf configurator for cern
    -	
    -1998-04-27 20:17  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1998-04-20 14:53  jesse
    -
    -	* Makefile:
    -
    -	bumped version to .9.14.
    -	
    -1998-04-20 14:53  jesse
    -
    -	* Makefile:
    -
    -	bumped version to .9.13.1
    -	
    -1998-04-19 03:14  jesse
    -
    -	* Makefile:
    -
    -	updated version number.
    -	now explicitly create rt-etc-dir
    -	
    -1998-04-16 21:40  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	removed a spurious addition to the lib path from the mux
    -	abstracted a bunch of stuff out of the mux and throughout the makefile.
    -	like program names.
    -	
    -1998-04-16 21:39  jesse
    -
    -	* Makefile:
    -
    -	abstracted a bunch of stuff out of the mux and throughout the makefile.
    -	like program names.
    -	
    -1998-04-16 19:47  jesse
    -
    -	* COPYING, Makefile, NEWS, README, README.FIRST, TODO:
    -
    -	commiting updates
    -	
    -1998-04-08 13:35  jesse
    -
    -	* etc/config.pm:
    -
    -	fixed typos in config.pm that prevented mail from working with .9.11
    -	bumped version to .12
    -	
    -1998-04-08 13:34  jesse
    -
    -	* Makefile:
    -
    -	bumped version to .12
    -	
    -1998-04-02 21:30  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1998-04-02 21:27  jesse
    -
    -	* Makefile:
    -
    -	fixed make dist
    -	
    -1998-04-02 15:36  jesse
    -
    -	* Makefile, Makefile:
    -
    -	[no log message]
    -	
    -1998-04-02 15:29  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1998-04-02 15:25  jesse
    -
    -	* etc/config.pm:
    -
    -	split mail program and mail program flags
    -	hopefully fixed make dist
    -	
    -1998-04-02 15:25  jesse
    -
    -	* Makefile:
    -
    -	hopefully fixed make dist
    -	
    -1998-04-02 11:02  jesse
    -
    -	* Makefile, NEWS:
    -
    -	updated news
    -	
    -1998-04-02 10:55  jesse
    -
    -	* Makefile:
    -
    -	[no log message]
    -	
    -1998-04-02 10:31  jesse
    -
    -	* etc/config.pm:
    -
    -	reshuffled files that the user won't be changing out of etc and into lib
    -	this includes generic templates and images for the web ui
    -	updated src and makefiles accordingly.
    -	verbosifoed part of config.pm
    -	
    -1998-04-02 10:31  jesse
    -
    -	* Makefile:
    -
    -	reshuffled files that the user won't be changing out of etc and into lib
    -	this includes generic templates and images for the web ui
    -	updated src and makefiles accordingly.
    -	
    -1998-04-02 10:20  jesse
    -
    -	* Makefile:
    -
    -	built more auto-dist stuff
    -	
    -1998-04-02 03:22  jesse
    -
    -	* README:
    -
    -	added apache patch to readme
    -	
    -1998-04-02 03:13  jesse
    -
    -	* Makefile, README, TODO, etc/config.pm:
    -
    -	updated makefile and readme and todo
    -	added toggle for mysql 3.21
    -	moved sendmail flags to makefile for compat w 8.6
    -	
    -1998-02-08 21:12  jesse
    -
    -	* Makefile:
    -
    -	make upgrade now calls mux-install
    -	
    -1998-01-30 22:31  jesse
    -
    -	* Makefile, README, README.FIRST:
    -
    -	added bits to upgrade from .9.1
    -	made make upgrade upgrade the conf file
    -	
    -1998-01-27 01:56  jesse
    -
    -	* NEWS:
    -
    -	updated news
    -	
    -1998-01-27 01:48  jesse
    -
    -	* Makefile:
    -
    -	started a make dist
    -	
    -1998-01-26 17:59  jesse
    -
    -	* Makefile, README, README.FIRST:
    -
    -	updated readme
    -	
    -1998-01-21 18:37  jesse
    -
    -	* Makefile:
    -
    -	fixes to makefile to allow for proper specification of database as local.
    -	added "you are logged in as..." to web/support...
    -	changed sendmail options in mail.pm/
    -	
    -1998-01-14 23:49  jesse
    -
    -	* Makefile, etc/mysql.acl:
    -
    -	incremented version number
    -	
    -1998-01-09 14:48  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	added taint safeness for $ENV{'ENV}
    -	updated makefile version number
    -	
    -1998-01-09 14:47  jesse
    -
    -	* Makefile:
    -
    -	updated makefile version number
    -	
    -1998-01-08 16:17  jesse
    -
    -	* README.FIRST:
    -
    -	ipdated readme.first.
    -	
    -1998-01-08 14:53  jesse
    -
    -	* etc/suidrt.c:
    -
    -	made suidrt.c work
    -	updated the mux
    -	
    -1998-01-08 14:53  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	updated the mux
    -	
    -1998-01-08 13:10  jesse
    -
    -	* Makefile:
    -
    -	more fixes to make suid wrapper stuff work.
    -	
    -1998-01-08 12:51  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	made rtmux attempt to work with the suid wrapper
    -	
    -1998-01-08 12:48  jesse
    -
    -	* etc/suidrt.c:
    -
    -	added back suidrt.c. blech.
    -	
    -1998-01-08 12:44  jesse
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	brought back suidrt.c
    -	bleck.
    -	
    -1998-01-07 18:06  jesse
    -
    -	* Makefile:
    -
    -	added a sane mode for $(RT_PATH)
    -	
    -1998-01-07 00:37  jesse
    -
    -	* Makefile, README.FIRST:
    -
    -	added basic old upgrade instructions.
    -	added info to README.FIRST about upgrading.
    -	
    -1998-01-07 00:31  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	made mailing work.
    -	
    -1998-01-06 10:27  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	made the mux require ui::mail before it tried to invoke it.
    -	
    -1998-01-04 02:26  jesse
    -
    -	* README:
    -
    -	told users to read readme.first.
    -	
    -1998-01-04 02:25  jesse
    -
    -	* README, README.FIRST:
    -
    -	added readme.first
    -	
    -1998-01-04 02:12  jesse
    -
    -	* Makefile:
    -
    -	updated webadmin interface. fixed some logout problems. fixed an html bug in web-manip.
    -	
    -1998-01-02 01:14  jesse
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	fixed more problems w/ making cliadmin run
    -	merged mux-install and mux-links into one section of makefile
    -	
    -1998-01-02 00:59  jesse
    -
    -	* Makefile, NEWS, README, TODO, bin/rtmux.pl, etc/config.pm:
    -
    -	fixed typo in Makefile: install-libs -> libs-install
    -	
    -1998-01-01 03:07  jesse
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	commented makefile better
    -	added more stuff for taint checks to rtmux.pl
    -	fixed a non-frames web bug in FormComment
    -	
    -1997-12-31 01:55  jesse
    -
    -	* Makefile, bin/rtmux.pl, etc/config.pm:
    -
    -	lots of cleanup to get web interface running.
    -	beginnigs of taint-safe scripts.
    -	
    -1997-12-30 23:49  jesse
    -
    -	* Makefile, bin/rtmux.pl:
    -
    -	cleanup in cli admin.pm, cli query.pm, the mux, the makefile
    -	database routines now assign an effective serial # to a request when you get
    -	the fact's serial number
    -	
    -1997-12-30 22:56  jesse
    -
    -	* Makefile, README, bin/rtmux.pl:
    -
    -	remodded rtmux to use correct vars for command line arguments.
    -	moved RT_VERSION to makefile.
    -	updated README for new install procedure
    -	
    -1997-12-30 01:09  jesse
    -
    -	* Makefile, etc/config.pm, etc/mysql.acl:
    -
    -	fixed typo in web/admin.pm
    -	set up config.pm mysql.acl and rtmux.pl to get themselves parsed from the makefile.
    -	removed last vestiges of C
    -	
    -1997-12-28 18:59  jesse
    -
    -	* Makefile, etc/schema:
    -
    -	removed suidrt for a preparation to move to a c-free system
    -	added provisions for token-parsing to makefile
    -	
    -1997-12-28 03:10  jesse
    -
    -	* etc/schema:
    -
    -	added tags to schema
    -	
    -1997-12-28 02:48  jesse
    -
    -	* Makefile:
    -
    -	started to modify toplevel makefile
    -	
    -1997-12-19 03:04  jesse
    -
    -	* lib/rtmux.pl:
    -
    -	moved the executable rtmux.pl to bin, where it belongs.
    -	made sure bin/cgi gets created on checkout
    -	
    -1997-12-19 03:03  jesse
    -
    -	* bin/rtmux.pl:
    -
    -	moved the executable rtmux.pl to bin, where it belongs.
    -	
    -1997-12-18 19:05  jesse
    -
    -	* lib/rtmux.pl:
    -
    -	worked on the mux
    -	
    -1997-12-09 15:14  jesse
    -
    -	* TODO:
    -
    -	added things for v1.0 to the todo list
    -	
    -1997-12-09 02:03  jesse
    -
    -	* etc/config.pm:
    -
    -	broke configuration out into config.pm
    -	
    -1997-12-09 01:54  jesse
    -
    -	* COPYING, Makefile, NEWS, README, TODO, etc/mysql.acl, etc/schema:
    -
    -	initial commit after i nuked the repository
    -	
    -1997-12-09 01:54  jesse
    -
    -	* COPYING, Makefile, NEWS, README, TODO, etc/mysql.acl, etc/schema:
    -
    -	Initial revision
    -	
    diff --git a/rt/TODO b/rt/TODO
    deleted file mode 100755
    index 3d1b7d02e..000000000
    --- a/rt/TODO
    +++ /dev/null
    @@ -1,9 +0,0 @@
    -Errata for RT 2.x can be found at http://fsck.com/rt2/NoAuth/Errata.html
    -
    -A list of all open issues, including those which haven't been added
    -to the official Errata lists,  can be found at 
    -http://fsck.com/rt2/NoAuth/Buglist.html
    -
    -If you want to look at bugs in more detail, you may need to login as guest with a password of 'guest'
    -
    -
    diff --git a/rt/bin/initacls.Oracle b/rt/bin/initacls.Oracle
    deleted file mode 100644
    index 8d05f45e1..000000000
    --- a/rt/bin/initacls.Oracle
    +++ /dev/null
    @@ -1,26 +0,0 @@
    -#!/bin/sh
    -
    -DATABASEHOME=$1
    -HOSTNAME=$2
    -PORT=$3
    -DATABASEADMIN=$4
    -DBAPASSWD=$5
    -DATABASENAME=$6
    -DATABASEACLS=$7
    -
    -BINDIR=${DATABASEHOME}/bin
    -
    -echo "DBHOME = $DATABASEHOME"
    -echo "HOSTNAME = $HOSTNAME"
    -echo "PORT = $PORT"
    -echo "DATABASEADMIN = $DATABASEADMIN"
    -echo "DBAPASSWD = $DBAPASSWD"
    -echo "DATABASENAME = $DATABASENAME"
    -
    -PATH=$PATH:$BINDIR
    -export PATH
    -
    -echo "Please enter ${DATABASEADMIN}'s  password for the SID ${DATABASENAME} to create an rt user";
    -
    -$BINDIR/sqlplus ${DATABASEADMIN}@${DATABASENAME}  @$DATABASEACLS
    -
    diff --git a/rt/bin/initacls.Pg b/rt/bin/initacls.Pg
    deleted file mode 100755
    index 82e32de74..000000000
    --- a/rt/bin/initacls.Pg
    +++ /dev/null
    @@ -1,28 +0,0 @@
    -#!/bin/sh
    -
    -DATABASEHOME=$1
    -HOSTNAME=$2
    -PORT=$3
    -DATABASEADMIN=$4
    -DBAPASSWD=$5
    -DATABASENAME=$6
    -DATABASEACLS=$7
    -
    -BINDIR=${DATABASEHOME}/bin
    -
    -
    -PATH=$PATH:$BINDIR
    -export PATH
    -
    -echo "Enter the postgres administrator's database password to create a new user for rt"
    -
    -if [ "fnord$PORT" != "fnord" ]; then
    -	PORT="-p $PORT"
    -fi;
    -
    -if [ "fnord$HOSTNAME" != "fnord" ]; then
    -	HOSTNAME="-h $HOSTNAME"
    -fi;
    -
    -psql $HOSTNAME $PORT -d $DATABASENAME -f $DATABASEACLS -U $DATABASEADMIN
    -
    diff --git a/rt/bin/initacls.mysql b/rt/bin/initacls.mysql
    deleted file mode 100755
    index 17e63f837..000000000
    --- a/rt/bin/initacls.mysql
    +++ /dev/null
    @@ -1,20 +0,0 @@
    -#!/bin/sh
    -
    -DATABASEHOME=$1
    -HOSTNAME=$2
    -PORT=$3
    -DATABASEADMIN=$4
    -DBAPASSWD=$5
    -DATABASENAME=$6
    -DATABASEACLS=$7
    -
    -BINDIR=${DATABASEHOME}/bin
    -
    -PATH=$PATH:$BINDIR
    -export PATH
    -
    -echo "Enter the mysql administrator's database password to create a new user for RT"
    -$BINDIR/mysql --host=${HOSTNAME} --port=${PORT} --user=${DATABASEADMIN} -p${DBAPASSWD} mysql < $DATABASEACLS
    -
    -echo "Enter the mysql administrator's database password to nondestructively reload the database"
    -$BINDIR/mysqladmin --host=${HOSTNAME} --port=${PORT} --user=${DATABASEADMIN} -p${DBAPASSWD} reload
    diff --git a/rt/bin/rtadmin b/rt/bin/rtadmin
    deleted file mode 100644
    index 25ba1b06a..000000000
    --- a/rt/bin/rtadmin
    +++ /dev/null
    @@ -1,1040 +0,0 @@
    -#!!!PERL!! -w
    -#
    -# $Header: /home/cvs/cvsroot/freeside/rt/bin/Attic/rtadmin,v 1.1 2002-08-12 06:17:07 ivan Exp $
    -# RT is (c) 1996-2001 Jesse Vincent 
    -
    -use strict;
    -use Carp;
    -use Getopt::Long qw(:config pass_through);
    -
    -use lib "!!RT_LIB_PATH!!";
    -use lib "!!RT_ETC_PATH!!";
    -
    -use RT::Interface::CLI  qw(CleanEnv LoadConfig DBConnect 
    -			   GetCurrentUser GetMessageContent);
    -
    -#Clean out all the nasties from the environment
    -CleanEnv();
    -
    -#Load etc/config.pm and drop privs
    -LoadConfig();
    -
    -#Connect to the database and get RT::SystemUser and RT::Nobody loaded
    -DBConnect();
    -
    -#Drop setgid permissions
    -RT::DropSetGIDPermissions();
    -
    -#Get the current user all loaded
    -my $CurrentUser = GetCurrentUser();
    -
    -unless ($CurrentUser->Id) {
    -        print "No RT user found. Please consult your RT administrator.\n";   
    -        exit(1);
    -}
    -
    -
    -
    -
    -PickMode();
    -
    -
    -# {{{ Help
    -
    -sub Help {
    -
    -    # {{{ help_acl
    -my $help_acl ="
    -        Access control
    -	--grant-right  
    -	--revoke-right 
    -	  --userid 
    -          --groupid 
    -	--list-rights";
    -
    -# }}}
    -    
    -    # {{{ help_keyword_sel
    -my $help_keyword_sel = "
    -       Keyword Selections
    -       --add-keyword-select
    -       --modify-keyword-select 
    -          --ks-name 
    -          --ks-keyword 
    -          --ks-single 
    -          --ks-multiple
    -          --ks-depth  
    -
    -        --disable-keyword-select ";
    -# }}}
    -    
    -    # {{{ help_scrip
    -my $help_scrip = "
    -        Scrips
    -        --create-scrip
    -           --scrip-condition 
    -           --scrip-action 
    -           --scrip-template