Changeset 104
- Timestamp:
- 12/09/10 23:58:25 (13 years ago)
- Location:
- server/trunk/web/lib/Sophie
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Base/Result/Paths.pm
r6 r104 8 8 __PACKAGE__->add_columns(qw/d_path_key path added updated/); 9 9 __PACKAGE__->set_primary_key('d_path_key'); 10 __PACKAGE__->add_unique_constraint('path' => [ 'path' ]); 10 11 #__PACKAGE__->belongs_to(media => 'Sophie::Base::Result::Medias', 'media'); 11 12 __PACKAGE__->has_many(MediasPaths => 'Sophie::Base::Result::MediasPaths', 'd_path'); -
server/trunk/web/lib/Sophie/Controller/Admin.pm
r68 r104 177 177 } 178 178 179 sub replace_path : XMLRPC { 180 my ($self, $c, $path, $newpath) = @_; 181 182 my $dpath = $c->model('Base::Paths')->find({ 183 path => $path, 184 }) or do { 185 return $c->stash->{xmlrpc} = 'Path not found'; 186 }; 187 188 $newpath =~ s/\/*$//; 189 190 $dpath->update( 191 { 192 updated => undef, 193 path => $newpath, 194 } 195 ) and $c->model('Base')->storage->dbh->commit; 196 return $c->stash->{xmlrpc} = 'OK'; 197 } 198 179 199 sub dump_distrib : XMLRPC { 180 200 my ($self, $c, $distribution, $version, $arch) = @_;
Note: See TracChangeset
for help on using the changeset viewer.