--- bin/import-strix.pl 2008/06/16 14:43:07 173 +++ bin/import-strix.pl 2008/06/16 16:48:16 174 @@ -18,7 +18,7 @@ my $config = Jifty->config->app('strix') or die "need strix config"; -my $model = A3C::Model::StrixSite->new; +my $model = A3C::Model::StrixInstance->new; my $total = 0; @@ -28,17 +28,17 @@ warn "? $path\n" if $debug; return unless m/conf\.php$/; - $path =~ m{/etc/([^/]+)/conf\.php$} or die "can't find site name in $path"; - my $site = $1; + $path =~ m{/etc/([^/]+)/conf\.php$} or die "can't find instance name in $path"; + my $instance = $1; my $data = A3C::PHP->parse_file( $path ); warn "# PHP = ", dump( $data ) if $debug; - $data->{site} = $site; + $data->{instance} = $instance; my ($ok,$msg) = $model->load_or_create( %$data ); if ( $ok ) { - Jifty->log->info("$ok $site ", $msg || 'ADDED'); + Jifty->log->info("$ok $instance ", $msg || 'ADDED'); $total++; } else { Jifty->log->error("can't parse $path"); @@ -46,4 +46,4 @@ }}, $config->{dir} ); -Jifty->log->info( "$total Strix sites imported" ); +Jifty->log->info( "$total Strix instances imported" );