diff -r -c5 eprints-2.3.3/bin/generate_apacheconf eprints-2.3.4/bin/generate_apacheconf *** eprints-2.3.3/bin/generate_apacheconf Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/bin/generate_apacheconf Tue Jul 6 14:31:57 2004 *************** *** 197,207 **** my $site_userfile = EPrints::Config::get( "cfg_path" )."/apache.conf"; print "Creating system wide apache conf files.\n" if( $noise >= 1 ); unless( -e $site_userfile ) { ! print "Creating $site_userfile.\n" if( $noise >= 2 ); open( CONF, ">$site_userfile" ) || die "Can't write to $site_userfile"; print CONF <= 1 ); unless( -e $site_userfile ) { ! print "Creating $site_userfile\n" if( $noise >= 2 ); open( CONF, ">$site_userfile" ) || die "Can't write to $site_userfile"; print CONF <= 2 ); my $startupfile = EPrints::Config::get( "bin_path" )."/startup.pl"; open( CONF, ">$site_sysfile" ) || die "Can't write to $site_sysfile"; print CONF <= 2 ); my $startupfile = EPrints::Config::get( "bin_path" )."/startup.pl"; open( CONF, ">$site_sysfile" ) || die "Can't write to $site_sysfile"; print CONF <= 2 ); open( CONF, ">$site_incfile" ) || die "Can't write to $site_incfile"; print CONF <= 2 ); open( CONF, ">$site_incfile" ) || die "Can't write to $site_incfile"; print CONF <get_conf( "config_path" )."/apache.conf"; my $vhostfile = $archive->get_conf( "config_path" )."/apachevhost.conf"; my $id = $archive->get_id(); ! print "Creating apache conf files for archive $archiveid.\n" if( $noise >= 1 ); unless( -e $userfile ) { ! print "Creating $userfile.\n" if( $noise >= 2 ); open( CONF, ">$userfile" ) || die "Can't write to $userfile"; print CONF <get_conf( "config_path" )."/apache.conf"; my $vhostfile = $archive->get_conf( "config_path" )."/apachevhost.conf"; my $id = $archive->get_id(); ! print "Creating apache conf files for archive $archiveid\n" if( $noise >= 1 ); unless( -e $userfile ) { ! print "Creating $userfile\n" if( $noise >= 2 ); open( CONF, ">$userfile" ) || die "Can't write to $userfile"; print CONF <= 2 ); open( CONF, ">$vhostfile" ) || die "Can't write to $vhostfile"; print CONF <= 2 ); open( CONF, ">$vhostfile" ) || die "Can't write to $vhostfile"; print CONF <get_conf( "securepath" ); } ! print "Creating $sysfile.\n" if( $noise >= 2 ); open( CONF, ">$sysfile" ) || die "Can't write to $sysfile"; print CONF <get_conf( "securepath" ); } ! print "Creating $sysfile\n" if( $noise >= 2 ); open( CONF, ">$sysfile" ) || die "Can't write to $sysfile"; print CONF <set_value( $_, $self->get_value( $_ ) ); } # Copy files ! my $rc = system( "/bin/cp -a ".$self->local_path()."/* ".$new_doc->local_path() ) & 0xffff; # If something's gone wrong... if ( $rc!=0 ) { $self->{session}->get_archive()->log( "Error copying from ".$self->local_path()." to ".$new_doc->local_path().": $!" ); --- 475,485 ---- { $new_doc->set_value( $_, $self->get_value( $_ ) ); } # Copy files ! my $rc = system( "/bin/cp -pR ".$self->local_path()."/* ".$new_doc->local_path() ) & 0xffff; # If something's gone wrong... if ( $rc!=0 ) { $self->{session}->get_archive()->log( "Error copying from ".$self->local_path()." to ".$new_doc->local_path().": $!" ); diff -r -c5 eprints-2.3.3/perl_lib/EPrints/EPrint.pm eprints-2.3.4/perl_lib/EPrints/EPrint.pm *** eprints-2.3.3/perl_lib/EPrints/EPrint.pm Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/perl_lib/EPrints/EPrint.pm Tue Jul 6 14:31:57 2004 *************** *** 915,924 **** --- 915,925 ---- my $prob = $self->{session}->make_doc_fragment(); $prob->appendChild( $doc->render_description() ); $prob->appendChild( $self->{session}->make_text( ": " ) ); $prob->appendChild( $_ ); + push @problems, $prob; } } return( \@problems ); } diff -r -c5 eprints-2.3.3/perl_lib/EPrints/Extras.pm eprints-2.3.4/perl_lib/EPrints/Extras.pm *** eprints-2.3.3/perl_lib/EPrints/Extras.pm Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/perl_lib/EPrints/Extras.pm Tue Jul 6 14:31:57 2004 *************** *** 287,298 **** $li->appendChild( $span ); } if( $subject->can_post && $exp != -1 && !$selected ) { my $ibutton = '_internal_'.$field->get_name.'_view_'.$current_subj->get_id.'=1'; ! my $intact = '_internal_'.$session->get_internal_button(); ! $ibutton = $intact.'='.$session->param( $intact ); my $url = $addurl.'&'.$ibutton.'&'.$field->get_name.'='.$subject->get_id.'#t'; $li->appendChild( $session->html_phrase( "lib/extras:subject_browser_add", link=>$session->make_element( "a", href=>$url ) ) ); } --- 287,302 ---- $li->appendChild( $span ); } if( $subject->can_post && $exp != -1 && !$selected ) { my $ibutton = '_internal_'.$field->get_name.'_view_'.$current_subj->get_id.'=1'; ! if( $session->internal_button_pressed ) ! { ! my $intact = '_internal_'.$session->get_internal_button(); ! $ibutton = $intact.'='.$session->param( $intact ); ! } ! my $url = $addurl.'&'.$ibutton.'&'.$field->get_name.'='.$subject->get_id.'#t'; $li->appendChild( $session->html_phrase( "lib/extras:subject_browser_add", link=>$session->make_element( "a", href=>$url ) ) ); } diff -r -c5 eprints-2.3.3/perl_lib/EPrints/MetaField/Pagerange.pm eprints-2.3.4/perl_lib/EPrints/MetaField/Pagerange.pm *** eprints-2.3.3/perl_lib/EPrints/MetaField/Pagerange.pm Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/perl_lib/EPrints/MetaField/Pagerange.pm Tue Jul 6 14:31:57 2004 *************** *** 89,99 **** "input", "accept-charset" => "utf-8", name => $fromid, value => $pages[0], size => 6, ! maxlength => 10 ) ); $frag->appendChild( $session->make_text(" ") ); $frag->appendChild( $session->html_phrase( "lib/metafield:to" ) ); $frag->appendChild( $session->make_text(" ") ); --- 89,99 ---- "input", "accept-charset" => "utf-8", name => $fromid, value => $pages[0], size => 6, ! maxlength => 120 ) ); $frag->appendChild( $session->make_text(" ") ); $frag->appendChild( $session->html_phrase( "lib/metafield:to" ) ); $frag->appendChild( $session->make_text(" ") ); *************** *** 102,112 **** "input", "accept-charset" => "utf-8", name => $toid, value => $pages[1], size => 6, ! maxlength => 10 ) ); return [ [ { el=>$frag } ] ]; } sub is_browsable --- 102,112 ---- "input", "accept-charset" => "utf-8", name => $toid, value => $pages[1], size => 6, ! maxlength => 120 ) ); return [ [ { el=>$frag } ] ]; } sub is_browsable diff -r -c5 eprints-2.3.3/perl_lib/EPrints/UserPage.pm eprints-2.3.4/perl_lib/EPrints/UserPage.pm *** eprints-2.3.3/perl_lib/EPrints/UserPage.pm Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/perl_lib/EPrints/UserPage.pm Tue Jul 6 14:31:57 2004 *************** *** 104,120 **** $session->render_error( $session->html_phrase( "lib/userpage:no_user" ) ); return; } my $user; ! if( EPrints::Utils::is_set( $username ) ) { ! $user = EPrints::User::user_with_username( $session, $username ); } else { ! $user = EPrints::User->new( $session, $userid ); } if( !defined $user ) { --- 104,124 ---- $session->render_error( $session->html_phrase( "lib/userpage:no_user" ) ); return; } my $user; ! if( EPrints::Utils::is_set( $userid ) ) { ! $user = EPrints::User->new( ! $session, ! $userid ); } else { ! $user = EPrints::User::user_with_username( ! $session, ! $username ); } if( !defined $user ) { *************** *** 177,187 **** $searchexp->dispose(); my $url; if( $staff ) { ! $url = $session->get_archive()->get_conf( "perl_url" )."/search/archive?userid=$userid&_action_search=1"; } else { $url = $session->get_archive()->get_conf( "perl_url" )."/user_eprints?userid=$userid"; } --- 181,191 ---- $searchexp->dispose(); my $url; if( $staff ) { ! $url = $session->get_archive()->get_conf( "perl_url" )."/users/search/archive?userid=$userid&_action_search=1"; } else { $url = $session->get_archive()->get_conf( "perl_url" )."/user_eprints?userid=$userid"; } diff -r -c5 eprints-2.3.3/perl_lib/EPrints/XML.pm eprints-2.3.4/perl_lib/EPrints/XML.pm *** eprints-2.3.3/perl_lib/EPrints/XML.pm Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/perl_lib/EPrints/XML.pm Tue Jul 6 14:31:57 2004 *************** *** 458,481 **** # lowercasing all tags screws up OAI. #$tagname = "\L$tagname"; push @n, '<', $tagname, ' '; - #foreach my $attr ( $node->getChildNodes ) my $nnm = $node->getAttributes; my $done = {}; foreach my $i ( 0..$nnm->getLength-1 ) { my $attr = $nnm->item($i); ! next if $done->{$attr->getName}; $done->{$attr->getName} = 1; # cjg Should probably escape these values. my $value = $attr->getValue; $value =~ s/&/&/g; $value =~ s/"/"/g; - my $name = $attr->getName; push @n, " ", $name."=\"".$value."\""; } #cjg This is bad. It makes nodes like
if # they are empty. Should make
like XML::DOM --- 458,481 ---- # lowercasing all tags screws up OAI. #$tagname = "\L$tagname"; push @n, '<', $tagname, ' '; my $nnm = $node->getAttributes; my $done = {}; foreach my $i ( 0..$nnm->getLength-1 ) { my $attr = $nnm->item($i); ! my $name = $attr->getName; ! next if( $name =~ m/^xmlns/ ); ! next if( $done->{$attr->getName} ); $done->{$attr->getName} = 1; # cjg Should probably escape these values. my $value = $attr->getValue; $value =~ s/&/&/g; $value =~ s/"/"/g; push @n, " ", $name."=\"".$value."\""; } #cjg This is bad. It makes nodes like
if # they are empty. Should make
like XML::DOM *************** *** 526,543 **** } elsif( EPrints::XML::is_dom( $node, "Text", "CDATASection", ! "EntityReference", ! "Comment" ) ) { push @n, $node->toString; } elsif( EPrints::XML::is_dom( $node, "Comment" ) ) { ! push @n, "" } else { print STDERR "EPrints::XML: Not sure how to turn node type ".$node->getNodeType."\ninto a string.\n"; } --- 526,542 ---- } elsif( EPrints::XML::is_dom( $node, "Text", "CDATASection", ! "EntityReference" ) ) { push @n, $node->toString; } elsif( EPrints::XML::is_dom( $node, "Comment" ) ) { ! push @n, "" } else { print STDERR "EPrints::XML: Not sure how to turn node type ".$node->getNodeType."\ninto a string.\n"; } diff -r -c5 eprints-2.3.3/cgi/oai2 eprints-2.3.4/cgi/oai2 *** eprints-2.3.3/cgi/oai2 Thu Mar 4 19:02:49 2004 --- eprints-2.3.4/cgi/oai2 Tue Jul 6 14:31:57 2004 *************** *** 740,753 **** if( $count > 0 ) { $tokenvalue = "deletion/0/$cache".$mdtoken; } } ! $response->appendChild( $session->render_data_element( ! 2, ! "resumptionToken", ! $tokenvalue ) ); my $f = $session->make_doc_fragment(); $f->appendChild( $session->make_indent( 2 ) ); $f->appendChild( $response ); return $f; --- 740,757 ---- if( $count > 0 ) { $tokenvalue = "deletion/0/$cache".$mdtoken; } } ! ! if( EPrints::Utils::is_set( $tokenvalue ) ) ! { ! $response->appendChild( $session->render_data_element( ! 2, ! "resumptionToken", ! $tokenvalue ) ); ! } my $f = $session->make_doc_fragment(); $f->appendChild( $session->make_indent( 2 ) ); $f->appendChild( $response ); return $f;