rt.patch 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. Index: html/Elements/Login
  2. --- html/Elements/Login.orig 2003-11-18 01:31:11.000000000 +0100
  3. +++ html/Elements/Login 2003-11-25 17:08:38.000000000 +0100
  4. @@ -87,11 +87,13 @@
  5. If you've forgotten your username or password, RT can <A
  6. href="/NoAuth/Reminder.html">send you a reminder</a>.
  7. -->
  8. +<!--
  9. <BR>
  10. <BR>
  11. <BR>
  12. <HR>
  13. <& /Elements/Footer, Menu => 0 &>
  14. +-->
  15. <%ARGS>
  16. $user => ""
  17. $pass => undef
  18. Index: html/Ticket/Elements/ShowMessageStanza
  19. --- html/Ticket/Elements/ShowMessageStanza.orig 2004-03-16 16:19:24.000000000 +0100
  20. +++ html/Ticket/Elements/ShowMessageStanza 2004-03-16 16:20:51.000000000 +0100
  21. @@ -24,12 +24,40 @@
  22. % if (ref($Message)) {
  23. <font color="<%$colors[$Depth]%>">
  24. <%perl>
  25. -foreach my $stanza (@$Message) {
  26. - if ( ref $stanza eq "ARRAY" ) {
  27. - $m->comp( 'ShowMessageStanza',
  28. - Depth => $Depth + 1,
  29. - Transaction => $Transaction,
  30. - Message => $stanza );
  31. + my $msg='';
  32. + my $wrapfunc = sub {
  33. + my $max = 0;
  34. + foreach ( split ( /\n/, $_[0] ) ) {
  35. + $max = length if length > $max;
  36. + }
  37. + if ( $max > 76 ) {
  38. + require Text::Wrapper;
  39. + my $wrapper = new Text::Wrapper(
  40. + columns => 70,
  41. + body_start => ( $max > 70 * 3 ? ' ' : '' ),
  42. + par_start => '');
  43. + $_[0] = $wrapper->wrap($_[0]);
  44. + }
  45. + RT::Interface::Web::EscapeUTF8(\$_[0]);
  46. + $m->comp('/Elements/Callback', content => \$_[0], %ARGS);
  47. + };
  48. + foreach my $stanza (@$Message) {
  49. + if ( ref $stanza eq "ARRAY" ) {
  50. + if ($msg ne '') {
  51. + $wrapfunc->($msg);
  52. +</%perl>
  53. +<font color="<%$colors[$Depth]%>"><pre><%$msg |n%></pre></font>
  54. +<%perl>
  55. + $msg = '';
  56. + }
  57. + $m->comp( 'ShowMessageStanza',
  58. + Depth => $Depth + 1,
  59. + Transaction => $Transaction,
  60. + Message => $stanza );
  61. + }
  62. + elsif ( ref $stanza eq "HASH" ) {
  63. + $msg .= "$stanza->{raw}\n";
  64. + }
  65. }
  66. elsif ( ref $stanza eq "HASH" ) {
  67. my $content = $stanza->{raw};
  68. Index: lib/RT/Attachment_Overlay.pm
  69. --- lib/RT/Attachment_Overlay.pm.orig 2003-11-18 01:31:13.000000000 +0100
  70. +++ lib/RT/Attachment_Overlay.pm 2003-11-25 17:08:38.000000000 +0100
  71. @@ -318,10 +318,11 @@
  72. # If we somehow fail to do the decode, at least push out the raw bits
  73. eval {return( Encode::decode_utf8($content))} || return ($content);
  74. }
  75. -
  76. - eval { Encode::from_to($content, 'utf8' => $enc);};
  77. - if ($@) {
  78. - $RT::Logger->error("Could not convert attachment from assumed utf8 to '$enc' :".$@);
  79. + if (!$enc) {
  80. + eval { Encode::from_to($content, 'utf8' => $enc);};
  81. + if ($@) {
  82. + $RT::Logger->error("Could not convert attachment from assumed utf8 to '$enc' :".$@);
  83. + }
  84. }
  85. return $content;
  86. }
  87. Index: lib/RT/User_Overlay.pm
  88. --- lib/RT/User_Overlay.pm.orig 2003-11-18 01:31:14.000000000 +0100
  89. +++ lib/RT/User_Overlay.pm 2003-11-25 17:08:38.000000000 +0100
  90. @@ -279,7 +279,7 @@
  91. #If the create failed.
  92. unless ($id) {
  93. $RT::Handle->Rollback();
  94. - $RT::Logger->error("Could not create a new user - " .join('-'. %args));
  95. + $RT::Logger->error("Could not create a new user - " .join('-', %args));
  96. return ( 0, $self->loc('Could not create user') );
  97. }
  98. Index: html/Elements/Header
  99. --- html/Elements/Header.orig 2005-03-27 09:40:16 +0200
  100. +++ html/Elements/Header 2005-08-11 11:17:29 +0200
  101. @@ -77,7 +77,7 @@
  102. >
  103. <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
  104. <tr>
  105. - <td colspan=2><a href="http://bestpractical.com"><img src="<%$RT::WebImagesURL%>/bplogo.gif" alt="<%loc("Best Practical Solutions, LLC corporate logo")%>" width="230" height="50"></a></td>
  106. + <td colspan=2><a href="<%$RT::LogoLink%>"><img src="<%$RT::LogoURL%>" alt="" width="230" height="50"></a></td>
  107. <td>&nbsp;</td>
  108. <td>&nbsp;</td>
  109. <td width="50%" align="right">