merging rt \3.8.8 to HEAD
authorivan <ivan>
Tue, 18 May 2010 19:20:29 +0000 (19:20 +0000)
committerivan <ivan>
Tue, 18 May 2010 19:20:29 +0000 (19:20 +0000)
21 files changed:
rt/Makefile
rt/Makefile.in
rt/bin/mason_handler.fcgi
rt/bin/mason_handler.scgi
rt/config.status
rt/etc/RT_Config.pm
rt/etc/RT_Config.pm.in
rt/lib/RT.pm
rt/lib/RT.pm.in
rt/lib/RT/Config.pm
rt/lib/RT/Groups_Overlay.pm
rt/lib/RT/Record.pm
rt/lib/RT/SearchBuilder.pm
rt/lib/RT/Ticket_Overlay.pm
rt/lib/RT/User_Overlay.pm
rt/lib/RT/Users_Overlay.pm
rt/share/html/Admin/Users/Modify.html
rt/share/html/Ticket/Elements/ShowSummary
rt/share/html/Ticket/Elements/ShowTransactionAttachments
rt/share/html/Ticket/Elements/Tabs
rt/share/html/User/Prefs.html

index 9cb8c13..9d5fde0 100644 (file)
@@ -63,7 +63,7 @@ SITE_CONFIG_FILE      =       $(CONFIG_FILE_PATH)/RT_SiteConfig.pm
 
 RT_VERSION_MAJOR       =       3
 RT_VERSION_MINOR       =       8
-RT_VERSION_PATCH       =       7
+RT_VERSION_PATCH       =       8
 
 RT_VERSION             =       $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
 TAG                    =       rt-$(RT_VERSION_MAJOR)-$(RT_VERSION_MINOR)-$(RT_VERSION_PATCH)
@@ -106,6 +106,7 @@ RT_LIB_PATH         =       /opt/rt3/lib
 RT_MAN_PATH            =       /opt/rt3/man
 RT_VAR_PATH            =       /opt/rt3/var
 RT_DOC_PATH            =       /opt/rt3/share/doc
+RT_FONT_PATH           =       /opt/rt3/share/fonts
 RT_LOCAL_PATH          =       /opt/rt3/local
 LOCAL_PLUGIN_PATH      =       /opt/rt3/local/plugins
 LOCAL_ETC_PATH         =       /opt/rt3/local/etc
@@ -134,6 +135,8 @@ RT_STANDALONE_SERVER        =       standalone_httpd
 RT_SPEEDYCGI_HANDLER   =       mason_handler.scgi
 # RT_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_FASTCGI_HANDLER     =       mason_handler.fcgi
+# RT_FASTCGI_SERVER is the FastCGI server
+RT_FASTCGI_SERVER      =       fastcgi_server
 # RT_WIN32_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_WIN32_FASTCGI_HANDLER       =       mason_handler.svc
 # RT's CLI
@@ -153,6 +156,7 @@ BINARIES            =       $(RT_MODPERL_HANDLER) \
                                $(RT_STANDALONE_SERVER) \
                                $(RT_SPEEDYCGI_HANDLER) \
                                $(RT_FASTCGI_HANDLER) \
+                               $(RT_FASTCGI_SERVER) \
                                $(RT_WIN32_FASTCGI_HANDLER)
 
 
@@ -284,7 +288,7 @@ upgrade-instruct:
 
 upgrade: testdeps config-install dirs files-install fixperms upgrade-instruct
 
-upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install fixperms
+upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install font-install fixperms
 
 
 # {{{ dependencies
@@ -349,6 +353,7 @@ fixperms:
 # {{{ dirs
 dirs:
        $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_LOG_PATH)
+       $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
        $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)
        $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/cache
        $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/etc
@@ -364,7 +369,7 @@ dirs:
 
 install: testdeps config-install dirs files-install fixperms instruct
 
-files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install
+files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install font-install
 
 config-install:
        $(INSTALL) -m 0755 -o $(BIN_OWNER) -g $(RTGROUP) -d $(DESTDIR)$(CONFIG_FILE_PATH)
@@ -423,6 +428,14 @@ html-install:
        done
 # }}}
 
+# {{{ font-install
+font-install:
+       [ -d $(DESTDIR)$(RT_FONT_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
+       -( cd share/fonts && find . -type f -print ) | while read file ; do \
+           $(INSTALL) -m 0644 "share/fonts/$$file" "$(DESTDIR)$(RT_FONT_PATH)/$$file" ; \
+       done
+# }}}
+
 # {{{ doc-install
 doc-install:
        # RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
index fe7e171..bef1025 100644 (file)
@@ -106,6 +106,7 @@ RT_LIB_PATH         =       @RT_LIB_PATH_R@
 RT_MAN_PATH            =       @RT_MAN_PATH_R@
 RT_VAR_PATH            =       @RT_VAR_PATH_R@
 RT_DOC_PATH            =       @RT_DOC_PATH_R@
+RT_FONT_PATH           =       @RT_FONT_PATH_R@
 RT_LOCAL_PATH          =       @RT_LOCAL_PATH_R@
 LOCAL_PLUGIN_PATH      =       @RT_LOCAL_PATH_R@/plugins
 LOCAL_ETC_PATH         =       @LOCAL_ETC_PATH_R@
@@ -134,6 +135,8 @@ RT_STANDALONE_SERVER        =       standalone_httpd
 RT_SPEEDYCGI_HANDLER   =       mason_handler.scgi
 # RT_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_FASTCGI_HANDLER     =       mason_handler.fcgi
+# RT_FASTCGI_SERVER is the FastCGI server
+RT_FASTCGI_SERVER      =       fastcgi_server
 # RT_WIN32_FASTCGI_HANDLER is the mason handler script for FastCGI
 RT_WIN32_FASTCGI_HANDLER       =       mason_handler.svc
 # RT's CLI
@@ -153,6 +156,7 @@ BINARIES            =       $(RT_MODPERL_HANDLER) \
                                $(RT_STANDALONE_SERVER) \
                                $(RT_SPEEDYCGI_HANDLER) \
                                $(RT_FASTCGI_HANDLER) \
+                               $(RT_FASTCGI_SERVER) \
                                $(RT_WIN32_FASTCGI_HANDLER)
 
 
@@ -284,7 +288,7 @@ upgrade-instruct:
 
 upgrade: testdeps config-install dirs files-install fixperms upgrade-instruct
 
-upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install fixperms
+upgrade-noclobber: config-install dirs libs-install html-install bin-install local-install doc-install font-install fixperms
 
 
 # {{{ dependencies
@@ -349,6 +353,7 @@ fixperms:
 # {{{ dirs
 dirs:
        $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_LOG_PATH)
+       $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
        $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)
        $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/cache
        $(INSTALL) -m 0770 -d $(DESTDIR)$(MASON_DATA_PATH)/etc
@@ -364,7 +369,7 @@ dirs:
 
 install: testdeps config-install dirs files-install fixperms instruct
 
-files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install
+files-install: libs-install etc-install config-install bin-install sbin-install html-install local-install doc-install font-install
 
 config-install:
 @COMMENT_INPLACE_LAYOUT@       $(INSTALL) -m 0755 -o $(BIN_OWNER) -g $(RTGROUP) -d $(DESTDIR)$(CONFIG_FILE_PATH)
@@ -423,6 +428,14 @@ html-install:
 @COMMENT_INPLACE_LAYOUT@       done
 # }}}
 
+# {{{ font-install
+font-install:
+@COMMENT_INPLACE_LAYOUT@       [ -d $(DESTDIR)$(RT_FONT_PATH) ] || $(INSTALL) -m 0755 -d $(DESTDIR)$(RT_FONT_PATH)
+@COMMENT_INPLACE_LAYOUT@       -( cd share/fonts && find . -type f -print ) | while read file ; do \
+@COMMENT_INPLACE_LAYOUT@           $(INSTALL) -m 0644 "share/fonts/$$file" "$(DESTDIR)$(RT_FONT_PATH)/$$file" ; \
+@COMMENT_INPLACE_LAYOUT@       done
+# }}}
+
 # {{{ doc-install
 doc-install:
 @COMMENT_INPLACE_LAYOUT@       # RT 3.0.0 - RT 3.0.2 would accidentally create a file instead of a dir
index 8092455..881d638 100755 (executable)
 # those contributions and any derivatives thereof.
 # 
 # END BPS TAGGED BLOCK }}}
-package RT::Mason;
-
 use strict;
-use vars '$Handler';
-use File::Basename;
+use warnings;
+no warnings qw(once);
 
-require (dirname(__FILE__) . '/webmux.pl');
+use File::Basename;
+require (dirname(__FILE__) .'/webmux.pl');
 
 # Enter CGI::Fast mode, which should also work as a vanilla CGI script.
 require CGI::Fast;
 
-RT::Init();
-$Handler ||= RT::Interface::Web::Handler->new(
-    RT->Config->Get('MasonParameters')
-);
-
-
 while ( my $cgi = CGI::Fast->new ) {
     # the whole point of fastcgi requires the env to get reset here..
     # So we must squash it again
@@ -75,12 +68,16 @@ while ( my $cgi = CGI::Fast->new ) {
     Module::Refresh->refresh if RT->Config->Get('DevelMode');
     RT::ConnectToDatabase();
 
-    if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
-        && ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
+    my $interp = $RT::Mason::Handler->interp;
+    if (
+        !$interp->comp_exists( $cgi->path_info )
+        && $interp->comp_exists( $cgi->path_info . "/index.html" )
+    ) {
         $cgi->path_info( $cgi->path_info . "/index.html" );
     }
 
-    eval { $Handler->handle_cgi_object($cgi); };
+    local $@;
+    eval { $RT::Mason::Handler->handle_cgi_object($cgi); };
     if ($@) {
         $RT::Logger->crit($@);
     }
index 1050866..1a497de 100755 (executable)
@@ -56,18 +56,13 @@ require (dirname(__FILE__) . '/webmux.pl');
 
 require CGI;
 
-RT::Init();
-$Handler ||= RT::Interface::Web::Handler->new(
-    RT->Config->Get('MasonParameters')
-);
-
-
 my $cgi = CGI->new;
 if ( ( !$Handler->interp->comp_exists( $cgi->path_info ) )
     && ( $Handler->interp->comp_exists( $cgi->path_info . "/index.html" ) ) ) {
     $cgi->path_info( $cgi->path_info . "/index.html" );
 }
 
+RT::ConnectToDatabase();
 $Handler->handle_cgi_object($cgi);
 RT::Interface::Web::Handler->CleanupRequest();
 1;
index 3abecf4..40efd26 100755 (executable)
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
+
 SHELL=${CONFIG_SHELL-/bin/sh}
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+export SHELL
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
 else
-  as_unset=false
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+       expr "X$arg" : "X\\(.*\\)$as_nl";
+       arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
 fi
 
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in #((
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error ERROR [LINENO LOG_FD]
+# ---------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with status $?, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$?; test $as_status -eq 0 && as_status=1
+  if test "$3"; then
+    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
   fi
-done
+  $as_echo "$as_me: error: $1" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
         X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)$' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
+        X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\/\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
 
-
-# PATH needs CR, and LINENO needs CR and PATH.
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -86,148 +258,123 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 as_cr_digits='0123456789'
 as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-        case $as_dir in
-        /*)
-          if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-            $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-            $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-            CONFIG_SHELL=$as_dir/$as_base
-            export CONFIG_SHELL
-            exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-          fi;;
-        esac
-       done
-done
-;;
-  esac
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='     ' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='        ';;     # ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='        ';;
+  esac;;
+*)
+  ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
 else
-  as_expr=false
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
   fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$as_dir" : 'X\(//\)[^/]' \| \
+        X"$as_dir" : 'X\(//\)$' \| \
+        X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
 
+
+} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+       test -d "$1/.";
+      else
+       case $1 in #(
+       -*)set "./$1";;
+       esac;
+       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+       ???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -236,38 +383,16 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS="  $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
 exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+# Save the log message, to keep $0 and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
-<<<<<<< config.status
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by RT $as_me 3.6.6, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
-=======
 # values after options handling.
 ac_log="
-This file was extended by RT $as_me 3.8.7, which was
-generated by GNU Autoconf 2.64.  Invocation command line was
->>>>>>> 1.4
+This file was extended by RT $as_me 3.8.8, which was
+generated by GNU Autoconf 2.65.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -279,44 +404,43 @@ 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/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 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 from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -q, --quiet      do not print progress messages
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-                  instantiate the configuration file FILE
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
 
 Configuration files:
 $config_files
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to <rt-bugs@bestpractical.com>."
+
+ac_cs_config="'PERL=/usr/bin/perl'"
 ac_cs_version="\
-<<<<<<< config.status
-RT config.status 3.6.6
-configured by ./configure, generated by GNU Autoconf 2.59,
-  with options \"'--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'\"
-=======
-RT config.status 3.8.7
-configured by ./configure, generated by GNU Autoconf 2.64,
-  with options \"'--with-db-type=SQLite' '--enable-layout=relative' '--with-web-handler=standalone' 'PERL=/usr/bin/perl'\"
->>>>>>> 1.4
-
-Copyright (C) 2003 Free Software Foundation, Inc.
+RT config.status 3.8.8
+configured by ./configure, generated by GNU Autoconf 2.65,
+  with options \"$ac_cs_config\"
+
+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/falcone/work/rt/releases/rt-3.8.7'
+ac_pwd='/Users/ruz/projs/RT/core/rt-3.8.8'
 srcdir='.'
-INSTALL='install'
+INSTALL='/opt/local/bin/ginstall -c'
 AWK='gawk'
 test -n "$AWK" || AWK=awk
 # The default lists apply if the user does not specify any file.
@@ -325,58 +449,46 @@ while test $# != 0
 do
   case $1 in
   --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
-  -*)
+  *)
     ac_option=$1
     ac_optarg=$2
     ac_shift=shift
     ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
   esac
 
   case $ac_option in
   # Handling of the options.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; } ;;
+  -*) as_fn_error "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-  *) ac_config_targets="$ac_config_targets $1" ;;
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
 
   esac
   shift
@@ -390,7 +502,7 @@ if $ac_cs_silent; then
 fi
 
 if $ac_cs_recheck; then
-  set X '/bin/sh' './configure'  '--with-db-type=SQLite' '--enable-layout=relative' '--with-web-handler=standalone' 'PERL=/usr/bin/perl' $ac_configure_extra_args --no-create --no-recursion
+  set X '/bin/sh' './configure'  'PERL=/usr/bin/perl' $ac_configure_extra_args --no-create --no-recursion
   shift
   $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
   CONFIG_SHELL='/bin/sh'
@@ -398,6 +510,17 @@ if $ac_cs_recheck; then
   exec "$@"
 fi
 
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+
+# Handling of arguments.
 for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
@@ -415,6 +538,7 @@ do
     "sbin/rt-validator") CONFIG_FILES="$CONFIG_FILES sbin/rt-validator" ;;
     "sbin/rt-email-group-admin") CONFIG_FILES="$CONFIG_FILES sbin/rt-email-group-admin" ;;
     "sbin/rt-server") CONFIG_FILES="$CONFIG_FILES sbin/rt-server" ;;
+    "bin/fastcgi_server") CONFIG_FILES="$CONFIG_FILES bin/fastcgi_server" ;;
     "bin/mason_handler.fcgi") CONFIG_FILES="$CONFIG_FILES bin/mason_handler.fcgi" ;;
     "bin/mason_handler.scgi") CONFIG_FILES="$CONFIG_FILES bin/mason_handler.scgi" ;;
     "bin/standalone_httpd") CONFIG_FILES="$CONFIG_FILES bin/standalone_httpd" ;;
@@ -433,6 +557,7 @@ do
   esac
 done
 
+
 # If the user did not use the arguments to specify the items to instantiate,
 # then the envvar interface is used.  Set only those that are not.
 # We use the long form for the default assignment because of an extremely
@@ -442,19 +567,23 @@ if $ac_need_defaults; then
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
 }
-
 # Create a (secure) tmp directory for tmp files.
 
 {
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
@@ -495,6 +624,7 @@ S["MASON_HTML_PATH_R"]="/opt/rt3/share/html"
 S["MASON_SESSION_PATH_R"]="/opt/rt3/var/session_data"
 S["MASON_DATA_PATH_R"]="/opt/rt3/var/mason_data"
 S["RT_PLUGIN_PATH_R"]="/opt/rt3/plugins"
+S["RT_FONT_PATH_R"]="/opt/rt3/share/fonts"
 S["RT_MAN_PATH_R"]="/opt/rt3/man"
 S["RT_VAR_PATH_R"]="/opt/rt3/var"
 S["RT_SBIN_PATH_R"]="/opt/rt3/sbin"
@@ -514,6 +644,7 @@ S["MASON_HTML_PATH"]="share/html"
 S["MASON_SESSION_PATH"]="var/session_data"
 S["MASON_DATA_PATH"]="var/mason_data"
 S["RT_PLUGIN_PATH"]="plugins"
+S["RT_FONT_PATH"]="share/fonts"
 S["RT_MAN_PATH"]="man"
 S["RT_VAR_PATH"]="var"
 S["RT_SBIN_PATH"]="sbin"
@@ -524,7 +655,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"]="7"
+S["RT_VERSION_PATCH"]="8"
 S["RT_VERSION_MINOR"]="8"
 S["RT_VERSION_MAJOR"]="3"
 S["RT_GPG"]="1"
@@ -550,7 +681,7 @@ S["DB_RT_HOST"]="localhost"
 S["DB_PORT"]=""
 S["DB_HOST"]="localhost"
 S["DATABASE_ENV_PREF"]=""
-S["DB_TYPE"]="SQLite"
+S["DB_TYPE"]="mysql"
 S["LIBS_GROUP"]="bin"
 S["LIBS_OWNER"]="root"
 S["BIN_OWNER"]="root"
@@ -577,6 +708,8 @@ S["exp_plugindir"]="plugins"
 S["plugindir"]="plugins"
 S["exp_manualdir"]="share/doc"
 S["manualdir"]="share/doc"
+S["exp_fontdir"]="share/fonts"
+S["fontdir"]="share/fonts"
 S["exp_htmldir"]="share/html"
 S["exp_datadir"]="share"
 S["exp_libdir"]="lib"
@@ -587,13 +720,13 @@ S["exp_bindir"]="bin"
 S["exp_exec_prefix"]="/opt/rt3"
 S["exp_prefix"]="/opt/rt3"
 S["SPEEDY_BIN"]="/usr/local/bin/speedy"
-S["WEB_HANDLER"]="standalone"
+S["WEB_HANDLER"]="fastcgi"
 S["PERL"]="/usr/bin/perl"
 S["AWK"]="gawk"
 S["INSTALL_DATA"]="${INSTALL} -m 644"
 S["INSTALL_SCRIPT"]="${INSTALL}"
 S["INSTALL_PROGRAM"]="${INSTALL}"
-S["rt_version_patch"]="7"
+S["rt_version_patch"]="8"
 S["rt_version_minor"]="8"
 S["rt_version_major"]="3"
 S["target_alias"]=""
@@ -603,7 +736,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.7\\\" -DPACKAGE_STRING=\\\"RT\\ 3.8.7\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpractica"\
+S["DEFS"]="-DPACKAGE_NAME=\\\"RT\\\" -DPACKAGE_TARNAME=\\\"rt\\\" -DPACKAGE_VERSION=\\\"3.8.8\\\" -DPACKAGE_STRING=\\\"RT\\ 3.8.8\\\" -DPACKAGE_BUGREPORT=\\\"rt-bugs@bestpractica"\
 "l.com\\\" -DPACKAGE_URL=\\\"\\\""
 S["mandir"]="man"
 S["localedir"]="${datarootdir}/locale"
@@ -629,8 +762,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.7"
-S["PACKAGE_VERSION"]="3.8.7"
+S["PACKAGE_STRING"]="RT 3.8.8"
+S["PACKAGE_VERSION"]="3.8.8"
 S["PACKAGE_TARNAME"]="rt"
 S["PACKAGE_NAME"]="RT"
 S["PATH_SEPARATOR"]=":"
@@ -642,291 +775,172 @@ cat >>"$tmp/subs1.awk" <<_ACAWK &&
 
 }
 {
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
 }
 
+_ACAWK
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi # test -n "$CONFIG_FILES"
 
-#
-# CONFIG_FILES section.
-#
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
-s,@SHELL@,/bin/sh,;t t
-s,@PATH_SEPARATOR@,:,;t t
-s,@PACKAGE_NAME@,RT,;t t
-s,@PACKAGE_TARNAME@,rt,;t t
-s,@PACKAGE_VERSION@,3.6.6,;t t
-s,@PACKAGE_STRING@,RT 3.6.6,;t t
-s,@PACKAGE_BUGREPORT@,rt-bugs@bestpractical.com,;t t
-s,@exec_prefix@,/opt/rt3,;t t
-s,@prefix@,/opt/rt3,;t t
-s,@program_transform_name@,s,x,x,,;t t
-s,@bindir@,/opt/rt3/bin,;t t
-s,@sbindir@,/opt/rt3/sbin,;t t
-s,@libexecdir@,${exec_prefix}/libexec,;t t
-s,@datadir@,/opt/rt3/share,;t t
-s,@sysconfdir@,/opt/rt3/etc,;t t
-s,@sharedstatedir@,${prefix}/com,;t t
-s,@localstatedir@,/opt/rt3/var,;t t
-s,@libdir@,/opt/rt3/lib,;t t
-s,@includedir@,${prefix}/include,;t t
-s,@oldincludedir@,/usr/include,;t t
-s,@infodir@,${prefix}/info,;t t
-s,@mandir@,/opt/rt3/man,;t t
-s,@build_alias@,,;t t
-s,@host_alias@,,;t t
-s,@target_alias@,,;t t
-s,@DEFS@,-DPACKAGE_NAME=\"RT\" -DPACKAGE_TARNAME=\"rt\" -DPACKAGE_VERSION=\"3.6.6\" -DPACKAGE_STRING=\"RT\ 3.6.6\" -DPACKAGE_BUGREPORT=\"rt-bugs@bestpractical.com\" ,;t t
-s,@ECHO_C@,,;t t
-s,@ECHO_N@,-n,;t t
-s,@ECHO_T@,,;t t
-s,@LIBS@,,;t t
-s,@rt_version_major@,3,;t t
-s,@rt_version_minor@,6,;t t
-s,@rt_version_patch@,6,;t t
-s,@INSTALL_PROGRAM@,${INSTALL},;t t
-s,@INSTALL_SCRIPT@,${INSTALL},;t t
-s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
-s,@AWK@,mawk,;t t
-s,@PERL@,/usr/bin/perl,;t t
-s,@SPEEDY_BIN@,/usr/local/bin/speedy,;t t
-s,@exp_prefix@,/opt/rt3,;t t
-s,@exp_exec_prefix@,/opt/rt3,;t t
-s,@exp_bindir@,/opt/rt3/bin,;t t
-s,@exp_sbindir@,/opt/rt3/sbin,;t t
-s,@exp_sysconfdir@,/opt/rt3/etc,;t t
-s,@exp_mandir@,/opt/rt3/man,;t t
-s,@exp_libdir@,/opt/rt3/lib,;t t
-s,@exp_datadir@,/opt/rt3/share,;t t
-s,@htmldir@,/var/www/freeside/rt,;t t
-s,@exp_htmldir@,/var/www/freeside/rt,;t t
-s,@manualdir@,/opt/rt3/share/doc,;t t
-s,@exp_manualdir@,/opt/rt3/share/doc,;t t
-s,@exp_localstatedir@,/opt/rt3/var,;t t
-s,@logfiledir@,/opt/rt3/var/log,;t t
-s,@exp_logfiledir@,/opt/rt3/var/log,;t t
-s,@masonstatedir@,/usr/local/etc/freeside/masondata,;t t
-s,@exp_masonstatedir@,/usr/local/etc/freeside/masondata,;t t
-s,@sessionstatedir@,/opt/rt3/var/session_data,;t t
-s,@exp_sessionstatedir@,/opt/rt3/var/session_data,;t t
-s,@customdir@,/opt/rt3/local,;t t
-s,@exp_customdir@,/opt/rt3/local,;t t
-s,@custometcdir@,/opt/rt3/local/etc,;t t
-s,@exp_custometcdir@,/opt/rt3/local/etc,;t t
-s,@customhtmldir@,/opt/rt3/local/html,;t t
-s,@exp_customhtmldir@,/opt/rt3/local/html,;t t
-s,@customlexdir@,/opt/rt3/local/po,;t t
-s,@exp_customlexdir@,/opt/rt3/local/po,;t t
-s,@customlibdir@,/opt/rt3/local/lib,;t t
-s,@exp_customlibdir@,/opt/rt3/local/lib,;t t
-s,@rt_layout_name@,Freeside,;t t
-s,@BIN_OWNER@,root,;t t
-s,@LIBS_OWNER@,root,;t t
-s,@LIBS_GROUP@,bin,;t t
-s,@DB_TYPE@,Pg,;t t
-s,@DATABASE_ENV_PREF@,,;t t
-s,@DB_HOST@,localhost,;t t
-s,@DB_PORT@,,;t t
-s,@DB_RT_HOST@,localhost,;t t
-s,@DB_DBA@,freeside,;t t
-s,@DB_DATABASE@,freeside,;t t
-s,@DB_RT_USER@,freeside,;t t
-s,@DB_RT_PASS@,,;t t
-s,@WEB_USER@,freeside,;t t
-s,@WEB_GROUP@,freeside,;t t
-s,@RTGROUP@,freeside,;t t
-s,@APACHECTL@,,;t t
-s,@RT_STANDALONE@,0,;t t
-s,@RT_DEVEL_MODE@,0,;t t
-s,@RT_VERSION_MAJOR@,3,;t t
-s,@RT_VERSION_MINOR@,6,;t t
-s,@RT_VERSION_PATCH@,6,;t t
-s,@RT_PATH@,/opt/rt3,;t t
-s,@RT_DOC_PATH@,/opt/rt3/share/doc,;t t
-s,@RT_LOCAL_PATH@,/opt/rt3/local,;t t
-s,@RT_LIB_PATH@,/opt/rt3/lib,;t t
-s,@RT_ETC_PATH@,/opt/rt3/etc,;t t
-s,@CONFIG_FILE_PATH@,/opt/rt3/etc,;t t
-s,@RT_BIN_PATH@,/opt/rt3/bin,;t t
-s,@RT_SBIN_PATH@,/opt/rt3/sbin,;t t
-s,@RT_VAR_PATH@,/opt/rt3/var,;t t
-s,@RT_MAN_PATH@,/opt/rt3/man,;t t
-s,@MASON_DATA_PATH@,/usr/local/etc/freeside/masondata,;t t
-s,@MASON_SESSION_PATH@,/opt/rt3/var/session_data,;t t
-s,@MASON_HTML_PATH@,/var/www/freeside/rt,;t t
-s,@LOCAL_ETC_PATH@,/opt/rt3/local/etc,;t t
-s,@MASON_LOCAL_HTML_PATH@,/opt/rt3/local/html,;t t
-s,@LOCAL_LEXICON_PATH@,/opt/rt3/local/po,;t t
-s,@LOCAL_LIB_PATH@,/opt/rt3/local/lib,;t t
-s,@DESTDIR@,/opt/rt3,;t t
-s,@RT_LOG_PATH@,/opt/rt3/var/log,;t t
-s,@LIBOBJS@,,;t t
-s,@LTLIBOBJS@,,;t t
-CEOF
-
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
-  fi
-fi # test -n "$CONFIG_FILES"
+eval set X "  :F $CONFIG_FILES      "
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
 
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-       cat >$tmp/stdin
-       ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-       ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+        # (if the path is not absolute).  The absolute path cannot be DOS-style,
+        # because $ac_f cannot contain `:'.
+        test -f "$ac_f" ||
+          case $ac_f in
+          [\\/$]*) false;;
+          *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+          esac ||
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+         $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+       `' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
   esac
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+  ac_dir=`$as_dirname -- "$ac_file" ||
 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_file" : 'X\(//\)[^/]' \| \
         X"$ac_file" : 'X\(//\)$' \| \
-        X"$ac_file" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$as_dir" : 'X\(//\)[^/]' \| \
-        X"$as_dir" : 'X\(//\)$' \| \
-        X"$as_dir" : 'X\(/\)' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-         /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-         /^X\(\/\/\)$/{ s//\1/; q; }
-         /^X\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
-
+        X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)[^/].*/{
+           s//\1/
+           q
+         }
+         /^X\(\/\/\)$/{
+           s//\1/
+           q
+         }
+         /^X\(\/\).*/{
+           s//\1/
+           q
+         }
+         s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
   ac_builddir=.
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
 
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
 
   case $INSTALL in
   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
   esac
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
@@ -965,26 +979,31 @@ s/^[^=]*=[         ]*$//
 
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || as_fn_error "could not create $ac_file" "$LINENO" 5
 
-  # Run the commands associated with the file.
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
   case $ac_file in
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
@@ -1008,9 +1027,9 @@ s,@INSTALL@,$ac_INSTALL,;t t
                 ;;
     "sbin/rt-dump-database":F) chmod ug+x $ac_file
                 ;;
-    sbin/rt-setup-database ) chmod ug+x $ac_file
+    "sbin/rt-setup-database":F) chmod ug+x $ac_file
                 ;;
-    sbin/rt-test-dependencies ) chmod ug+x $ac_file
+    "sbin/rt-test-dependencies":F) chmod ug+x $ac_file
                 ;;
     "sbin/rt-email-digest":F) chmod ug+x $ac_file
                 ;;
@@ -1026,19 +1045,23 @@ s,@INSTALL@,$ac_INSTALL,;t t
                 ;;
     "sbin/rt-server":F) chmod ug+x $ac_file
                 ;;
+    "bin/fastcgi_server":F) chmod ug+x $ac_file
+                ;;
     "bin/mason_handler.fcgi":F) chmod ug+x $ac_file
                 ;;
-    bin/mason_handler.scgi ) chmod ug+x $ac_file
+    "bin/mason_handler.scgi":F) chmod ug+x $ac_file
                 ;;
-    bin/standalone_httpd ) chmod ug+x $ac_file
+    "bin/standalone_httpd":F) chmod ug+x $ac_file
                 ;;
-    bin/rt-crontool ) chmod ug+x $ac_file
+    "bin/rt-crontool":F) chmod ug+x $ac_file
                 ;;
-    bin/rt-mailgate ) chmod ug+x $ac_file
+    "bin/rt-mailgate":F) chmod ug+x $ac_file
                 ;;
-    bin/rt ) chmod ug+x $ac_file
+    "bin/rt":F) chmod ug+x $ac_file
                 ;;
+
   esac
-done
+done # for ac_tag
+
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
index 459dea4..b36a607 100644 (file)
@@ -175,6 +175,26 @@ improvements, but some setups can not handle it.
 
 Set($UseSQLForACLChecks, undef);
 
+=item C<$TicketsItemMapSize>
+
+In RT at display page of a ticket and there is the current search,
+then links for first, next, previous and last ticket are shown in
+the menu.
+
+To build full map RT has to fetch full result set out of DB what can
+eat lots of resourses. Using this option it's possible to limit number
+of tickets fetched.
+
+Set C<$TicketsItemMapSize> to number of tickets you want RT to look
+at to build the map. If full result set is bigger than that number
+then there would be no 'last' link in the menu.
+
+Set this to zero to return back to old behaviour.
+
+=cut
+
+Set($TicketsItemMapSize, 1000);
+
 =back
 
 =head1 Incoming Mail Gateway Configuration
@@ -266,7 +286,7 @@ avoid sending mail to itself.  It will also hide RT addresses from the list of
 
 =cut
 
-Set($RTAddressRegexp , '^rt\@example.com$');
+Set($RTAddressRegexp , undef);
 
 =item C<$CanonicalizeEmailAddressMatch>, C<$CanonicalizeEmailAddressReplace>
 
@@ -402,6 +422,54 @@ Set($OverrideOutgoingMailFrom, {
 
 =back
 
+=item C<$DefaultMailPrecedence>
+
+C<$DefaultMailPrecedence> is used to control the default
+Precedence level of outgoing mail where none is specified.
+By default it is C<bulk>, but if you only send mail to
+your staff, you may wish to change it.
+
+Note that you can set the precedence of individual templates
+by including an explicit Precedence header.
+
+If you set this value to C<undef> then we do not set a default
+Precedence header to outgoing mail. However, if there already is a
+Precedence header it will be preserved.
+
+=cut
+
+Set($DefaultMailPrecedence, 'bulk');
+
+=back
+
+=item C<$DefaultErrorMailPrecedence>
+
+C<$DefaultErrorMailPrecedence> is used to control the default
+Precedence level of outgoing mail that indicates some kind of
+error condition. By default it is C<bulk>, but if you only send
+mail to your staff, you may wish to change it.
+
+If you set this value to C<undef> then we do not add a Precedence
+header to error mail.
+
+=cut
+
+Set($DefaultErrorMailPrecedence, 'bulk');
+
+=back
+
+=item C<$UseOriginatorHeader>
+
+C<$UseOriginatorHeader> is used to control the insertion of an
+RT-Originator Header in every outgoing mail, containing the
+mail address of the transaction creator.
+
+=cut
+
+Set($UseOriginatorHeader, 1);
+
+=back
+
 =head1 Sendmail Configuration
 
 These options only take effect if C<$MailCommand> is 'sendmail' or
@@ -878,6 +946,41 @@ C<$LogoURL> points to the URL of the RT logo displayed in the web UI
 
 Set($LogoURL, RT->Config->Get('WebImagesURL') . "bplogo.gif");
 
+=item C<$LogoLinkURL>
+
+C<$LogoLinkURL> is the URL that the RT logo hyperlinks to.
+
+=cut
+
+Set($LogoLinkURL, "http://bestpractical.com");
+
+=item C<$LogoAltText>
+
+C<$LogoAltText> is a string of text for the alt-text of the logo. It
+will be passed through C<loc> for localization.
+
+=cut
+
+Set($LogoAltText, "Best Practical Solutions, LLC corporate logo");
+
+=item C<$LogoImageHeight>
+
+C<$LogoImageHeight> is the value of the C<height> attribute of the logo
+C<img> tag.
+
+=cut
+
+Set($LogoImageHeight, 33);
+
+=item C<$LogoImageWidth>
+
+C<$LogoImageWidth> is the value of the C<width> attribute of the logo
+C<img> tag.
+
+=cut
+
+Set($LogoImageWidth, 177);
+
 =item C<$WebNoAuthRegex>
 
 What portion of RT's URL space should not require authentication.
@@ -952,6 +1055,14 @@ Should your user's signatures (from their Preferences page) be included in Comme
 
 Set($MessageBoxIncludeSignature, 1);
 
+=item C<$MessageBoxIncludeSignatureOnComment>
+
+Should your user's signatures (from their Preferences page) be included in Comments. Setting this to false overrides C<$MessageBoxIncludeSignature>.
+
+=cut
+
+Set($MessageBoxIncludeSignatureOnComment, 1);
+
 =item C<$WikiImplicitLinks>
 
 Support implicit links in WikiText custom fields?  A true value
@@ -973,6 +1084,27 @@ sent in a request (although there is probably more to it than that)
 
 Set($TrustHTMLAttachments, undef);
 
+=item C<$AlwaysDownloadAttachments>
+
+Always download attachments, regardless of content type. If set,
+this overrides C<TrustHTMLAttachments>.
+
+=cut
+
+Set($AlwaysDownloadAttachments, undef);
+
+=item C<$AttachmentUnits>
+
+Controls the units (kilobytes or bytes) that attachment sizes use
+for display. The default is to display kilobytes if the attachment
+is larger than 1024 bytes, bytes otherwise. If you set
+C<$AttachmentUnits> to C<'k'> then attachment sizes will always be
+displayed in kilobytes. If set to C<'b'>, then sizes will be bytes.
+
+=cut
+
+Set($AttachmentUnits, undef);
+
 =item C<$RedistributeAutoGeneratedMessages>
 
 Should RT redistribute correspondence that it identifies as
@@ -1078,6 +1210,16 @@ to RT for the defined time.
 
 Set($AutoLogoff, 0);
 
+=item C<$LogoutRefresh>
+
+The number of seconds to wait after logout before sending the user to the
+login page. By default, 1 second, though you may want to increase this if
+you display additional information on the logout page.
+
+=cut
+
+Set($LogoutRefresh, 1);
+
 =item C<$WebSecureCookies>
 
 By default, RT's session cookie isn't marked as "secure" Some web browsers 
@@ -1254,6 +1396,46 @@ Set($DefaultSelfServiceSearchResultFormat, qq{
    Requestors,
    OwnerName});
 
+=item C<%AdminSearchResultFormat>
+
+In admin interface format strings similar to tickets search result
+formats are used. Use C<%AdminSearchResultFormat> to define format
+strings per RT class.
+
+=cut
+
+Set(%AdminSearchResultFormat,
+    Queues =>
+        q{'<a href="__WebPath__/Admin/Queues/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/Queues/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,__Description__,__Address__,__Priority__,__DefaultDueIn__,__Disabled__},
+
+    Groups =>
+        q{'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,'__Description__'},
+
+    Users =>
+        q{'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,__RealName__, __EmailAddress__},
+
+    CustomFields =>
+        q{'<a href="__WebPath__/Admin/CustomFields/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/CustomFields/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,__AppliedTo__, __FriendlyType__, __FriendlyPattern__},
+
+    Scrips => 
+        q{'<a href="__WebPath__/__WebRequestPathDir__/Scrip.html?id=__id__&Queue=__QueueId__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/__WebRequestPathDir__/Scrip.html?id=__id__&Queue=__QueueId__">__Description__</a>/TITLE:Description'}
+        .q{,__Stage__, __Condition__, __Action__, __Template__},
+
+    Templates =>
+        q{'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__Name__</a>/TITLE:Name'}
+        .q{,'__Description__'},
+);
+
 =item C<$SuppressInlineTextFiles>
 
 If C<$SuppressInlineTextFiles> is set to a true value, then uploaded
@@ -1274,17 +1456,38 @@ ticket searches.
 
 Set($DontSearchFileAttachments, undef);
 
-=item C<$ChartFont>
+=item C<%ChartFont>
+
+The L<GD> module (which RT uses for graphs) ships with a builtin font 
+that doesn't have full Unicode support. You can use a given TrueType font 
+for a specific language by setting %ChartFont to (language =E<gt> the 
+absolute path of a font) pairs. Your GD library must have support for
+TrueType fonts to use this option. If there is no entry for a language 
+in the hash then font with 'others' key is used.
 
-The L<GD> module (which RT uses for graphs) uses a builtin font that doesn't
-have full Unicode support. You can use a particular TrueType font by setting
-$ChartFont to the absolute path of that font. Your GD library must have
-support for TrueType fonts to use this option.
+RT comes with two TrueType fonts covering most available languages.
 
 =cut
 
-Set($ChartFont, undef);
+Set(
+    %ChartFont,
+    'zh-cn'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'zh-tw'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'ja'     => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'others' => "$RT::BasePath/share/fonts/DroidSans.ttf",
+);
+
+=item C<$ChartsTimezonesInDB>
+
+Dates are stored using UTC timezone in the DB, so charts groupped
+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
+feature, read more in F<docs/timezones_in_charts.pod>.
+
+=cut
 
+Set( $ChartsTimezonesInDB, 0 );
 
 =item C<@Active_MakeClicky>
 
index 73639c1..03ee5d9 100644 (file)
@@ -175,6 +175,26 @@ improvements, but some setups can not handle it.
 
 Set($UseSQLForACLChecks, undef);
 
+=item C<$TicketsItemMapSize>
+
+In RT at display page of a ticket and there is the current search,
+then links for first, next, previous and last ticket are shown in
+the menu.
+
+To build full map RT has to fetch full result set out of DB what can
+eat lots of resourses. Using this option it's possible to limit number
+of tickets fetched.
+
+Set C<$TicketsItemMapSize> to number of tickets you want RT to look
+at to build the map. If full result set is bigger than that number
+then there would be no 'last' link in the menu.
+
+Set this to zero to return back to old behaviour.
+
+=cut
+
+Set($TicketsItemMapSize, 1000);
+
 =back
 
 =head1 Incoming Mail Gateway Configuration
@@ -266,7 +286,7 @@ avoid sending mail to itself.  It will also hide RT addresses from the list of
 
 =cut
 
-Set($RTAddressRegexp , '^rt\@example.com$');
+Set($RTAddressRegexp , undef);
 
 =item C<$CanonicalizeEmailAddressMatch>, C<$CanonicalizeEmailAddressReplace>
 
@@ -402,6 +422,54 @@ Set($OverrideOutgoingMailFrom, {
 
 =back
 
+=item C<$DefaultMailPrecedence>
+
+C<$DefaultMailPrecedence> is used to control the default
+Precedence level of outgoing mail where none is specified.
+By default it is C<bulk>, but if you only send mail to
+your staff, you may wish to change it.
+
+Note that you can set the precedence of individual templates
+by including an explicit Precedence header.
+
+If you set this value to C<undef> then we do not set a default
+Precedence header to outgoing mail. However, if there already is a
+Precedence header it will be preserved.
+
+=cut
+
+Set($DefaultMailPrecedence, 'bulk');
+
+=back
+
+=item C<$DefaultErrorMailPrecedence>
+
+C<$DefaultErrorMailPrecedence> is used to control the default
+Precedence level of outgoing mail that indicates some kind of
+error condition. By default it is C<bulk>, but if you only send
+mail to your staff, you may wish to change it.
+
+If you set this value to C<undef> then we do not add a Precedence
+header to error mail.
+
+=cut
+
+Set($DefaultErrorMailPrecedence, 'bulk');
+
+=back
+
+=item C<$UseOriginatorHeader>
+
+C<$UseOriginatorHeader> is used to control the insertion of an
+RT-Originator Header in every outgoing mail, containing the
+mail address of the transaction creator.
+
+=cut
+
+Set($UseOriginatorHeader, 1);
+
+=back
+
 =head1 Sendmail Configuration
 
 These options only take effect if C<$MailCommand> is 'sendmail' or
@@ -878,6 +946,41 @@ C<$LogoURL> points to the URL of the RT logo displayed in the web UI
 
 Set($LogoURL, RT->Config->Get('WebImagesURL') . "bplogo.gif");
 
+=item C<$LogoLinkURL>
+
+C<$LogoLinkURL> is the URL that the RT logo hyperlinks to.
+
+=cut
+
+Set($LogoLinkURL, "http://bestpractical.com");
+
+=item C<$LogoAltText>
+
+C<$LogoAltText> is a string of text for the alt-text of the logo. It
+will be passed through C<loc> for localization.
+
+=cut
+
+Set($LogoAltText, "Best Practical Solutions, LLC corporate logo");
+
+=item C<$LogoImageHeight>
+
+C<$LogoImageHeight> is the value of the C<height> attribute of the logo
+C<img> tag.
+
+=cut
+
+Set($LogoImageHeight, 33);
+
+=item C<$LogoImageWidth>
+
+C<$LogoImageWidth> is the value of the C<width> attribute of the logo
+C<img> tag.
+
+=cut
+
+Set($LogoImageWidth, 177);
+
 =item C<$WebNoAuthRegex>
 
 What portion of RT's URL space should not require authentication.
@@ -952,6 +1055,14 @@ Should your user's signatures (from their Preferences page) be included in Comme
 
 Set($MessageBoxIncludeSignature, 1);
 
+=item C<$MessageBoxIncludeSignatureOnComment>
+
+Should your user's signatures (from their Preferences page) be included in Comments. Setting this to false overrides C<$MessageBoxIncludeSignature>.
+
+=cut
+
+Set($MessageBoxIncludeSignatureOnComment, 1);
+
 =item C<$WikiImplicitLinks>
 
 Support implicit links in WikiText custom fields?  A true value
@@ -973,6 +1084,27 @@ sent in a request (although there is probably more to it than that)
 
 Set($TrustHTMLAttachments, undef);
 
+=item C<$AlwaysDownloadAttachments>
+
+Always download attachments, regardless of content type. If set,
+this overrides C<TrustHTMLAttachments>.
+
+=cut
+
+Set($AlwaysDownloadAttachments, undef);
+
+=item C<$AttachmentUnits>
+
+Controls the units (kilobytes or bytes) that attachment sizes use
+for display. The default is to display kilobytes if the attachment
+is larger than 1024 bytes, bytes otherwise. If you set
+C<$AttachmentUnits> to C<'k'> then attachment sizes will always be
+displayed in kilobytes. If set to C<'b'>, then sizes will be bytes.
+
+=cut
+
+Set($AttachmentUnits, undef);
+
 =item C<$RedistributeAutoGeneratedMessages>
 
 Should RT redistribute correspondence that it identifies as
@@ -1078,6 +1210,16 @@ to RT for the defined time.
 
 Set($AutoLogoff, 0);
 
+=item C<$LogoutRefresh>
+
+The number of seconds to wait after logout before sending the user to the
+login page. By default, 1 second, though you may want to increase this if
+you display additional information on the logout page.
+
+=cut
+
+Set($LogoutRefresh, 1);
+
 =item C<$WebSecureCookies>
 
 By default, RT's session cookie isn't marked as "secure" Some web browsers 
@@ -1254,6 +1396,46 @@ Set($DefaultSelfServiceSearchResultFormat, qq{
    Requestors,
    OwnerName});
 
+=item C<%AdminSearchResultFormat>
+
+In admin interface format strings similar to tickets search result
+formats are used. Use C<%AdminSearchResultFormat> to define format
+strings per RT class.
+
+=cut
+
+Set(%AdminSearchResultFormat,
+    Queues =>
+        q{'<a href="__WebPath__/Admin/Queues/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/Queues/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,__Description__,__Address__,__Priority__,__DefaultDueIn__,__Disabled__},
+
+    Groups =>
+        q{'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,'__Description__'},
+
+    Users =>
+        q{'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,__RealName__, __EmailAddress__},
+
+    CustomFields =>
+        q{'<a href="__WebPath__/Admin/CustomFields/Modify.html?id=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/Admin/CustomFields/Modify.html?id=__id__">__Name__</a>/TITLE:Name'}
+        .q{,__AppliedTo__, __FriendlyType__, __FriendlyPattern__},
+
+    Scrips => 
+        q{'<a href="__WebPath__/__WebRequestPathDir__/Scrip.html?id=__id__&Queue=__QueueId__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/__WebRequestPathDir__/Scrip.html?id=__id__&Queue=__QueueId__">__Description__</a>/TITLE:Description'}
+        .q{,__Stage__, __Condition__, __Action__, __Template__},
+
+    Templates =>
+        q{'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__id__</a>/TITLE:#'}
+        .q{,'<a href="__WebPath__/__WebRequestPathDir__/Template.html?Queue=__QueueId__&Template=__id__">__Name__</a>/TITLE:Name'}
+        .q{,'__Description__'},
+);
+
 =item C<$SuppressInlineTextFiles>
 
 If C<$SuppressInlineTextFiles> is set to a true value, then uploaded
@@ -1274,17 +1456,38 @@ ticket searches.
 
 Set($DontSearchFileAttachments, undef);
 
-=item C<$ChartFont>
+=item C<%ChartFont>
+
+The L<GD> module (which RT uses for graphs) ships with a builtin font 
+that doesn't have full Unicode support. You can use a given TrueType font 
+for a specific language by setting %ChartFont to (language =E<gt> the 
+absolute path of a font) pairs. Your GD library must have support for
+TrueType fonts to use this option. If there is no entry for a language 
+in the hash then font with 'others' key is used.
 
-The L<GD> module (which RT uses for graphs) uses a builtin font that doesn't
-have full Unicode support. You can use a particular TrueType font by setting
-$ChartFont to the absolute path of that font. Your GD library must have
-support for TrueType fonts to use this option.
+RT comes with two TrueType fonts covering most available languages.
 
 =cut
 
-Set($ChartFont, undef);
+Set(
+    %ChartFont,
+    'zh-cn'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'zh-tw'  => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'ja'     => "$RT::BasePath/share/fonts/DroidSansFallback.ttf",
+    'others' => "$RT::BasePath/share/fonts/DroidSans.ttf",
+);
+
+=item C<$ChartsTimezonesInDB>
+
+Dates are stored using UTC timezone in the DB, so charts groupped
+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
+feature, read more in F<docs/timezones_in_charts.pod>.
+
+=cut
 
+Set( $ChartsTimezonesInDB, 0 );
 
 =item C<@Active_MakeClicky>
 
index c4f066e..f98a74b 100644 (file)
@@ -57,7 +57,7 @@ use Cwd ();
 
 use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE);
 
-our $VERSION = '3.8.7';
+our $VERSION = '3.8.8';
 
 
 
@@ -354,7 +354,10 @@ sub InitLogging {
                          ));
         }
     }
+    InitSignalHandlers();
+}
 
+sub InitSignalHandlers {
 
 # Signal handlers
 ## This is the default handling of warnings and die'ings in the code
@@ -430,6 +433,8 @@ Load all modules that define base classes.
 =cut
 
 sub InitClasses {
+    shift if @_%2; # so we can call it as a function or method
+    my %args = (@_);
     require RT::Tickets;
     require RT::Transactions;
     require RT::Attachments;
@@ -474,6 +479,25 @@ sub InitClasses {
         RT::ObjectCustomFieldValue
         RT::Attribute
     );
+
+    if ( $args{'Heavy'} ) {
+        # load scrips' modules
+        my $scrips = RT::Scrips->new($RT::SystemUser);
+        $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
+        while ( my $scrip = $scrips->Next ) {
+            $scrip->LoadModules;
+        }
+
+       foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) {
+            local $@;
+            eval "require $class; 1" or $RT::Logger->error(
+                "Class '$class' is listed in CustomFieldValuesSources option"
+                ." in the config, but we failed to load it:\n$@\n"
+            );
+        }
+
+        RT::I18N->LoadLexicons;
+    }
 }
 
 =head2 InitSystemObjects
index a5f8e01..367086d 100644 (file)
@@ -354,7 +354,10 @@ sub InitLogging {
                          ));
         }
     }
+    InitSignalHandlers();
+}
 
+sub InitSignalHandlers {
 
 # Signal handlers
 ## This is the default handling of warnings and die'ings in the code
@@ -430,6 +433,8 @@ Load all modules that define base classes.
 =cut
 
 sub InitClasses {
+    shift if @_%2; # so we can call it as a function or method
+    my %args = (@_);
     require RT::Tickets;
     require RT::Transactions;
     require RT::Attachments;
@@ -474,6 +479,25 @@ sub InitClasses {
         RT::ObjectCustomFieldValue
         RT::Attribute
     );
+
+    if ( $args{'Heavy'} ) {
+        # load scrips' modules
+        my $scrips = RT::Scrips->new($RT::SystemUser);
+        $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' );
+        while ( my $scrip = $scrips->Next ) {
+            $scrip->LoadModules;
+        }
+
+       foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) {
+            local $@;
+            eval "require $class; 1" or $RT::Logger->error(
+                "Class '$class' is listed in CustomFieldValuesSources option"
+                ." in the config, but we failed to load it:\n$@\n"
+            );
+        }
+
+        RT::I18N->LoadLexicons;
+    }
 }
 
 =head2 InitSystemObjects
index 4e66c3c..3f8581c 100644 (file)
@@ -333,6 +333,22 @@ our %META = (
         },
     },
 
+    RTAddressRegexp => {
+        Type    => 'SCALAR',
+        PostLoadCheck => sub {
+            my $self = shift;
+            my $value = $self->Get('RTAddressRegexp');
+            return if $value;
+
+            $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.'
+            );
+        },
+    },
     # User overridable mail options
     EmailFrequency => {
         Section         => 'Mail',                                     #loc
@@ -349,6 +365,16 @@ our %META = (
             ]
         }
     },
+    NotifyActor => {
+        Section         => 'Mail',                                     #loc
+        Overridable     => 1,
+        SortOrder       => 2,
+        Widget          => '/Widgets/Form/Boolean',
+        WidgetArguments => {
+            Description => 'Outgoing mail', #loc
+            Hints => 'Should RT send you mail for ticket updates you make?', #loc
+        }
+    },
 
     # this tends to break extensions that stash links in ticket update pages
     Organization => {
index 407b905..1b3ef51 100644 (file)
@@ -88,6 +88,7 @@ sub _Init {
   my $self = shift;
   $self->{'table'} = "Groups";
   $self->{'primary_key'} = "id";
+  $self->{'with_disabled_column'} = 1;
 
   my @result = $self->SUPER::_Init(@_);
 
@@ -129,7 +130,7 @@ sub PrincipalsAlias {
 }
 
 
-# {{{ LimiToSystemInternalGroups
+# {{{ LimitToSystemInternalGroups
 
 =head2 LimitToSystemInternalGroups
 
@@ -148,7 +149,7 @@ sub LimitToSystemInternalGroups {
 
 # }}}
 
-# {{{ LimiToUserDefinedGroups
+# {{{ LimitToUserDefinedGroups
 
 =head2 LimitToUserDefinedGroups
 
@@ -167,7 +168,7 @@ sub LimitToUserDefinedGroups {
 
 # }}}
 
-# {{{ LimiToPersonalGroupsFor
+# {{{ LimitToPersonalGroupsFor
 
 =head2 LimitToPersonalGroupsFor PRINCIPAL_ID
 
@@ -377,12 +378,13 @@ Only find items that haven\'t been disabled
 
 sub LimitToEnabled {
     my $self = shift;
-    
-    $self->Limit( ALIAS => $self->PrincipalsAlias,
-                         FIELD => 'Disabled',
-                         VALUE => '0',
-                         OPERATOR => '=',
-                );
+
+    $self->{'handled_disabled_column'} = 1;
+    $self->Limit(
+        ALIAS => $self->PrincipalsAlias,
+        FIELD => 'Disabled',
+        VALUE => '0',
+    );
 }
 # }}}
 
@@ -397,13 +399,14 @@ Only find items that have been deleted.
 sub LimitToDeleted {
     my $self = shift;
     
-    $self->{'find_disabled_rows'} = 1;
-    $self->Limit( ALIAS => $self->PrincipalsAlias,
-                  FIELD => 'Disabled',
-                  OPERATOR => '=',
-                  VALUE => 1,
-                );
+    $self->{'handled_disabled_column'} = $self->{'find_disabled_rows'} = 1;
+    $self->Limit(
+        ALIAS => $self->PrincipalsAlias,
+        FIELD => 'Disabled',
+        VALUE => 1,
+    );
 }
+
 # }}}
 
 # {{{ sub Next
index 4f38b04..bee9442 100755 (executable)
@@ -1562,6 +1562,7 @@ sub CustomFields {
     $cfs->LimitToGlobalOrObjectId(
         $self->_LookupId( $self->CustomFieldLookupType )
     );
+    $cfs->ApplySortOrder;
 
     return $cfs;
 }
index 527952b..671d880 100644 (file)
@@ -93,10 +93,9 @@ Only find items that haven't been disabled
 
 sub LimitToEnabled {
     my $self = shift;
-    
-    $self->Limit( FIELD => 'Disabled',
-                 VALUE => '0',
-                 OPERATOR => '=' );
+
+    $self->{'handled_disabled_column'} = 1;
+    $self->Limit( FIELD => 'Disabled', VALUE => '0' );
 }
 
 =head2 LimitToDeleted
@@ -107,12 +106,19 @@ Only find items that have been deleted.
 
 sub LimitToDeleted {
     my $self = shift;
-    
-    $self->{'find_disabled_rows'} = 1;
-    $self->Limit( FIELD => 'Disabled',
-                 OPERATOR => '=',
-                 VALUE => '1'
-               );
+
+    $self->{'handled_disabled_column'} = $self->{'find_disabled_rows'} = 1;
+    $self->Limit( FIELD => 'Disabled', VALUE => '1' );
+}
+
+=head2 FindAllRows
+
+Find all matching rows, regardless of whether they are disabled or not
+
+=cut
+
+sub FindAllRows {
+    shift->{'find_disabled_rows'} = 1;
 }
 
 =head2 LimitAttribute PARAMHASH
@@ -262,16 +268,6 @@ sub LimitCustomField {
     );
 }
 
-=head2 FindAllRows
-
-Find all matching rows, regardless of whether they are disabled or not
-
-=cut
-
-sub FindAllRows {
-    shift->{'find_disabled_rows'} = 1;
-}
-
 =head2 Limit PARAMHASH
 
 This Limit sub calls SUPER::Limit, but defaults "CASESENSITIVE" to 1, thus
@@ -323,6 +319,32 @@ sub ItemsArrayRef {
     return $self->ItemsOrderBy($self->SUPER::ItemsArrayRef());
 }
 
+# make sure that Disabled rows never get seen unless
+# we're explicitly trying to see them.
+
+sub _DoSearch {
+    my $self = shift;
+
+    if ( $self->{'with_disabled_column'}
+        && !$self->{'handled_disabled_column'}
+        && !$self->{'find_disabled_rows'}
+    ) {
+        $self->LimitToEnabled;
+    }
+    return $self->SUPER::_DoSearch(@_);
+}
+sub _DoCount {
+    my $self = shift;
+
+    if ( $self->{'with_disabled_column'}
+        && !$self->{'handled_disabled_column'}
+        && !$self->{'find_disabled_rows'}
+    ) {
+        $self->LimitToEnabled;
+    }
+    return $self->SUPER::_DoCount(@_);
+}
+
 eval "require RT::SearchBuilder_Vendor";
 die $@ if ($@ && $@ !~ qr{^Can't locate RT/SearchBuilder_Vendor.pm});
 eval "require RT::SearchBuilder_Local";
index f4664fd..83737c1 100644 (file)
@@ -135,6 +135,11 @@ our %LINKDIRMAP = (
 sub LINKTYPEMAP   { return \%LINKTYPEMAP   }
 sub LINKDIRMAP   { return \%LINKDIRMAP   }
 
+our %MERGE_CACHE = (
+    effective => {},
+    merged => {},
+);
+
 # {{{ sub Load
 
 =head2 Load
@@ -148,47 +153,46 @@ Otherwise, returns the ticket id.
 sub Load {
     my $self = shift;
     my $id   = shift;
+    $id = '' unless defined $id;
 
-    #TODO modify this routine to look at EffectiveId and do the recursive load
-    # thing. be careful to cache all the interim tickets we try so we don't loop forever.
+    # TODO: modify this routine to look at EffectiveId and
+    # do the recursive load thing. be careful to cache all
+    # the interim tickets we try so we don't loop forever.
 
     # FIXME: there is no TicketBaseURI option in config
     my $base_uri = RT->Config->Get('TicketBaseURI') || '';
     #If it's a local URI, turn it into a ticket id
-    if ( $base_uri && defined $id && $id =~ /^$base_uri(\d+)$/ ) {
+    if ( $base_uri && $id =~ /^$base_uri(\d+)$/ ) {
         $id = $1;
     }
 
-    #If it's a remote URI, we're going to punt for now
-    elsif ( $id =~ '://' ) {
+    unless ( $id =~ /^\d+$/ ) {
+        $RT::Logger->debug("Tried to load a bogus ticket id: '$id'");
         return (undef);
     }
 
-    #If we have an integer URI, load the ticket
-    if ( defined $id && $id =~ /^\d+$/ ) {
-        my ($ticketid,$msg) = $self->LoadById($id);
+    $id = $MERGE_CACHE{'effective'}{ $id }
+        if $MERGE_CACHE{'effective'}{ $id };
 
-        unless ($self->Id) {
-            $RT::Logger->debug("$self tried to load a bogus ticket: $id");
-            return (undef);
-        }
-    }
-
-    #It's not a URI. It's not a numerical ticket ID. Punt!
-    else {
-        $RT::Logger->debug("Tried to load a bogus ticket id: '$id'");
+    my ($ticketid, $msg) = $self->LoadById( $id );
+    unless ( $self->Id ) {
+        $RT::Logger->debug("$self tried to load a bogus ticket: $id");
         return (undef);
     }
 
     #If we're merged, resolve the merge.
-    if ( ( $self->EffectiveId ) and ( $self->EffectiveId != $self->Id ) ) {
-        $RT::Logger->debug ("We found a merged ticket.". $self->id ."/".$self->EffectiveId);
-        return ( $self->Load( $self->EffectiveId ) );
+    if ( $self->EffectiveId && $self->EffectiveId != $self->Id ) {
+        $RT::Logger->debug(
+            "We found a merged ticket. "
+            . $self->id ."/". $self->EffectiveId
+        );
+        my $real_id = $self->Load( $self->EffectiveId );
+        $MERGE_CACHE{'effective'}{ $id } = $real_id;
+        return $real_id;
     }
 
     #Ok. we're loaded. lets get outa here.
-    return ( $self->Id );
-
+    return $self->Id;
 }
 
 # }}}
@@ -1160,12 +1164,20 @@ sub _AddWatcher {
 
     my $principal = RT::Principal->new($self->CurrentUser);
     if ($args{'Email'}) {
+        if ( RT::EmailParser->IsRTAddress( $args{'Email'} ) ) {
+            return (0, $self->loc("[_1] is an address RT receives mail at. Adding it as a '[_2]' would create a mail loop", $args{'Email'}, $self->loc($args{'Type'})));
+        }
         my $user = RT::User->new($RT::SystemUser);
         my ($pid, $msg) = $user->LoadOrCreateByEmail( $args{'Email'} );
         $args{'PrincipalId'} = $pid if $pid; 
     }
     if ($args{'PrincipalId'}) {
         $principal->Load($args{'PrincipalId'});
+        if ( $principal->id and $principal->IsUser and my $email = $principal->Object->EmailAddress ) {
+            return (0, $self->loc("[_1] is an address RT receives mail at. Adding it as a '[_2]' would create a mail loop", $email, $self->loc($args{'Type'})))
+                if RT::EmailParser->IsRTAddress( $email );
+
+        }
     } 
 
  
@@ -1696,8 +1708,9 @@ sub IsOwner {
 
 =head2 TransactionAddresses
 
-Returns a composite hashref of the results of L<RT::Transaction/Addresses> for all this ticket's Create, Comment or Correspond transactions.
-The keys are C<To>, C<Cc> and C<Bcc>. The values are lists of C<Email::Address> objects.
+Returns a composite hashref of the results of L<RT::Transaction/Addresses> for
+all this ticket's Create, Comment or Correspond transactions. The keys are
+stringified email addresses. Each value is an L<Email::Address> object.
 
 NOTE: For performance reasons, this method might want to skip transactions and go straight for attachments. But to make that work right, we're going to need to go and walk around the access control in Attachment.pm's sub _Value.
 
@@ -2230,13 +2243,13 @@ sub _RecordNote {
             my $addresses = join ', ', (
                 map { RT::User->CanonicalizeEmailAddress( $_->address ) }
                     Email::Address->parse( $args{ $type . 'MessageTo' } ) );
-            $args{'MIMEObj'}->head->add( 'RT-Send-' . $type, $addresses );
+            $args{'MIMEObj'}->head->add( 'RT-Send-' . $type, Encode::encode_utf8( $addresses ) );
         }
     }
 
     foreach my $argument (qw(Encrypt Sign)) {
         $args{'MIMEObj'}->head->add(
-            "X-RT-$argument" => $args{ $argument }
+            "X-RT-$argument" => Encode::encode_utf8( $args{ $argument } )
         ) if defined $args{ $argument };
     }
 
@@ -2282,34 +2295,35 @@ sub _Links {
     my $field = shift;
     my $type  = shift || "";
 
-    unless ( $self->{"$field$type"} ) {
-        $self->{"$field$type"} = new RT::Links( $self->CurrentUser );
-
-        #not sure what this ACL was supposed to do... but returning the
-        # bare (unlimited) RT::Links certainly seems wrong, it causes the
-        # $Ticket->Customers method during creation to return results for every
-        # ticket...
-        #if ( $self->CurrentUserHasRight('ShowTicket') ) {
-
-            # Maybe this ticket is a merged ticket
-            my $Tickets = new RT::Tickets( $self->CurrentUser );
-            # at least to myself
-            $self->{"$field$type"}->Limit( FIELD => $field,
-                                           VALUE => $self->URI,
-                                           ENTRYAGGREGATOR => 'OR' );
-            $Tickets->Limit( FIELD => 'EffectiveId',
-                             VALUE => $self->EffectiveId );
-            while (my $Ticket = $Tickets->Next) {
-                $self->{"$field$type"}->Limit( FIELD => $field,
-                                               VALUE => $Ticket->URI,
-                                               ENTRYAGGREGATOR => 'OR' );
-            }
-            $self->{"$field$type"}->Limit( FIELD => 'Type',
-                                           VALUE => $type )
-              if ($type);
-        #}
+    my $cache_key = "$field$type";
+    return $self->{ $cache_key } if $self->{ $cache_key };
+
+    my $links = $self->{ $cache_key }
+              = RT::Links->new( $self->CurrentUser );
+    unless ( $self->CurrentUserHasRight('ShowTicket') ) {
+        $links->Limit( FIELD => 'id', VALUE => 0 );
+        return $links;
     }
-    return ( $self->{"$field$type"} );
+
+    # Maybe this ticket is a merge ticket
+    my $limit_on = 'Local'. $field;
+    # at least to myself
+    $links->Limit(
+        FIELD           => $limit_on,
+        VALUE           => $self->id,
+        ENTRYAGGREGATOR => 'OR',
+    );
+    $links->Limit(
+        FIELD           => $limit_on,
+        VALUE           => $_,
+        ENTRYAGGREGATOR => 'OR',
+    ) foreach $self->Merged;
+    $links->Limit(
+        FIELD => 'Type',
+        VALUE => $type,
+    ) if $type;
+
+    return $links;
 }
 
 # }}}
@@ -2551,8 +2565,6 @@ sub _AddLink {
 
 MergeInto take the id of the ticket to merge this ticket into.
 
-
-
 =cut
 
 sub MergeInto {
@@ -2564,7 +2576,7 @@ sub MergeInto {
     }
 
     # Load up the new ticket.
-    my $MergeInto = RT::Ticket->new($RT::SystemUser);
+    my $MergeInto = RT::Ticket->new($self->CurrentUser);
     $MergeInto->Load($ticket_id);
 
     # make sure it exists.
@@ -2577,6 +2589,11 @@ sub MergeInto {
         return ( 0, $self->loc("Permission Denied") );
     }
 
+    delete $MERGE_CACHE{'effective'}{ $self->id };
+    delete @{ $MERGE_CACHE{'merged'} }{
+        $ticket_id, $MergeInto->id, $self->id
+    };
+
     $RT::Handle->BeginTransaction();
 
     # We use EffectiveId here even though it duplicates information from
@@ -2726,18 +2743,22 @@ Returns list of tickets' ids that's been merged into this ticket.
 sub Merged {
     my $self = shift;
 
-    my $mergees = new RT::Tickets( $self->CurrentUser );
+    my $id = $self->id;
+    return @{ $MERGE_CACHE{'merged'}{ $id } }
+        if $MERGE_CACHE{'merged'}{ $id };
+
+    my $mergees = RT::Tickets->new( $self->CurrentUser );
     $mergees->Limit(
         FIELD    => 'EffectiveId',
-        OPERATOR => '=',
-        VALUE    => $self->Id,
+        VALUE    => $id,
     );
     $mergees->Limit(
         FIELD    => 'id',
         OPERATOR => '!=',
-        VALUE    => $self->Id,
+        VALUE    => $id,
     );
-    return map $_->id, @{ $mergees->ItemsArrayRef || [] };
+    return @{ $MERGE_CACHE{'merged'}{ $id } ||= [] }
+        = map $_->id, @{ $mergees->ItemsArrayRef || [] };
 }
 
 # }}}
index 0f28568..2115c32 100644 (file)
@@ -916,6 +916,42 @@ sub _GenerateRandomNextChar {
     return ($i);
 }
 
+sub SafeSetPassword {
+    my $self = shift;
+    my %args = (
+        Current      => undef,
+        New          => undef,
+        Confirmation => undef,
+        @_,
+    );
+    return (1) unless defined $args{'New'} && length $args{'New'};
+
+    my %cond = $self->CurrentUserRequireToSetPassword;
+
+    unless ( $cond{'CanSet'} ) {
+        return (0, $self->loc('You can not set password.') .' '. $cond{'Reason'} );
+    }
+
+    my $error = '';    
+    if ( $cond{'RequireCurrent'} && !$self->CurrentUser->IsPassword($args{'Current'}) ) {
+        if ( defined $args{'Current'} && length $args{'Current'} ) {
+            $error = $self->loc("Please enter your current password correctly.");
+        }
+        else {
+            $error = $self->loc("Please enter your current password.");
+        }
+    } elsif ( $args{'New'} ne $args{'Confirmation'} ) {
+        $error = $self->loc("Passwords do not match.");
+    }
+
+    if ( $error ) {
+        $error .= ' '. $self->loc('Password has not been set.');
+        return (0, $error);
+    }
+
+    return $self->SetPassword( $args{'New'} );
+}
+
 =head3 SetPassword
 
 Takes a string. Checks the string's length and sets this user's password 
@@ -1034,7 +1070,7 @@ sub IsPassword {
     }
 
     #  if it's a historical password we say ok.
-    if ($self->__Value('Password') eq crypt($value, $self->__Value('Password'))
+    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.
@@ -1047,6 +1083,35 @@ sub IsPassword {
     return (undef);
 }
 
+sub CurrentUserRequireToSetPassword {
+    my $self = shift;
+
+    my %res = (
+        CanSet => 1,
+        Reason => '',
+        RequireCurrent => 1,
+    );
+
+    if ( RT->Config->Get('WebExternalAuth')
+        && !RT->Config->Get('WebFallbackToInternalAuth')
+    ) {
+        $res{'CanSet'} = 0;
+        $res{'Reason'} = $self->loc("External authentication enabled.");
+    }
+    elsif ( !$self->CurrentUser->HasPassword ) {
+        if ( $self->CurrentUser->id == ($self->id||0) ) {
+            # don't require current password if user has no
+            $res{'RequireCurrent'} = 0;
+        }
+        else {
+            $res{'CanSet'} = 0;
+            $res{'Reason'} = $self->loc("Your password is not set.");
+        }
+    }
+
+    return %res;
+}
+
 =head3 AuthToken
 
 Returns an authentication string associated with the user. This
index 32fb393..ea12dbe 100644 (file)
@@ -73,11 +73,10 @@ no warnings qw(redefine);
 sub _Init {
     my $self = shift;
     $self->{'table'} = 'Users';
-        $self->{'primary_key'} = 'id';
+    $self->{'primary_key'} = 'id';
+    $self->{'with_disabled_column'} = 1;
 
-
-
-    my @result =          $self->SUPER::_Init(@_);
+    my @result = $self->SUPER::_Init(@_);
     # By default, order by name
     $self->OrderBy( ALIAS => 'main',
                     FIELD => 'Name',
@@ -114,46 +113,41 @@ sub PrincipalsAlias {
 }
 
 
-# {{{ sub _DoSearch 
-
-=head2 _DoSearch
+=head2 LimitToEnabled
 
-  A subclass of DBIx::SearchBuilder::_DoSearch that makes sure that _Disabled rows never get seen unless
-we're explicitly trying to see them.
+Only find items that haven\'t been disabled
 
 =cut
 
-sub _DoSearch {
+# XXX: should be generalized
+sub LimitToEnabled {
     my $self = shift;
 
-    #unless we really want to find disabled rows, make sure we\'re only finding enabled ones.
-    unless ( $self->{'find_disabled_rows'} ) {
-        $self->LimitToEnabled();
-    }
-    return ( $self->SUPER::_DoSearch(@_) );
-
+    $self->{'handled_disabled_column'} = 1;
+    $self->Limit(
+        ALIAS    => $self->PrincipalsAlias,
+        FIELD    => 'Disabled',
+        VALUE    => '0',
+    );
 }
 
-# }}}
-# {{{ sub LimitToEnabled
-
-=head2 LimitToEnabled
+=head2 LimitToDeleted
 
-Only find items that haven\'t been disabled
+Only find items that have been deleted.
 
 =cut
 
-# XXX: should be generalized
-sub LimitToEnabled {
+sub LimitToDeleted {
     my $self = shift;
-
-    $self->Limit( ALIAS    => $self->PrincipalsAlias,
-                  FIELD    => 'Disabled',
-                  VALUE    => '0',
-                  OPERATOR => '=' );
+    
+    $self->{'handled_disabled_column'} = $self->{'find_disabled_rows'} = 1;
+    $self->Limit(
+        ALIAS => $self->PrincipalsAlias,
+        FIELD => 'Disabled',
+        VALUE => 1,
+    );
 }
 
-# }}}
 
 # {{{ LimitToEmail
 
@@ -378,7 +372,8 @@ sub WhoHaveRight {
         return (undef);
     }
 
-    my @from_role = $self->Clone->_WhoHaveRoleRightSplitted( %args );
+    my $from_role = $self->Clone;
+    $from_role->WhoHaveRoleRight( %args );
 
     my $from_group = $self->Clone;
     $from_group->WhoHaveGroupRight( %args );
@@ -387,8 +382,8 @@ sub WhoHaveRight {
     use DBIx::SearchBuilder 1.50; #no version on ::Union :(
     use DBIx::SearchBuilder::Union;
     my $union = new DBIx::SearchBuilder::Union;
-    $union->add( $_ ) foreach @from_role;
     $union->add( $from_group );
+    $union->add( $from_role );
     %$self = %$union;
     bless $self, ref($union);
 
@@ -410,57 +405,14 @@ sub WhoHaveRoleRight
         @_
     );
 
-    my $groups = $self->_JoinGroups( %args );
-    my $acl = $self->_JoinACL( %args );
-
-    $self->Limit( ALIAS => $acl,
-                  FIELD => 'PrincipalType',
-                  VALUE => "$groups.Type",
-                  QUOTEVALUE => 0,
-                );
-
-    # no system user
-    $self->Limit( ALIAS => $self->PrincipalsAlias,
-                  FIELD => 'id',
-                  OPERATOR => '!=',
-                  VALUE => $RT::SystemUser->id
-                );
-
     my @objects = $self->_GetEquivObjects( %args );
-    unless ( @objects ) {
-        unless ( $args{'IncludeSystemRights'} ) {
-            $self->_AddSubClause( WhichObjects => "($acl.ObjectType != 'RT::System')" );
-        }
+    my @roles = RT::Principal->RolesWithRight( %args );
+    unless ( @roles ) {
+        $self->_AddSubClause( "WhichRole", "(main.id = 0)" );
         return;
     }
 
-    my ($groups_clauses, $acl_clauses) = $self->_RoleClauses( $groups, $acl, @objects );
-    $self->_AddSubClause( "WhichObject", "(". join( ' OR ', @$groups_clauses ) .")" );
-    $self->_AddSubClause( "WhichRole", "(". join( ' OR ', @$acl_clauses ) .")" );
-
-    return;
-}
-
-sub _WhoHaveRoleRightSplitted {
-    my $self = shift;
-    my %args = (
-        Right                  => undef,
-        Object                 => undef,
-        IncludeSystemRights    => undef,
-        IncludeSuperusers      => undef,
-        IncludeSubgroupMembers => 1,
-        EquivObjects           => [ ],
-        @_
-    );
-
     my $groups = $self->_JoinGroups( %args );
-    my $acl = $self->_JoinACL( %args );
-
-    $self->Limit( ALIAS => $acl,
-                  FIELD => 'PrincipalType',
-                  VALUE => "$groups.Type",
-                  QUOTEVALUE => 0,
-                );
 
     # no system user
     $self->Limit( ALIAS => $self->PrincipalsAlias,
@@ -469,35 +421,21 @@ sub _WhoHaveRoleRightSplitted {
                   VALUE => $RT::SystemUser->id
                 );
 
-    my @objects = $self->_GetEquivObjects( %args );
-    unless ( @objects ) {
-        unless ( $args{'IncludeSystemRights'} ) {
-            $self->_AddSubClause( WhichObjects => "($acl.ObjectType != 'RT::System')" );
-        }
-        return $self;
-    }
+    $self->_AddSubClause( "WhichRole", "(". join( ' OR ', map "$groups.Type = '$_'", @roles ) .")" );
 
-    my ($groups_clauses, $acl_clauses) = $self->_RoleClauses( $groups, $acl, @objects );
-    $self->_AddSubClause( "WhichRole", "(". join( ' OR ', @$acl_clauses ) .")" );
-    
-    my @res;
-    foreach ( @$groups_clauses ) {
-        my $tmp = $self->Clone;
-        $tmp->_AddSubClause( WhichObject => $_ );
-        push @res, $tmp;
-    }
+    my @groups_clauses = $self->_RoleClauses( $groups, @objects );
+    $self->_AddSubClause( "WhichObject", "(". join( ' OR ', @groups_clauses ) .")" )
+        if @groups_clauses;
 
-    return @res;
+    return;
 }
 
 sub _RoleClauses {
     my $self = shift;
     my $groups = shift;
-    my $acl = shift;
     my @objects = @_;
 
     my @groups_clauses;
-    my @acl_clauses;
     foreach my $obj ( @objects ) {
         my $type = ref($obj)? ref($obj): $obj;
         my $id;
@@ -509,12 +447,8 @@ sub _RoleClauses {
         # field to integer and drop this quotes.
         $role_clause   .= " AND $groups.Instance = '$id'" if $id;
         push @groups_clauses, "($role_clause)";
-
-        my $object_clause = "$acl.ObjectType = '$type'";
-        $object_clause   .= " AND $acl.ObjectId = $id" if $id;
-        push @acl_clauses, "($object_clause)";
     }
-    return (\@groups_clauses, \@acl_clauses);
+    return @groups_clauses;
 }
 
 # XXX: should be generalized
index be67f35..70650a4 100755 (executable)
 
 <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 />
-                   
-% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) {
-<table>
-<tr>
-<td align="right">
-<&|/l&>New Password</&>:
-</td>
-<td align="left">
-<input type="password" name="Pass1" autocomplete="off" />
-</td>
-</tr>
-<tr><td align="right">
-<&|/l&>Retype Password</&>:
-</td>
-<td>
-<input type="password" name="Pass2" autocomplete="off" />
-</td>
-</tr>
-</table>
-% }
+
+<& /Elements/EditPassword,
+    User => $UserObj,
+    Name => [qw(CurrentPass Pass1 Pass2)],
+&>
 </&>
 % $m->callback( %ARGS, CallbackName => 'LeftColumnBottom', UserObj => $UserObj );
 </td>
@@ -372,22 +357,20 @@ if ($UserObj->Id && $id ne 'new') {
     # }}}
 }
 
+
+my %password_cond = $UserObj->CurrentUserRequireToSetPassword;
 if ( $UserObj->Id ) {
-    my $password_not_set;
     # Deal with Password field
-    if ( !$Pass1 and !$Pass2 ) {
-       $password_not_set = 1;
-    } elsif ( $Pass1 ne $Pass2 ) {
-       $password_not_set = 1;
-        push @results, loc("Passwords do not match.");
-    } elsif ( $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) {
-        my ($code, $msg) = $UserObj->SetPassword($Pass1);
-        push @results, loc_fuzzy($msg);
-       $password_not_set = 1 unless $code;
+    my ($status, $msg) = $UserObj->SafeSetPassword(
+        Current      => $CurrentPass,
+        New          => $Pass1,
+        Confirmation => $Pass2,
+    );
+    push @results, $msg;
+
+    if ( $id eq 'new' && !$status ) {
+        push @results, loc("A password was not set, so user won't be able to login.");
     }
-    if ($id eq 'new' and $password_not_set) {
-       push @results, loc("A password was not set, so user won't be able to login.");
-    } 
 }
 
 
@@ -439,8 +422,9 @@ $City  => undef
 $State  => undef
 $Zip  => undef
 $Country => undef
+$CurrentPass => undef
 $Pass1 => undef
-$Pass2=> undef
+$Pass2 => undef
 $Create=> undef
 $OnlySearchForCustomers => undef
 $OnlySearchForServices => undef
index 28a2965..295ac6d 100755 (executable)
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-      <table width="100%" class="ticket-summary">
-      <tr>
-       <td valign="top" class="boxcontainer">
-         <&| /Widgets/TitleBox, title => loc('The Basics'), 
-               title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id, 
-               class => 'ticket-info-basics' &>
-               <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
-         </&>
+<table width="100%" class="ticket-summary">
+<tr>
+  <td valign="top" class="boxcontainer">
+% $m->callback( %ARGS, CallbackName => 'LeftColumnTop' );
+
+    <&| /Widgets/TitleBox, title => loc('The Basics'),
+        title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id,
+        class => 'ticket-info-basics',
+    &>
+        <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
+    </&>
 
 % if ($Ticket->CustomFields->First) {
-         <&| /Widgets/TitleBox, title => loc('Custom Fields'), 
-               title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id, 
-               class => 'ticket-info-cfs'  &> 
-               <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
-         </&>
+    <&| /Widgets/TitleBox, title => loc('Custom Fields'),
+        title_href => RT->Config->Get('WebPath')."/Ticket/Modify.html?id=".$Ticket->Id,
+        class => 'ticket-info-cfs',
+    &>
+        <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
+    </&>
 % }
-         <&| /Widgets/TitleBox, title => loc('People'), 
-               title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id, 
-               class => 'ticket-info-people' &>
-            <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
-         </&>
 
-         <&| /Widgets/TitleBox, title => loc('Customers'), 
-               title_href => RT->Config->Get('WebPath')."/Ticket/ModifyCustomers.html?id=".$Ticket->Id, 
-               class => 'ticket-info-customers' &>
-            <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &>
-         </&>
+    <&| /Widgets/TitleBox, title => loc('Customers'), 
+        title_href => RT->Config->Get('WebPath')."/Ticket/ModifyCustomers.html?id=".$Ticket->Id, 
+        class => 'ticket-info-customers'
+    &>
+        <& /Ticket/Elements/ShowCustomers, Ticket => $Ticket &>
+    </&>
+
+    <&| /Widgets/TitleBox, title => loc('People'),
+        title_href => RT->Config->Get('WebPath')."/Ticket/ModifyPeople.html?id=".$Ticket->Id,
+        class => 'ticket-info-people',
+    &>
+        <& /Ticket/Elements/ShowPeople, Ticket => $Ticket &>
+    </&>
 
-      <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
+    <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
 
-         <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
+    <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
 
 % $m->callback( %ARGS, CallbackName => 'LeftColumn' );
-       </td>
-       <td valign="top" class="boxcontainer">
+
+  </td>
+  <td valign="top" class="boxcontainer">
+
+% $m->callback( %ARGS, CallbackName => 'RightColumnTop' );
+
 % if ( RT->Config->Get('EnableReminders') ) {
-         <&|/Widgets/TitleBox, title => loc("Reminders"),
-               title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id, 
-               class => 'ticket-info-reminders' &>
-        <table>
-        <tr>
-        <td>
+    <&|/Widgets/TitleBox, title => loc("Reminders"),
+        title_href => RT->Config->Get('WebPath')."/Ticket/Reminders.html?id=".$Ticket->Id,
+        class => 'ticket-info-reminders',
+    &>
+        <table><tr><td>
             <form action="<%RT->Config->Get('WebPath')%>/Ticket/Display.html" method="post">
-             <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &>
-              <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div>
+                <& /Ticket/Elements/Reminders, Ticket => $Ticket, ShowCompleted => 0 &>
+                <div align="right"><input type="submit" class="button" value="<&|/l&>Save</&>" /></div>
             </form>
-            </td>
-            </tr>
-            </table>
-         </&>
+        </td></tr></table>
+    </&>
 % }
-         <&| /Widgets/TitleBox, title => loc("Dates"),
-               title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id, 
-               class => 'ticket-info-dates' &>
-         <& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
-         </&>
+
+    <&| /Widgets/TitleBox, title => loc("Dates"),
+        title_href => RT->Config->Get('WebPath')."/Ticket/ModifyDates.html?id=".$Ticket->Id,
+        class => 'ticket-info-dates',
+    &>
+        <& /Ticket/Elements/ShowDates, Ticket => $Ticket &>
+    </&>
+
 % my (@extra);
 % push @extra, titleright_raw => '<a href="'. RT->Config->Get('WebPath'). '/Ticket/Graphs/index.html?id='.$Ticket->id.'">'.loc('Graph').'</a>' unless RT->Config->Get('DisableGraphViz');
-         <&| /Widgets/TitleBox, title => loc('Links'), 
-               title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id, 
-               class => 'ticket-info-links', @extra &>
-               <& /Elements/ShowLinks, Ticket => $Ticket &>
-          </&>
+    <&| /Widgets/TitleBox, title => loc('Links'),
+        title_href => RT->Config->Get('WebPath')."/Ticket/ModifyLinks.html?id=".$Ticket->Id,
+        class => 'ticket-info-links',
+        @extra,
+    &>
+        <& /Elements/ShowLinks, Ticket => $Ticket &>
+    </&>
+
 % $m->callback( %ARGS, CallbackName => 'RightColumn' );
 
-       </td>
-      </tr>
-    </table>
+  </td>
+</tr>
+</table>
 <%ARGS>
 $Ticket => undef
 $Attachments => undef
 </%ARGS>
-
-
-
-
index 51c4aa4..95ffcbd 100644 (file)
@@ -67,7 +67,10 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
 % if ( $DownloadableHeaders && !$message->Filename && $message->ContentType =~ /text/  ) {
  / <a href="<% $AttachPath %>/WithHeaders/<% $message->Id %>"><% loc('with headers') %></a>
 % }
-<br /> 
+
+% $m->callback(CallbackName => 'AfterDownloadLinks', ARGSRef => \%ARGS, Ticket => $Ticket, Transaction => $Transaction, Attachment => $message);
+
+<br />
 <span class="downloadcontenttype"><% $message->ContentType %> <% $size_to_str->( $size ) %></span>
 </div>
 %   }
@@ -76,7 +79,7 @@ foreach my $message ( grep $_->__Value('Parent') == $Parent, @$Attachments ) {
 % if ( scalar ( grep $_->__Value('Parent') == $message->id, @$Attachments ) ) {
 <div class="messageattachments">
 % } else {
-<div class="messagebody <% RT->Config->Get('PlainTextMono', $session{'CurrentUser'}) ? ' plain-text-white-space' : ''%>">
+<div class="messagebody">
 % }
 <%PERL>
 
index a99f219..c893a35 100755 (executable)
@@ -75,11 +75,13 @@ if ($Ticket) {
 
         # Don't display prev links if we're on the first ticket
         if ( $item_map->{ $Ticket->Id }->{prev} ) {
-            $searchtabs->{'_a'} = {
-                class => "nav",
-                path  => "Ticket/Display.html?id=" . $item_map->{first},
-                title => '<< ' . loc('First')
-            };
+            if ( $item_map->{first} ) {
+                $searchtabs->{'_a'} = {
+                    class => "nav",
+                    path  => "Ticket/Display.html?id=" . $item_map->{first},
+                    title => '<< ' . loc('First')
+                };
+            }
             $searchtabs->{"_b"} = {
                 class => "nav",
                 path  => "Ticket/Display.html?id="
@@ -96,11 +98,13 @@ if ($Ticket) {
                     . $item_map->{ $Ticket->Id }->{next},
                 title => loc('Next') . ' >'
             };
-            $searchtabs->{'e'} = {
-                class => "nav",
-                path  => "Ticket/Display.html?id=" . $item_map->{last},
-                title => loc('Last') . ' >>'
-            };
+            if ( $item_map->{last} ) {
+                $searchtabs->{'e'} = {
+                    class => "nav",
+                    path  => "Ticket/Display.html?id=" . $item_map->{last},
+                    title => loc('Last') . ' >>'
+                };
+            }
         }
     }
 
index 43c981d..e3a00f6 100755 (executable)
 % $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormLeftColumn' );
 </td>
 <td valign="top" class="boxcontainer">
-% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) {
+
 <&| /Widgets/TitleBox, title => loc('Password'), id => "user-prefs-password" &>
-<table>
-<tr>
-<td class="label">
-<&|/l&>New Password</&>:
-</td>
-<td class="value">
-<input type="password" name="Pass1" autocomplete="off"/>
-</td>
-</tr>
-<tr><td class="label">
-<&|/l&>Retype Password</&>:
-</td>
-<td class="value">
-<input type="password" name="Pass2" autocomplete="off" />
-</td>
-</tr>
-</table>
+<& /Elements/EditPassword,
+    User => $UserObj,
+    Name => [qw(CurrentPass Pass1 Pass2)],
+&>
 </&>
-% }
 
 <&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &>
 <table cellspacing="0" cellpadding="0">
@@ -221,6 +207,7 @@ unless ( $UserObj->id ) {
         if $Name;
     Abort(loc("Couldn't load user"));
 }
+$id = $UserObj->id;
 
 my @results;
 
@@ -259,13 +246,14 @@ if  ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
     push @results, loc('Privileged status: [_1]', loc_fuzzy($msg));
 }
 
-#TODO: make this report errors properly
-if ( defined $Pass1 and length $Pass1 and $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) {
-    my ($code, $msg);
-    ($code, $msg) = $UserObj->SetPassword($Pass1);
-    push @results, loc('Password: [_1]', loc_fuzzy($msg));
-} elsif ( defined $Pass1 && length $Pass1 && $Pass1 ne $Pass2 ) {
-    push @results, loc("Passwords do not match. Your password has not been changed");
+my %password_cond = $UserObj->CurrentUserRequireToSetPassword;
+if (defined $Pass1 && length $Pass1 ) {
+    my ($status, $msg) = $UserObj->SafeSetPassword(
+        Current      => $CurrentPass,
+        New          => $Pass1,
+        Confirmation => $Pass2,
+    );
+    push @results, loc("Password: [_1]", $msg);
 }
 
 if ( $ARGS{'ResetAuthToken'} ) {
@@ -308,7 +296,8 @@ $City  => undef
 $State  => undef
 $Zip  => undef
 $Country => undef
+$CurrentPass => undef
 $Pass1 => undef
-$Pass2=> undef
+$Pass2 => undef
 $Create=> undef
 </%ARGS>