Don't change $pageData['id'], add ~dup1 to the array key only

This commit is contained in:
Daniel Rudolf 2015-09-28 17:23:47 +02:00
parent a5755b0d39
commit 13a50c7f2f

View file

@ -270,11 +270,12 @@ class PicoDeprecated extends AbstractPicoPlugin
}
// prevent duplicates
for ($i = 1, $origId = $pageData['id']; isset($pages[$pageData['id']]); $i++) {
$pageData['id'] = $origId . '~dup' . $i;
$id = $pageData['id'];
for ($i = 1; isset($pages[$id]); $i++) {
$id = $pageData['id'] . '~dup' . $i;
}
$pages[$pageData['id']] = &$pageData;
$pages[$id] = &$pageData;
}
}