rt 4.2.14 (#13852)
[freeside.git] / rt / etc / upgrade / split-out-cf-categories.in
index d7dd117..582d7c1 100644 (file)
@@ -3,7 +3,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
 # those contributions and any derivatives thereof.
 #
 # END BPS TAGGED BLOCK }}}
+use 5.10.1;
 use strict;
 use warnings;
 
 use lib "@LOCAL_LIB_PATH@";
 use lib "@RT_LIB_PATH@";
 
-use RT;
-RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'debug');
-RT::Init();
-
-$| = 1;
+use RT::Interface::CLI qw(Init);
+Init();
 
 $RT::Handle->BeginTransaction();
 
@@ -168,4 +165,4 @@ while (my $cf  = $CFs->Next ) {
 }
 
 $RT::Handle->Commit;
-print "No custom fields with categories found\n" unless $seen;
\ No newline at end of file
+print "No custom fields with categories found\n" unless $seen;