diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:16:28 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-06-04 00:16:28 -0700 |
commit | 7588a4ac90a9b07c08a3107cd1107d773be1c991 (patch) | |
tree | 55b8bedb5f899e705da0ba7f608267943bf89e94 /rt/sbin | |
parent | 98d2b25256055abb0dfcb9f586b434474fa97afd (diff) |
RT 4.0.13
Diffstat (limited to 'rt/sbin')
-rw-r--r-- | rt/sbin/rt-attributes-viewer.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-clean-sessions.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-dump-metadata.in | 3 | ||||
-rw-r--r-- | rt/sbin/rt-email-dashboards.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-email-digest.in | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-email-group-admin.in | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-fulltext-indexer | 13 | ||||
-rw-r--r-- | rt/sbin/rt-fulltext-indexer.in | 13 | ||||
-rwxr-xr-x | rt/sbin/rt-message-catalog | 2 | ||||
-rw-r--r-- | rt/sbin/rt-preferences-viewer.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-server.fcgi.in | 3 | ||||
-rw-r--r-- | rt/sbin/rt-server.in | 3 | ||||
-rwxr-xr-x | rt/sbin/rt-session-viewer | 2 | ||||
-rw-r--r-- | rt/sbin/rt-session-viewer.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-setup-database.in | 17 | ||||
-rwxr-xr-x | rt/sbin/rt-setup-fulltext-index | 2 | ||||
-rw-r--r-- | rt/sbin/rt-setup-fulltext-index.in | 2 | ||||
-rwxr-xr-x | rt/sbin/rt-shredder.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-test-dependencies.in | 9 | ||||
-rw-r--r-- | rt/sbin/rt-validate-aliases.in | 2 | ||||
-rw-r--r-- | rt/sbin/rt-validator.in | 8 | ||||
-rwxr-xr-x | rt/sbin/standalone_httpd | 3 | ||||
-rw-r--r-- | rt/sbin/standalone_httpd.in | 3 |
23 files changed, 62 insertions, 39 deletions
diff --git a/rt/sbin/rt-attributes-viewer.in b/rt/sbin/rt-attributes-viewer.in index c776f1a8c..59eb42361 100644 --- a/rt/sbin/rt-attributes-viewer.in +++ b/rt/sbin/rt-attributes-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-clean-sessions.in b/rt/sbin/rt-clean-sessions.in index 24ee86837..1d6e1cfb5 100644 --- a/rt/sbin/rt-clean-sessions.in +++ b/rt/sbin/rt-clean-sessions.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-dump-metadata.in b/rt/sbin/rt-dump-metadata.in index f58371f5d..20c28538b 100644 --- a/rt/sbin/rt-dump-metadata.in +++ b/rt/sbin/rt-dump-metadata.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -47,6 +47,7 @@ # # END BPS TAGGED BLOCK }}} use strict; +use warnings; # As we specify that XML is UTF-8 and we output it to STDOUT, we must be sure # it is UTF-8 so further XMLin will not break diff --git a/rt/sbin/rt-email-dashboards.in b/rt/sbin/rt-email-dashboards.in index aa5ce649f..f77ae6117 100644 --- a/rt/sbin/rt-email-dashboards.in +++ b/rt/sbin/rt-email-dashboards.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-email-digest.in b/rt/sbin/rt-email-digest.in index fd257fa77..68f0b4c92 100644 --- a/rt/sbin/rt-email-digest.in +++ b/rt/sbin/rt-email-digest.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-email-group-admin.in b/rt/sbin/rt-email-group-admin.in index 0e32525d9..f62662631 100755 --- a/rt/sbin/rt-email-group-admin.in +++ b/rt/sbin/rt-email-group-admin.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-fulltext-indexer b/rt/sbin/rt-fulltext-indexer index 396ef10bd..8ac0e9c21 100755 --- a/rt/sbin/rt-fulltext-indexer +++ b/rt/sbin/rt-fulltext-indexer @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -374,11 +374,18 @@ sub process_pg { my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) }; unless ( $status ) { - if ($dbh->errstr =~ /string is too long for tsvector/) { - warn "Attachment @{[$attachment->id]} not indexed, as it contains too many unique words to be indexed"; + if ( $dbh->err == 7 && $dbh->state eq '54000' ) { + warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words"; + } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) { + warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes"; } else { die "error: ". $dbh->errstr; } + + # Insert an empty tsvector, so we count this row as "indexed" + # for purposes of knowing where to pick up + eval { $dbh->do( $query, undef, "", $attachment->id ) } + or die "Failed to insert empty tsvector: " . $dbh->errstr; } } diff --git a/rt/sbin/rt-fulltext-indexer.in b/rt/sbin/rt-fulltext-indexer.in index 06aa89270..9ad6d26bd 100644 --- a/rt/sbin/rt-fulltext-indexer.in +++ b/rt/sbin/rt-fulltext-indexer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -374,11 +374,18 @@ sub process_pg { my $status = eval { $dbh->do( $query, undef, $$text, $attachment->id ) }; unless ( $status ) { - if ($dbh->errstr =~ /string is too long for tsvector/) { - warn "Attachment @{[$attachment->id]} not indexed, as it contains too many unique words to be indexed"; + if ( $dbh->err == 7 && $dbh->state eq '54000' ) { + warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains too many unique words"; + } elsif ( $dbh->err == 7 && $dbh->state eq '22021' ) { + warn "Attachment @{[$attachment->id]} cannot be indexed, as it contains invalid UTF8 bytes"; } else { die "error: ". $dbh->errstr; } + + # Insert an empty tsvector, so we count this row as "indexed" + # for purposes of knowing where to pick up + eval { $dbh->do( $query, undef, "", $attachment->id ) } + or die "Failed to insert empty tsvector: " . $dbh->errstr; } } diff --git a/rt/sbin/rt-message-catalog b/rt/sbin/rt-message-catalog index 070f6b2f3..b31b58de7 100755 --- a/rt/sbin/rt-message-catalog +++ b/rt/sbin/rt-message-catalog @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-preferences-viewer.in b/rt/sbin/rt-preferences-viewer.in index 1c32f879e..d32588eca 100644 --- a/rt/sbin/rt-preferences-viewer.in +++ b/rt/sbin/rt-preferences-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-server.fcgi.in b/rt/sbin/rt-server.fcgi.in index f84f6c103..632ba0ba6 100644 --- a/rt/sbin/rt-server.fcgi.in +++ b/rt/sbin/rt-server.fcgi.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) { require RT; RT->LoadConfig(); +RT->InitPluginPaths(); RT->InitLogging(); require Module::Refresh if RT->Config->Get('DevelMode'); diff --git a/rt/sbin/rt-server.in b/rt/sbin/rt-server.in index f84f6c103..632ba0ba6 100644 --- a/rt/sbin/rt-server.in +++ b/rt/sbin/rt-server.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) { require RT; RT->LoadConfig(); +RT->InitPluginPaths(); RT->InitLogging(); require Module::Refresh if RT->Config->Get('DevelMode'); diff --git a/rt/sbin/rt-session-viewer b/rt/sbin/rt-session-viewer index 4a9cf09aa..1a6334d94 100755 --- a/rt/sbin/rt-session-viewer +++ b/rt/sbin/rt-session-viewer @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-session-viewer.in b/rt/sbin/rt-session-viewer.in index 37e050a27..cdf7a77bc 100644 --- a/rt/sbin/rt-session-viewer.in +++ b/rt/sbin/rt-session-viewer.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2010 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in index 2efb9f329..f1e35f5cc 100644 --- a/rt/sbin/rt-setup-database.in +++ b/rt/sbin/rt-setup-database.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -206,7 +206,7 @@ foreach my $action ( @actions ) { sub action_create { my %args = @_; my $dbh = get_system_dbh(); - my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'pre' ); + my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'create' ); return ($status, $msg) unless $status; print "Now creating a $db_type database $db_name for RT.\n"; @@ -234,7 +234,7 @@ END sub action_schema { my %args = @_; my $dbh = get_admin_dbh(); - my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'pre' ); + my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'schema' ); return ($status, $msg) unless $status; print "Now populating database schema.\n"; @@ -244,7 +244,7 @@ sub action_schema { sub action_acl { my %args = @_; my $dbh = get_admin_dbh(); - my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'pre' ); + my ($status, $msg) = RT::Handle->CheckCompatibility( $dbh, 'acl' ); return ($status, $msg) unless $status; print "Now inserting database ACLs.\n"; @@ -257,7 +257,7 @@ sub action_coredata { $RT::Handle->dbh( undef ); RT::ConnectToDatabase(); RT::InitLogging(); - my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'pre' ); + my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'coredata' ); return ($status, $msg) unless $status; print "Now inserting RT core system objects.\n"; @@ -268,7 +268,7 @@ sub action_insert { my %args = @_; $RT::Handle = RT::Handle->new; RT::Init(); - my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'pre' ); + my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'insert' ); return ($status, $msg) unless $status; print "Now inserting data.\n"; @@ -308,6 +308,7 @@ sub action_upgrade { return (0, "Couldn't read dir '$base_dir' with upgrade data") unless -d $base_dir || -r _; + my $version_word_regex = join '|', RT::Handle->version_words; my $upgrading_from = undef; do { if ( defined $upgrading_from ) { @@ -318,7 +319,7 @@ sub action_upgrade { $upgrading_from = scalar <STDIN>; chomp $upgrading_from; $upgrading_from =~ s/\s+//g; - } while $upgrading_from !~ /^\d+\.\d+\.\w+$/; + } while $upgrading_from !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/; my $upgrading_to = $RT::VERSION; return (0, "The current version $upgrading_to is lower than $upgrading_from") @@ -353,7 +354,7 @@ sub action_upgrade { chomp $custom_upgrading_to; $custom_upgrading_to =~ s/\s+//g; last unless $custom_upgrading_to; - } while $custom_upgrading_to !~ /^\d+\.\d+\.\w+$/; + } while $custom_upgrading_to !~ /^\d+\.\d+\.\d+(?:$version_word_regex)?\d*$/; if ( $custom_upgrading_to ) { return ( diff --git a/rt/sbin/rt-setup-fulltext-index b/rt/sbin/rt-setup-fulltext-index index 862581544..ef9b7d543 100755 --- a/rt/sbin/rt-setup-fulltext-index +++ b/rt/sbin/rt-setup-fulltext-index @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-setup-fulltext-index.in b/rt/sbin/rt-setup-fulltext-index.in index da8089d94..eab720352 100644 --- a/rt/sbin/rt-setup-fulltext-index.in +++ b/rt/sbin/rt-setup-fulltext-index.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-shredder.in b/rt/sbin/rt-shredder.in index c0655dbe1..e7910e523 100755 --- a/rt/sbin/rt-shredder.in +++ b/rt/sbin/rt-shredder.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-test-dependencies.in b/rt/sbin/rt-test-dependencies.in index 5ce918b02..df1ef135f 100644 --- a/rt/sbin/rt-test-dependencies.in +++ b/rt/sbin/rt-test-dependencies.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -52,6 +52,7 @@ # use strict; +use warnings; no warnings qw(numeric redefine); use Getopt::Long; my %args; @@ -293,6 +294,7 @@ Log::Dispatch::Perl Test::WWW::Mechanize::PSGI Plack::Middleware::Test::StashWarnings 0.06 Test::LongString +Test::NoWarnings . $deps{'FASTCGI'} = [ text_to_hash( << '.') ]; @@ -340,7 +342,7 @@ Net::SMTP . $deps{'DASHBOARDS'} = [ text_to_hash( << '.') ]; -HTML::RewriteAttributes 0.04 +HTML::RewriteAttributes 0.05 MIME::Types URI 1.59 . @@ -361,13 +363,14 @@ Convert::Color . $deps{'HTML-DOC'} = [ text_to_hash( <<'.') ]; -Pod::Simple 3.17 +Pod::Simple 3.24 HTML::Entities . my %AVOID = ( 'DBD::Oracle' => [qw(1.23)], 'Email::Address' => [qw(1.893 1.894)], + 'Devel::StackTrace' => [qw(1.28 1.29)], ); if ($args{'download'}) { diff --git a/rt/sbin/rt-validate-aliases.in b/rt/sbin/rt-validate-aliases.in index 46ae8aac7..5dbfaa459 100644 --- a/rt/sbin/rt-validate-aliases.in +++ b/rt/sbin/rt-validate-aliases.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) diff --git a/rt/sbin/rt-validator.in b/rt/sbin/rt-validator.in index 331d5f379..d90280169 100644 --- a/rt/sbin/rt-validator.in +++ b/rt/sbin/rt-validator.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -894,7 +894,7 @@ push @CHECKS, 'LastUpdatedBy and Creator' => sub { 'Replace', "Column $column should point to a user, but there is record #$id in table $table\n" ."where it's not true. It's ok to replace these wrong references with id of any user.\n" - ."Note that id you enter is not checked. You can peak any user from your DB, but it's\n" + ."Note that id you enter is not checked. You can pick any user from your DB, but it's\n" ."may be better to create a special user for this, for example 'user_that_has_been_deleted'\n" ."or something like that.", "$table.$column -> user #$prop{$column}" @@ -1163,12 +1163,12 @@ records or ressurect accidentally deleted. mandatory. - it's equall to -c + it's equal to -c =item verbose print additional info to STDOUT - it's equall to -v + it's equal to -v =item resolve diff --git a/rt/sbin/standalone_httpd b/rt/sbin/standalone_httpd index cef0f3102..5bc8d0c8b 100755 --- a/rt/sbin/standalone_httpd +++ b/rt/sbin/standalone_httpd @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) { require RT; RT->LoadConfig(); +RT->InitPluginPaths(); RT->InitLogging(); require Module::Refresh if RT->Config->Get('DevelMode'); diff --git a/rt/sbin/standalone_httpd.in b/rt/sbin/standalone_httpd.in index f84f6c103..632ba0ba6 100644 --- a/rt/sbin/standalone_httpd.in +++ b/rt/sbin/standalone_httpd.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # <sales@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) { require RT; RT->LoadConfig(); +RT->InitPluginPaths(); RT->InitLogging(); require Module::Refresh if RT->Config->Get('DevelMode'); |