From fbb6b2808b24030ef7c914bfad8c18d1e37c5f35 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 13 Sep 2010 21:18:45 +0000 Subject: [PATCH] Merge r17574, r17575, r17584, r17585, r17628, r17639 from trunk to delete deprecated cgi-bin configuration interfaces The CGI interfaces have not been maintained; the interfaces available through the Admin -> Server Administration menu in the staff client are the recommended method for setting up new libraries in the organizational hierarchy, permissions, copy statuses, and circulation rules. Note that an adjustment to eg.conf is recommended to point to the offline.pl script, which is the only remaining CGI script in use; this should avoid conflicting Apache definitions for the /cgi-bin/ alias. Most modern systems will install Class::DBI::Frozen::301 to avoid conflicts with incompatible Class::DBI packages. We need to teach offline.pl how to use Class::DBI::Frozen::301 if it is available. Note that we're using "use parent" instead of "use base" per the recommendation of "perldoc base"; accordingly, we're adding the system prerequisite for the parent pragma. git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@17642 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/apache/eg.conf | 4 +- Open-ILS/src/cgi-bin/circ-rules.cgi | 308 -------------- Open-ILS/src/cgi-bin/config.cgi | 23 - Open-ILS/src/cgi-bin/copy_statuses.cgi | 139 ------ Open-ILS/src/cgi-bin/lib-setup.cgi | 465 --------------------- Open-ILS/src/cgi-bin/org_unit_types.cgi | 164 -------- Open-ILS/src/cgi-bin/perms-setup.cgi | 142 ------- Open-ILS/src/cgi-bin/support/base.gif | Bin 1040 -> 0 bytes Open-ILS/src/cgi-bin/support/cd.gif | Bin 239 -> 0 bytes Open-ILS/src/cgi-bin/support/dtree.js | 324 -------------- Open-ILS/src/cgi-bin/support/empty.gif | Bin 62 -> 0 bytes Open-ILS/src/cgi-bin/support/folder.gif | Bin 372 -> 0 bytes Open-ILS/src/cgi-bin/support/folderopen.gif | Bin 376 -> 0 bytes Open-ILS/src/cgi-bin/support/globe.gif | Bin 1095 -> 0 bytes Open-ILS/src/cgi-bin/support/imgfolder.gif | Bin 622 -> 0 bytes Open-ILS/src/cgi-bin/support/join.gif | Bin 69 -> 0 bytes Open-ILS/src/cgi-bin/support/joinbottom.gif | Bin 66 -> 0 bytes Open-ILS/src/cgi-bin/support/line.gif | Bin 66 -> 0 bytes Open-ILS/src/cgi-bin/support/minus.gif | Bin 86 -> 0 bytes Open-ILS/src/cgi-bin/support/minusbottom.gif | Bin 85 -> 0 bytes Open-ILS/src/cgi-bin/support/musicfolder.gif | Bin 633 -> 0 bytes Open-ILS/src/cgi-bin/support/nolines_minus.gif | Bin 861 -> 0 bytes Open-ILS/src/cgi-bin/support/nolines_plus.gif | Bin 870 -> 0 bytes Open-ILS/src/cgi-bin/support/page.gif | Bin 582 -> 0 bytes Open-ILS/src/cgi-bin/support/plus.gif | Bin 89 -> 0 bytes Open-ILS/src/cgi-bin/support/plusbottom.gif | Bin 88 -> 0 bytes Open-ILS/src/cgi-bin/support/question.gif | Bin 1044 -> 0 bytes Open-ILS/src/cgi-bin/support/trash.gif | Bin 1051 -> 0 bytes Open-ILS/src/cgi-bin/usr_group-setup.cgi | 339 --------------- Open-ILS/src/extras/Makefile.install | 2 + .../src/perlmods/OpenILS/Utils/OfflineStore.pm | 15 +- Open-ILS/src/support-scripts/eg_db_config.pl | 38 +- Open-ILS/web/Makefile.am | 13 +- README | 6 +- 34 files changed, 23 insertions(+), 1959 deletions(-) delete mode 100755 Open-ILS/src/cgi-bin/circ-rules.cgi delete mode 100755 Open-ILS/src/cgi-bin/config.cgi delete mode 100755 Open-ILS/src/cgi-bin/copy_statuses.cgi delete mode 100755 Open-ILS/src/cgi-bin/lib-setup.cgi delete mode 100755 Open-ILS/src/cgi-bin/org_unit_types.cgi delete mode 100755 Open-ILS/src/cgi-bin/perms-setup.cgi delete mode 100644 Open-ILS/src/cgi-bin/support/base.gif delete mode 100644 Open-ILS/src/cgi-bin/support/cd.gif delete mode 100644 Open-ILS/src/cgi-bin/support/dtree.js delete mode 100644 Open-ILS/src/cgi-bin/support/empty.gif delete mode 100644 Open-ILS/src/cgi-bin/support/folder.gif delete mode 100644 Open-ILS/src/cgi-bin/support/folderopen.gif delete mode 100644 Open-ILS/src/cgi-bin/support/globe.gif delete mode 100644 Open-ILS/src/cgi-bin/support/imgfolder.gif delete mode 100644 Open-ILS/src/cgi-bin/support/join.gif delete mode 100644 Open-ILS/src/cgi-bin/support/joinbottom.gif delete mode 100644 Open-ILS/src/cgi-bin/support/line.gif delete mode 100644 Open-ILS/src/cgi-bin/support/minus.gif delete mode 100644 Open-ILS/src/cgi-bin/support/minusbottom.gif delete mode 100644 Open-ILS/src/cgi-bin/support/musicfolder.gif delete mode 100644 Open-ILS/src/cgi-bin/support/nolines_minus.gif delete mode 100644 Open-ILS/src/cgi-bin/support/nolines_plus.gif delete mode 100644 Open-ILS/src/cgi-bin/support/page.gif delete mode 100644 Open-ILS/src/cgi-bin/support/plus.gif delete mode 100644 Open-ILS/src/cgi-bin/support/plusbottom.gif delete mode 100644 Open-ILS/src/cgi-bin/support/question.gif delete mode 100644 Open-ILS/src/cgi-bin/support/trash.gif delete mode 100755 Open-ILS/src/cgi-bin/usr_group-setup.cgi diff --git a/Open-ILS/examples/apache/eg.conf b/Open-ILS/examples/apache/eg.conf index 17eb787bc7..243e1b88d8 100644 --- a/Open-ILS/examples/apache/eg.conf +++ b/Open-ILS/examples/apache/eg.conf @@ -53,8 +53,8 @@ AliasMatch ^/opac/.*/extras/selfcheck/(.*) /openils/var/web/opac/extras/selfchec # ---------------------------------------------------------------------------------- # System config CGI scripts go here # ---------------------------------------------------------------------------------- -Alias /cgi-bin/ "/openils/var/cgi-bin/" - +Alias /cgi-bin/offline/ "/openils/var/cgi-bin/offline/" + AddHandler cgi-script .cgi .pl AllowOverride None Options None diff --git a/Open-ILS/src/cgi-bin/circ-rules.cgi b/Open-ILS/src/cgi-bin/circ-rules.cgi deleted file mode 100755 index d65c39fb58..0000000000 --- a/Open-ILS/src/cgi-bin/circ-rules.cgi +++ /dev/null @@ -1,308 +0,0 @@ -#!/usr/bin/perl -w -# vim:noet:ts=4 -use strict; - -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; - -our %config; -do '##CONFIG##/live-db-setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr},$config{pw}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - - - - -Home - -

Configure Circulation Rules

-
- -HEADER - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %dur_cols = ( - name => "Name", - extended => "Extended", - normal => "Normal", - shrt => "Short", - max_renewals => "Max Renewals", -); - -my @dur_display_order = ( qw/name normal extended shrt max_renewals/ ); - -my %fine_cols = ( - name => "Name", - high => "High", - normal => "Normal", - low => "Low", - recurrence_interval => "Interval", -); - -my @fine_display_order = ( qw/name recurrence_interval normal high low/ ); - -my %age_cols = ( - name => "Name", - age => "Item Age", - prox => "Holdable Radius", -); - -my @age_display_order = ( qw/name age prox/ ); - -my %max_fine_cols = ( - name => "Name", - amount => "Amount", -); - -my @max_fine_display_order = ( qw/name amount/ ); - - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - my $form = $cgi->param('rules_form'); - - if ($form eq 'duration') { - if ($action eq 'Remove Selected') { - for my $id ( ($cgi->param('remove_me')) ) { - config::rules::circ_duration->retrieve($id)->delete; - } - } elsif ( $action eq 'Add New' ) { - config::rules::circ_duration->create( - { map { ($_ => $cgi->param($_)) } keys %dur_cols } - ); - } - } elsif ($form eq 'recurring_fine') { - if ($action eq 'Remove Selected') { - for my $id ( ($cgi->param('remove_me')) ) { - config::rules::recurring_fine->retrieve($id)->delete; - } - } elsif ( $action eq 'Add New' ) { - config::rules::recurring_fine->create( - { map { ($_ => $cgi->param($_)) } keys %fine_cols } - ); - } - } elsif ($form eq 'max_fine') { - if ($action eq 'Remove Selected') { - for my $id ( ($cgi->param('remove_me')) ) { - config::rules::max_fine->retrieve($id)->delete; - } - } elsif ( $action eq 'Add New' ) { - config::rules::max_fine->create( - { map { ($_ => $cgi->param($_)) } keys %max_fine_cols } - ); - } - } elsif ($form eq 'age_hold') { - if ($action eq 'Remove Selected') { - for my $id ( ($cgi->param('remove_me')) ) { - config::rules::age_hold_protect->retrieve($id)->delete; - } - } elsif ( $action eq 'Add New' ) { - config::rules::age_hold_protect->create( - { map { ($_ => $cgi->param($_)) } keys %age_cols } - ); - } - } - - -} - - -#------------------------------------------------------------------------------- -# Form part -#------------------------------------------------------------------------------- -{ - #----------------------------------------------------------------------- - # Duration form - #----------------------------------------------------------------------- - print "
". - "". - "

Circulation Duration

". - "\n"; - - for my $col ( @dur_display_order ) { - print th($dur_cols{$col}); - } - - print ""; - for my $col ( @dur_display_order ) { - print td($row->$col); - } - print "\n"; - - for my $col ( @dur_display_order ) { - print td(""); - } - - - print "
\n"; - - for my $row ( config::rules::circ_duration->retrieve_all ) { - print "
"; - } - print "
". - " | ". - "". - "

"; -} - -{ - #----------------------------------------------------------------------- - # Recurring Fine form - #----------------------------------------------------------------------- - print "
". - "". - "

Recurring Fine Levels

". - "\n"; - - for my $col ( @fine_display_order ) { - print th($fine_cols{$col}); - } - - print "\n"; - for my $col ( @fine_display_order ) { - print td($row->$col); - } - print "\n"; - - for my $col ( @fine_display_order ) { - print td(""); - } - - - print "
\n"; - - for my $row ( config::rules::recurring_fine->retrieve_all ) { - print "
"; - } - - print "
". - " | ". - "". - "

"; -} - -{ - #----------------------------------------------------------------------- - # Max Fine form - #----------------------------------------------------------------------- - print "
". - "". - "

Max Fine Levels

". - "\n"; - - for my $col ( @max_fine_display_order ) { - print th($max_fine_cols{$col}); - } - - print "\n"; - for my $col ( @max_fine_display_order ) { - print td($row->$col); - } - print "\n"; - - for my $col ( @max_fine_display_order ) { - print td(""); - } - - - print "
\n"; - - for my $row ( config::rules::max_fine->retrieve_all ) { - print "
"; - } - - print "
". - " | ". - "". - "

"; -} - -{ - #----------------------------------------------------------------------- - # Age hold protect form - #----------------------------------------------------------------------- - print "
". - "". - "

Item Age Hold Protection

". - "\n"; - - for my $col ( @age_display_order ) { - print th($age_cols{$col}); - } - - print "\n"; - for my $col ( @age_display_order ) { - print td($row->$col); - } - print "\n"; - - for my $col ( @age_display_order ) { - print td(""); - } - - - print "
\n"; - - for my $row ( config::rules::age_hold_protect->retrieve_all ) { - print "
"; - } - - print "
". - " | ". - "". - "

"; -} - - -print ""; - - diff --git a/Open-ILS/src/cgi-bin/config.cgi b/Open-ILS/src/cgi-bin/config.cgi deleted file mode 100755 index 041fb90db8..0000000000 --- a/Open-ILS/src/cgi-bin/config.cgi +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/perl -print < - - - Open-ILS Bootstrapping Scripts - - -

Open-ILS Bootstrapping Scripts

-
- - - -CGI diff --git a/Open-ILS/src/cgi-bin/copy_statuses.cgi b/Open-ILS/src/cgi-bin/copy_statuses.cgi deleted file mode 100755 index 5c5dc92dec..0000000000 --- a/Open-ILS/src/cgi-bin/copy_statuses.cgi +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/perl -use strict; -# vim:noet:ts=4 - -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; -our %config; -do '##CONFIG##/live-db-setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr},$config{pw}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - - - - -Home - -

Copy Status Setup

-
- -HEADER - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %cs_cols = ( qw/id SysID name Name holdable Unholdable/ ); - -my @col_display_order = ( qw/id name holdable/ ); - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Remove Selected' ) { - for my $id ( ($cgi->param('id')) ) { - next unless ($id > 99); - config::copy_status->retrieve($id)->delete; - } - } elsif ( $action eq 'Update Selected' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = config::copy_status->retrieve($id); - $u->name( $cgi->param("name_$id") ); - $u->holdable( $cgi->param("holdable_$id") ); - $u->update; - } - } elsif ( $action eq 'Add New' ) { - config::copy_status->create( { name => $cgi->param("name") } ); - } -} - - -#------------------------------------------------------------------------------- -# Form part -#------------------------------------------------------------------------------- -{ - #----------------------------------------------------------------------- - # User form - #----------------------------------------------------------------------- - print "
". - "\n"; - - for my $col ( @col_display_order ) { - print th($cs_cols{$col}); - } - - print ''; - - for my $row ( sort { $a->name cmp $b->name } (config::copy_status->retrieve_all) ) { - print Tr( - td( $row->id() ), - td(""), - td("holdable()} .">"), - td(""), - ); - } - - print "", - td(), - td(""), - td(""), - td(), - ""; - - print "
Action
"; - print " | "; - print " | "; - print "

"; -} - -print ""; - - diff --git a/Open-ILS/src/cgi-bin/lib-setup.cgi b/Open-ILS/src/cgi-bin/lib-setup.cgi deleted file mode 100755 index f93455cb10..0000000000 --- a/Open-ILS/src/cgi-bin/lib-setup.cgi +++ /dev/null @@ -1,465 +0,0 @@ -#!/usr/bin/perl -use strict; -# vim:noet:ts=4 - -use DateTime; -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; -our %config; -do '##CONFIG##/live-db-setup.pl'; -#do '/openils/conf/live-db-setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr},$config{pw}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %org_cols = ( qw/id SysID name Name parent_ou Parent ou_type OrgUnitType shortname ShortName email Email phone Phone opac_visible OPACVisible/ ); - -my @col_display_order = ( qw/id name shortname ou_type email phone opac_visible parent_ou/ ); - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Update' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = actor::org_unit->retrieve($id); - for my $col ( keys %org_cols ) { - next if ($cgi->param($col."_$id") =~ /Select One/o); - if ($col eq 'shortname') { - $u->$col( uc( $cgi->param($col."_$id") ) ); - } else { - $u->$col( $cgi->param($col."_$id") ); - } - } - $u->update; - } - } elsif ( $action eq 'Update Hours' ) { - for my $id ( ($cgi->param('id')) ) { - my $hoo = actor::org_unit::hours_of_operation->retrieve($id); - for my $col ( $hoo->columns('Essential') ) { - $hoo->$col( $cgi->param($col) ); - } - $hoo->update; - } - } elsif ( $action eq 'Add New' ) { - actor::org_unit->create( - { map { - defined($cgi->param($_)) ? - ( $_ eq 'shortname' ? - ($_ => uc($cgi->param($_))) : - ($_ => $cgi->param($_)) - ) : - () - } keys %org_cols - } - ); - } elsif ( $action eq 'Save Address' ) { - my $org = actor::org_unit->retrieve($cgi->param('id')); - - my $addr = {}; - - $$addr{org_unit} = $cgi->param('org_unit') || $org->id; - $$addr{street1} = $cgi->param('street1'); - $$addr{street2} = $cgi->param('street2'); - $$addr{city} = $cgi->param('city'); - $$addr{county} = $cgi->param('county'); - $$addr{state} = $cgi->param('state'); - $$addr{country} = $cgi->param('country'); - $$addr{post_code} = $cgi->param('post_code'); - - my $a_type = $cgi->param('addr_type'); - - - my $a = actor::org_address->retrieve($cgi->param('aid')); - - if ($a) { - for (keys %$addr) { - next unless $$addr{$_}; - $a->$_($$addr{$_}); - } - $a->update; - } else { - $a = actor::org_address->create( {map {defined($$addr{$_}) ? ($_ => $$addr{$_}) : ()} keys %$addr} ); - } - - $org->$a_type($a->id); - $org->update; - } -} - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - - - - - - - -Home - -

Library Hierarchy Setup

-
-HEADER - -my $uri = $cgi->url(-relative=>1); - -my $top; -for my $lib ( actor::org_unit->search( {parent_ou=>undef} ) ) { - my $name = $lib->name; - $name =~ s/'/\\'/og; - $top = $lib->id; - print <<" HEADER"; -
- -
-
- -HEADER - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'child' ) { - my $id = $cgi->param('id'); - if ($id) { - my $node = actor::org_unit->retrieve($id); - #----------------------------------------------------------------------- - # child form - #----------------------------------------------------------------------- - - print "

Edit ".$node->name."

"; - print "
". - "\n"; - - print Tr( - th($org_cols{id}), - td( $node->id() ), - ); - print Tr( - th($org_cols{name}), - td("name() ."\">"), - ); - print Tr( - th($org_cols{shortname}), - td(""), - ); - print Tr( - th($org_cols{ou_type}), - td(""), - ); - print Tr( - th($org_cols{email}), - td("email() ."\">"), - ); - - print Tr( - th($org_cols{phone}), - td(""), - ); - - print Tr( - th($org_cols{opac_visible} .'*'), - td("" - ), - ); - - print Tr( - th($org_cols{parent_ou}), - td(""), - ); - - print Tr( "" ); - print "
*". - "You must hide every OU you want hidden, not just an ancestor!
"; - - #------------------------------------------------------------------------- - # Hours of operation form - #------------------------------------------------------------------------- - - - - my %dow = ( - 0 => 'Monday', - 1 => 'Tuesday', - 2 => 'Wednesday', - 3 => 'Thursday', - 4 => 'Friday', - 5 => 'Saturday', - 6 => 'Sunday', - ); - - print "

Hours of Operation for ".$node->name."

". - "
". - "\n"; - - print Tr( - th('Day of Week'), - th('Open Time'), - th('Close Time'), - ); - - my $hoo = actor::org_unit::hours_of_operation->find_or_create( { id => $node->id } ); - for my $day ( 0 .. 6 ) { - my $open = "dow_${day}_open"; - my $close = "dow_${day}_close"; - - print Tr( - th($dow{$day}), - td("$open ."\">"), - td("$close ."\">"), - ); - } - - print Tr( "" - ); - print "
". - "". - "
"; - - - #------------------------------------------------------------------------- - # Address edit form - #------------------------------------------------------------------------- - - print "

Addresses for ".$node->name."

"; - print ""; - my %addrs = ( ill_address => 'ILL Address', - holds_address => 'Consortial Holds Address', - mailing_address => 'Mailing Address', - billing_address => 'Physical Address' - ); - for my $a (qw/billing_address mailing_address holds_address ill_address/) { - my $addr = actor::org_address->retrieve( $node->$a ) if ($node->$a); - - my %ah = ( street1 => $addr?$addr->street1:'', - street2 => $addr?$addr->street2:'', - city => $addr?$addr->city:'', - county => $addr?$addr->county:'', - state => $addr?$addr->state:'', - country => $addr?$addr->country:'US', - post_code => $addr?$addr->post_code:'', - org_unit => $addr?$addr->org_unit:$node->id, - id => $addr?$addr->id:'', - ); - - #print '' if ($a eq 'holds_address'); - print <<" TABLE"; - - - - TABLE - } - - print "
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$addrs{$a}
SysID
*Street 1
Street 2
*City
County
*State
*Country
*ZIP
- - - - -

New Child

"; - - print "
". - "\n"; - - print Tr( - th($org_cols{name}), - td(""), - ); - print Tr( - th($org_cols{shortname}), - td(""), - ); - print Tr( - th($org_cols{ou_type}), - td(""), - ); - print Tr( - th($org_cols{email}), - td(""), - ); - print Tr( - th($org_cols{phone}), - td(""), - ); - - print Tr( "" ); - print "
", - "

"; - } - } -} - -print "
"; - - diff --git a/Open-ILS/src/cgi-bin/org_unit_types.cgi b/Open-ILS/src/cgi-bin/org_unit_types.cgi deleted file mode 100755 index db6bedf071..0000000000 --- a/Open-ILS/src/cgi-bin/org_unit_types.cgi +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/perl -use strict; -# vim:noet:ts=4 - -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; - -our %config; -do '##CONFIG##/live-db-setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr},$config{pw}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - - - - -Home - -

Organizational Unit Type Setup

-
- -HEADER - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %ou_cols = ( qw/id SysID name Name opac_label OpacLabel depth Depth parent ParentType can_have_vols CanHaveVolumes can_have_users CanHaveUsers/ ); - -my @col_display_order = ( qw/id name opac_label depth parent can_have_vols can_have_users/ ); - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Remove Selected' ) { - for my $id ( ($cgi->param('id')) ) { - actor::org_unit_type->retrieve($id)->delete; - } - } elsif ( $action eq 'Update Selected' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = actor::org_unit_type->retrieve($id); - for my $col (@col_display_order) { - next if ($cgi->param($col."_$id") =~ /Select One/o); - $u->$col( $cgi->param($col."_$id") ); - } - $u->update; - } - } elsif ( $action eq 'Add New' ) { - actor::org_unit_type->create( { map {defined($cgi->param($_)) ? ($_ => $cgi->param($_)) : () } @col_display_order } ); - } -} - - -#------------------------------------------------------------------------------- -# Form part -#------------------------------------------------------------------------------- -{ - #----------------------------------------------------------------------- - # User form - #----------------------------------------------------------------------- - print "
". - "\n"; - - for my $col ( @col_display_order ) { - print th($ou_cols{$col}); - } - - print ''; - - for my $row ( sort { $a->depth <=> $b->depth } (actor::org_unit_type->retrieve_all) ) { - print Tr( - td( $row->id() ), - td(""), - td(""), - td(""), - td(""), - td("can_have_vols){"checked"}} .">"), - td("can_have_users){"checked"}} .">"), - td(""), - ); - } - - print "", - td(), - td(""), - td(""), - td(""), - td(""), - td(""), - td(""), - td(), - ""; - print "
Action
"; - print " | "; - print " | "; - print "

"; -} - -print ""; - - diff --git a/Open-ILS/src/cgi-bin/perms-setup.cgi b/Open-ILS/src/cgi-bin/perms-setup.cgi deleted file mode 100755 index b285d65313..0000000000 --- a/Open-ILS/src/cgi-bin/perms-setup.cgi +++ /dev/null @@ -1,142 +0,0 @@ -#!/usr/bin/perl -use strict; -# vim:noet:ts=4 - -use OpenILS::Application::Storage; -use OpenILS::Application::Storage::CDBI; - -# I need to abstract the driver loading away... -use OpenILS::Application::Storage::Driver::Pg; - -use CGI qw/:standard start_*/; - -our %config; -do '##CONFIG##/live-db-setup.pl'; - -OpenILS::Application::Storage::CDBI->connection($config{dsn},$config{usr},$config{pw}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - - - - -Home - -

Permission List Setup

-
- -HEADER - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- - -my %profile_cols = ( qw/id SysID code Name description Description/ ); - -my @col_display_order = ( qw/id code description/ ); - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Remove Selected' ) { - for my $id ( ($cgi->param('id')) ) { - permission::perm_list->retrieve($id)->delete; - } - } elsif ( $action eq 'Update Selected' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = permission::perm_list->retrieve($id); - $u->code( $cgi->param("code_$id") ); - $u->description( $cgi->param("description_$id") ); - $u->update; - } - } elsif ( $action eq 'Add New' ) { - permission::perm_list->create( - { code => $cgi->param("code"), - description => $cgi->param("description") - } - ); - } -} - - -#------------------------------------------------------------------------------- -# Form part -#------------------------------------------------------------------------------- -{ - #----------------------------------------------------------------------- - # User form - #----------------------------------------------------------------------- - print "
". - "\n"; - - for my $col ( @col_display_order ) { - print th($profile_cols{$col}); - } - - print ''; - - for my $row ( sort { $a->code cmp $b->code } (permission::perm_list->retrieve_all) ) { - print Tr( - td( $row->id() ), - td(""), - td(""), - td(""), - ); - } - - print "", - td(), - td(""), - td(""), - td(), - ""; - print "
Action
"; - print " | "; - print " | "; - print "

"; -} - -print ""; - - diff --git a/Open-ILS/src/cgi-bin/support/base.gif b/Open-ILS/src/cgi-bin/support/base.gif deleted file mode 100644 index 9ac0b117b078b91521d56fce710e987ff5c5bdf5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1040 zcmeH`?^BBb9KfHpsoZf+xenJINgQ!5-bCk)!^n@*j^hX|?DTUt&d)e*iWIX(X^rZs zS;bjeo)(q0_Kdd7+U#kgX6sq2Hf7D0w8+S}j*B zU^e%)wwf7?GB&%avhwY^Mp)kjMnf;JAF@)orFUu$Jojj)0Y%%dS^#y!MFKJlKI*kZ zQHw1Qn411IZL`^N+*sj)55|5B>%no|#P>;SpY!_pVoqNB11FTLtXKV+ui5NYKEH(|9ra$Y*+!JF zyQN+*nM|Xjqshr-tb;iirhQs1e|YZ+izQJ_fd)5RQ%$fA-<8zcPIDxM`Pe}<@N&x~ z5+mk^`}}5)$J5(8$QO1yox`;{*Qv)tf>#FFlQxnZJFbNuV(0)4Rkg|-HqYzvWu;eG z`vyd!_7|N4DYdTBQZ1cc{YWS~byJfdhibz>p$(3d4D822rLx4!eyiKx69maeWp=Am z;Sbc;>-IJWPPdIK6ehjitj4WUsfx>OVkKWMsOtv+bS))rHHx;{? fny&E8D>{NTbE&~4u_ql#Er|S;e|Qd+f+YL_u9n3O diff --git a/Open-ILS/src/cgi-bin/support/cd.gif b/Open-ILS/src/cgi-bin/support/cd.gif deleted file mode 100644 index 7503819404024526e6181901806c55f0d80c5933..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 239 zcmVrJ``g+7o}HwDfriP+%H`z#&d&S!*Z=kE z|K{fCzP{+0nauzH|NsC0A^8LW000jFEC2ui022Ta000D>@X2QgDb|R|oC=38x?@%aA z3XHC|001ZuX$Aq%'; - } - if (node.url) { - str += ''; - str += node.name; - if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ''; - str += ''; - if (node._hc) { - str += '
'; - str += this.addNode(node); - str += '
'; - } - this.aIndent.pop(); - return str; -}; - -dTree.prototype.indent = function(node, nodeId) { - var str = ''; - if (this.root.id != node.pid) { - for (var n=0; n'; - (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); - if (node._hc) { - str += ''; - } else str += ''; - } - return str; -}; - -dTree.prototype.setCS = function(node) { - var lastId; - for (var n=0; nmYc?Kr_IsGe7zvW*%XUnbb L&G+VrGgt!vQpOa` diff --git a/Open-ILS/src/cgi-bin/support/folder.gif b/Open-ILS/src/cgi-bin/support/folder.gif deleted file mode 100644 index eb129763dcea0dc1916b7e934fdce2fd8770c380..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 372 zcmZ?wbhEHb6k-r!xXQrr`}gnn@893v9&~1=$&)8f4jw$XxRCo$zt;Bc+vnx5?P^z= zlf`m!n&I9q)y<94Gt(JwZ!g^1B)cGw zMSgXq@QJAg2YNM*9XqzJMr>9F(~2^IHB}=2ujK##G5PiD*Z=>|`G33g|C9Rv?>o0` z+x8y>W-^ck6o0ZXGBD^d=zw&C{KUXE(P4UlhmKVLi6xgzC4402GB{W!L~2f9POOq~ zU`a4ovhaqB%+vz~Nx8dkFFrrvqSej!Kd!MF9@+A*p|PG#+gVIkwX>^RSE$vAT~}-J zl&QL${d#h`nsevP*X5qctE;hW`3hadnOwRm>o;uF<*#vKOczy ZVbwl)>NG2h3j?FtrOQ`>yuBP5tO0@?i&Ovr diff --git a/Open-ILS/src/cgi-bin/support/folderopen.gif b/Open-ILS/src/cgi-bin/support/folderopen.gif deleted file mode 100644 index c5c31102d525076f68a946b1c942687b3ce0da4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmZ?wbhEHb6k-r!xXQrr{{8!<#k{|N|2{L*q6oUN3z&7>3 ztO5@mss0m7f-EEygfto)EEhyd@^~j!tvR(XKI+JllL;CPicM^J(Q8*-F>q|Y`M%=j z62+dM{~PKQW!3d-jdOF2Weio>+e{5RD$0%I4VAejFig^&H-8?Vk|_5Crb$NHt5$3C zNei(}Fr8zpvu*n}0e-m}r{#G~uV;mw0cLrC^)_Z0DGV33b1Po(Sa(>zf!o}J1>$0ZL+5}+6JHr`< zs59<2ADD$k0dv7VSPBs!85|83W2YWrU{mu%Hi8cua%jT}X0VKs8iV_@s~cN|4IQK7 zlgwVZniU_ug+va|$vdW0wiwXo*|ykB@De?HwLlJxC0N(!S8i(2E~|v9(_+$dE1QD4 z(6NQB0}P|~wBw2sEI5NRJ4=uuOa5tsBHg+7q6Hu5dC6C#RV~P$5g9p@LhLx0zT1=#$;61Slp z{b$G3Cq5tj+aRnLm}j%g>meJip=3z4fBc6cC?X}jzdC>`>6~1Hyp7=2MId*?rsV_o z0IrGVmN!ePo4-uR0e|!Ywb#GtFWpGfTw^6849G2ChCzJ@XGmPPTIixuZ>)mYL-;TxSo$E#hk&Ui;z3lE682RvPTxRDt7BWAb0m{VSvJ=cgb~yz@9V5_O(cZFI)`$`ISCTU`DjBw zyS8egLnhurnWUI?_PR)I7%9~+D!e_EXKRJ1r3zig4{K%xOvx2|%18b>$me4+u^7Xq I@p#1QKgm$!SpWb4 diff --git a/Open-ILS/src/cgi-bin/support/imgfolder.gif b/Open-ILS/src/cgi-bin/support/imgfolder.gif deleted file mode 100644 index e6d880347f518bbd1239f2af3e3059ccb1e674e3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 622 zcmZ?wbhEHb6k-r!c*el+{{8!<#k_3u{{L^wI(YEl_U+q$|Ni~|@MghDua+)ZG%JH? z-TL((7IrU~Kj+DlCo5O3lwA7%*s)`qHgDa!eb@j0OBdvEG*;)$$zqw8!`56^^k}p5 z_Ya-7_UFu)+TYb$+uz;v|9Z=kBA(5S(&rbc{eRsuGoA72{gy`u15VE{KDj_~ajDeg z37uzVnk*{dIyud7L!HE&S<`mx+V>;JX-$>L)2C0b?{GLaORBB0{O{F*<)!?K3%Nf$ zsam#d+5aDt|39h!f4lVm`_9*|U#E2~`~QE=wr$&f|N3)mmgIjBn8`2{fZ|UUMg|5? z1|5)NL2<&se!9W4skx=K)lgW7o1c@{KvtWf%~RNQ+VpAif|G?@nV2{@=DW(VPUdzM za9Zso;A-yDro->*#N*D+IV1gO z@j_>Lk*uD81ih2?D)vTMXLcNRa$tCI39M1!eiVTiL RukLUjIIv`XD-$DwH2~IF)06-J diff --git a/Open-ILS/src/cgi-bin/support/join.gif b/Open-ILS/src/cgi-bin/support/join.gif deleted file mode 100644 index 34dd47610a5d7c3580dedc342683559bf77abce2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69 zcmZ?wbhEHb6k-r!XkcV$XlVHV|G(l-7DfgJMg|=QAOOiQFv;}DH=KUEdfpt3ORshA Wx&LIzk};W<vKC_i diff --git a/Open-ILS/src/cgi-bin/support/joinbottom.gif b/Open-ILS/src/cgi-bin/support/joinbottom.gif deleted file mode 100644 index 48b81c80a9e25f6f29e2614aaa33bdf4a4d2881b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66 zcmZ?wbhEHb6k-r!XkcV$XlVHV|G(l-7DfgJMg|=QAOOiQFiG~vH=KUEdfpt3ORshA Tx&LIzy5lkJS?4l0Mh0sDgH;v` diff --git a/Open-ILS/src/cgi-bin/support/line.gif b/Open-ILS/src/cgi-bin/support/line.gif deleted file mode 100644 index 1a259eea00c330eee85fb18aa64e2e232d5410b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66 zcmZ?wbhEHb6k-r!XkcV$XlVHV|G(l-7DfgJMg|=QAOOiQFiG~vH=KUEdfpt3ORshA Txqp6J8?ND(@^elGBZD;ng_;%{ diff --git a/Open-ILS/src/cgi-bin/support/minus.gif b/Open-ILS/src/cgi-bin/support/minus.gif deleted file mode 100644 index 3d212a97ae0d8f83aa39836c5a85d442f8602553..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 86 zcmZ?wbhEHb6k-r!n8?h~)YR0_(7?dJ@c;jR#h)yU3=GT+IzTQ^R)~RtNqvreafzu-gC3m_gnAtsyGG)YXIxA8@>Pl diff --git a/Open-ILS/src/cgi-bin/support/musicfolder.gif b/Open-ILS/src/cgi-bin/support/musicfolder.gif deleted file mode 100644 index f620789feb3c4b1222909d255f51aeaa81faefb6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 633 zcmZ?wbhEHb6k-r!c;?CQ|HtI_d&1|;T=V|@`}l;_ON)8`KdAow`}didCU@_DGciej z^5n_Eg9rbA>8q=`<>xo+u1K?DiJW3#)C#D)aIvB91 zfNOew_W$>t|Ni|e&CM||NI81&?f=`QuV26Z|9{T0S(4kfZTk-bGZ}^gQ2fcl$iU#q zpaXI&C{7sIuQhl!HMg)hmVUg|Ta9<%L zB*!hNW#eGnvfRbP!^OqjoL^Um#e}(8(%psk*bWzm73wnj%>wQWm-x821i3D`7>P8w z-n-|h>B!0H=xU{*=yrFzi#XF`MLGYlFIxARNO@hDtWaBUIiPTOMfV7_}lvsu=hh(Z;&NfL@qDJM29Jw4q( Jn2m+O8UP#&8=e3F diff --git a/Open-ILS/src/cgi-bin/support/nolines_plus.gif b/Open-ILS/src/cgi-bin/support/nolines_plus.gif deleted file mode 100644 index f258ce211a0a19c2ecbcb11170b9a8b35ae2436c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 870 zcmZ?wbhEHb6k-r!_|DAG)YR0_(7-SXMnhmkhJfNv7DfgJW(FOQ??HKjfy0@BokPZB z!-9j&9Ku>LGYlFIxARNO@hAj7*xx83m?l#Y_`t1M|Ba{La?4kwX3c6}c&WZ`PygnpJ?rkDyZry# zum9<}^Zxw(U)#BD%KlHsjvf2=@89j`-!lsq`N~Rn2+cXw3F)`cNXo|{M zwn^yh*lA;L&u+56RaJ{?r=8t#bK_Gj;^%BG95Yu?zS_*U>z2K_g$4ipCbgRvpFHC> zdg-Vu`PTd?H;48ok#7ReIGiR-xW0J7!Dc}Y2`z_&_QUOboFWD+3JrbT68dFMM=k~^ HFjxZso}Jb2 diff --git a/Open-ILS/src/cgi-bin/support/plus.gif b/Open-ILS/src/cgi-bin/support/plus.gif deleted file mode 100644 index b2c997233b3f7b0fd56c4637c2c20aaf0d47bae7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 89 zcmZ?wbhEHb6k-r!n8?J?(9poZ!0`Y7e;}#&lZBCifr&u}$Og&^0ohtp^czmUT|IBk qf~en0XVhiRX3S&EJ6Nfhb5kY1Re>f2&SBJ{1ibDv2XRV|Dor_^WyXB*=Ku>91RN!zTl3yBbIVx z(geQ%ggTf9umTL|phE>VfGW0dOs3%S#nN%*vE*Enb)jBp9@2x>3JQh1R%p`NKy3y_ zU3YW4U}Q`#nViy?7fYC*mTrH-X7dccKo2mX(s=~L^<(g+r59TS6iqRkj2so5zx+t0 zo0(kzz6vnCo~H$RBRBH)J1GX_SNvfE*Z~wa*h)-iiw*S>Xcn2f6(IYmN~W^Xa^K5L zAex2;PwPjN7>)J4^$VxEb>L;|NOI2mP7BNcjAM&;D`d1LQE7F1uO6=7d%+o2q9~a& z^=HF5f%;G1kxWBiba`M*MXx~Y7eUYLsomU#>SdCrPUj>1OFJ?by71aqM(w;SNCnf+=v){(2QoAPYLn^Co4umpI zZBr+TQf2|-$OSB}T&RT}4J2kXT)9=qY~~&gO+?Wfm<{S%x+=cSPXj28urVYrD5gv> z1x&7r!xs%3p=C(_v_;&ng?=lfkaLrYG$*dMwTX12GNmWsd~wr2�PO#XTOK|5d)& z!4vms05e%S6&9cUdCfvAM{4}`Ll&Au0|4ZI{x#q|zXU~)a%9_I{Pz zF8K#`U8CUK$V+kftzmD{56XRA*JOAEn0*=T9qYDGam8&jKK%R;2frNVs?fakAt(1x zVoBrOZf<9tZI{^DPQFJAYw$bp-YzSMPP;$X(ujj4M^>&|RhjNU%J*O1o>2EXGlIU? f&E;Ccsie~d>oCoZ diff --git a/Open-ILS/src/cgi-bin/support/trash.gif b/Open-ILS/src/cgi-bin/support/trash.gif deleted file mode 100644 index cfa0f000e1ed3b61c8737fcfbef4b78035a6abe7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1051 zcmeH`!B0|g0LLGK3dPJgm@T#>b?KJNwY61t2y23!a_iPbmlJ1M5VKlN19e8^5=^!z zbD)u~Nn)UBz(^5iXd;hRCWauSKscU&!V@09@^9$c_wYG>4xjDIC@(v6wu%B#plCOQ zlj1%HL7xpg`;4hq!Iu!Ay`fHi8EnwqRZheRTo3t^+{2HkSV8B3ac*wiwj`U#enmI4T(`vn#vK;=k2di7RfPB!bd zJK#>yEZWxDDf!FE7-xpVy$l$}cV*&0M5)OxjQmJ|k6$*vDy}eU@5RE6J(P)Qp+ZeFi9t}!OUd7^O(;WX^ z+tZm1;6~zHF4t@}>pdVC3@Q`~e*%oJB(?5U`#K^Y8IgTkSWbYYT`>3^JQN6~{i|c1 zT@Hui@px7N7}o0@4u@hP=0$@VCwTuo#%8nWYPtge=>Pt?01YMJAgCKUv1i)*1VoHM zg(NCdC7W!ynX~=LT1$V~nzDI+!inF1=tx}_nc5}mr=DV)ug;EKpMRZBPRn{eeTULj zT$`c1GEET^B}LcnR&AAaiH{Ye*N`rB57O`u#Dp_b1s(h%A~RpaD3zSN{F_j2tj!_g zDpL!j?zKmG<;}MS$4?;^-Us|{&uLL9Bj?<{OfuP3Q`%K@Iu9puGT|qsM`h&mnJkio zah!lJc2>jfh55v~gO_sCXyqAH#KmqWJ;xJR)WRHv@kL7O1(~3lev(ei&BE0!@)+$U l*+Y54N|AtcU>`GZuw~%!;jig5uN)!pv)3}!7s*7Zconnection($config{dsn},$config{usr},$config{pw}); -OpenILS::Application::Storage::CDBI->db_Main->{ AutoCommit } = 1; - -my $cgi = new CGI; - -#------------------------------------------------------------------------------- -# setup part -#------------------------------------------------------------------------------- -my @perms = sort { $a->code cmp $b->code } permission::perm_list->retrieve_all; - -my %org_cols = ( qw/id GroupID name Name parent ParentGroup description Description application_perm ApplicationPermission/ ); - -my @col_display_order = ( qw/id name parent description application_perm/ ); - -if (my $action = $cgi->param('action')) { - if ( $action eq 'Update' ) { - for my $id ( ($cgi->param('id')) ) { - my $u = permission::grp_tree->retrieve($id); - for my $col ( keys %org_cols ) { - next if ($cgi->param($col."_$id") =~ /Select One/o); - $u->$col( $cgi->param($col."_$id") ); - } - $u->update; - } - } elsif ( $action eq 'Set Permissions' ) { - my $grp = permission::grp_tree->retrieve($cgi->param('perms')); - my @ids = $cgi->param('permission'); - for my $perm ( @perms ) { - if (my $id = $cgi->param('permission_'.$perm->id) ) { - my $p = permission::grp_perm_map->search({perm=>$id,grp=>$grp->id})->next; - my $d = $cgi->param("depth_$id"); - my $g = $cgi->param("grant_$id") || 'f'; - if (!$p) { - $p = permission::grp_perm_map->create({perm=>$id,grp=>$grp->id,depth=>$d,grantable=>$g}); - } else { - $p->depth( $d ); - $p->grantable( $g ); - } - $p->update; - } else { - permission::grp_perm_map->search({perm=>$perm->id,grp=>$grp->id})->delete_all; - } - } - $cgi->param('action'=>'child'); - } elsif ( $action eq 'Add New' ) { - permission::grp_tree->create( { map { defined($cgi->param($_)) ? ($_ => $cgi->param($_)) : () } keys %org_cols } ); - } -} - -#------------------------------------------------------------------------------- -# HTML part -#------------------------------------------------------------------------------- - -print < - - - - - - - - - - - -Home - -

User Group Hierarchy Setup

-
-HEADER - -my $uri = $cgi->url(-relative=>1); - -my $top; -for my $grp ( permission::grp_tree->search( {parent=>undef} ) ) { - my $name = $grp->name; - my $desc = $grp->description || $grp->name; - $top = $grp->id; - $name =~ s/'/\\'/og; - print <<" HEADER"; -
- -
-
-HEADER - -#------------------------------------------------------------------------------- -# Logic part -#------------------------------------------------------------------------------- - -if (my $action = $cgi->param('action')) { - if ( $action eq 'child' ) { - my $id = $cgi->param('id'); - if ($id) { - my $node = permission::grp_tree->retrieve($id); - #----------------------------------------------------------------------- - # child form - #----------------------------------------------------------------------- - - print "

Edit Group '".$node->name."'

"; - print "
". - "\n"; - - print Tr( - th($org_cols{id}), - td( $node->id() ), - ); - print Tr( - th($org_cols{name}), - td("name() ."\">"), - ); - print Tr( - th($org_cols{parent}), - td(""), - ); - print Tr( - th($org_cols{description}), - td("description() ."\">"), - ); - print Tr( - th($org_cols{application_perm}), - "" - ); - - print Tr( "" ); - - print "
".do { - my $out = ''; - $out; - }."

"; - - - print "

Group Permissions

"; - - print "
". - "\n". - ""; - - for my $perm ( sort {$a->code cmp $b->code} @perms ) { - my $grp = $node; - my $out = 'parent)); - $stuff; - }.">".$outype->name.""; - } - $out .= ""; - $out .= "" - - ); - } - - print Tr( "" ); - print "
PermissionSelectAt DepthGrantable
search( - { grp => $grp->id, - perm => $perm->id } - )->next; - $stuff = "checked='checked' " if ($setting && $setting->grantable); - } - } while (!$stuff && $grp && ($grp = $grp->parent)); - $stuff; - }.">"; - - $grp = $node; - print Tr( "".$perm->code."". - "search( - { grp => $grp->id, - perm => $perm->id } - )->next; - $stuff = "checked " if ($setting); - $stuff .= "disabled " if($setting && $setting->grp != $node->id); - } - } while (!$stuff && $grp && ($grp = $grp->parent)); - $stuff; - }. - ">$out", - "

"; - - - - print "

New Child

"; - - print "
". - "\n"; - - print Tr( - th($org_cols{name}), - td(""), - ); - print Tr( - th($org_cols{description}), - td(""), - ); - print Tr( "" ); - print "
", - "

"; - - } - } -} - -print "
"; - - diff --git a/Open-ILS/src/extras/Makefile.install b/Open-ILS/src/extras/Makefile.install index 7df8e18af5..6c7161f948 100644 --- a/Open-ILS/src/extras/Makefile.install +++ b/Open-ILS/src/extras/Makefile.install @@ -91,6 +91,7 @@ DEBS = \ libnet-server-perl\ libnspr4-dev\ libole-storage-lite-perl\ + libparent-perl \ libpq-dev\ libreadline5-dev\ libspreadsheet-writeexcel-perl\ @@ -162,6 +163,7 @@ FEDORA_13_RPMS = \ mod_ssl \ ncurses-devel \ ncurses-libs \ + perl-parent \ perl-Business-CreditCard \ perl-Business-ISBN \ perl-Business-ISBN-Data \ diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm b/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm index abb50a32f8..5bf0141cdb 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/OfflineStore.pm @@ -1,6 +1,15 @@ package OpenILS::Utils::OfflineStore; use strict; use warnings; -use base 'Class::DBI'; + +use UNIVERSAL::require; +if ('Class::DBI::Frozen::301'->use) { + use parent 'Class::DBI::Frozen::301'; +} elsif ('Class::DBI'->use) { + use parent 'Class::DBI'; +} else { + die $@; +} + use DBI; use OpenSRF::Utils::Config; @@ -40,7 +49,7 @@ sub disconnect { package OpenILS::Utils::OfflineStore::Session; -use base 'OpenILS::Utils::OfflineStore'; +use parent 'OpenILS::Utils::OfflineStore'; sub _create_table { my $self = shift; @@ -71,7 +80,7 @@ __PACKAGE__->has_many(scripts => 'OpenILS::Utils::OfflineStore::Script'); package OpenILS::Utils::OfflineStore::Script; -use base 'OpenILS::Utils::OfflineStore'; +use parent 'OpenILS::Utils::OfflineStore'; sub _create_table { my $self = shift; diff --git a/Open-ILS/src/support-scripts/eg_db_config.pl b/Open-ILS/src/support-scripts/eg_db_config.pl index 695602c154..ef6e87b37a 100755 --- a/Open-ILS/src/support-scripts/eg_db_config.pl +++ b/Open-ILS/src/support-scripts/eg_db_config.pl @@ -27,7 +27,6 @@ use File::Basename; my ($dbhost, $dbport, $dbname, $dbuser, $dbpw, $help); my $config_file = ''; my $build_db_sh = ''; -my $bootstrap_file = ''; my $offline_file = ''; my $prefix = ''; my $sysconfdir = ''; @@ -77,24 +76,6 @@ sub update_config { die "ERROR: Failed to update the configuration file '$config_file'\n"; } -# write out the DB bootstrapping config -sub create_db_bootstrap { - my ($setup, $settings) = @_; - - open(FH, '>', $setup) or die "Could not write database setup to $setup\n"; - - print "Writing database bootstrapping configuration to $setup\n"; - - printf FH "\$main::config{dsn} = 'dbi:Pg:host=%s;dbname=%s;port=%d';\n", - $settings->{host}, $settings->{db}, $settings->{port}; - - printf FH "\$main::config{usr} = '%s';\n", $settings->{user}; - printf FH "\$main::config{pw} = '%s';\n", $settings->{pw}; - - print FH "\$main::config{index} = 'config.cgi';\n"; - close(FH); -} - # write out the offline config sub create_offline_config { my ($setup, $settings) = @_; @@ -149,17 +130,14 @@ sub create_schema { chdir($script_dir); } -my $bootstrap; my $offline; my $cschema; my $uconfig; my %settings; GetOptions("create-schema" => \$cschema, - "create-bootstrap" => \$bootstrap, "create-offline" => \$offline, "update-config" => \$uconfig, - "bootstrap-file=s" => \$bootstrap_file, "config-file=s" => \$config_file, "build-db-file=s" => \$build_db_sh, "service=s" => \@services, @@ -194,10 +172,6 @@ if (!$build_db_sh) { $build_db_sh = File::Spec->catfile($script_dir, '../sql/Pg/build-db.sh'); } -if (!$bootstrap_file) { - $bootstrap_file = File::Spec->catfile($sysconfdir, 'live-db-setup.pl'); -} - if (!$offline_file) { $offline_file = File::Spec->catfile($sysconfdir, 'offline-config.pl'); } @@ -211,10 +185,9 @@ if ($uconfig) { update_config(\@services, \%settings); } get_settings(\%settings); if ($cschema) { create_schema(\%settings); } -if ($bootstrap) { create_db_bootstrap($bootstrap_file, \%settings); } if ($offline) { create_offline_config($offline_file, \%settings); } -if ((!$cschema && !$uconfig && !$bootstrap && !$offline) || $help) { +if ((!$cschema && !$uconfig && !$offline) || $help) { print < $(TMP)/cgi-bin/$$xxx; done - cp $(TMP)/cgi-bin/*cgi $(DESTDIR)$(CGIDIR) - cp -r @top_srcdir@/Open-ILS/src/cgi-bin/support $(DESTDIR)$(CGIDIR) - chmod 755 $(DESTDIR)$(CGIDIR)/*cgi - install-data-local: $(MKDIR_P) $(DESTDIR)$(WEBDIR)/opac/common/js for i in $(OPACJS); do \ diff --git a/README b/README index cccb45ae5e..dc671cf2d7 100644 --- a/README +++ b/README @@ -47,7 +47,7 @@ make STAFF_CLIENT_BUILD_ID=rel_trunk install This will install Evergreen, including example configuration files in /openils/conf/ that you can use as templates for your own configuration files. -The STAFF_CLIENT_BUILD_ID variable stamps the server-side and client-side files +The STAFF_CLIENT_STAMP_ID variable stamps the server-side and client-side files for the staff client to ensure that they match. Install Dojo Toolkit: @@ -125,7 +125,7 @@ up a database called "evergreen". Note that the location of the PostgreSQL commands, we assume that you are working with PostgreSQL 8.4 on a Debian-based system: -createdb -E UNICODE evergreen +createdb -t template0 -E UNICODE evergreen createlang plperl evergreen createlang plperlu evergreen createlang plpgsql evergreen @@ -147,7 +147,7 @@ source directory, replacing , , , , and with the appropriate values for your PostgreSQL database: perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \ - --service all --create-schema --create-bootstrap --create-offline \ + --service all --create-schema --create-offline \ --user --password --hostname --port \ --database -- 2.11.0