[Rt-commit] [svn] r1519 - in rt: . branches/3.3-TESTING/sbin
autrijus at pallas.eruditorum.org
autrijus at pallas.eruditorum.org
Mon Sep 20 13:09:36 EDT 2004
Author: autrijus
Date: Mon Sep 20 13:09:36 2004
New Revision: 1519
Modified:
rt/ (props changed)
rt/branches/3.3-TESTING/sbin/rt-dump-database.in (contents, props changed)
Log:
* rt-dump-database now uses YAML for easy hand modification.
Modified: rt/branches/3.3-TESTING/sbin/rt-dump-database.in
==============================================================================
--- rt/branches/3.3-TESTING/sbin/rt-dump-database.in (original)
+++ rt/branches/3.3-TESTING/sbin/rt-dump-database.in Mon Sep 20 13:09:36 2004
@@ -48,6 +48,7 @@
use strict;
use lib "@RT_LIB_PATH@";
use RT;
+use YAML;
RT::LoadConfig();
RT::Init();
@@ -77,10 +78,13 @@
$objects->OrderBy( FIELD => 'Id' );
if ($LocalOnly) {
+ next if $class eq 'ACL'; # XXX - would go into infinite loop - XXX
$objects->Limit( FIELD => 'LastUpdatedBy', OPERATOR => '!=', VALUE => $SystemUserId )
unless $class eq 'Groups';
$objects->Limit( FIELD => 'Id', OPERATOR => '!=', VALUE => $SystemUserId )
if $class eq 'Users';
+ $objects->Limit( FIELD => 'Domain', OPERATOR => '=', VALUE => 'UserDefined' )
+ if $class eq 'Groups';
}
my %fields;
@@ -139,9 +143,7 @@
}
}
-use Data::Dumper;
-print Data::Dumper->Dump(
- [map { $RV{$_} || [] } @classes],
- [map { "*$_" } @classes],
-);
-
+print(<< '.', YAML::Dump({ map { ($_ => ($RV{$_} || [])) } @classes }));
+no strict;use YAML;*_=YAML::Load(do{local$/;<DATA>});@$_=@{$_{$_}}for keys%_
+__DATA__
+.
More information about the Rt-commit
mailing list