Skip to content

Commit

Permalink
Fixed bug creating extra versions in child page histories
Browse files Browse the repository at this point in the history
  • Loading branch information
John Luxford committed Oct 13, 2009
1 parent 81236d1 commit 0e61be1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions inc/app/cms/forms/edit/sitellite_page/index.php
Expand Up @@ -384,12 +384,14 @@ function onSubmit ($vals) {
'return' => $return,
));
} else {
foreach (db_shift_array ('select id from sitellite_page where below_page = ?', $key) as $child) {
$method = $rex->determineAction ($key);
if (! $method) {
die ($rex->error);
if ($key != $vals[$rex->key]) {
foreach (db_shift_array ('select id from sitellite_page where below_page = ?', $key) as $child) {
$method = $rex->determineAction ($key);
if (! $method) {
die ($rex->error);
}
$rex->{$method} ($child, array ('below_page' => $vals['id']), 'Updating renamed parent reference');
}
$rex->{$method} ($child, array ('below_page' => $vals['id']), 'Updating renamed parent reference');
}

loader_import ('cms.Workflow');
Expand Down

0 comments on commit 0e61be1

Please sign in to comment.