[rt-users] global default auto-refresh patch for 3.8.2
Kevin Falcone
falcone at bestpractical.com
Thu Feb 12 15:12:51 EST 2009
On Feb 12, 2009, at 2:43 PM, Jo Rhett wrote:
> This patch is adapted from something Ian posted for 3.6.4 adapted
> for 3.8.2. Jesse, please consider adopting this for the mainline as
> it is a popular question and this patch allows the person to
> override the default.
Since 3.8 added user level preferences, this really looks like
something which is
better handled as a user preference. RT::Config has docs about
adding items
to %META and marking them as user overridable. It would also want some
changes and docs for RT_Config.pm because you could set a global default
(default would be 0)
-kevin
>
> --- html/autohandler_orig 2009-02-12 11:31:49.000000000 -0800
> +++ html/autohandler 2009-02-12 11:42:02.000000000 -0800
> @@ -208,6 +208,13 @@
> if defined $new_user_info->{$attribute};
> }
> $session{'CurrentUser'}->Load($user);
> +
> + unless( $session{'home_refresh_interval'} ) {
> + $session{'home_refresh_interval'} =
> $RT::HomeRefreshInterval;
> + }
> + unless( $session{'tickets_refresh_interval'} ) {
> + $session{'tickets_refresh_interval'} =
> $RT::TicketsRefreshInterval;
> + }
> }
> else {
>
> @@ -273,6 +280,13 @@
> $m->abort;
> }
> $session{'CurrentUser'} = $user_obj;
> + unless( $session{'home_refresh_interval'} ) {
> + $session{'home_refresh_interval'} =
> $RT::HomeRefreshInterval;
> + }
> + unless( $session{'tickets_refresh_interval'} ) {
> + $session{'tickets_refresh_interval'} =
> $RT::TicketsRefreshInterval;
> + }
> +
> $RT::Logger->info(
> "Successful login for $user from $ENV{'REMOTE_ADDR'}");
> $m->callback( %ARGS, CallbackName => 'SuccessfulLogin' );
>
>
>
>
> --
> Jo Rhett
> Net Consonance : consonant endings by net philanthropy, open source
> and other randomness
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
More information about the rt-users
mailing list