mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-20 03:31:10 +01:00
Oversight: Prevent deletion/movement of stub pages
Summary: Refs T2686 - Now you also can't delete / move stubbed pages Test Plan: tried it out - works wonderful Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2686 Differential Revision: https://secure.phabricator.com/D5341
This commit is contained in:
parent
76ed21d922
commit
2f9c981716
2 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ final class PhrictionDeleteController extends PhrictionController {
|
|||
$disallowed_states = array(
|
||||
PhrictionDocumentStatus::STATUS_DELETED, // Stupid
|
||||
PhrictionDocumentStatus::STATUS_MOVED, // Makes no sense
|
||||
PhrictionDocumentStatus::STATUS_STUB, // How could they?
|
||||
);
|
||||
if (in_array($document->getStatus(), $disallowed_states)) {
|
||||
$e_text = pht('An already moved or deleted document can not be deleted');
|
||||
|
|
|
@ -53,6 +53,7 @@ final class PhrictionMoveController
|
|||
$disallowed_statuses = array(
|
||||
PhrictionDocumentStatus::STATUS_DELETED, // Stupid
|
||||
PhrictionDocumentStatus::STATUS_MOVED, // Plain stupid
|
||||
PhrictionDocumentStatus::STATUS_STUB, // Utterly stupid
|
||||
);
|
||||
if (in_array($document->getStatus(), $disallowed_statuses)) {
|
||||
$error_view = new AphrontErrorView();
|
||||
|
|
Loading…
Reference in a new issue