[Rt-commit] [rtir] 01/01: Replace copy with a call to core.
Kevin Falcone
falcone at bestpractical.com
Fri Jul 25 17:56:53 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.2/crypt-not-gnupg
in repository rtir.
commit 1d63621baa3ba7042faba58e5c8feb65e428beaa
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 25 17:52:43 2014 -0400
Replace copy with a call to core.
RTIR contained yet another outdated copy of core code.
Instead, just pass through to the core component while retaining the
/RTIR/ namespace. Hopefully fewer needs for bugfixes in the future.
Closes issues #30052
---
html/RTIR/{GnuPG.html => Crypt.html} | 59 +-----------------------------------
html/RTIR/Display.html | 2 +-
html/RTIR/Incident/Display.html | 2 +-
3 files changed, 3 insertions(+), 60 deletions(-)
diff --git a/html/RTIR/GnuPG.html b/html/RTIR/Crypt.html
similarity index 54%
rename from html/RTIR/GnuPG.html
rename to html/RTIR/Crypt.html
index 21e32fa..b7b7f7f 100644
--- a/html/RTIR/GnuPG.html
+++ b/html/RTIR/Crypt.html
@@ -45,61 +45,4 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<& /RTIR/Elements/Header, Title => $title &>
-<& /Elements/Tabs &>
-
-% $m->callback( CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS );
-<& /Elements/ListActions, actions => \@results &>
-<form method="post" action="<% RT->Config->Get('WebPath') . $m->request_comp->path %>?id=<% $id %>">
-<a href="<% RT->Config->Get('WebURL') %>/RTIR/Display.html?id=<% $ticket->id %>#txn-<% $id %>">
-<% loc('Return back to the ticket') %>
-</a>
-<& /Elements/Submit,
- Label => ($encrypted? loc('Decrypt'): loc('Encrypt')),
- Name => ($encrypted? 'Decrypt': 'Encrypt'),
-&>
-</form>
-<%ARGS>
-$id => undef
-$Encrypt => 0
-$Decrypt => 0
-</%ARGS>
-<%INIT>
-my $txn = RT::Transaction->new( $session{'CurrentUser'} );
-$txn->Load( $id );
-unless ( $txn->id ) {
- Abort(loc("Couldn't load transaction #[_1]", $id));
-}
-$id = $txn->id;
-
-my $ticket = $txn->TicketObj;
-
-my $Type = RT::IR::TicketType( Ticket => $ticket );
-return $m->comp( '/Ticket/GnuPG.html', %ARGS ) unless $Type;
-
-my @results;
-
-my $encrypted = 0;
-
-my $attachments = $txn->Attachments;
-while ( my $attachment = $attachments->Next ) {
- next unless $attachment->ContentType =~ m{^x-application-rt/gpg-encrypted\b};
- $encrypted = 1;
- last;
-}
-$attachments->GotoFirstItem;
-
-if ( $Encrypt || $Decrypt ) {
- my $done = 1;
- while ( my $attachment = $attachments->Next ) {
- my ($status, $msg) = $Decrypt? $attachment->Decrypt : $attachment->Encrypt;
- push @results, $msg;
- unless ( $status ) {
- $done = 0; last;
- }
- }
- $encrypted = !$encrypted if $done;
-}
-
-my $title = loc("Encrypt/Decrypt transaction #[_1] of ticket #[_2]", $id, $ticket->id);
-</%INIT>
+<& /Ticket/Crypt.html, %ARGS &>
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index f2514db..9db7ec4 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -131,7 +131,7 @@
DisplayPath => RT->Config->Get('WebPath') ."/RTIR/Display.html?id=$id",
UpdatePath => RT->Config->Get('WebPath') ."/RTIR/Update.html",
ForwardPath => RT->Config->Get('WebPath') ."/RTIR/Forward.html",
- EncryptionPath => RT->Config->Get('WebPath') ."/RTIR/GnuPG.html",
+ EncryptionPath => RT->Config->Get('WebPath') ."/RTIR/Crypt.html",
WarnUnsigned => 1,
PathPrefix => RT->Config->Get('WebPath') ."/Ticket/",
&>
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 230e755..df9fbf3 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -126,7 +126,7 @@
DisplayPath => RT->Config->Get('WebPath') ."/RTIR/Display.html?id=$id",
UpdatePath => RT->Config->Get('WebPath') ."/RTIR/Update.html",
ForwardPath => RT->Config->Get('WebPath') ."/RTIR/Forward.html",
- EncryptionPath => RT->Config->Get('WebPath') ."/RTIR/GnuPG.html",
+ EncryptionPath => RT->Config->Get('WebPath') ."/RTIR/Crypt.html",
PathPrefix => RT->Config->Get('WebPath') ."/Ticket/",
&>
<%INIT>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list