mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
Phriction - fix a corner case on renaming a project
Summary: if you rename a project in such a way that the old slug and the new slug are the same, there are errors when the phriction document is updated. detect this case and don't bother updating the document since there is no change. Fixes Github issue 474. Test Plan: made a project "testTest". Viewed the wiki page. Created the wiki page. Renamed the project "TestTest". Before patch, this error'd, post patch it works! Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7888
This commit is contained in:
parent
66dd984db5
commit
d63e530608
1 changed files with 2 additions and 2 deletions
|
@ -250,8 +250,8 @@ final class PhabricatorProjectEditor extends PhabricatorEditor {
|
|||
$old_slug = $project->getFullPhrictionSlug();
|
||||
$project->setName($xaction->getNewValue());
|
||||
$project->setPhrictionSlug($xaction->getNewValue());
|
||||
|
||||
if ($xaction->getOldValue()) {
|
||||
$changed_slug = $old_slug != $project->getFullPhrictionSlug();
|
||||
if ($xaction->getOldValue() && $changed_slug) {
|
||||
$old_document = id(new PhrictionDocument())
|
||||
->loadOneWhere(
|
||||
'slug = %s',
|
||||
|
|
Loading…
Reference in a new issue