From 32da33792be36b93ce982e9191aaa305d697e1e9 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 31 Dec 2009 12:44:09 +0000 Subject: [PATCH] rt 3.6.10 --- rt/etc/RT_Config.pm.in | 21 ++++- rt/html/Admin/Users/Modify.html | 4 +- rt/html/Elements/CollectionAsTable/Row | 4 +- rt/html/Elements/Footer | 23 +----- rt/html/Elements/Header | 4 +- rt/html/Elements/Menu | 4 +- rt/html/Elements/PageLayout | 4 +- rt/html/Elements/QuickCreate | 4 +- rt/html/Elements/SelectDate | 4 +- rt/html/Elements/SimpleSearch | 4 +- rt/html/Elements/Tabs | 4 +- rt/html/Elements/TicketList | 4 +- rt/html/Elements/TitleBoxStart | 4 +- rt/html/NoAuth/css/3.5-default/main.css | 4 +- rt/html/NoAuth/css/3.5-default/misc.css | 4 +- rt/html/NoAuth/css/3.5-default/titlebox.css | 4 +- rt/html/NoAuth/css/3.5-default/transactions.css | 4 +- rt/html/Prefs/SearchOptions.html | 4 +- rt/html/Search/Bulk.html | 5 +- rt/html/Ticket/Create.html | 9 ++- rt/html/Ticket/Display.html | 12 +-- rt/html/Ticket/Elements/ShowSummary | 4 +- rt/html/Ticket/Elements/ShowTransactionAttachments | 4 +- rt/html/Ticket/Elements/Tabs | 8 +- rt/html/User/Prefs.html | 4 +- rt/html/Widgets/TitleBoxStart | 4 +- rt/lib/RT/Groups_Overlay.pm | 4 +- rt/lib/RT/Record.pm | 4 +- rt/lib/RT/SearchBuilder.pm | 4 +- rt/lib/RT/Ticket_Overlay.pm | 90 ++++++++++------------ rt/lib/RT/Transaction_Overlay.pm | 4 +- rt/lib/RT/User_Overlay.pm | 4 +- rt/lib/RT/Users_Overlay.pm | 4 +- rt/sbin/rt-setup-database.in | 4 +- 34 files changed, 136 insertions(+), 140 deletions(-) diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index cf089fb8d..37a2c17bb 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -360,6 +360,13 @@ Set($LogoURL , $WebImagesURL . "bplogo.gif"); Set($WebNoAuthRegex, qr!^/rt(?:/+NoAuth/| /+REST/\d+\.\d+/NoAuth/)!x ); +# SelfServiceRegex - What portion of RT's URLspace should +# be accessible to Unprivileged users +# This does not override the redirect from /Ticket/Display.html +# to /SelfService/Display.html when Unprivileged +# users attempt to access ticked displays +Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x ); + # For message boxes, set the entry box width and what type of wrapping # to use. # @@ -414,6 +421,13 @@ Set($WebExternalGecos , undef); Set($WebExternalAuto , undef); +# If $WebExternalAuto is true, this will be passed to User's +# Create method. Use it to set defaults, such as creating +# Unprivileged users with { Privileged => 0 } +# Must be a hashref of arguments + +Set($AutoCreate, undef); + # $WebSessionClass is the class you wish to use for managing Sessions. # It defaults to use your SQL database, but if you are using MySQL 3.x and # plans to use non-ascii Queue names, uncomment and add this line to @@ -542,8 +556,11 @@ Set($EmailOutputEncoding , 'utf-8'); Set($DateDayBeforeMonth , 1); -# Should "Tuesday" default to meaning "Next Tuesday" or "Last Tuesday"? -# Set to 0 for "Next" or 1 for "Last". +# Should an unspecified day or year in a date refer to a future or a +# past value? For example, should a date of "Tuesday" default to mean +# the date for next Tuesday or last Tuesday? Should the date "March 1" +# default to the date for next March or last March? +# Set to 0 for the next date or 1 for the last date. Set($AmbiguousDayInPast , 1); diff --git a/rt/html/Admin/Users/Modify.html b/rt/html/Admin/Users/Modify.html index be50dca0f..1be96f695 100644 --- a/rt/html/Admin/Users/Modify.html +++ b/rt/html/Admin/Users/Modify.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/CollectionAsTable/Row b/rt/html/Elements/CollectionAsTable/Row index d8492265e..bb9032149 100644 --- a/rt/html/Elements/CollectionAsTable/Row +++ b/rt/html/Elements/CollectionAsTable/Row @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/Footer b/rt/html/Elements/Footer index 6604bd211..914bbbd3b 100644 --- a/rt/html/Elements/Footer +++ b/rt/html/Elements/Footer @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -53,25 +53,6 @@ <& /Elements/Callback, %ARGS &> -%# - % if ($Debug >= 2 ) { % require Data::Dumper; % my $d = Data::Dumper->new([\%ARGS], [qw(%ARGS)]); diff --git a/rt/html/Elements/Header b/rt/html/Elements/Header index a32784e35..571da6c90 100644 --- a/rt/html/Elements/Header +++ b/rt/html/Elements/Header @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/Menu b/rt/html/Elements/Menu index b5b2bdad5..48fceebc0 100644 --- a/rt/html/Elements/Menu +++ b/rt/html/Elements/Menu @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/PageLayout b/rt/html/Elements/PageLayout index b9d15e9d3..3185662e1 100644 --- a/rt/html/Elements/PageLayout +++ b/rt/html/Elements/PageLayout @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/QuickCreate b/rt/html/Elements/QuickCreate index 75b3a4598..83d3a0d38 100644 --- a/rt/html/Elements/QuickCreate +++ b/rt/html/Elements/QuickCreate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/SelectDate b/rt/html/Elements/SelectDate index 23df246ce..d911cf713 100644 --- a/rt/html/Elements/SelectDate +++ b/rt/html/Elements/SelectDate @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/SimpleSearch b/rt/html/Elements/SimpleSearch index a4fd7e270..5f83da03e 100644 --- a/rt/html/Elements/SimpleSearch +++ b/rt/html/Elements/SimpleSearch @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/Tabs b/rt/html/Elements/Tabs index 36ecfa5a6..7b3d80928 100644 --- a/rt/html/Elements/Tabs +++ b/rt/html/Elements/Tabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/TicketList b/rt/html/Elements/TicketList index b36101e73..7f715d921 100644 --- a/rt/html/Elements/TicketList +++ b/rt/html/Elements/TicketList @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Elements/TitleBoxStart b/rt/html/Elements/TitleBoxStart index ba24fd92e..da04f8b7d 100644 --- a/rt/html/Elements/TitleBoxStart +++ b/rt/html/Elements/TitleBoxStart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/NoAuth/css/3.5-default/main.css b/rt/html/NoAuth/css/3.5-default/main.css index 7c4fa5a20..ed4a6989c 100644 --- a/rt/html/NoAuth/css/3.5-default/main.css +++ b/rt/html/NoAuth/css/3.5-default/main.css @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/NoAuth/css/3.5-default/misc.css b/rt/html/NoAuth/css/3.5-default/misc.css index cf7068a87..981dea36d 100755 --- a/rt/html/NoAuth/css/3.5-default/misc.css +++ b/rt/html/NoAuth/css/3.5-default/misc.css @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/NoAuth/css/3.5-default/titlebox.css b/rt/html/NoAuth/css/3.5-default/titlebox.css index 1e3f7c48e..82961bb38 100644 --- a/rt/html/NoAuth/css/3.5-default/titlebox.css +++ b/rt/html/NoAuth/css/3.5-default/titlebox.css @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/NoAuth/css/3.5-default/transactions.css b/rt/html/NoAuth/css/3.5-default/transactions.css index e9decf8ee..fee5c52f2 100755 --- a/rt/html/NoAuth/css/3.5-default/transactions.css +++ b/rt/html/NoAuth/css/3.5-default/transactions.css @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Prefs/SearchOptions.html b/rt/html/Prefs/SearchOptions.html index fd292d8eb..06f32ba7e 100644 --- a/rt/html/Prefs/SearchOptions.html +++ b/rt/html/Prefs/SearchOptions.html @@ -3,7 +3,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -25,7 +25,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Bulk.html b/rt/html/Search/Bulk.html index 9742df5ae..69ffba8eb 100644 --- a/rt/html/Search/Bulk.html +++ b/rt/html/Search/Bulk.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -335,6 +335,7 @@ while ( my $Ticket = $Tickets->Next ) { foreach my $key (@$list) { my ( $cfid, $cf ); + next if $key =~ /CustomField-(\d+)-Category$/; if ( $key =~ /CustomField-(\d+)-/ ) { $cfid = $1; $cf = RT::CustomField->new( $session{'CurrentUser'} ); diff --git a/rt/html/Ticket/Create.html b/rt/html/Ticket/Create.html index b22a67593..9b38d2608 100644 --- a/rt/html/Ticket/Create.html +++ b/rt/html/Ticket/Create.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -86,7 +86,7 @@ - + <&|/l&>Cc: @@ -96,7 +96,7 @@ - + <&|/l&>Admin Cc: @@ -152,6 +152,7 @@ <&|/l&>Describe the issue below:
+<& /Elements/Callback, _CallbackName => 'BeforeMessageBox', QueueObj => $QueueObj, %ARGS &> % if (exists $ARGS{Content}) { <& /Elements/MessageBox, Default => $ARGS{Content}, IncludeSignature => 0 &> % } else { diff --git a/rt/html/Ticket/Display.html b/rt/html/Ticket/Display.html index ca6939821..d0422c008 100644 --- a/rt/html/Ticket/Display.html +++ b/rt/html/Ticket/Display.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -135,11 +135,10 @@ if ($ARGS{'id'} eq 'new') { } $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'}; - if ( $ARGS{'UpdateTimeWorked'} || ( - defined $ARGS{'UpdateContent'} + if ( ( defined $ARGS{'UpdateContent'} && $ARGS{'UpdateContent'} ne '' && $ARGS{'UpdateContent'} ne "-- \n" - . $session{'CurrentUser'}->UserObj->Signature ) ) + . $session{'CurrentUser'}->UserObj->Signature ) || $session{'Attachments'} ) { $ARGS{UpdateAttachments} = $session{'Attachments'}; ProcessUpdateMessage( @@ -148,6 +147,9 @@ if ($ARGS{'id'} eq 'new') { TicketObj => $TicketObj, ); delete $session{'Attachments'}; + } elsif ( $ARGS{'UpdateTimeWorked'} ) { + # Add UpdateTimeWorked to TimeWorked (processed below with ProcessTicketBasics) + $ARGS{'TimeWorked'} = $TicketObj->TimeWorked + $ARGS{'UpdateTimeWorked'}; } #Process status updates my @PeopleActions = ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj=>$TicketObj); diff --git a/rt/html/Ticket/Elements/ShowSummary b/rt/html/Ticket/Elements/ShowSummary index e3464c732..2f153f3bc 100644 --- a/rt/html/Ticket/Elements/ShowSummary +++ b/rt/html/Ticket/Elements/ShowSummary @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments index 85e04e5e5..66823d743 100644 --- a/rt/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/html/Ticket/Elements/ShowTransactionAttachments @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Ticket/Elements/Tabs b/rt/html/Ticket/Elements/Tabs index 3dee8dff6..3149e6b7c 100644 --- a/rt/html/Ticket/Elements/Tabs +++ b/rt/html/Ticket/Elements/Tabs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -223,13 +223,13 @@ if ($args) { $tabs->{"i"} = { path => "Search/Results.html$args", title => loc('Show Results'), }; - if ($current_tab =~ "Search/Results.html") { + if ($current_tab =~ m{Search/Results.html}) { $current_tab = "Search/Results.html$args"; } $tabs->{"j"} = { path => "Search/Bulk.html$args", title => loc('Bulk Update'), }; - if ($current_tab =~ "Search/Bulk.html") { + if ($current_tab =~ m{Search/Bulk.html}) { $current_tab = "Search/Bulk.html$args"; } foreach my $searchtab (keys %{$searchtabs}) { diff --git a/rt/html/User/Prefs.html b/rt/html/User/Prefs.html index bb38760da..56d2ee05b 100644 --- a/rt/html/User/Prefs.html +++ b/rt/html/User/Prefs.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Widgets/TitleBoxStart b/rt/html/Widgets/TitleBoxStart index 1d8548d00..602106e71 100755 --- a/rt/html/Widgets/TitleBoxStart +++ b/rt/html/Widgets/TitleBoxStart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ %# along with this program; if not, write to the Free Software %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA %# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/copyleft/gpl.html. +%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/lib/RT/Groups_Overlay.pm b/rt/lib/RT/Groups_Overlay.pm index 82e021c16..aba5cc0b3 100644 --- a/rt/lib/RT/Groups_Overlay.pm +++ b/rt/lib/RT/Groups_Overlay.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm index b32ef5553..8664e2867 100755 --- a/rt/lib/RT/Record.pm +++ b/rt/lib/RT/Record.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/lib/RT/SearchBuilder.pm b/rt/lib/RT/SearchBuilder.pm index aa915d433..fd0842419 100644 --- a/rt/lib/RT/SearchBuilder.pm +++ b/rt/lib/RT/SearchBuilder.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/lib/RT/Ticket_Overlay.pm b/rt/lib/RT/Ticket_Overlay.pm index dad94375f..20f54625f 100644 --- a/rt/lib/RT/Ticket_Overlay.pm +++ b/rt/lib/RT/Ticket_Overlay.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -1403,52 +1403,43 @@ sub AddWatcher { @_ ); - # XXX, FIXME, BUG: if only email is provided then we only check - # for ModifyTicket right, but must try to get PrincipalId and - # check Watch* rights too if user exist + return ( 0, "No principal specified" ) + unless $args{'Email'} or $args{'PrincipalId'}; + + if ( !$args{'PrincipalId'} and $args{'Email'} ) { + my $user = RT::User->new( $self->CurrentUser ); + $user->LoadByEmail( $args{'Email'} ); + if ( $user->id ) { + $args{'PrincipalId'} = $user->PrincipalId; + delete $args{'Email'}; + } + } # {{{ Check ACLS + # ModifyTicket allow you to add any watcher + return $self->_AddWatcher(%args) + if $self->CurrentUserHasRight('ModifyTicket'); + #If the watcher we're trying to add is for the current user - if ( $self->CurrentUser->PrincipalId == ($args{'PrincipalId'} || 0) - or lc( $self->CurrentUser->UserObj->EmailAddress ) - eq lc( RT::User->CanonicalizeEmailAddress( $args{'Email'} ) || '' ) ) - { - # If it's an AdminCc and they don't have - # 'WatchAsAdminCc' or 'ModifyTicket', bail + if ( $self->CurrentUser->PrincipalId == ($args{'PrincipalId'} || 0) ) { + # If it's an AdminCc and they have 'WatchAsAdminCc' if ( $args{'Type'} eq 'AdminCc' ) { - unless ( $self->CurrentUserHasRight('ModifyTicket') - or $self->CurrentUserHasRight('WatchAsAdminCc') ) { - return ( 0, $self->loc('Permission Denied')) - } + return $self->_AddWatcher( %args ) + if $self->CurrentUserHasRight('WatchAsAdminCc'); } - # If it's a Requestor or Cc and they don't have - # 'Watch' or 'ModifyTicket', bail - elsif ( ( $args{'Type'} eq 'Cc' ) or ( $args{'Type'} eq 'Requestor' ) ) { - - unless ( $self->CurrentUserHasRight('ModifyTicket') - or $self->CurrentUserHasRight('Watch') ) { - return ( 0, $self->loc('Permission Denied')) - } + # If it's a Requestor or Cc and they have 'Watch' + elsif ( $args{'Type'} eq 'Cc' || $args{'Type'} eq 'Requestor' ) { + return $self->_AddWatcher( %args ) + if $self->CurrentUserHasRight('Watch'); } else { - $RT::Logger->warning( "$self -> AddWatcher got passed a bogus type"); + $RT::Logger->warning( "AddWatcher got passed a bogus type" ); return ( 0, $self->loc('Error in parameters to Ticket->AddWatcher') ); } } - # If the watcher isn't the current user - # and the current user doesn't have 'ModifyTicket' - # bail - else { - unless ( $self->CurrentUserHasRight('ModifyTicket') ) { - return ( 0, $self->loc("Permission Denied") ); - } - } - - # }}} - - return ( $self->_AddWatcher(%args) ); + return ( 0, $self->loc("Permission Denied") ); } #This contains the meat of AddWatcher. but can be called from a routine like @@ -2508,7 +2499,7 @@ sub _RecordNote { unless ( ($args{'MIMEObj'}->head->get('Message-ID') || '') =~ /<(rt-.*?-\d+-\d+)\.(\d+-0-0)\@\Q$RT::Organization>/ ) { - $args{'MIMEObj'}->head->set( 'RT-Message-ID', + $args{'MIMEObj'}->head->replace( 'RT-Message-ID', " sub CustomFieldValues { my $self = shift; my $field = shift; - if ( $field and $field !~ /^\d+$/ ) { - my $cf = RT::CustomField->new( $self->CurrentUser ); - $cf->LoadByNameAndQueue( Name => $field, Queue => $self->Queue ); - unless ( $cf->id ) { - $cf->LoadByNameAndQueue( Name => $field, Queue => 0 ); - } - unless ( $cf->id ) { - # If we didn't find a valid cfid, give up. - return RT::CustomFieldValues->new($self->CurrentUser); - } + + return $self->SUPER::CustomFieldValues( $field ) + if !$field || $field =~ /^\d+$/; + + my $cf = RT::CustomField->new( $self->CurrentUser ); + $cf->LoadByNameAndQueue( Name => $field, Queue => $self->Queue ); + unless ( $cf->id ) { + $cf->LoadByNameAndQueue( Name => $field, Queue => 0 ); } - return $self->SUPER::CustomFieldValues($field); + + # If we didn't find a valid cfid, give up. + return RT::ObjectCustomFieldValues->new( $self->CurrentUser ) + unless $cf->id; + + return $self->SUPER::CustomFieldValues( $cf->id ); } # }}} diff --git a/rt/lib/RT/Transaction_Overlay.pm b/rt/lib/RT/Transaction_Overlay.pm index dd1887e33..1a5473b3c 100644 --- a/rt/lib/RT/Transaction_Overlay.pm +++ b/rt/lib/RT/Transaction_Overlay.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/lib/RT/User_Overlay.pm b/rt/lib/RT/User_Overlay.pm index 8f4df467d..73c3bdd5b 100644 --- a/rt/lib/RT/User_Overlay.pm +++ b/rt/lib/RT/User_Overlay.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/lib/RT/Users_Overlay.pm b/rt/lib/RT/Users_Overlay.pm index 809fa6707..bdc7074ff 100644 --- a/rt/lib/RT/Users_Overlay.pm +++ b/rt/lib/RT/Users_Overlay.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -24,7 +24,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in index cf607e286..4ed48d7a3 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-2007 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -25,7 +25,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 or visit their web page on the internet at -# http://www.gnu.org/copyleft/gpl.html. +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. # # # CONTRIBUTION SUBMISSION POLICY: -- 2.11.0