[rt-users] strange $RT::WebPath results

David Chu davidchu at aol.net
Tue Jun 4 11:58:48 EDT 2002


I am making some modifications to ShowTransaction and it turned out that I
needed to add the $RT::WebPath to all instances of href links in
ShowTransaction.  This works fine for everything except sometimes a
mysterious "/%/" is appended to my $RT::Webpath.  Notably, this occurs on
the first transaction only.  So for example below, it would generate:
"/rt/%/" rather than just "/rt/".  However, on subsequent calls to
ShowTransaction, everything works fine.  Has anyone else experienced
something similar?

Below is code from ShowTransaction that I have modified.



# If the transaction has anything attached to it at all
if ($Transaction->Message->First && $ShowTitleBarCommands) {
 if ($Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket')) {
  $titlebar_commands .=

######Below is the line that is funky
      "[<a href=\"" . <% $RT::WebPath %> . "/Ticket/Update.html?id=".


    $Transaction->Ticket . "&QuoteTransaction=".$Transaction->Id.
    "&Action=Respond\">Reply</a>] ";
 }
 if ($Transaction->TicketObj->CurrentUserHasRight('CommentOnTicket')) {
      $titlebar_commands .=
      "[<a href=\"" . <% $RT::WebPath %> .
"/Ticket/Update.html?id=".$Transaction->Ticket.
      "&QuoteTransaction=".$Transaction->Id.
      "&Action=Comment\">Comment</a>]";
 }
}

</%INIT>

-david

-----------------------------------
David C. Chu
Network Tools Intern
America Online
-----------------------------------





More information about the rt-users mailing list