[Rt-commit] r12945 - in rt/branches/3.8-TESTING: . etc

sartak at bestpractical.com sartak at bestpractical.com
Thu Jun 5 19:21:47 EDT 2008


Author: sartak
Date: Thu Jun  5 19:21:45 2008
New Revision: 12945

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/etc/RT_Config.pm.in
   rt/branches/3.8-TESTING/lib/RT/Config.pm

Log:
 r61742 at onn:  sartak | 2008-06-05 18:23:36 -0400
 Add a DisableGD option (which isn't yet used)


Modified: rt/branches/3.8-TESTING/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/3.8-TESTING/etc/RT_Config.pm.in	(original)
+++ rt/branches/3.8-TESTING/etc/RT_Config.pm.in	Thu Jun  5 19:21:45 2008
@@ -780,6 +780,8 @@
 
 Set($DisableGraphViz, do { local $@; eval {require GraphViz; 1;} ? 0 : 1 } );
 
+Set($DisableGD, do { local $@; eval {require GD; 1;} ? 0 : 1 } );
+
 # }}}
 
 # Ticket Updates 

Modified: rt/branches/3.8-TESTING/lib/RT/Config.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Config.pm	(original)
+++ rt/branches/3.8-TESTING/lib/RT/Config.pm	Thu Jun  5 19:21:45 2008
@@ -220,6 +220,19 @@
             $self->Set( DisableGraphViz => 1 );
         },
     },
+    DisableGD => {
+        Type            => 'SCALAR',
+        PostLoadCheck   => sub {
+            my $self  = shift;
+            my $value = shift;
+            return if $value;
+            return if $INC{'GD'};
+            local $@;
+            return if eval {require GD; 1};
+            warn "You've enabled GD, but we couldn't load the module: $@";
+            $self->Set( DisableGD => 1 );
+        },
+    },
     MailPlugins  => { Type => 'ARRAY' },
     GnuPG        => { Type => 'HASH' },
     GnuPGOptions => { Type => 'HASH' },


More information about the Rt-commit mailing list