[Rt-commit] r5388 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Thu Jun 15 19:54:29 EDT 2006


Author: ruz
Date: Thu Jun 15 19:54:29 2006
New Revision: 5388

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in

Log:
 r3203 at cubic-pc:  cubic | 2006-06-16 02:23:05 +0400
 * get rid of a warning


Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in	(original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in	Thu Jun 15 19:54:29 2006
@@ -182,10 +182,12 @@
         no warnings 'unopened';
 
         open( SCHEMA, "<" . $base_path . "/schema." . $db_type );
-        open( SCHEMA_LOCAL, "<" . $RT::LocalEtcPath . "/schema." . $db_type );
+
+        my $has_local = 0;
+        open( SCHEMA_LOCAL, "<" . $RT::LocalEtcPath . "/schema." . $db_type ) and $has_local = 1;
 
         my $statement = "";
-        foreach my $line (<SCHEMA>, ($_ = ';;'), <SCHEMA_LOCAL>) {
+        foreach my $line (<SCHEMA>, ($_ = ';;'), ($has_local? <SCHEMA_LOCAL>: ()) ) {
             $line =~ s/\#.*//g;
             $line =~ s/--.*//g;
             $statement .= $line;


More information about the Rt-commit mailing list