[Rt-commit] r15879 - in rt/3.8/trunk: .

falcone at bestpractical.com falcone at bestpractical.com
Tue Sep 9 17:00:24 EDT 2008


Author: falcone
Date: Tue Sep  9 17:00:24 2008
New Revision: 15879

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/lib/RT/Config.pm

Log:
 r39577 at ketch:  falcone | 2008-09-09 15:52:34 -0400
 * perltidy %META
   group the Sections together withing the hash


Modified: rt/3.8/trunk/lib/RT/Config.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Config.pm	(original)
+++ rt/3.8/trunk/lib/RT/Config.pm	Tue Sep  9 17:00:24 2008
@@ -98,24 +98,17 @@
 =cut
 
 our %META = (
+    # General user overridable options
     WebDefaultStylesheet => {
         Section         => 'General',                #loc
         Overridable     => 1,
         Widget          => '/Widgets/Form/Select',
         WidgetArguments => {
             Description => 'Theme',                  #loc
-                 # XXX: we need support for 'get values callback'
+            # XXX: we need support for 'get values callback'
             Values => [qw(3.5-default 3.4-compat web2)],
         },
     },
-    DefaultSummaryRows => {
-        Section         => 'RT at a glance',    #loc
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Integer',
-        WidgetArguments => {
-            Description => 'Number of search results',    #loc
-        },
-    },
     MessageBoxRichText => {
         Section => 'General',
         Overridable => 1,
@@ -148,6 +141,50 @@
             Description => 'Message box height',          #loc
         },
     },
+    UsernameFormat => {
+        Section         => 'General',
+        Overridable     => 1,
+        Widget          => '/Widgets/Form/Select',
+        WidgetArguments => {
+            Description => 'Username format',
+            Values      => [qw(concise verbose)],
+            ValuesLabel => {
+                concise => 'Short usernames',
+                verbose => 'Name and email address',
+            },
+        },
+    },
+    DefaultQueue => {
+        Section         => 'General',
+        Overridable     => 1,
+        Widget          => '/Widgets/Form/Select',
+        WidgetArguments => {
+            Description => 'Default queue',    #loc
+            Callback    => sub {
+                my $ret = { Values => [], ValuesLabel => {}};
+                my $q = new RT::Queues($HTML::Mason::Commands::session{'CurrentUser'});
+                $q->UnLimit;
+                while (my $queue = $q->Next) {
+                    next unless $queue->CurrentUserHasRight("CreateTicket");
+                    push @{$ret->{Values}}, $queue->Id;
+                    $ret->{ValuesLabel}{$queue->Id} = $queue->Name;
+                }
+                return $ret;
+            },
+        }
+    },
+
+    # User overridable options for RT ata a glance
+    DefaultSummaryRows => {
+        Section         => 'RT at a glance',    #loc
+        Overridable     => 1,
+        Widget          => '/Widgets/Form/Integer',
+        WidgetArguments => {
+            Description => 'Number of search results',    #loc
+        },
+    },
+
+    # User overridable options for Ticket displays
     MaxInlineBody => {
         Section         => 'Ticket display',              #loc
         Overridable     => 1,
@@ -155,7 +192,7 @@
         WidgetArguments => {
             Description => 'Maximum inline message length',    #loc
             Hints =>
-                "Length in characters; Use '0' to show all messages inline, regardless of length" #loc
+            "Length in characters; Use '0' to show all messages inline, regardless of length" #loc
         },
     },
     OldestTransactionsFirst => {
@@ -172,18 +209,20 @@
         Widget          => '/Widgets/Form/Boolean',
         WidgetArguments => {
             Description => 'Notify me of unread messages',    #loc
-            },
+        },
 
     },
     PlainTextPre => {
-	Section         => 'Ticket display',
-	Overridable     => 1,
+        Section         => 'Ticket display',
+        Overridable     => 1,
         Widget          => '/Widgets/Form/Boolean',
         WidgetArguments => {
             Description => 'Use monospace font', #loc
             Hints       => "Use fixed-width font to display plaintext messages" #loc
-	},
+        },
     },
+
+    # User overridable locale options
     DateTimeFormat => {
         Section         => 'Locale',                       #loc
         Overridable     => 1,
@@ -199,53 +238,25 @@
             },
         },
     },
-    UsernameFormat => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
-            Description => 'Username format',
-            Values      => [qw(concise verbose)],
-            ValuesLabel => {
-                concise => 'Short usernames',
-                verbose => 'Name and email address',
-            },
-        },
-    },
-    DefaultQueue => {
-        Section         => 'General',
-        Overridable     => 1,
-        Widget          => '/Widgets/Form/Select',
-        WidgetArguments => {
-            Description => 'Default queue',    #loc
-            Callback    => sub {
-                my $ret = { Values => [], ValuesLabel => {}};
-                my $q = new RT::Queues($HTML::Mason::Commands::session{'CurrentUser'});
-                $q->UnLimit;
-                while (my $queue = $q->Next) {
-                    next unless $queue->CurrentUserHasRight("CreateTicket");
-                    push @{$ret->{Values}}, $queue->Id;
-                    $ret->{ValuesLabel}{$queue->Id} = $queue->Name;
-                }
-                return $ret;
-            },
-        }
-    },
-     EmailFrequency => {
+
+    # User overridable mail options
+    EmailFrequency => {
         Section         => 'Mail',                                     #loc
         Overridable     => 1,
-            Default     => 'Individual messages',
+        Default     => 'Individual messages',
         Widget          => '/Widgets/Form/Select',
         WidgetArguments => {
             Description => 'Email delivery',    #loc
             Values      => [
-                'Individual messages',    #loc
-                'Daily digest',           #loc
-                'Weekly digest',          #loc
-                'Suspended'               #loc
+            'Individual messages',    #loc
+            'Daily digest',           #loc
+            'Weekly digest',          #loc
+            'Suspended'               #loc
             ]
-            }
-            },
+        }
+    },
+
+    # Internal config options
     DisableGraphViz => {
         Type            => 'SCALAR',
         PostLoadCheck   => sub {
@@ -278,30 +289,28 @@
     GnuPGOptions => { Type => 'HASH',
         PostLoadCheck => sub {
             my $self = shift;
-    my $gpg = $self->Get('GnuPG');
-    my $gpgopts = $self->Get('GnuPGOptions');
-        unless (-d $gpgopts->{homedir}  && -r _ ) { # no homedir, no gpg
-            $RT::Logger->debug(
-             "RT's GnuPG libraries couldn't successfully read your".
-            " configured GnuPG home directory (".$gpgopts->{homedir}
-            ."). PGP support has been disabled");
-            $gpg->{'Enable'} = 0;
-        }
+            my $gpg = $self->Get('GnuPG');
+            my $gpgopts = $self->Get('GnuPGOptions');
+            unless (-d $gpgopts->{homedir}  && -r _ ) { # no homedir, no gpg
+                $RT::Logger->debug(
+                    "RT's GnuPG libraries couldn't successfully read your".
+                    " configured GnuPG home directory (".$gpgopts->{homedir}
+                    ."). PGP support has been disabled");
+                $gpg->{'Enable'} = 0;
+            }
 
-    
-    if ($gpg->{'Enable'}) {
-        require RT::Crypt::GnuPG;
-        unless (RT::Crypt::GnuPG->Probe()) {
-            $RT::Logger->debug(
-            "RT's GnuPG libraries couldn't successfully execute gpg.".
-            " PGP support has been disabled");
-            $gpg->{'Enable'} = 0;
-        }
-    }
 
-        
-        
-        }},
+            if ($gpg->{'Enable'}) {
+                require RT::Crypt::GnuPG;
+                unless (RT::Crypt::GnuPG->Probe()) {
+                    $RT::Logger->debug(
+                        "RT's GnuPG libraries couldn't successfully execute gpg.".
+                        " PGP support has been disabled");
+                    $gpg->{'Enable'} = 0;
+                }
+            }
+        }
+    },
 );
 my %OPTIONS = ();
 


More information about the Rt-commit mailing list