diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2015-07-14 08:05:03 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2015-07-14 08:05:03 +0200 |
| commit | 4137e993d11e926ae28343c1eeac1a46977efd47 (patch) | |
| tree | 940cd55b0d48d54692ee999010ce0823a9085e4c /www/edit.php | |
| parent | 808a3a5857c77ef99605fdfdde9b31b5c02e22c6 (diff) | |
| download | phorkie-4137e993d11e926ae28343c1eeac1a46977efd47.tar.gz phorkie-4137e993d11e926ae28343c1eeac1a46977efd47.zip | |
jump to correct hash after renaming a file
Diffstat (limited to 'www/edit.php')
| -rw-r--r-- | www/edit.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/www/edit.php b/www/edit.php index e7e6fbc..1ced7b6 100644 --- a/www/edit.php +++ b/www/edit.php @@ -22,7 +22,14 @@ $repopo = new Repository_Post($repo); if ($repopo->process($_POST, $_SESSION)) { $anchor = ''; if ($file instanceof File) { - $anchor = '#' . $file->getAnchorName(); + if (isset($repopo->renameMap[$file->getFilename()])) { + $anchor = '#' + . $repo->getFileByName( + $repopo->renameMap[$file->getFilename()] + )->getAnchorName(); + } else { + $anchor = '#' . $file->getAnchorName(); + } } else if ($file === 'newfile' && $repopo->newfileName) { $anchor = '#' . $repo->getFileByName($repopo->newfileName)->getAnchorName(); } |
