Bug 166424 - "can't rename a module in despot" [p=reed r=justdave]

This commit is contained in:
reed%reedloden.com 2006-12-12 18:38:47 +00:00
Родитель 3bf0d60fe5
Коммит 8e1b5134b1
1 изменённых файлов: 14 добавлений и 4 удалений

Просмотреть файл

@ -830,7 +830,7 @@ sub AddPartition {
if ($partition eq "") {
Punt("You must enter a partition name.");
}
Punt("Partition may only contain letters, numbers, spaces, dashes, ampersands, and colons") unless $partition =~ /$partregexp/;
Punt("Partition names may only contain letters, numbers, spaces, dashes, ampersands, and colons") unless $partition =~ /$partregexp/;
my $repid = $F::repid;
my $query;
my @row;
@ -884,6 +884,12 @@ sub EditPartition() {
my @list;
push(@list, Tr(th("Name:"),
td(textfield(-name=>'partition',
-default=>$partname,
-size=>30,
-override=>1))));
push(@list, Tr(th("Repository:") . td($repname)));
push(@list, Tr(th("Description:") . td(textarea(-name=>"description",
@ -1013,7 +1019,10 @@ sub ChangePartition {
}
}
if ($F::partition eq "") {
Punt("You must enter a partition name.");
}
Punt("Partition names may only contain letters, numbers, spaces, dashes, ampersands, and colons") unless $F::partition =~ /$partregexp/;
@ -1029,13 +1038,14 @@ sub ChangePartition {
@row = $query->fetchrow_array();
}
my $branchid = $row[0];
$::db->do("UPDATE partitions SET description = ?, " .
$::db->do("UPDATE partitions SET name = ?, " .
"description = ?, " .
"branchid = ?, " .
"state = ?, " .
"newsgroups = ?, " .
"doclinks = ? " .
"WHERE id = ?",
undef, $F::description, $branchid, $F::state, $F::newsgroups, $F::doclinks, $F::partitionid);
undef, $F::partition, $F::description, $branchid, $F::state, $F::newsgroups, $F::doclinks, $F::partitionid);
$::db->do("DELETE FROM files WHERE partitionid = ?", undef, $F::partitionid);
foreach my $f2 (@files) {