- Timestamp:
- 12/24/10 21:20:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/admin/lib/Sophie/Cli.pm
r81 r186 114 114 completion => sub { 115 115 my ($self, $start) = @_; 116 my $res = $self->xmlreq('distrib.struct', 117 $self->{dist}, 118 ); 119 return map { $_->{label} } @{ $res->value }; 120 }, 121 } 122 ); 123 $env->add_func('replace_path', 124 { 125 help => '', 126 code => sub { 127 my ($self, $path, $newpath) = @_; 128 my $res = $self->xmlreq( 129 '/admin/replace_path', $path, $newpath); 130 print $OUT join (' ', map { $_ } @{ $res->value }); 131 print $OUT "\n"; 132 }, 133 completion => sub { 134 my ($self, $start, $oldpath) = @_; 135 if ($oldpath) { 136 my $res = $self->xmlreq('admin.ls_local', $start); 137 return @{ $res->value }; 138 } else { 139 my $res = $self->xmlreq('admin.list_path', 140 $self->{dist}, 141 ); 142 return @{ $res->value }; 143 } 144 }, 145 } 146 ); 147 $env->add_func('remove_media', 148 { 149 help => '', 150 code => sub { 151 my ($self, $media) = @_; 152 my $res = $self->xmlreq( 153 '/admin/remove_media', $self->{dist}, $media); 154 print $OUT join (' ', map { $_ } @{ $res->value }); 155 print $OUT "\n"; 156 }, 157 completion => sub { 158 my ($self) = @_; 116 159 my $res = $self->xmlreq('distrib.struct', 117 160 $self->{dist},
Note: See TracChangeset
for help on using the changeset viewer.