rt.patch 4.3 KB

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