diff options
| author | ivan <ivan> | 2011-02-17 00:52:27 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2011-02-17 00:52:27 +0000 | 
| commit | 01352af8e44b7eb70b2b587ca43ab7ca946f038d (patch) | |
| tree | 6e724b2a809b8f9cb17f2aca606c36f0dec18078 | |
| parent | 0fb307c305e4bc2c9c27dc25a3308beae3a4d33c (diff) | |
commiting rt 3.8.9 to HEAD
75 files changed, 1893 insertions, 1278 deletions
diff --git a/rt/Makefile b/rt/Makefile index d497e900d..2365d927c 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  #  # DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated. @@ -63,7 +63,7 @@ SITE_CONFIG_FILE	=	$(CONFIG_FILE_PATH)/RT_SiteConfig.pm  RT_VERSION_MAJOR	=	3  RT_VERSION_MINOR	=	8 -RT_VERSION_PATCH	=	8 +RT_VERSION_PATCH	=	9  RT_VERSION		=	$(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)  TAG 			=	rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH) @@ -163,7 +163,8 @@ BINARIES		=	$(RT_MODPERL_HANDLER) \ -SYSTEM_BINARIES		=	rt-dump-database \ +SYSTEM_BINARIES		=	rt-attributes-viewer \ +				rt-dump-database \  				rt-setup-database \  				rt-email-digest \  				rt-email-dashboards \ diff --git a/rt/Makefile.in b/rt/Makefile.in index 1f42102aa..2288cfa59 100644 --- a/rt/Makefile.in +++ b/rt/Makefile.in @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  #  # DO NOT HAND-EDIT the file named 'Makefile'. This file is autogenerated. @@ -163,7 +163,8 @@ BINARIES		=	$(RT_MODPERL_HANDLER) \ -SYSTEM_BINARIES		=	rt-dump-database \ +SYSTEM_BINARIES		=	rt-attributes-viewer \ +				rt-dump-database \  				rt-setup-database \  				rt-email-digest \  				rt-email-dashboards \ diff --git a/rt/bin/fastcgi_server b/rt/bin/fastcgi_server index f8e8828ce..248267e45 100755 --- a/rt/bin/fastcgi_server +++ b/rt/bin/fastcgi_server @@ -1,4 +1,4 @@ -#!/Users/falcone/perl5/perlbrew/bin/perl +#!/usr/bin/perl  # BEGIN BPS TAGGED BLOCK {{{  #  # COPYRIGHT: diff --git a/rt/bin/mason_handler.fcgi b/rt/bin/mason_handler.fcgi index 881d6388a..432296be7 100755 --- a/rt/bin/mason_handler.fcgi +++ b/rt/bin/mason_handler.fcgi @@ -1,41 +1,41 @@  #!/usr/bin/perl  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,7 +44,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  use strict;  use warnings; diff --git a/rt/bin/mason_handler.scgi b/rt/bin/mason_handler.scgi index 1a497de77..5cbb9a30f 100755 --- a/rt/bin/mason_handler.scgi +++ b/rt/bin/mason_handler.scgi @@ -1,41 +1,41 @@  #!/usr/local/bin/speedy  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,7 +44,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  package RT::Mason; diff --git a/rt/bin/mason_handler.svc b/rt/bin/mason_handler.svc index 4276b6ea1..ceb6cbcd9 100644 --- a/rt/bin/mason_handler.svc +++ b/rt/bin/mason_handler.svc @@ -1,41 +1,41 @@  #!/usr/bin/perl  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,7 +44,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/bin/rt-crontool b/rt/bin/rt-crontool index 13c11bfd7..61932804c 100644 --- a/rt/bin/rt-crontool +++ b/rt/bin/rt-crontool @@ -1,41 +1,41 @@  #!/usr/bin/perl  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,7 +44,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  use strict;  use Carp; @@ -79,8 +79,6 @@ use RT;  use Getopt::Long;  use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent loc); -use RT::Tickets; -use RT::Template;  #Clean out all the nasties from the environment  CleanEnv(); @@ -112,6 +110,9 @@ RT->Config->Set( LogToScreen => $log ) if $log;  #Connect to the database and get RT::SystemUser and RT::Nobody loaded  RT::Init(); +require RT::Tickets; +require RT::Template; +  #Get the current user all loaded  my $CurrentUser = GetCurrentUser(); @@ -374,13 +375,13 @@ sub help {      print loc("Example:");      print "\n";      print " " -      . loc( "The following command will find all active tickets in the queue 'general' and set their priority to 99 if they haven't been touched in 4 hours:" +      . loc( "The following command will find all active tickets in the queue 'general' and set their priority to 99 if they are overdue:"        )        . "\n\n";      print " bin/rt-crontool \\\n";      print "  --search RT::Search::ActiveTicketsInQueue  --search-arg general \\\n"; -    print "  --condition RT::Condition::UntouchedInHours --condition-arg 4 \\\n"; +    print "  --condition RT::Condition::Overdue \\\n";      print "  --action RT::Action::SetPriority --action-arg 99 \\\n";      print "  --verbose\n"; diff --git a/rt/bin/rt-mailgate b/rt/bin/rt-mailgate index d9e85a7b9..9227a6ee6 100755 --- a/rt/bin/rt-mailgate +++ b/rt/bin/rt-mailgate @@ -1,41 +1,41 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,7 +44,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/bin/standalone_httpd b/rt/bin/standalone_httpd index f89c5fb7c..9488d0a8b 100755 --- a/rt/bin/standalone_httpd +++ b/rt/bin/standalone_httpd @@ -1,4 +1,4 @@ -#!/Users/falcone/perl5/perlbrew/bin/perl -w +#!/usr/bin/perl  # BEGIN BPS TAGGED BLOCK {{{  #  # COPYRIGHT: diff --git a/rt/config.log b/rt/config.log index ab4b65c54..636e689d8 100644 --- a/rt/config.log +++ b/rt/config.log @@ -1,8 +1,8 @@  This file contains any messages produced by compilers while  running configure, to aid debugging if configure makes a mistake. -It was created by RT configure 3.6.4, which was -generated by GNU Autoconf 2.59.  Invocation command line was +It was created by RT configure 3.8.9, which was +generated by GNU Autoconf 2.65.  Invocation command line was    $ ./configure --enable-layout=Freeside --with-db-type=Pg --with-db-dba=freeside --with-db-database=freeside --with-db-rt-user=freeside --with-db-rt-pass= --with-web-user=freeside --with-web-group=freeside --with-rt-group=freeside @@ -10,11 +10,11 @@ generated by GNU Autoconf 2.59.  Invocation command line was  ## Platform. ##  ## --------- ## -hostname = rootwood -uname -m = x86_64 -uname -r = 2.6.21-1-amd64 -uname -s = Linux -uname -v = #1 SMP Sat May 26 17:22:54 CEST 2007 +hostname = transom.local +uname -m = i386 +uname -r = 10.6.0 +uname -s = Darwin +uname -v = Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386  /usr/bin/uname -p = unknown  /bin/uname -X     = unknown @@ -22,41 +22,168 @@ uname -v = #1 SMP Sat May 26 17:22:54 CEST 2007  /bin/arch              = unknown  /usr/bin/arch -k       = unknown  /usr/convex/getsysinfo = unknown -hostinfo               = unknown +/usr/bin/hostinfo      = Mach kernel version: +	 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 +Kernel configured for up to 2 processors. +2 processors are physically available. +2 processors are logically available. +Processor type: i486 (Intel 80486) +Processors active: 0 1 +Primary memory available: 8.00 gigabytes +Default processor set: 158 tasks, 589 threads, 2 processors +Load average: 0.94, Mach factor: 1.30  /bin/machine           = unknown  /usr/bin/oslevel       = unknown  /bin/universe          = unknown -PATH: /usr/local/sbin -PATH: /usr/local/bin -PATH: /usr/sbin +PATH: /Users/falcone/perl5/perlbrew/bin +PATH: /Users/falcone/perl5/perlbrew/perls/current/bin +PATH: /Users/falcone/gitprojects/v/ +PATH: /opt/local/bin +PATH: /opt/local/sbin +PATH: /opt/local/bin +PATH: /opt/local/sbin +PATH: /opt/local/bin +PATH: /opt/local/sbin +PATH: /Users/falcone/bin +PATH: /Users/falcone/ec2/bin +PATH: /Users/falcone/work/git/git-sync +PATH: /Users/falcone/work/private-git/git-tools +PATH: /Users/falcone/Documents//android-sdk-mac_86/tools  PATH: /usr/bin -PATH: /sbin  PATH: /bin +PATH: /usr/sbin +PATH: /sbin +PATH: /usr/local/bin +PATH: /usr/X11/bin  ## ----------- ##  ## Core tests. ##  ## ----------- ## -configure:1331: checking for a BSD-compatible install -configure:1386: result: /usr/bin/install -c -configure:1401: checking for gawk -configure:1417: found /usr/bin/gawk -configure:1427: result: gawk -configure:1440: checking for perl -configure:1458: found /usr/bin/perl -configure:1471: result: /usr/bin/perl -configure:1795: checking for chosen layout -configure:1810: result: Freeside -configure:2272: creating ./config.status +configure:1979: checking for a BSD-compatible install +configure:2047: result: /usr/bin/install -c +configure:2062: checking for gawk +configure:2078: found /opt/local/bin/gawk +configure:2089: result: gawk +configure:2103: checking for perl +configure:2121: found /Users/falcone/perl5/perlbrew/bin/perl +configure:2134: result: /Users/falcone/perl5/perlbrew/bin/perl +configure:2499: checking for chosen layout +configure:2512: result: relative +configure:2671: checking if user www exists +configure:2674: result: found +configure:2695: checking if group www exists +configure:2698: result: found +configure:2718: checking if group rt3 exists +configure:2724: result: not found +configure:2718: checking if group rt exists +configure:2724: result: not found +configure:2718: checking if group www exists +configure:2721: result: found +configure:2751: checking if database name is valid +configure:2754: result: yes +configure:2845: checking for gcc +configure:2861: found /usr/bin/gcc +configure:2872: result: gcc +configure:3101: checking for C compiler version +configure:3110: gcc --version >&5 +i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) +Copyright (C) 2007 Free Software Foundation, Inc. +This is free software; see the source for copying conditions.  There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure:3121: $? = 0 +configure:3110: gcc -v >&5 +Using built-in specs. +Target: i686-apple-darwin10 +Configured with: /var/tmp/gcc/gcc-5664~89/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 +Thread model: posix +gcc version 4.2.1 (Apple Inc. build 5664) +configure:3121: $? = 0 +configure:3110: gcc -V >&5 +gcc-4.2: argument to `-V' is missing +configure:3121: $? = 1 +configure:3110: gcc -qversion >&5 +i686-apple-darwin10-gcc-4.2.1: no input files +configure:3121: $? = 1 +configure:3141: checking whether the C compiler works +configure:3163: gcc    conftest.c  >&5 +configure:3167: $? = 0 +configure:3216: result: yes +configure:3219: checking for C compiler default output file name +configure:3221: result: a.out +configure:3227: checking for suffix of executables +configure:3234: gcc -o conftest    conftest.c  >&5 +configure:3238: $? = 0 +configure:3260: result:  +configure:3282: checking whether we are cross compiling +configure:3290: gcc -o conftest    conftest.c  >&5 +configure:3294: $? = 0 +configure:3301: ./conftest +configure:3305: $? = 0 +configure:3320: result: no +configure:3325: checking for suffix of object files +configure:3347: gcc -c   conftest.c >&5 +configure:3351: $? = 0 +configure:3372: result: o +configure:3376: checking whether we are using the GNU C compiler +configure:3395: gcc -c   conftest.c >&5 +configure:3395: $? = 0 +configure:3404: result: yes +configure:3413: checking whether gcc accepts -g +configure:3433: gcc -c -g  conftest.c >&5 +configure:3433: $? = 0 +configure:3474: result: yes +configure:3491: checking for gcc option to accept ISO C89 +configure:3555: gcc  -c -g -O2  conftest.c >&5 +configure:3555: $? = 0 +configure:3568: result: none needed +configure:3589: checking for aginitlib in -lgraph +configure:3614: gcc -o conftest -g -O2   conftest.c -lgraph   >&5 +ld: library not found for -lgraph +collect2: ld returned 1 exit status +configure:3614: $? = 1 +configure: failed program was: +| /* confdefs.h */ +| #define PACKAGE_NAME "RT" +| #define PACKAGE_TARNAME "rt" +| #define PACKAGE_VERSION "3.8.9" +| #define PACKAGE_STRING "RT 3.8.9" +| #define PACKAGE_BUGREPORT "rt-bugs@bestpractical.com" +| #define PACKAGE_URL "" +| /* end confdefs.h.  */ +|  +| /* Override any GCC internal prototype to avoid an error. +|    Use char because int might match the return type of a GCC +|    builtin and then its argument prototype would still apply.  */ +| #ifdef __cplusplus +| extern "C" +| #endif +| char aginitlib (); +| int +| main () +| { +| return aginitlib (); +|   ; +|   return 0; +| } +configure:3623: result: no +configure:3649: checking for gdlib-config +configure:3665: found /opt/local/bin/gdlib-config +configure:3677: result: yes +configure:3705: checking for gpg +configure:3721: found /opt/local/bin/gpg +configure:3733: result: yes +configure:4032: creating ./config.status  ## ---------------------- ##  ## Running config.status. ##  ## ---------------------- ## -This file was extended by RT config.status 3.6.4, which was -generated by GNU Autoconf 2.59.  Invocation command line was +This file was extended by RT config.status 3.8.9, which was +generated by GNU Autoconf 2.65.  Invocation command line was    CONFIG_FILES    =     CONFIG_HEADERS  =  @@ -64,27 +191,54 @@ generated by GNU Autoconf 2.59.  Invocation command line was    CONFIG_COMMANDS =     $ ./config.status  -on rootwood - -config.status:760: creating sbin/rt-dump-database -config.status:760: creating sbin/rt-setup-database -config.status:760: creating sbin/rt-test-dependencies -config.status:760: creating bin/mason_handler.fcgi -config.status:760: creating bin/mason_handler.scgi -config.status:760: creating bin/standalone_httpd -config.status:760: creating bin/rt-crontool -config.status:760: creating bin/rt-mailgate -config.status:760: creating bin/rt -config.status:760: creating Makefile -config.status:760: creating etc/RT_Config.pm -config.status:760: creating lib/RT.pm -config.status:760: creating bin/mason_handler.svc -config.status:760: creating bin/webmux.pl +on transom.local + +config.status:860: creating etc/upgrade/3.8-branded-queues-extension +config.status:860: creating etc/upgrade/3.8-ical-extension +config.status:860: creating etc/upgrade/split-out-cf-categories +config.status:860: creating etc/upgrade/generate-rtaddressregexp +config.status:860: creating etc/upgrade/vulnerable-passwords +config.status:860: creating sbin/rt-attributes-viewer +config.status:860: creating sbin/rt-dump-database +config.status:860: creating sbin/rt-setup-database +config.status:860: creating sbin/rt-test-dependencies +config.status:860: creating sbin/rt-email-digest +config.status:860: creating sbin/rt-email-dashboards +config.status:860: creating sbin/rt-clean-sessions +config.status:860: creating sbin/rt-shredder +config.status:860: creating sbin/rt-validator +config.status:860: creating sbin/rt-email-group-admin +config.status:860: creating sbin/rt-server +config.status:860: creating bin/fastcgi_server +config.status:860: creating bin/mason_handler.fcgi +config.status:860: creating bin/mason_handler.scgi +config.status:860: creating bin/standalone_httpd +config.status:860: creating bin/rt-crontool +config.status:860: creating bin/rt-mailgate +config.status:860: creating bin/rt +config.status:860: creating Makefile +config.status:860: creating etc/RT_Config.pm +config.status:860: creating lib/RT.pm +config.status:860: creating bin/mason_handler.svc +config.status:860: creating bin/webmux.pl +config.status:860: creating t/data/configs/apache2.2+mod_perl.conf +config.status:860: creating t/data/configs/apache2.2+fastcgi.conf  ## ---------------- ##  ## Cache variables. ##  ## ---------------- ## +ac_cv_c_compiler_gnu=yes +ac_cv_env_CC_set= +ac_cv_env_CC_value= +ac_cv_env_CFLAGS_set= +ac_cv_env_CFLAGS_value= +ac_cv_env_CPPFLAGS_set= +ac_cv_env_CPPFLAGS_value= +ac_cv_env_LDFLAGS_set= +ac_cv_env_LDFLAGS_value= +ac_cv_env_LIBS_set= +ac_cv_env_LIBS_value=  ac_cv_env_PERL_set=  ac_cv_env_PERL_value=  ac_cv_env_build_alias_set= @@ -93,7 +247,9 @@ ac_cv_env_host_alias_set=  ac_cv_env_host_alias_value=  ac_cv_env_target_alias_set=  ac_cv_env_target_alias_value= -ac_cv_path_PERL=/usr/bin/perl +ac_cv_lib_graph_aginitlib=no +ac_cv_objext=o +ac_cv_path_PERL=/Users/falcone/perl5/perlbrew/bin/perl  ac_cv_path_install='/usr/bin/install -c'  ac_cv_prog_AWK=gawk @@ -111,13 +267,12 @@ DB_DBA='freeside'  DB_HOST='localhost'  DB_PORT=''  DB_RT_HOST='localhost' -DB_RT_PASS='' -DB_RT_USER='freeside' -DB_TYPE='Pg' -DEFS='-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.6.4\" -DPACKAGE_STRING=\"RT\ 3.6.4\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" ' -DESTDIR='/opt/rt3' -ECHO_C='' -ECHO_N='-n' +DB_RT_PASS='rt_pass' +DB_RT_USER='rt_user' +DB_TYPE='mysql' +DEFS='-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.8.9\" -DPACKAGE_STRING=\"RT\ 3.8.9\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" -DPACKAGE_URL=\"\"' +ECHO_C='\c' +ECHO_N=''  ECHO_T=''  INSTALL_DATA='${INSTALL} -m 644'  INSTALL_PROGRAM='${INSTALL}' @@ -136,13 +291,15 @@ MASON_LOCAL_HTML_PATH='/opt/rt3/local/html'  MASON_SESSION_PATH='/opt/rt3/var/session_data'  PACKAGE_BUGREPORT='rt-bugs@bestpractical.com'  PACKAGE_NAME='RT' -PACKAGE_STRING='RT 3.6.4' +PACKAGE_STRING='RT 3.8.9'  PACKAGE_TARNAME='rt' -PACKAGE_VERSION='3.6.4' +PACKAGE_URL='' +PACKAGE_VERSION='3.8.9'  PATH_SEPARATOR=':' -PERL='/usr/bin/perl' -RTGROUP='freeside' -RT_BIN_PATH='/opt/rt3/bin' +PERL='/Users/falcone/perl5/perlbrew/bin/perl' +RTGROUP='www' +RT_BIN_PATH='bin' +RT_BIN_PATH_R='/opt/rt3/bin'  RT_DEVEL_MODE='0'  RT_DOC_PATH='/opt/rt3/share/doc'  RT_ETC_PATH='/opt/rt3/etc' @@ -155,8 +312,8 @@ RT_SBIN_PATH='/opt/rt3/sbin'  RT_STANDALONE='0'  RT_VAR_PATH='/opt/rt3/var'  RT_VERSION_MAJOR='3' -RT_VERSION_MINOR='6' -RT_VERSION_PATCH='4' +RT_VERSION_MINOR='8' +RT_VERSION_PATCH='9'  SHELL='/bin/sh'  SPEEDY_BIN='/usr/local/bin/speedy'  WEB_GROUP='freeside' @@ -205,10 +362,10 @@ prefix='/opt/rt3'  program_transform_name='s,x,x,'  rt_layout_name='Freeside'  rt_version_major='3' -rt_version_minor='6' -rt_version_patch='4' -sbindir='/opt/rt3/sbin' -sessionstatedir='/opt/rt3/var/session_data' +rt_version_minor='8' +rt_version_patch='9' +sbindir='sbin' +sessionstatedir='var/session_data'  sharedstatedir='${prefix}/com'  sysconfdir='/opt/rt3/etc'  target_alias='' @@ -221,6 +378,9 @@ target_alias=''  #define PACKAGE_NAME "RT"  #define PACKAGE_STRING "RT 3.6.4"  #define PACKAGE_TARNAME "rt" -#define PACKAGE_VERSION "3.6.4" +#define PACKAGE_VERSION "3.8.9" +#define PACKAGE_STRING "RT 3.8.9" +#define PACKAGE_BUGREPORT "rt-bugs@bestpractical.com" +#define PACKAGE_URL ""  configure: exit 0 diff --git a/rt/config.status b/rt/config.status index 40efd26f9..293cc6c3e 100755 --- a/rt/config.status +++ b/rt/config.status @@ -391,7 +391,7 @@ exec 6>&1  # report actual input values of CONFIG_FILES etc. instead of their  # values after options handling.  ac_log=" -This file was extended by RT $as_me 3.8.8, which was +This file was extended by RT $as_me 3.8.9, which was  generated by GNU Autoconf 2.65.  Invocation command line was    CONFIG_FILES    = $CONFIG_FILES @@ -404,7 +404,7 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`  "  # Files that config.status was made for. -config_files=" etc/upgrade/3.8-branded-queues-extension etc/upgrade/3.8-ical-extension etc/upgrade/split-out-cf-categories sbin/rt-attributes-viewer sbin/rt-dump-database sbin/rt-setup-database sbin/rt-test-dependencies sbin/rt-email-digest sbin/rt-email-dashboards sbin/rt-clean-sessions sbin/rt-shredder sbin/rt-validator sbin/rt-email-group-admin sbin/rt-server bin/fastcgi_server bin/mason_handler.fcgi bin/mason_handler.scgi bin/standalone_httpd bin/rt-crontool bin/rt-mailgate bin/rt Makefile etc/RT_Config.pm lib/RT.pm bin/mason_handler.svc bin/webmux.pl t/data/configs/apache2.2+mod_perl.conf t/data/configs/apache2.2+fastcgi.conf" +config_files=" etc/upgrade/3.8-branded-queues-extension etc/upgrade/3.8-ical-extension etc/upgrade/split-out-cf-categories etc/upgrade/generate-rtaddressregexp etc/upgrade/vulnerable-passwords sbin/rt-attributes-viewer sbin/rt-dump-database sbin/rt-setup-database sbin/rt-test-dependencies sbin/rt-email-digest sbin/rt-email-dashboards sbin/rt-clean-sessions sbin/rt-shredder sbin/rt-validator sbin/rt-email-group-admin sbin/rt-server bin/fastcgi_server bin/mason_handler.fcgi bin/mason_handler.scgi bin/standalone_httpd bin/rt-crontool bin/rt-mailgate bin/rt Makefile etc/RT_Config.pm lib/RT.pm bin/mason_handler.svc bin/webmux.pl t/data/configs/apache2.2+mod_perl.conf t/data/configs/apache2.2+fastcgi.conf"  ac_cs_usage="\  \`$as_me' instantiates files and other configuration actions @@ -428,9 +428,9 @@ $config_files  Report bugs to <rt-bugs@bestpractical.com>." -ac_cs_config="'PERL=/usr/bin/perl'" +ac_cs_config=""  ac_cs_version="\ -RT config.status 3.8.8 +RT config.status 3.8.9  configured by ./configure, generated by GNU Autoconf 2.65,    with options \"$ac_cs_config\" @@ -438,9 +438,9 @@ Copyright (C) 2009 Free Software Foundation, Inc.  This config.status script is free software; the Free Software Foundation  gives unlimited permission to copy, distribute and modify it." -ac_pwd='/Users/ruz/projs/RT/core/rt-3.8.8' +ac_pwd='/Users/falcone/work/rt/3.8/rt-3.8.9'  srcdir='.' -INSTALL='/opt/local/bin/ginstall -c' +INSTALL='/usr/bin/install -c'  AWK='gawk'  test -n "$AWK" || AWK=awk  # The default lists apply if the user does not specify any file. @@ -502,7 +502,7 @@ if $ac_cs_silent; then  fi  if $ac_cs_recheck; then -  set X '/bin/sh' './configure'  'PERL=/usr/bin/perl' $ac_configure_extra_args --no-create --no-recursion +  set X '/bin/sh' './configure'  $ac_configure_extra_args --no-create --no-recursion    shift    $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6    CONFIG_SHELL='/bin/sh' @@ -527,6 +527,8 @@ do      "etc/upgrade/3.8-branded-queues-extension") CONFIG_FILES="$CONFIG_FILES etc/upgrade/3.8-branded-queues-extension" ;;      "etc/upgrade/3.8-ical-extension") CONFIG_FILES="$CONFIG_FILES etc/upgrade/3.8-ical-extension" ;;      "etc/upgrade/split-out-cf-categories") CONFIG_FILES="$CONFIG_FILES etc/upgrade/split-out-cf-categories" ;; +    "etc/upgrade/generate-rtaddressregexp") CONFIG_FILES="$CONFIG_FILES etc/upgrade/generate-rtaddressregexp" ;; +    "etc/upgrade/vulnerable-passwords") CONFIG_FILES="$CONFIG_FILES etc/upgrade/vulnerable-passwords" ;;      "sbin/rt-attributes-viewer") CONFIG_FILES="$CONFIG_FILES sbin/rt-attributes-viewer" ;;      "sbin/rt-dump-database") CONFIG_FILES="$CONFIG_FILES sbin/rt-dump-database" ;;      "sbin/rt-setup-database") CONFIG_FILES="$CONFIG_FILES sbin/rt-setup-database" ;; @@ -655,7 +657,7 @@ S["RT_LIB_PATH"]="lib"  S["RT_LOCAL_PATH"]="local"  S["RT_DOC_PATH"]="share/doc"  S["RT_PATH"]="/opt/rt3" -S["RT_VERSION_PATCH"]="8" +S["RT_VERSION_PATCH"]="9"  S["RT_VERSION_MINOR"]="8"  S["RT_VERSION_MAJOR"]="3"  S["RT_GPG"]="1" @@ -721,12 +723,12 @@ S["exp_exec_prefix"]="/opt/rt3"  S["exp_prefix"]="/opt/rt3"  S["SPEEDY_BIN"]="/usr/local/bin/speedy"  S["WEB_HANDLER"]="fastcgi" -S["PERL"]="/usr/bin/perl" +S["PERL"]="/Users/falcone/perl5/perlbrew/bin/perl"  S["AWK"]="gawk"  S["INSTALL_DATA"]="${INSTALL} -m 644"  S["INSTALL_SCRIPT"]="${INSTALL}"  S["INSTALL_PROGRAM"]="${INSTALL}" -S["rt_version_patch"]="8" +S["rt_version_patch"]="9"  S["rt_version_minor"]="8"  S["rt_version_major"]="3"  S["target_alias"]="" @@ -736,7 +738,7 @@ S["LIBS"]=""  S["ECHO_T"]=""  S["ECHO_N"]=""  S["ECHO_C"]="\\c" -S["DEFS"]="-DPACKAGE_NAME=\\\"RT\\\" -DPACKAGE_TARNAME=\\\"rt\\\" -DPACKAGE_VERSION=\\\"3.8.8\\\" -DPACKAGE_STRING=\\\"RT\\ 3.8.8\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpractica"\ +S["DEFS"]="-DPACKAGE_NAME=\\\"RT\\\" -DPACKAGE_TARNAME=\\\"rt\\\" -DPACKAGE_VERSION=\\\"3.8.9\\\" -DPACKAGE_STRING=\\\"RT\\ 3.8.9\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpractica"\  "l.com\\\" -DPACKAGE_URL=\\\"\\\""  S["mandir"]="man"  S["localedir"]="${datarootdir}/locale" @@ -762,8 +764,8 @@ S["prefix"]="/opt/rt3"  S["exec_prefix"]="/opt/rt3"  S["PACKAGE_URL"]=""  S["PACKAGE_BUGREPORT"]="rt-bugs@bestpractical.com" -S["PACKAGE_STRING"]="RT 3.8.8" -S["PACKAGE_VERSION"]="3.8.8" +S["PACKAGE_STRING"]="RT 3.8.9" +S["PACKAGE_VERSION"]="3.8.9"  S["PACKAGE_TARNAME"]="rt"  S["PACKAGE_NAME"]="RT"  S["PATH_SEPARATOR"]=":" @@ -1023,6 +1025,10 @@ which seems to be undefined.  Please make sure it is defined." >&2;}                  ;;      "etc/upgrade/split-out-cf-categories":F) chmod ug+x $ac_file                  ;; +    "etc/upgrade/generate-rtaddressregexp":F) chmod ug+x $ac_file +                ;; +    "etc/upgrade/vulnerable-passwords":F) chmod ug+x $ac_file +                ;;      "sbin/rt-attributes-viewer":F) chmod ug+x $ac_file                  ;;      "sbin/rt-dump-database":F) chmod ug+x $ac_file diff --git a/rt/configure.ac b/rt/configure.ac index ce9138d7f..73738b359 100644 --- a/rt/configure.ac +++ b/rt/configure.ac @@ -3,11 +3,11 @@ dnl  dnl Process this file with autoconf to produce a configure script  dnl  dnl Embed in generated ./configure script the following CVS info: -AC_REVISION($Revision: 1.2 $)dnl +AC_REVISION($Revision: 1.3 $)dnl  dnl Setup autoconf  AC_PREREQ([2.53]) -AC_INIT(RT, 3.8.8, [rt-bugs@bestpractical.com]) +AC_INIT(RT, 3.8.9, [rt-bugs@bestpractical.com])  AC_CONFIG_SRCDIR([lib/RT.pm.in])  dnl Extract RT version number components @@ -397,6 +397,8 @@ AC_CONFIG_FILES([                   etc/upgrade/3.8-branded-queues-extension                   etc/upgrade/3.8-ical-extension                   etc/upgrade/split-out-cf-categories +                 etc/upgrade/generate-rtaddressregexp +                 etc/upgrade/vulnerable-passwords                   sbin/rt-attributes-viewer                   sbin/rt-session-viewer                   sbin/rt-dump-database diff --git a/rt/etc/RT_Config.pm b/rt/etc/RT_Config.pm index b20140d3d..3d010596b 100644 --- a/rt/etc/RT_Config.pm +++ b/rt/etc/RT_Config.pm @@ -284,6 +284,11 @@ regular expression that matches all addresses used by your RT.  This lets RT  avoid sending mail to itself.  It will also hide RT addresses from the list of   "One-time Cc" and Bcc lists on ticket reply. +If you have a number of addresses configured in your RT database already, you +can generate a naive first pass regexp by using + +    perl etc/upgrade/generate-rtaddressregexp +  =cut  Set($RTAddressRegexp , undef); @@ -315,24 +320,6 @@ F<RT/User_Local.pm>  Set($CanonicalizeOnCreate, 0); -=item C<$SenderMustExistInExternalDatabase> - -If C<$SenderMustExistInExternalDatabase> is true, RT will refuse to -create non-privileged accounts for unknown users if you are using -the C<$LookupSenderInExternalDatabase> option. -Instead, an error message will be mailed and RT will forward the -message to C<$RTOwner>. - -If you are not using C<$LookupSenderInExternalDatabase>, this option -has no effect. - -If you define an AutoRejectRequest template, RT will use this -template for the rejection message. - -=cut - -Set($SenderMustExistInExternalDatabase , undef); -  =item C<$ValidateUserEmailAddresses>  If C<$ValidateUserEmailAddresses> is true, RT will refuse to create users with @@ -388,6 +375,11 @@ or 'qmail'.  Note that you should remove the '-t' from C<$SendmailArguments>  if you use 'sendmail' rather than 'sendmailpipe' +For testing purposes, or to simply disable sending mail out into the world, you +can set C<$MailCommand> to 'testfile' which writes all mail to a temporary +file.  RT will log the location of the temporary file so you can extract mail +from it afterwards. +  =cut  Set($MailCommand , 'sendmailpipe'); @@ -407,8 +399,11 @@ Set($SetOutgoingMailFrom, 0);  =item C<$OverrideOutgoingMailFrom>  C<$OverrideOutgoingMailFrom> is used for overwriting the Correspond -address of the queue. The option is a hash reference of queue name to -email address. +address of the queue as it is handed to sendmail -f. This helps force +the From_ header away from www-data or other email addresses that show +up in the "Sent by" line in Outlook. + +The option is a hash reference of queue name to email address.  If there is no ticket involved, then the value of the C<Default> key will be  used. @@ -616,7 +611,7 @@ Set($UseFriendlyToLine, 0);  =item C<$FriendlyToLineFormat> -C<sprintf()> format of the friendly 'From:' header; its arguments +C<sprintf()> format of the friendly 'To:' header; its arguments  are WatcherType and TicketId.  =cut @@ -1105,6 +1100,16 @@ displayed in kilobytes. If set to C<'b'>, then sizes will be bytes.  Set($AttachmentUnits, undef); +=item C<$EditCustomFieldsSingleColumn> + +When displaying a list of Ticket Custom Fields for editing, RT defaults +to a 2 column list.  If you set this to 1, it will instead display the +Custom Fields in a single column. + +=cut + +Set($EditCustomFieldsSingleColumn, 0); +  =item C<$RedistributeAutoGeneratedMessages>  Should RT redistribute correspondence that it identifies as @@ -1285,6 +1290,29 @@ search results in RT. Choose from [0, 120, 300, 600, 1200, 3600, 7200].  Set($SearchResultsRefreshInterval, 0); +=item C<$ResolveDefaultUpdateType> + +Set the default Update Type when clicking the Resolve link in the Ticket +links tab. + +  Comment            Comments (Not sent to requestors) +  Respond            Reply to requestors + +=cut + +Set($ResolveDefaultUpdateType, 'Comment'); + +=item C<$SuppressAutoOpenOnUpdate> + +When users click Comment or Reply on a new ticket in the web UI, the default +status for the ticket gets set to 'open' if the status is currently 'new'. +Setting this option to 1 will suppress that behavior and leave the default +status as 'new'. This option can be overridden by users in their preferences. + +=cut + +Set($SuppressAutoOpenOnUpdate, 0); +  =item C<$OldestTransactionsFirst>  By default, RT shows newest transactions at the bottom of the ticket @@ -1481,12 +1509,14 @@ Set(  =item C<$ChartsTimezonesInDB> -Dates are stored using UTC timezone in the DB, so charts groupped +RT stores dates using the UTC timezone in the DB, so charts grouped  by dates and time are not representative. Set C<$ChartsTimezonesInDB> -to a true value to enable timezones conversions using DB's -capabilities. You may need to do some work on DB side to use this +to a true value to enable timezone conversions using your DB's +capabilities. You may need to do some work on the DB side to use this  feature, read more in F<docs/timezones_in_charts.pod>. +At this time, this feature only applies to MySQL and PostgreSQL. +  =cut  Set( $ChartsTimezonesInDB, 0 ); @@ -1669,7 +1699,7 @@ Set($AmbiguousDayInFuture, 0);  =head1 Approval Configuration -Configration for the approvl system +Configuration for the approval system  =over 4 diff --git a/rt/etc/RT_Config.pm.in b/rt/etc/RT_Config.pm.in index 1755f5455..6b99b61a5 100644 --- a/rt/etc/RT_Config.pm.in +++ b/rt/etc/RT_Config.pm.in @@ -284,6 +284,11 @@ regular expression that matches all addresses used by your RT.  This lets RT  avoid sending mail to itself.  It will also hide RT addresses from the list of   "One-time Cc" and Bcc lists on ticket reply. +If you have a number of addresses configured in your RT database already, you +can generate a naive first pass regexp by using + +    perl etc/upgrade/generate-rtaddressregexp +  =cut  Set($RTAddressRegexp , undef); @@ -315,24 +320,6 @@ F<RT/User_Local.pm>  Set($CanonicalizeOnCreate, 0); -=item C<$SenderMustExistInExternalDatabase> - -If C<$SenderMustExistInExternalDatabase> is true, RT will refuse to -create non-privileged accounts for unknown users if you are using -the C<$LookupSenderInExternalDatabase> option. -Instead, an error message will be mailed and RT will forward the -message to C<$RTOwner>. - -If you are not using C<$LookupSenderInExternalDatabase>, this option -has no effect. - -If you define an AutoRejectRequest template, RT will use this -template for the rejection message. - -=cut - -Set($SenderMustExistInExternalDatabase , undef); -  =item C<$ValidateUserEmailAddresses>  If C<$ValidateUserEmailAddresses> is true, RT will refuse to create users with @@ -388,6 +375,11 @@ or 'qmail'.  Note that you should remove the '-t' from C<$SendmailArguments>  if you use 'sendmail' rather than 'sendmailpipe' +For testing purposes, or to simply disable sending mail out into the world, you +can set C<$MailCommand> to 'testfile' which writes all mail to a temporary +file.  RT will log the location of the temporary file so you can extract mail +from it afterwards. +  =cut  Set($MailCommand , 'sendmailpipe'); @@ -407,8 +399,11 @@ Set($SetOutgoingMailFrom, 0);  =item C<$OverrideOutgoingMailFrom>  C<$OverrideOutgoingMailFrom> is used for overwriting the Correspond -address of the queue. The option is a hash reference of queue name to -email address. +address of the queue as it is handed to sendmail -f. This helps force +the From_ header away from www-data or other email addresses that show +up in the "Sent by" line in Outlook. + +The option is a hash reference of queue name to email address.  If there is no ticket involved, then the value of the C<Default> key will be  used. @@ -616,7 +611,7 @@ Set($UseFriendlyToLine, 0);  =item C<$FriendlyToLineFormat> -C<sprintf()> format of the friendly 'From:' header; its arguments +C<sprintf()> format of the friendly 'To:' header; its arguments  are WatcherType and TicketId.  =cut @@ -1105,6 +1100,16 @@ displayed in kilobytes. If set to C<'b'>, then sizes will be bytes.  Set($AttachmentUnits, undef); +=item C<$EditCustomFieldsSingleColumn> + +When displaying a list of Ticket Custom Fields for editing, RT defaults +to a 2 column list.  If you set this to 1, it will instead display the +Custom Fields in a single column. + +=cut + +Set($EditCustomFieldsSingleColumn, 0); +  =item C<$RedistributeAutoGeneratedMessages>  Should RT redistribute correspondence that it identifies as @@ -1285,6 +1290,29 @@ search results in RT. Choose from [0, 120, 300, 600, 1200, 3600, 7200].  Set($SearchResultsRefreshInterval, 0); +=item C<$ResolveDefaultUpdateType> + +Set the default Update Type when clicking the Resolve link in the Ticket +links tab. + +  Comment            Comments (Not sent to requestors) +  Respond            Reply to requestors + +=cut + +Set($ResolveDefaultUpdateType, 'Comment'); + +=item C<$SuppressAutoOpenOnUpdate> + +When users click Comment or Reply on a new ticket in the web UI, the default +status for the ticket gets set to 'open' if the status is currently 'new'. +Setting this option to 1 will suppress that behavior and leave the default +status as 'new'. This option can be overridden by users in their preferences. + +=cut + +Set($SuppressAutoOpenOnUpdate, 0); +  =item C<$OldestTransactionsFirst>  By default, RT shows newest transactions at the bottom of the ticket @@ -1481,12 +1509,14 @@ Set(  =item C<$ChartsTimezonesInDB> -Dates are stored using UTC timezone in the DB, so charts groupped +RT stores dates using the UTC timezone in the DB, so charts grouped  by dates and time are not representative. Set C<$ChartsTimezonesInDB> -to a true value to enable timezones conversions using DB's -capabilities. You may need to do some work on DB side to use this +to a true value to enable timezone conversions using your DB's +capabilities. You may need to do some work on the DB side to use this  feature, read more in F<docs/timezones_in_charts.pod>. +At this time, this feature only applies to MySQL and PostgreSQL. +  =cut  Set( $ChartsTimezonesInDB, 0 ); @@ -1669,7 +1699,7 @@ Set($AmbiguousDayInFuture, 0);  =head1 Approval Configuration -Configration for the approvl system +Configuration for the approval system  =over 4 diff --git a/rt/lib/RT.pm b/rt/lib/RT.pm index 5d2e70425..a9d4cdaf9 100644 --- a/rt/lib/RT.pm +++ b/rt/lib/RT.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  use strict; @@ -57,7 +57,7 @@ use Cwd ();  use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE); -our $VERSION = '3.8.8'; +our $VERSION = '3.8.9'; @@ -401,13 +401,20 @@ sub CheckPerlRequirements {          die sprintf "RT requires Perl v5.8.3 or newer.  Your current Perl is v%vd\n", $^V;       } -    local ($@); -    eval {  -        my $x = '';  -        my $y = \$x; -        require Scalar::Util; Scalar::Util::weaken($y); -    }; -    if ($@) { +    # use $error here so the following "die" can still affect the global $@ +    my $error; +    { +        local $@; +        eval { +            my $x = ''; +            my $y = \$x; +            require Scalar::Util; +            Scalar::Util::weaken($y); +        }; +        $error = $@; +    } + +    if ($error) {          die <<"EOF";  RT requires the Scalar::Util module be built with support for  the 'weaken' @@ -487,7 +494,10 @@ sub InitClasses {          my $scrips = RT::Scrips->new($RT::SystemUser);          $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );          while ( my $scrip = $scrips->Next ) { -            $scrip->LoadModules; +            local $@; +            eval { $scrip->LoadModules } or +                $RT::Logger->error("Invalid Scrip ".$scrip->Id.".  Unable to load the Action or Condition.  ". +                                   "You should delete or repair this Scrip in the admin UI.\n$@\n");          }  	foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) { diff --git a/rt/lib/RT.pm.in b/rt/lib/RT.pm.in index 77b9d4c9b..d881e1bfc 100644 --- a/rt/lib/RT.pm.in +++ b/rt/lib/RT.pm.in @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  use strict; @@ -401,13 +401,20 @@ sub CheckPerlRequirements {          die sprintf "RT requires Perl v5.8.3 or newer.  Your current Perl is v%vd\n", $^V;       } -    local ($@); -    eval {  -        my $x = '';  -        my $y = \$x; -        require Scalar::Util; Scalar::Util::weaken($y); -    }; -    if ($@) { +    # use $error here so the following "die" can still affect the global $@ +    my $error; +    { +        local $@; +        eval { +            my $x = ''; +            my $y = \$x; +            require Scalar::Util; +            Scalar::Util::weaken($y); +        }; +        $error = $@; +    } + +    if ($error) {          die <<"EOF";  RT requires the Scalar::Util module be built with support for  the 'weaken' @@ -487,7 +494,10 @@ sub InitClasses {          my $scrips = RT::Scrips->new($RT::SystemUser);          $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );          while ( my $scrip = $scrips->Next ) { -            $scrip->LoadModules; +            local $@; +            eval { $scrip->LoadModules } or +                $RT::Logger->error("Invalid Scrip ".$scrip->Id.".  Unable to load the Action or Condition.  ". +                                   "You should delete or repair this Scrip in the admin UI.\n$@\n");          }  	foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) { diff --git a/rt/lib/RT/Action.pm b/rt/lib/RT/Action.pm index 42bf767e7..cb1eeccc8 100755 --- a/rt/lib/RT/Action.pm +++ b/rt/lib/RT/Action.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/lib/RT/Action/CreateTickets.pm b/rt/lib/RT/Action/CreateTickets.pm index 74520ca69..0a7eca3d8 100644 --- a/rt/lib/RT/Action/CreateTickets.pm +++ b/rt/lib/RT/Action/CreateTickets.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  package RT::Action::CreateTickets; @@ -352,6 +352,7 @@ sub CreateByTemplate {      local $T::TOP     = $T::TOP;      local $T::ID      = $T::ID;      $T::Tickets{'TOP'} = $T::TOP = $top if $top; +    local $T::TransactionObj = $self->TransactionObj;      my $ticketargs;      my ( @links, @postponed ); diff --git a/rt/lib/RT/Action/EscalatePriority.pm b/rt/lib/RT/Action/EscalatePriority.pm index 3704ee73f..94d6e76f0 100644 --- a/rt/lib/RT/Action/EscalatePriority.pm +++ b/rt/lib/RT/Action/EscalatePriority.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/lib/RT/Condition.pm b/rt/lib/RT/Condition.pm index dfd58e757..2774fe823 100755 --- a/rt/lib/RT/Condition.pm +++ b/rt/lib/RT/Condition.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/lib/RT/Config.pm b/rt/lib/RT/Config.pm index 7aa25b380..e3bdbe90b 100644 --- a/rt/lib/RT/Config.pm +++ b/rt/lib/RT/Config.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  package RT::Config; @@ -231,6 +231,29 @@ our %META = (              },            },        }, +    ResolveDefaultUpdateType => { +        Section         => 'General',                                      #loc +        Overridable     => 1, +        SortOrder       => 9, +        Widget          => '/Widgets/Form/Select', +        WidgetArguments => { +            Description => 'Default Update Type when Resolving',           #loc +            Values      => [qw(Comment Respond)], +            ValuesLabel => { +                Comment => "Comments (Not sent to requestors)",            #loc +                Respond => "Reply to requestors",                          #loc +            }, +        }, +    }, +    SuppressAutoOpenOnUpdate => { +        Section => 'General', +        Overridable => 1, +        SortOrder => 10, +        Widget => '/Widgets/Form/Boolean', +        WidgetArguments => { +            Description => 'Suppress automatic new to open status change on ticket update' # loc +        } +    },      # User overridable options for RT at a glance      DefaultSummaryRows => { @@ -350,15 +373,13 @@ our %META = (              my $value = $self->Get('RTAddressRegexp');              return if $value; -            #XXX freeside - should fix this at some point, but it is being WAY -            #too noisy in the logs -            #$RT::Logger->error( -            #    'The RTAddressRegexp option is not set in the config.' -            #    .' Not setting this option results in additional SQL queries to' -            #    .' check whether each address belongs to RT or not.' -            #    .' It is especially important to set this option if RT recieves' -            #    .' emails on addresses that are not in the database or config.' -            #); +            $RT::Logger->debug( +                'The RTAddressRegexp option is not set in the config.' +                .' Not setting this option results in additional SQL queries to' +                .' check whether each address belongs to RT or not.' +                .' It is especially important to set this option if RT recieves' +                .' emails on addresses that are not in the database or config.' +            );          },      },      # User overridable mail options @@ -795,8 +816,8 @@ sub SetFromConfig {                  # RTIR's options is set in main site config or RTFM's                  warn                      "Change of config option '$name' at $args{'File'} line $args{'Line'} has been ignored." -                    ." It's may be ok, but we want you to be aware." -                    ." This option earlier has been set in $source{'File'} line $source{'Line'}." +                    ." It may be ok, but we want you to be aware." +                    ." This option has been set earlier in $source{'File'} line $source{'Line'}."                  ;              } @@ -857,7 +878,7 @@ sub SetFromConfig {              # get entry for type we are looking for              # XXX skip references to scalars or other references. -            # Otherwie 5.10 goes boom. may be we should skip any +            # Otherwie 5.10 goes boom. maybe we should skip any              # reference              next if ref($entry) eq 'SCALAR' || ref($entry) eq 'REF';              my $entry_ref = *{$entry}{ ref($ref) }; diff --git a/rt/lib/RT/CustomField.pm b/rt/lib/RT/CustomField.pm index dc4108044..e2563481f 100644 --- a/rt/lib/RT/CustomField.pm +++ b/rt/lib/RT/CustomField.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  # Autogenerated by DBIx::SearchBuilder factory (by <jesse@bestpractical.com>) diff --git a/rt/lib/RT/CustomField_Overlay.pm b/rt/lib/RT/CustomField_Overlay.pm index c91f12037..e2342e946 100644 --- a/rt/lib/RT/CustomField_Overlay.pm +++ b/rt/lib/RT/CustomField_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  package RT::CustomField; @@ -117,6 +117,7 @@ RT::CustomField->_ForObjectType( 'RT::Group' => "Groups", );  our $RIGHTS = {      SeeCustomField            => 'See custom fields',       # loc_pair      AdminCustomField          => 'Create, delete and modify custom fields',        # loc_pair +    AdminCustomFieldValues    => 'Create, delete and modify custom fields values',        # loc_pair      ModifyCustomField         => 'Add, delete and modify custom field values for objects' #loc_pair  }; @@ -405,7 +406,7 @@ sub AddValue {      my $self = shift;      my %args = @_; -    unless ($self->CurrentUserHasRight('AdminCustomField')) { +    unless ($self->CurrentUserHasRight('AdminCustomField') || $self->CurrentUserHasRight('AdminCustomFieldValues')) {          return (0, $self->loc('Permission Denied'));      } @@ -434,7 +435,7 @@ Does not remove this value for any article which has had it selected  sub DeleteValue {      my $self = shift;      my $id = shift; -    unless ( $self->CurrentUserHasRight('AdminCustomField') ) { +    unless ( $self->CurrentUserHasRight('AdminCustomField') || $self->CurrentUserHasRight('AdminCustomFieldValues') ) {          return (0, $self->loc('Permission Denied'));      } diff --git a/rt/lib/RT/Date.pm b/rt/lib/RT/Date.pm index 2c7a6b66f..cc66e0f5d 100644 --- a/rt/lib/RT/Date.pm +++ b/rt/lib/RT/Date.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME @@ -910,7 +910,7 @@ sub RFC2616 {                   Seconds => 1, DayOfWeek => 1,                 ); -    my $res = $self->RFC2822( @_ ); +    my $res = $self->RFC2822( %args );      $res =~ s/\s*[+-]\d\d\d\d$/ GMT/ if $args{'Time'};      return $res;  } diff --git a/rt/lib/RT/Groups_Overlay.pm b/rt/lib/RT/Groups_Overlay.pm index 1b3ef51e2..fa39e8c3e 100644 --- a/rt/lib/RT/Groups_Overlay.pm +++ b/rt/lib/RT/Groups_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/lib/RT/Interface/Web.pm b/rt/lib/RT/Interface/Web.pm index 106209d64..2990f3ea3 100644 --- a/rt/lib/RT/Interface/Web.pm +++ b/rt/lib/RT/Interface/Web.pm @@ -2,8 +2,8 @@  #  # COPYRIGHT:  # -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com>  #  # (Except where explicitly superseded by other copyright notices)  # @@ -192,6 +192,9 @@ sub HandleRequest {      SendSessionCookie();      $HTML::Mason::Commands::session{'CurrentUser'} = RT::CurrentUser->new() unless _UserLoggedIn(); +    # Process session-related callbacks before any auth attempts +    $HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Session', CallbackPage => '/autohandler' ); +      MaybeShowNoAuthPage($ARGS);      AttemptExternalAuth($ARGS) if RT->Config->Get('WebExternalAuthContinuous') or not _UserLoggedIn(); @@ -204,13 +207,29 @@ sub HandleRequest {      unless ( _UserLoggedIn() ) {          _ForceLogout(); -        # If the user is logging in, let's authenticate -        if ( defined $ARGS->{user} && defined $ARGS->{pass} ) { -            AttemptPasswordAuthentication($ARGS); -        } else { -            # if no credentials then show him login page -            $HTML::Mason::Commands::m->comp( '/Elements/Login', %$ARGS ); -            $HTML::Mason::Commands::m->abort; +        # Authenticate if the user is trying to login via user/pass query args +        my ($authed, $msg) = AttemptPasswordAuthentication($ARGS); + +        unless ($authed) { +            my $m = $HTML::Mason::Commands::m; + +            # REST urls get a special 401 response +            if ($m->request_comp->path =~ '^/REST/\d+\.\d+/') { +                $HTML::Mason::Commands::r->content_type("text/plain"); +                $m->error_format("text"); +                $m->out("RT/$RT::VERSION 401 Credentials required\n"); +                $m->out("\n$msg\n") if $msg; +                $m->abort; +            } +            # Specially handle /index.html so that we get a nicer URL +            elsif ( $m->request_comp->path eq '/index.html' ) { +                my $next = SetNextPage(RT->Config->Get('WebURL')); +                $m->comp('/NoAuth/Login.html', next => $next, actions => [$msg]); +                $m->abort; +            } +            else { +                TangentForLogin(results => ($msg ? LoginError($msg) : undef)); +            }          }      } @@ -223,6 +242,9 @@ sub HandleRequest {      ShowRequestedPage($ARGS);      LogRecordedSQLStatements(); + +    # Process per-page final cleanup callbacks +    $HTML::Mason::Commands::m->callback( %$ARGS, CallbackName => 'Final', CallbackPage => '/autohandler' );  }  sub _ForceLogout { @@ -239,6 +261,108 @@ sub _UserLoggedIn {  } +=head2 LoginError ERROR + +Pushes a login error into the Actions session store and returns the hash key. + +=cut + +sub LoginError { +    my $new = shift; +    my $key = Digest::MD5::md5_hex( rand(1024) ); +    push @{ $HTML::Mason::Commands::session{"Actions"}->{$key} ||= [] }, $new; +    $HTML::Mason::Commands::session{'i'}++; +    return $key; +} + +=head2 SetNextPage [PATH] + +Intuits and stashes the next page in the sesssion hash.  If PATH is +specified, uses that instead of the value of L<IntuitNextPage()>.  Returns +the hash value. + +=cut + +sub SetNextPage { +    my $next = shift || IntuitNextPage(); +    my $hash = Digest::MD5::md5_hex($next . $$ . rand(1024)); + +    $HTML::Mason::Commands::session{'NextPage'}->{$hash} = $next; +    $HTML::Mason::Commands::session{'i'}++; +     +    SendSessionCookie(); +    return $hash; +} + + +=head2 TangentForLogin [HASH] + +Redirects to C</NoAuth/Login.html>, setting the value of L<IntuitNextPage> as +the next page.  Optionally takes a hash which is dumped into query params. + +=cut + +sub TangentForLogin { +    my $hash  = SetNextPage(); +    my %query = (@_, next => $hash); +    my $login = RT->Config->Get('WebURL') . 'NoAuth/Login.html?'; +    $login .= $HTML::Mason::Commands::m->comp('/Elements/QueryString', %query); +    Redirect($login); +} + +=head2 TangentForLoginWithError ERROR + +Localizes the passed error message, stashes it with L<LoginError> and then +calls L<TangentForLogin> with the appropriate results key. + +=cut + +sub TangentForLoginWithError { +    my $key = LoginError(HTML::Mason::Commands::loc(@_)); +    TangentForLogin( results => $key ); +} + +=head2 IntuitNextPage + +Attempt to figure out the path to which we should return the user after a +tangent.  The current request URL is used, or failing that, the C<WebURL> +configuration variable. + +=cut + +sub IntuitNextPage { +    my $req_uri; + +    # This includes any query parameters.  Redirect will take care of making +    # it an absolute URL. +    if ($ENV{'REQUEST_URI'}) { +        $req_uri = $ENV{'REQUEST_URI'}; + +        # collapse multiple leading slashes so the first part doesn't look like +        # a hostname of a schema-less URI +        $req_uri =~ s{^/+}{/}; +    } + +    my $next = defined $req_uri ? $req_uri : RT->Config->Get('WebURL'); + +    # sanitize $next +    my $uri = URI->new($next); + +    # You get undef scheme with a relative uri like "/Search/Build.html" +    unless (!defined($uri->scheme) || $uri->scheme eq 'http' || $uri->scheme eq 'https') { +        $next = RT->Config->Get('WebURL'); +    } + +    # Make sure we're logging in to the same domain +    # You can get an undef authority with a relative uri like "index.html" +    my $uri_base_url = URI->new(RT->Config->Get('WebBaseURL')); +    unless (!defined($uri->authority) || $uri->authority eq $uri_base_url->authority) { +        $next = RT->Config->Get('WebURL'); +    } + +    return $next; +} +  =head2 MaybeShowInstallModePage   This function, called exclusively by RT's autohandler, dispatches @@ -278,6 +402,10 @@ sub MaybeShowNoAuthPage {      return unless $m->base_comp->path =~ RT->Config->Get('WebNoAuthRegex'); +    # Don't show the login page to logged in users +    Redirect(RT->Config->Get('WebURL')) +        if $m->base_comp->path eq '/NoAuth/Login.html' and _UserLoggedIn(); +      # If it's a noauth file, don't ask for auth.      SendSessionCookie();      $m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %$ARGS ); @@ -380,9 +508,12 @@ sub AttemptExternalAuth {                  # we failed to successfully create the user. abort abort abort.                  delete $HTML::Mason::Commands::session{'CurrentUser'}; -                $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc( 'Cannot create user: [_1]', $msg ) ) -                    if RT->Config->Get('WebFallbackToInternalAuth');; -                $m->abort(); + +                if (RT->Config->Get('WebFallbackToInternalAuth')) { +                    TangentForLoginWithError('Cannot create user: [_1]', $msg); +                } else { +                    $m->abort(); +                }              }          } @@ -393,15 +524,13 @@ sub AttemptExternalAuth {              $user = $orig_user;              if ( RT->Config->Get('WebExternalOnly') ) { -                $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc('You are not an authorized user') ); -                $m->abort(); +                TangentForLoginWithError('You are not an authorized user');              }          }      } elsif ( RT->Config->Get('WebFallbackToInternalAuth') ) {          unless ( defined $HTML::Mason::Commands::session{'CurrentUser'} ) {              # XXX unreachable due to prior defaulting in HandleRequest (check c34d108) -            $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc('You are not an authorized user') ); -            $m->abort(); +            TangentForLoginWithError('You are not an authorized user');          }      } else { @@ -414,7 +543,9 @@ sub AttemptExternalAuth {  }  sub AttemptPasswordAuthentication { -    my $ARGS     = shift; +    my $ARGS = shift; +    return unless defined $ARGS->{user} && defined $ARGS->{pass}; +      my $user_obj = RT::CurrentUser->new();      $user_obj->Load( $ARGS->{user} ); @@ -422,15 +553,34 @@ sub AttemptPasswordAuthentication {      unless ( $user_obj->id && $user_obj->IsPassword( $ARGS->{pass} ) ) {          $RT::Logger->error("FAILED LOGIN for @{[$ARGS->{user}]} from $ENV{'REMOTE_ADDR'}"); -        $m->comp( '/Elements/Login', %$ARGS, Error => HTML::Mason::Commands::loc('Your username or password is incorrect'), );          $m->callback( %$ARGS, CallbackName => 'FailedLogin', CallbackPage => '/autohandler' ); -        $m->abort; +        return (0, HTML::Mason::Commands::loc('Your username or password is incorrect'));      } +    else { +        $RT::Logger->info("Successful login for @{[$ARGS->{user}]} from $ENV{'REMOTE_ADDR'}"); -    $RT::Logger->info("Successful login for @{[$ARGS->{user}]} from $ENV{'REMOTE_ADDR'}"); -    InstantiateNewSession(); -    $HTML::Mason::Commands::session{'CurrentUser'} = $user_obj; -    $m->callback( %$ARGS, CallbackName => 'SuccessfulLogin', CallbackPage => '/autohandler' ); +        # It's important to nab the next page from the session before we blow +        # the session away +        my $next = delete $HTML::Mason::Commands::session{'NextPage'}->{$ARGS->{'next'} || ''}; + +        InstantiateNewSession(); +        $HTML::Mason::Commands::session{'CurrentUser'} = $user_obj; +        SendSessionCookie(); + +        $m->callback( %$ARGS, CallbackName => 'SuccessfulLogin', CallbackPage => '/autohandler' ); + +        # Really the only time we don't want to redirect here is if we were +        # passed user and pass as query params in the URL. +        if ($next) { +            Redirect($next); +        } +        elsif ($ARGS->{'next'}) { +            # Invalid hash, but still wants to go somewhere, take them to / +            Redirect(RT->Config->Get('WebURL')); +        } + +        return (1, HTML::Mason::Commands::loc('Logged in')); +    }  }  =head2 LoadSessionFromCookie @@ -497,6 +647,13 @@ sub Redirect {      untie $HTML::Mason::Commands::session;      my $uri        = URI->new($redir_to);      my $server_uri = URI->new( RT->Config->Get('WebURL') ); +     +    # Make relative URIs absolute from the server host and scheme +    $uri->scheme($server_uri->scheme) if not defined $uri->scheme; +    if (not defined $uri->host) { +        $uri->host($server_uri->host); +        $uri->port($server_uri->port); +    }      # If the user is coming in via a non-canonical      # hostname, don't redirect them to the canonical host, diff --git a/rt/lib/RT/Principal_Overlay.pm b/rt/lib/RT/Principal_Overlay.pm index 42474f863..f46525269 100644 --- a/rt/lib/RT/Principal_Overlay.pm +++ b/rt/lib/RT/Principal_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  # diff --git a/rt/lib/RT/Queue_Overlay.pm b/rt/lib/RT/Queue_Overlay.pm index dcca84eb4..5245af43f 100644 --- a/rt/lib/RT/Queue_Overlay.pm +++ b/rt/lib/RT/Queue_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/lib/RT/Record.pm b/rt/lib/RT/Record.pm index 78bbe915d..c87626a21 100755 --- a/rt/lib/RT/Record.pm +++ b/rt/lib/RT/Record.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME @@ -724,7 +724,7 @@ Takes a potentially large attachment. Returns (ContentEncoding, EncodedBody) bas  sub _EncodeLOB {          my $self = shift;          my $Body = shift; -        my $MIMEType = shift; +        my $MIMEType = shift || '';          my $ContentEncoding = 'none'; diff --git a/rt/lib/RT/Scrip_Overlay.pm b/rt/lib/RT/Scrip_Overlay.pm index b5beb3434..e91f8d64d 100644 --- a/rt/lib/RT/Scrip_Overlay.pm +++ b/rt/lib/RT/Scrip_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME @@ -588,5 +588,65 @@ sub HasRight {  # }}} + +=head2 SetScripAction + +=cut + +sub SetScripAction { +    my $self  = shift; +    my $value = shift; + +    return ( 0, $self->loc("Action is mandatory argument") ) unless $value; + +    require RT::ScripAction; +    my $action = RT::ScripAction->new( $self->CurrentUser ); +    $action->Load($value); +    return ( 0, $self->loc( "Action '[_1]' not found", $value ) ) +      unless $action->Id; + +    return $self->_Set( Field => 'ScripAction', Value => $action->Id ); +} + +=head2 SetScripCondition + +=cut + +sub SetScripCondition { +    my $self  = shift; +    my $value = shift; + +    return ( 0, $self->loc("Condition is mandatory argument") ) +      unless $value; + +    require RT::ScripCondition; +    my $condition = RT::ScripCondition->new( $self->CurrentUser ); +    $condition->Load($value); + +    return ( 0, $self->loc( "Condition '[_1]' not found", $value ) ) +      unless $condition->Id; + +    return $self->_Set( Field => 'ScripCondition', Value => $condition->Id ); +} + +=head2 SetTemplate + +=cut + +sub SetTemplate { +    my $self  = shift; +    my $value = shift; + +    return ( 0, $self->loc("Template is mandatory argument") ) unless $value; + +    require RT::Template; +    my $template = RT::Template->new( $self->CurrentUser ); +    $template->Load($value); +    return ( 0, $self->loc( "Template '[_1]' not found", $value ) ) +      unless $template->Id; + +    return $self->_Set( Field => 'Template', Value => $template->Id ); +} +  1; diff --git a/rt/lib/RT/SearchBuilder.pm b/rt/lib/RT/SearchBuilder.pm index 671d880c7..da542ea4e 100644 --- a/rt/lib/RT/SearchBuilder.pm +++ b/rt/lib/RT/SearchBuilder.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/lib/RT/System.pm b/rt/lib/RT/System.pm index e61e35f27..8e5f96368 100644 --- a/rt/lib/RT/System.pm +++ b/rt/lib/RT/System.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME  diff --git a/rt/lib/RT/Test.pm b/rt/lib/RT/Test.pm index 64b736fad..9954ec729 100644 --- a/rt/lib/RT/Test.pm +++ b/rt/lib/RT/Test.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  package RT::Test; @@ -221,12 +221,10 @@ sub bootstrap_config {          or die "Couldn't open $tmp{'config'}{'RT'}: $!";      print $config qq{ -Set( \$WebPort , $port); -Set( \$WebBaseURL , "http://localhost:\$WebPort"); -Set( \$LogToSyslog , undef); -Set( \$LogToScreen , "warning"); +Set( \$WebDomain, "localhost"); +Set( \$WebPort,   $port); +Set( \$WebPath,   "");  Set( \$RTAddressRegexp , qr/^bad_re_that_doesnt_match\$/); -Set( \$MailCommand, 'testfile');  };      if ( $ENV{'RT_TEST_DB_SID'} ) { # oracle case          print $config "Set( \$DatabaseName , '$ENV{'RT_TEST_DB_SID'}' );\n"; @@ -238,6 +236,8 @@ Set( \$MailCommand, 'testfile');      print $config "Set( \$DevelMode, 0 );\n"          if $INC{'Devel/Cover.pm'}; +    $self->bootstrap_logging( $config ); +      # set mail catcher      my $mail_catcher = $tmp{'mailbox'} = File::Spec->catfile(          $tmp{'directory'}->dirname, 'mailbox.eml' @@ -254,7 +254,7 @@ Set( \$MailCommand, sub {      close \$handle;  } );  END - +          print $config $args{'config'} if $args{'config'};      print $config "\n1;\n"; @@ -264,6 +264,29 @@ END      return $config;  } +sub bootstrap_logging { +    my $self = shift; +    my $config = shift; + +    # prepare file for logging +    $tmp{'log'}{'RT'} = File::Spec->catfile( +        "$tmp{'directory'}", 'rt.debug.log' +    ); +    open my $fh, '>', $tmp{'log'}{'RT'} +        or die "Couldn't open $tmp{'config'}{'RT'}: $!"; +    # make world writable so apache under different user +    # can write into it +    chmod 0666, $tmp{'log'}{'RT'}; + +    print $config <<END; +Set( \$LogToSyslog , undef); +Set( \$LogToScreen , "warning"); +Set( \$LogToFile, 'debug' ); +Set( \$LogDir, q{$tmp{'directory'}} ); +Set( \$LogToFileNamed, 'rt.debug.log' ); +END +} +  sub set_config_wrapper {      my $self = shift; @@ -389,6 +412,12 @@ sub bootstrap_plugins {      RT->Config->Set( Plugins => @plugins );      RT->InitPluginPaths; +    my $dba_dbh; +    $dba_dbh = _get_dbh( +        RT::Handle->DSN, +        $ENV{RT_DBA_USER}, $ENV{RT_DBA_PASSWORD}, +    ) if @plugins; +      require File::Spec;      foreach my $name ( @plugins ) {          my $plugin = RT::Plugin->new( name => $name ); @@ -400,10 +429,10 @@ sub bootstrap_plugins {              if $ENV{'TEST_VERBOSE'};          if ( -e $etc_path ) { -            my ($ret, $msg) = $RT::Handle->InsertSchema( undef, $etc_path ); +            my ($ret, $msg) = $RT::Handle->InsertSchema( $dba_dbh, $etc_path );              Test::More::ok($ret || $msg =~ /^Couldn't find schema/, "Created schema: ".($msg||'')); -            ($ret, $msg) = $RT::Handle->InsertACL( undef, $etc_path ); +            ($ret, $msg) = $RT::Handle->InsertACL( $dba_dbh, $etc_path );              Test::More::ok($ret || $msg =~ /^Couldn't find ACLs/, "Created ACL: ".($msg||''));              my $data_file = File::Spec->catfile( $etc_path, 'initialdata' ); @@ -423,6 +452,7 @@ sub bootstrap_plugins {          $RT::Handle->Connect; # XXX: strange but mysql can loose connection      } +    $dba_dbh->disconnect if $dba_dbh;  }  sub _get_dbh { @@ -687,6 +717,8 @@ sub run_and_capture {      my $self = shift;      my %args = @_; +    my $after_open = delete $args{after_open}; +      my $cmd = delete $args{'command'};      die "Couldn't find command ($cmd)" unless -f $cmd; @@ -704,7 +736,7 @@ sub run_and_capture {      my ($child_out, $child_in);      my $pid = IPC::Open2::open2($child_out, $child_in, $cmd); -    $args{after_open}->($child_in, $child_out) if $args{after_open}; +    $after_open->($child_in, $child_out) if $after_open;      close $child_in; diff --git a/rt/lib/RT/Ticket_Overlay.pm b/rt/lib/RT/Ticket_Overlay.pm index 8d04742e9..e4db79a91 100644 --- a/rt/lib/RT/Ticket_Overlay.pm +++ b/rt/lib/RT/Ticket_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  # {{{ Front Material  @@ -229,7 +229,7 @@ Ticket links can be set up during create by passing the link type as a hask key  the ticket id to be linked to as a value (or a URI when linking to other objects).  Multiple links of the same type can be created by passing an array ref. For example: -  Parent => 45, +  Parents => 45,    DependsOn => [ 15, 22 ],    RefersTo => 'http://www.bestpractical.com', diff --git a/rt/lib/RT/Tickets_Overlay.pm b/rt/lib/RT/Tickets_Overlay.pm index 16e98aec8..687be738e 100644 --- a/rt/lib/RT/Tickets_Overlay.pm +++ b/rt/lib/RT/Tickets_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  # Major Changes: diff --git a/rt/lib/RT/Transaction_Overlay.pm b/rt/lib/RT/Transaction_Overlay.pm index e51e5b50d..c9e13dd77 100644 --- a/rt/lib/RT/Transaction_Overlay.pm +++ b/rt/lib/RT/Transaction_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME @@ -176,7 +176,7 @@ sub Create {         # Entry point of the rule system         my $ticket = RT::Ticket->new($RT::SystemUser);         $ticket->Load($args{'ObjectId'}); -       my $rules = RT::Ruleset->FindAllRules( +       my $rules = $self->{rules} = RT::Ruleset->FindAllRules(              Stage       => 'TransactionCreate',              Type        => $args{'Type'},              TicketObj   => $ticket, @@ -211,6 +211,22 @@ sub Scrips {  } +=head2 Rules + +Returns the array of Rule objects for this transaction. +This routine is only useful on a freshly created transaction object. +Rules do not get persisted to the database with transactions. + + +=cut + + +sub Rules { +    my $self = shift; +    return($self->{'rules'}); +} + +  # {{{ sub Delete  =head2 Delete @@ -292,14 +308,14 @@ If $args{'Type'} is set to C<text/html>, this will return an HTML  part of the message, if available.  Otherwise it looks for a text/plain  part. If $args{'Type'} is missing, it defaults to the value of   C<$RT::Transaction::PreferredContentType>, if that's missing too,  -defaults to 'text/plain'. +defaults to textual.  =cut  sub Content {      my $self = shift;      my %args = ( -        Type  => $PreferredContentType || 'text/plain', +        Type => $PreferredContentType || '',          Quote => 0,          Wrap  => 70,          Wrap  => ( $RT::MessageBoxWidth || 72 ) - 2, @@ -307,7 +323,9 @@ sub Content {      );      my $content; -    if ( my $content_obj = $self->ContentObj( Type => $args{Type} ) ) { +    if ( my $content_obj = +        $self->ContentObj( $args{Type} ? ( Type => $args{Type} ) : () ) ) +    {          $content = $content_obj->Content ||'';          if ( lc $content_obj->ContentType eq 'text/html' ) { @@ -398,12 +416,16 @@ Returns the RT::Attachment object which contains the content for this Transactio  sub ContentObj {      my $self = shift; -    my %args = ( Type => $PreferredContentType || 'text/plain', -                 @_ ); +    my %args = ( Type => $PreferredContentType, Attachment => undef, @_ );      # If we don't have any content, return undef now.      # Get the set of toplevel attachments to this transaction. -    return undef unless my $Attachment = $self->Attachments->First; + +    my $Attachment = $args{'Attachment'}; + +    $Attachment ||= $self->Attachments->First; + +    return undef unless ($Attachment);      # If it's a textual part, just return the body.      if ( RT::I18N::IsTextualContentType($Attachment->ContentType) ) { @@ -413,14 +435,23 @@ sub ContentObj {      # If it's a multipart object, first try returning the first part with preferred      # MIME type ('text/plain' by default). -    elsif ( $Attachment->ContentType =~ '^multipart/' ) { -        my $plain_parts = $Attachment->Children; -        $plain_parts->ContentType( VALUE => $args{Type} ); -        $plain_parts->LimitNotEmpty; - -        # If we actully found a part, return its content -        if ( my $first = $plain_parts->First ) { -            return $first; +    elsif ( $Attachment->ContentType =~ qr|^multipart/mixed|i ) { +        my $kids = $Attachment->Children; +        while (my $child = $kids->Next) { +            my $ret =  $self->ContentObj(%args, Attachment => $child); +            return $ret if ($ret); +        } +    } +    elsif ( $Attachment->ContentType =~ qr|^multipart/|i ) { +        if ( $args{Type} ) { +            my $plain_parts = $Attachment->Children; +            $plain_parts->ContentType( VALUE => $args{Type} ); +            $plain_parts->LimitNotEmpty; + +            # If we actully found a part, return its content +            if ( my $first = $plain_parts->First ) { +                return $first; +            }          }          # If that fails, return the first textual part which has some content. @@ -527,6 +558,8 @@ sub ContentAsMIME {      my $self = shift;      my $main_content = $self->ContentObj; +    return unless $main_content; +      my $entity = $main_content->ContentAsMIME;      if ( $main_content->Parent ) { @@ -558,11 +591,7 @@ sub ContentAsMIME {          OPERATOR => 'NOT STARTSWITH',          VALUE => 'multipart/',      ); -    $attachments->Limit( -        FIELD => 'Content', -        OPERATOR => '!=', -        VALUE => '', -    ); +    $attachments->LimitNotEmpty;      while ( my $a = $attachments->Next ) {          $entity->make_multipart unless $entity->is_multipart;          $entity->add_part( $a->ContentAsMIME ); @@ -656,6 +685,9 @@ sub BriefDescription {              )          );      } +    elsif ( $type =~ /SystemError/ ) { +        return $self->loc("System error"); +    }      if ( my $code = $_BriefDescriptions{$type} ) {          return $code->($self); diff --git a/rt/lib/RT/User_Overlay.pm b/rt/lib/RT/User_Overlay.pm index 2115c3299..17e9645de 100644 --- a/rt/lib/RT/User_Overlay.pm +++ b/rt/lib/RT/User_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME @@ -69,6 +69,7 @@ package RT::User;  use strict;  no warnings qw(redefine); +use Digest::SHA;  use Digest::MD5;  use RT::Principals;  use RT::ACE; @@ -988,20 +989,28 @@ sub SetPassword {  } -=head3 _GeneratePassword PASSWORD +=head3 _GeneratePassword PASSWORD [, SALT] -returns an MD5 hash of the password passed in, in hexadecimal encoding. +Returns a salted SHA-256 hash of the password passed in, in base64 +encoding.  =cut  sub _GeneratePassword {      my $self = shift; -    my $password = shift; - -    my $md5 = Digest::MD5->new(); -    $md5->add(encode_utf8($password)); -    return ($md5->hexdigest); - +    my ($password, $salt) = @_; + +    # Generate a random 4-byte salt +    $salt ||= pack("C4",map{int rand(256)} 1..4); + +    # Encode the salt, and a truncated SHA256 of the MD5 of the +    # password.  The additional, un-necessary level of MD5 allows for +    # transparent upgrading to this scheme, from the previous unsalted +    # MD5 one. +    return MIME::Base64::encode_base64( +        $salt . substr(Digest::SHA::sha256($salt . Digest::MD5::md5($password)),0,26), +        "" # No newline +    );  }  =head3 _GeneratePasswordBase64 PASSWORD @@ -1064,23 +1073,32 @@ sub IsPassword {          return(undef);       } -    # generate an md5 password  -    if ($self->_GeneratePassword($value) eq $self->__Value('Password')) { -        return(1); -    } - -    #  if it's a historical password we say ok. -    if ($self->__Value('Password') eq crypt(encode_utf8($value), $self->__Value('Password')) -        or $self->_GeneratePasswordBase64($value) eq $self->__Value('Password')) -    { -        # ...but upgrade the legacy password inplace. -        $self->SUPER::SetPassword( $self->_GeneratePassword($value) ); -        return(1); +    my $stored = $self->__Value('Password'); +    if (length $stored == 40) { +        # The truncated SHA256(salt,MD5(passwd)) form from 2010/12 is 40 characters long +        my $hash = MIME::Base64::decode_base64($stored); +        # The first 4 bytes are the salt, the rest is substr(SHA256,0,26) +        my $salt = substr($hash, 0, 4, ""); +        return substr(Digest::SHA::sha256($salt . Digest::MD5::md5($value)), 0, 26) eq $hash; +    } elsif (length $stored == 32) { +        # Hex nonsalted-md5 +        return 0 unless Digest::MD5::md5_hex(encode_utf8($value)) eq $stored; +    } elsif (length $stored == 22) { +        # Base64 nonsalted-md5 +        return 0 unless Digest::MD5::md5_base64(encode_utf8($value)) eq $stored; +    } elsif (length $stored == 13) { +        # crypt() output +        return 0 unless crypt(encode_utf8($value), $stored) eq $stored; +    } else { +        $RT::Logger->warn("Unknown password form"); +        return 0;      } -    # no password check has succeeded. get out - -    return (undef); +    # We got here by validating successfully, but with a legacy +    # password form.  Update to the most recent form. +    my $obj = $self->isa("RT::CurrentUser") ? $self->UserObj : $self; +    $obj->_Set(Field => 'Password', Value =>  $self->_GeneratePassword($value) ); +    return 1;  }  sub CurrentUserRequireToSetPassword { @@ -1614,7 +1632,7 @@ admin right) 'ModifySelf', return 1. otherwise, return undef.  sub CurrentUserCanModify {      my $self  = shift; -    my $right = shift; +    my $field = shift;      if ( $self->CurrentUser->HasRight(Right => 'AdminUsers', Object => $RT::System) ) {          return (1); @@ -1622,7 +1640,7 @@ sub CurrentUserCanModify {      #If the field is marked as an "administrators only" field,       # don\'t let the user touch it. -    elsif ( $self->_Accessible( $right, 'admin' ) ) { +    elsif ( $self->_Accessible( $field, 'admin' ) ) {          return (undef);      } @@ -1968,6 +1986,14 @@ sub PreferredKey  {      my $self = shift;      return undef unless RT->Config->Get('GnuPG')->{'Enable'}; + +    if ( ($self->CurrentUser->Id != $self->Id )  && +          !$self->CurrentUser->HasRight(Right =>'AdminUsers', Object => $RT::System) ) { +          return undef; +    } + + +      my $prefkey = $self->FirstAttribute('PreferredKey');      return $prefkey->Content if $prefkey; @@ -1994,6 +2020,16 @@ sub PreferredKey  sub PrivateKey {      my $self = shift; + +    #If the user wants to see their own values, let them. +    #If the user is an admin, let them. +    #Otherwwise, don't let them. +    # +    if ( ($self->CurrentUser->Id != $self->Id )  && +          !$self->CurrentUser->HasRight(Right =>'AdminUsers', Object => $RT::System) ) { +          return undef; +    } +      my $key = $self->FirstAttribute('PrivateKey') or return undef;      return $key->Content;  } @@ -2001,7 +2037,11 @@ sub PrivateKey {  sub SetPrivateKey {      my $self = shift;      my $key = shift; -    # XXX: ACL + +    unless ($self->CurrentUserCanModify('PrivateKey')) { +        return (0, $self->loc("Permission Denied")); +    } +      unless ( $key ) {          my ($status, $msg) = $self->DeleteAttribute('PrivateKey');          unless ( $status ) { @@ -2024,7 +2064,7 @@ sub SetPrivateKey {      );      return ($status, $self->loc("Couldn't set private key"))              unless $status; -    return ($status, $self->loc("Unset private key")); +    return ($status, $self->loc("Set private key"));  }  sub BasicColumns { diff --git a/rt/lib/RT/Users_Overlay.pm b/rt/lib/RT/Users_Overlay.pm index ea12dbe7f..4d03b6056 100644 --- a/rt/lib/RT/Users_Overlay.pm +++ b/rt/lib/RT/Users_Overlay.pm @@ -1,40 +1,40 @@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  =head1 NAME diff --git a/rt/sbin/rt-setup-database.in b/rt/sbin/rt-setup-database.in index ea9b99ba0..d157a6b04 100644 --- a/rt/sbin/rt-setup-database.in +++ b/rt/sbin/rt-setup-database.in @@ -1,41 +1,41 @@  #!@PERL@  # BEGIN BPS TAGGED BLOCK {{{ -#  +#  # COPYRIGHT: -#  -# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -#                                          <jesse@bestpractical.com> -#  +# +# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +#                                          <sales@bestpractical.com> +#  # (Except where explicitly superseded by other copyright notices) -#  -#  +# +#  # LICENSE: -#  +#  # This work is made available to you under the terms of Version 2 of  # the GNU General Public License. A copy of that license should have  # been provided with this software, but in any event can be snarfed  # from www.gnu.org. -#  +#  # This work is distributed in the hope that it will be useful, but  # WITHOUT ANY WARRANTY; without even the implied warranty of  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  # General Public License for more details. -#  +#  # You should have received a copy of the GNU General Public License  # 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/licenses/old-licenses/gpl-2.0.html. -#  -#  +# +#  # CONTRIBUTION SUBMISSION POLICY: -#  +#  # (The following paragraph is not intended to limit the rights granted  # to you to modify and distribute this software under the terms of  # the GNU General Public License and is only of importance to you if  # you choose to contribute your changes and enhancements to the  # community by submitting them to Best Practical Solutions, LLC.) -#  +#  # By intentionally submitting any modifications, corrections or  # derivatives to this work, or any other work intended for use with  # Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -44,7 +44,7 @@  # royalty-free, perpetual, license to use, copy, create derivative  # works based on those contributions, and sublicense and distribute  # those contributions and any derivatives thereof. -#  +#  # END BPS TAGGED BLOCK }}}  use strict;  use warnings; diff --git a/rt/share/html/Admin/CustomFields/Modify.html b/rt/share/html/Admin/CustomFields/Modify.html index fc2c49d59..f53e4d7bb 100644 --- a/rt/share/html/Admin/CustomFields/Modify.html +++ b/rt/share/html/Admin/CustomFields/Modify.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Admin/Elements/Header, Title => $title &>  <& /Admin/Elements/CustomFieldTabs, @@ -214,6 +214,8 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {          foreach my $attr qw(Name Description SortOrder Category) {              my $param = join("-", $paramtag, $value->Id, $attr);              next unless exists $ARGS{$param}; +            $ARGS{$param} =~ s/^\s+//; +            $ARGS{$param} =~ s/\s+$//;              next if ($value->$attr()||'') eq ($ARGS{$param}||'');              my $mutator = "Set$attr";              my ($id, $msg) = $value->$mutator( $ARGS{$param} ); @@ -224,8 +226,10 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {      # Add any new values      if ( defined $ARGS{ $paramtag ."-new-Name" } && length $ARGS{ $paramtag ."-new-Name" } ) {          my ($id, $msg) = $CustomFieldObj->AddValue( -            map { $_ => $ARGS{ $paramtag ."-new-$_" } } -                qw( Name Description SortOrder Category ) +            map {  +                $ARGS{$paramtag."-new-$_"} =~ s/^\s+//; +                $ARGS{$paramtag."-new-$_"} =~ s/\s+$//; +                $_ => $ARGS{ $paramtag ."-new-$_" } } qw/ Name Description SortOrder Category/          );          push (@results, $msg);      } diff --git a/rt/share/html/Admin/Elements/EditCustomFields b/rt/share/html/Admin/Elements/EditCustomFields index 0767e4ae4..bf65c9e37 100755 --- a/rt/share/html/Admin/Elements/EditCustomFields +++ b/rt/share/html/Admin/Elements/EditCustomFields @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/ListActions, actions => \@results &> diff --git a/rt/share/html/Admin/Elements/EditScrip b/rt/share/html/Admin/Elements/EditScrip index a4e8beb4a..c2e9de19f 100755 --- a/rt/share/html/Admin/Elements/EditScrip +++ b/rt/share/html/Admin/Elements/EditScrip @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/ListActions, actions => \@actions &> diff --git a/rt/share/html/Admin/Elements/SelectScripAction b/rt/share/html/Admin/Elements/SelectScripAction index 48065905c..4dd39f55b 100755 --- a/rt/share/html/Admin/Elements/SelectScripAction +++ b/rt/share/html/Admin/Elements/SelectScripAction @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <select name="<%$Name%>"  onchange="var idobj = document.getElementsByName('id')[0];  diff --git a/rt/share/html/Admin/Elements/SelectScripCondition b/rt/share/html/Admin/Elements/SelectScripCondition index 516766157..67438a72a 100755 --- a/rt/share/html/Admin/Elements/SelectScripCondition +++ b/rt/share/html/Admin/Elements/SelectScripCondition @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <select name="<%$Name%>"  onchange="var idobj = document.getElementsByName('id')[0];  diff --git a/rt/share/html/Admin/Users/Modify.html b/rt/share/html/Admin/Users/Modify.html index 70650a47d..28d594377 100755 --- a/rt/share/html/Admin/Users/Modify.html +++ b/rt/share/html/Admin/Users/Modify.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Admin/Elements/Header, Title => $title  &>  <& /Admin/Elements/UserTabs,  @@ -118,7 +118,7 @@  <input type="hidden" class="hidden" name="SetPrivileged" value="1" /> -<input type="checkbox" class="checkbox" name="Privileged" value="1" <%$PrivilegedChecked||''%> /> <&|/l&>Let this user be granted rights</&><br /> +<input type="checkbox" class="checkbox" name="Privileged" value="1" <%$PrivilegedChecked||''%> /> <&|/l&>Let this user be granted rights</&> (<&|/l&>Privileged</&>)<br />  <& /Elements/EditPassword,      User => $UserObj, diff --git a/rt/share/html/Elements/CollectionList b/rt/share/html/Elements/CollectionList index 4e06e3f0a..522db5811 100644 --- a/rt/share/html/Elements/CollectionList +++ b/rt/share/html/Elements/CollectionList @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%INIT>  if (!$Collection && $Class eq 'RT::Tickets') { @@ -54,6 +54,16 @@ if (!$Collection && $Class eq 'RT::Tickets') {  my $TotalFound = $Collection->CountAll();  return '' if !$TotalFound && !$ShowEmpty; +if ( $Rows ) { +    if ( $TotalFound <= $Rows ) { +        $Page = 1; +    } +    else { +        my $MaxPage = int( $TotalFound / $Rows ) + ( $TotalFound % $Rows ? 1 : 0 ); +        $Page = $MaxPage if $Page > $MaxPage; +    } +} +  # XXX: ->{'order_by'} is hacky, but there is no way to check if  # collection is ordered or not  if ( @OrderBy && ($AllowSorting || !$Collection->{'order_by'}) ) { diff --git a/rt/share/html/Elements/ColumnMap b/rt/share/html/Elements/ColumnMap index a1475a99d..8afe4a163 100644 --- a/rt/share/html/Elements/ColumnMap +++ b/rt/share/html/Elements/ColumnMap @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%ARGS>  $Class => 'RT__Ticket' diff --git a/rt/share/html/Elements/Dashboards b/rt/share/html/Elements/Dashboards index 3653aa5b8..d13477b97 100644 --- a/rt/share/html/Elements/Dashboards +++ b/rt/share/html/Elements/Dashboards @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <div class="dashboards">  <&|/Widgets/TitleBox, diff --git a/rt/share/html/Elements/Footer b/rt/share/html/Elements/Footer index 59547e238..e339a05e0 100755 --- a/rt/share/html/Elements/Footer +++ b/rt/share/html/Elements/Footer @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  %# End of div#body from /Elements/PageLayout  </div> diff --git a/rt/share/html/Elements/Header b/rt/share/html/Elements/Header index 72e3e7220..4f48deb4d 100755 --- a/rt/share/html/Elements/Header +++ b/rt/share/html/Elements/Header @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /elements/header.html, {                'title' => $Title, diff --git a/rt/share/html/Elements/PageLayout b/rt/share/html/Elements/PageLayout index f30d815a5..cc0bb06dc 100755 --- a/rt/share/html/Elements/PageLayout +++ b/rt/share/html/Elements/PageLayout @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <% include('/elements/init_calendar.html') |n %> @@ -189,6 +189,8 @@ if ( defined $current_toptab ) {  my ($menu_depth, $almost_last, $page_tabs); +# don't pull out the last submenu for 3.5-compat theme +# see #14853 for details.  if (RT->Config->Get( 'WebDefaultStylesheet', $session{'CurrentUser'} ) ne '3.4-compat') {      ($menu_depth, $almost_last) = @{ $m->comp('.menu_recurse', data => $toptabs, current => $current_toptab ) }; diff --git a/rt/share/html/Elements/RT__CustomField/ColumnMap b/rt/share/html/Elements/RT__CustomField/ColumnMap index 6d8d76a4c..c0e17f264 100644 --- a/rt/share/html/Elements/RT__CustomField/ColumnMap +++ b/rt/share/html/Elements/RT__CustomField/ColumnMap @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%ARGS>  $Name => undef diff --git a/rt/share/html/Elements/RT__Ticket/ColumnMap b/rt/share/html/Elements/RT__Ticket/ColumnMap index e848939e1..7efc4b43e 100644 --- a/rt/share/html/Elements/RT__Ticket/ColumnMap +++ b/rt/share/html/Elements/RT__Ticket/ColumnMap @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%ARGS>  $Name => undef diff --git a/rt/share/html/Elements/RefreshHomepage b/rt/share/html/Elements/RefreshHomepage index bf91a9522..cb6611a74 100644 --- a/rt/share/html/Elements/RefreshHomepage +++ b/rt/share/html/Elements/RefreshHomepage @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <&|/Widgets/TitleBox, title => loc('Refresh')&>  <form method="get" action="<% RT->Config->Get('WebPath') . $m->request_path %>"> diff --git a/rt/share/html/Elements/SelectDate b/rt/share/html/Elements/SelectDate index 46092ce23..5bdbceeeb 100755 --- a/rt/share/html/Elements/SelectDate +++ b/rt/share/html/Elements/SelectDate @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  %# in PageLayout instead, once <% include('/elements/init_calendar.html') |n %>  <input type="text" id="<% $Name %>" name="<% $Name %>" value="<% $Value %>" size="<% $Size %>" /> diff --git a/rt/share/html/Elements/SelectQueue b/rt/share/html/Elements/SelectQueue index 5b146a7f6..0cfdd915d 100755 --- a/rt/share/html/Elements/SelectQueue +++ b/rt/share/html/Elements/SelectQueue @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  % if ($Lite) {  %     my $d = new RT::Queue($session{'CurrentUser'}); diff --git a/rt/share/html/Elements/ShowUserVerbose b/rt/share/html/Elements/ShowUserVerbose index 9b61ea74a..6a85a5b6f 100644 --- a/rt/share/html/Elements/ShowUserVerbose +++ b/rt/share/html/Elements/ShowUserVerbose @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  %# Released under the terms of version 2 of the GNU Public License  % if ( $Address->phrase || $Address->comment ) { @@ -63,7 +63,7 @@ if ($User) {      $Address = Email::Address->new( $phrase, $address, $comment );  } -$Address->comment('') if $comment && lc $Address->user eq lc $comment; +$Address->comment('') if $comment and defined $Address->user and lc $Address->user eq lc $comment;  if ( $phrase and my ( $l, $r ) = ( $phrase =~ /^(\w+) (\w+)$/ ) ) {      $Address->phrase('')        if $Address->user =~ /^\Q$l\E.\Q$r\E$/ diff --git a/rt/share/html/Elements/TicketList b/rt/share/html/Elements/TicketList index 059ad7be0..53318ab3c 100644 --- a/rt/share/html/Elements/TicketList +++ b/rt/share/html/Elements/TicketList @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%INIT>  $m->comp( diff --git a/rt/share/html/Prefs/SearchOptions.html b/rt/share/html/Prefs/SearchOptions.html index 5e5ed46f1..aeb27863f 100644 --- a/rt/share/html/Prefs/SearchOptions.html +++ b/rt/share/html/Prefs/SearchOptions.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/Header, Title => loc("Ticketing Search Preferences") &>  <& /User/Elements/Tabs,  diff --git a/rt/share/html/Search/Build.html b/rt/share/html/Search/Build.html index c5067d5d1..9507a2dbb 100644 --- a/rt/share/html/Search/Build.html +++ b/rt/share/html/Search/Build.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  %#  %# Data flow here: diff --git a/rt/share/html/Search/Elements/BuildFormatString b/rt/share/html/Search/Elements/BuildFormatString index 9935fdf91..654f1db3c 100644 --- a/rt/share/html/Search/Elements/BuildFormatString +++ b/rt/share/html/Search/Elements/BuildFormatString @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%ARGS>  $Format => RT->Config->Get('DefaultSearchResultFormat') @@ -150,7 +150,7 @@ if ( $RemoveCol ) {      # we do this regex match to avoid a non-numeric warning      my ($index) = $CurrentDisplayColumns =~ /^(\d+)/;      my $column = $seen[$index]; -    if ($index) { +    if ( defined($index) ) {          delete $seen[$index];          my @temp = @seen;          @seen = (); diff --git a/rt/share/html/Search/Elements/DisplayOptions b/rt/share/html/Search/Elements/DisplayOptions index 7464ae936..c83035884 100644 --- a/rt/share/html/Search/Elements/DisplayOptions +++ b/rt/share/html/Search/Elements/DisplayOptions @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <&| /Widgets/TitleBox, title => loc("Sorting"), id => 'sorting' &>  <table valign="top"> diff --git a/rt/share/html/Search/Elements/PickCFs b/rt/share/html/Search/Elements/PickCFs index beda9f733..9abab4443 100644 --- a/rt/share/html/Search/Elements/PickCFs +++ b/rt/share/html/Search/Elements/PickCFs @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  % foreach( @lines ) {  <& ConditionRow, Condition => $_ &> diff --git a/rt/share/html/Search/Results.tsv b/rt/share/html/Search/Results.tsv index 0724c335f..2a0de14e6 100644 --- a/rt/share/html/Search/Results.tsv +++ b/rt/share/html/Search/Results.tsv @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%ARGS>  $Query => '' @@ -92,7 +92,7 @@ my @attrs = qw(      Cc->MemberEmailAddressesAsString      AdminCc->MemberEmailAddressesAsString      DueObj->ISO ToldObj->ISO CreatedObj->ISO -    ResolvedObj->ISO LastUpdatedObj->ISO +    ResolvedObj->ISO LastUpdatedObj->ISO LastUpdatedByObj->Name  );  $r->content_type('text/csv'); diff --git a/rt/share/html/Ticket/Create.html b/rt/share/html/Ticket/Create.html index 33e933da0..5c6be7d47 100755 --- a/rt/share/html/Ticket/Create.html +++ b/rt/share/html/Ticket/Create.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/Header,      Title => $title, @@ -92,6 +92,7 @@  </td>  <td class="value" colspan="5">  <& /Elements/EmailInput, Name => 'Requestors', Size => '40', Default => $ARGS{Requestors} || $session{CurrentUser}->EmailAddress &> +% $m->callback( CallbackName => 'AfterRequestors', QueueObj => $QueueObj, ARGSRef => \%ARGS );  </td>  </tr>  <tr> diff --git a/rt/share/html/Ticket/Display.html b/rt/share/html/Ticket/Display.html index c1984bdca..bc5294136 100755 --- a/rt/share/html/Ticket/Display.html +++ b/rt/share/html/Ticket/Display.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/Header,       Title => loc("Ticket #[_1]: [_2]", $TicketObj->Id, $TicketObj->Subject), @@ -189,8 +189,9 @@ if (@Actions) {      my $key = Digest::MD5::md5_hex( rand(1024) );      push @{ $session{"Actions"}->{$key} ||= [] }, @Actions;      $session{'i'}++; -    RT::Interface::Web::Redirect( RT->Config->Get('WebURL') . "Ticket/Display.html?id=" . $TicketObj->id . "&results=" . $key ); - +    my $url = RT->Config->Get('WebURL') . "Ticket/Display.html?id=" . $TicketObj->id . "&results=" . $key; +    $url .= '#' . $ARGS{Anchor} if $ARGS{Anchor}; +    RT::Interface::Web::Redirect($url);  }  my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets); diff --git a/rt/share/html/Ticket/Elements/BulkLinks b/rt/share/html/Ticket/Elements/BulkLinks index d04eba426..181fbed56 100755 --- a/rt/share/html/Ticket/Elements/BulkLinks +++ b/rt/share/html/Ticket/Elements/BulkLinks @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <table width="100%">    <tr> @@ -125,31 +125,31 @@  <table>    <tr>      <td class="label"><&|/l&>Merge into</&>:</td> -    <td class="entry"><input name="Ticket-MergeInto" /> <i><&|/l&>(only one ticket)</&></i></td> +    <td class="entry"><input name="Ticket-MergeInto" value="<% $ARGS{'Ticket-MergeInto'} || '' %>" /> <i><&|/l&>(only one ticket)</&></i></td>    </tr>    <tr>      <td class="label"><&|/l&>Depends on</&>:</td> -    <td class="entry"><input name="Ticket-DependsOn" /></td> +    <td class="entry"><input name="Ticket-DependsOn" value="<% $ARGS{'Ticket-DependsOn'} || '' %>" /></td>    </tr>    <tr>      <td class="label"><&|/l&>Depended on by</&>:</td> -    <td class="entry"><input name="DependsOn-Ticket" /></td> +    <td class="entry"><input name="DependsOn-Ticket" value="<% $ARGS{'DependsOn-Ticket'} || '' %>" /></td>    </tr>    <tr>      <td class="label"><&|/l&>Parents</&>:</td> -    <td class="entry"><input name="Ticket-MemberOf" /></td> +    <td class="entry"><input name="Ticket-MemberOf" value="<% $ARGS{'Ticket-MemberOf'} || '' %>" /></td>    </tr>    <tr>      <td class="label"><&|/l&>Children</&>:</td> -    <td class="entry"> <input name="MemberOf-Ticket" /></td> +    <td class="entry"> <input name="MemberOf-Ticket" value="<% $ARGS{'MemberOf-Ticket'} || '' %>" /></td>    </tr>    <tr>      <td class="label"><&|/l&>Refers to</&>:</td> -    <td class="entry"><input name="Ticket-RefersTo" /></td> +    <td class="entry"><input name="Ticket-RefersTo" value="<% $ARGS{'Ticket-RefersTo'} || '' %>" /></td>    </tr>    <tr>      <td class="label"><&|/l&>Referred to by</&>:</td> -    <td class="entry"> <input name="RefersTo-Ticket" /></td> +    <td class="entry"> <input name="RefersTo-Ticket" value="<% $ARGS{'RefersTo-Ticket'} || '' %>" /></td>    </tr>  </table>  </td> diff --git a/rt/share/html/Ticket/Elements/ShowSummary b/rt/share/html/Ticket/Elements/ShowSummary index 295ac6d56..ef5960e01 100755 --- a/rt/share/html/Ticket/Elements/ShowSummary +++ b/rt/share/html/Ticket/Elements/ShowSummary @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <table width="100%" class="ticket-summary">  <tr> diff --git a/rt/share/html/Ticket/Elements/ShowTransactionAttachments b/rt/share/html/Ticket/Elements/ShowTransactionAttachments index 95ffcbd64..625e124f8 100644 --- a/rt/share/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/share/html/Ticket/Elements/ShowTransactionAttachments @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%PERL>  # Find all the attachments which have parent $Parent @@ -129,7 +129,7 @@ my $size_to_str = sub {      my $size = shift;      # show a download link      if ( $size > 1024*1024 ) { -        $size = loc( "[_1]b", int( $size / 1024 / 102.4 ) / 10 ); +        $size = loc( "[_1]m", int( $size / 1024 / 102.4 ) / 10 );      }      elsif ( $size > 1024 ) {          $size = loc( "[_1]k", int( $size / 102.4 ) / 10 ); @@ -250,7 +250,7 @@ my $render_attachment = sub {                . $message->Id                . '/" />' );      } -    elsif ( $message->ContentLength > 0 ) { +    elsif ( $message->ContentLength && $message->ContentLength > 0 ) {          $m->out( '<p>' .              loc( 'Message body not shown because it is not plain text.' ) .              '</p>' diff --git a/rt/share/html/Ticket/Elements/Tabs b/rt/share/html/Ticket/Elements/Tabs index d4725fa50..3a8a176c4 100755 --- a/rt/share/html/Ticket/Elements/Tabs +++ b/rt/share/html/Ticket/Elements/Tabs @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  % $m->callback( Ticket => $Ticket, actions=> $actions, tabs => $tabs, %ARGS );  <& /Elements/Tabs,  @@ -197,7 +197,9 @@ if ($Ticket) {          if ( $Ticket->Status ne 'resolved' ) {              $actions->{'G'} = {                  path => -                    "Ticket/Update.html?Action=Comment&DefaultStatus=resolved&id=" +                    "Ticket/Update.html?Action=" +                    . RT->Config->Get('ResolveDefaultUpdateType', $session{'CurrentUser'}) +                    . "&DefaultStatus=resolved&id="                      . $id,                  title => loc('Resolve')              }; diff --git a/rt/share/html/Ticket/Graphs/index.html b/rt/share/html/Ticket/Graphs/index.html index e23737c8e..ca7bde2cc 100644 --- a/rt/share/html/Ticket/Graphs/index.html +++ b/rt/share/html/Ticket/Graphs/index.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/Header, Title => $title &>  <& /Ticket/Elements/Tabs, diff --git a/rt/share/html/User/Prefs.html b/rt/share/html/User/Prefs.html index e3a00f6ef..09875c99a 100755 --- a/rt/share/html/User/Prefs.html +++ b/rt/share/html/User/Prefs.html @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/Header, Title=>loc("Ticketing Preferences") &>  <& /User/Elements/Tabs,  diff --git a/rt/share/html/Widgets/TitleBoxEnd b/rt/share/html/Widgets/TitleBoxEnd index 4a698e9f7..d39512042 100755 --- a/rt/share/html/Widgets/TitleBoxEnd +++ b/rt/share/html/Widgets/TitleBoxEnd @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}      <hr class="clear" />    </div> diff --git a/rt/share/html/autohandler b/rt/share/html/autohandler index b44bd68d5..5a618fbb1 100755 --- a/rt/share/html/autohandler +++ b/rt/share/html/autohandler @@ -1,40 +1,40 @@  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -43,7 +43,7 @@  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <%INIT>  use RT::Util; diff --git a/rt/share/html/index.html b/rt/share/html/index.html index 89c976f0c..0a570e5c3 100755 --- a/rt/share/html/index.html +++ b/rt/share/html/index.html @@ -29,42 +29,42 @@ If you need commercial support, please contact us at sales@bestpractical.com.  % }  %# BEGIN BPS TAGGED BLOCK {{{ -%#  +%#  %# COPYRIGHT: -%#  -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%#                                          <jesse@bestpractical.com> -%#  +%# +%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%#                                          <sales@bestpractical.com> +%#  %# (Except where explicitly superseded by other copyright notices) -%#  -%#  +%# +%#  %# LICENSE: -%#  +%#  %# This work is made available to you under the terms of Version 2 of  %# the GNU General Public License. A copy of that license should have  %# been provided with this software, but in any event can be snarfed  %# from www.gnu.org. -%#  +%#  %# This work is distributed in the hope that it will be useful, but  %# WITHOUT ANY WARRANTY; without even the implied warranty of  %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  %# General Public License for more details. -%#  +%#  %# You should have received a copy of the GNU General Public License  %# 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/licenses/old-licenses/gpl-2.0.html. -%#  -%#  +%# +%#  %# CONTRIBUTION SUBMISSION POLICY: -%#  +%#  %# (The following paragraph is not intended to limit the rights granted  %# to you to modify and distribute this software under the terms of  %# the GNU General Public License and is only of importance to you if  %# you choose to contribute your changes and enhancements to the  %# community by submitting them to Best Practical Solutions, LLC.) -%#  +%#  %# By intentionally submitting any modifications, corrections or  %# derivatives to this work, or any other work intended for use with  %# Request Tracker, to Best Practical Solutions, LLC, you confirm that @@ -73,7 +73,7 @@ If you need commercial support, please contact us at sales@bestpractical.com.  %# royalty-free, perpetual, license to use, copy, create derivative  %# works based on those contributions, and sublicense and distribute  %# those contributions and any derivatives thereof. -%#  +%#  %# END BPS TAGGED BLOCK }}}  <& /Elements/Tabs,       Title          => loc("RT at a glance"), @@ -109,7 +109,7 @@ if ( $ARGS{'QuickCreate'} ) {          my ($t, $msg) = CreateTicket(                           Queue => $ARGS{'Queue'},                          Owner => $ARGS{'Owner'}, -                        Status => 'new', +                        Status => $ARGS{'Status'}||'new',                          # yes! it's Requestors, not Requestor                          Requestors => $ARGS{'Requestors'},                          From => $session{'CurrentUser'}->EmailAddress,  | 
