mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-15 10:00:55 +01:00
(stable) Mark sessions as "signed all documents" when Legalpad has been uninstalled
See PHI238. When an install uninstalls "Legalpad", we were incorrectly failing to mark sessions as "Signed All Required Documents" by bailing early. Test Plan: Uninstalled Legalpad, logged in.
This commit is contained in:
parent
9570b843ea
commit
9fdeb2d8ac
1 changed files with 14 additions and 14 deletions
|
@ -562,14 +562,14 @@ abstract class PhabricatorController extends AphrontController {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$must_sign_docs = array();
|
||||||
|
$sign_docs = array();
|
||||||
|
|
||||||
$legalpad_class = 'PhabricatorLegalpadApplication';
|
$legalpad_class = 'PhabricatorLegalpadApplication';
|
||||||
$legalpad_installed = PhabricatorApplication::isClassInstalledForViewer(
|
$legalpad_installed = PhabricatorApplication::isClassInstalledForViewer(
|
||||||
$legalpad_class,
|
$legalpad_class,
|
||||||
$viewer);
|
$viewer);
|
||||||
if (!$legalpad_installed) {
|
if ($legalpad_installed) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$sign_docs = id(new LegalpadDocumentQuery())
|
$sign_docs = id(new LegalpadDocumentQuery())
|
||||||
->setViewer($viewer)
|
->setViewer($viewer)
|
||||||
->withSignatureRequired(1)
|
->withSignatureRequired(1)
|
||||||
|
@ -577,12 +577,12 @@ abstract class PhabricatorController extends AphrontController {
|
||||||
->setOrder('oldest')
|
->setOrder('oldest')
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$must_sign_docs = array();
|
|
||||||
foreach ($sign_docs as $sign_doc) {
|
foreach ($sign_docs as $sign_doc) {
|
||||||
if (!$sign_doc->getUserSignature($viewer->getPHID())) {
|
if (!$sign_doc->getUserSignature($viewer->getPHID())) {
|
||||||
$must_sign_docs[] = $sign_doc;
|
$must_sign_docs[] = $sign_doc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$must_sign_docs) {
|
if (!$must_sign_docs) {
|
||||||
// If nothing needs to be signed (either because there are no documents
|
// If nothing needs to be signed (either because there are no documents
|
||||||
|
|
Loading…
Reference in a new issue