Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/legalpad/controller/LegalpadDocumentEditController.php b/src/applications/legalpad/controller/LegalpadDocumentEditController.php
index d8ebc2d0c2..0fe6a5e9cf 100644
--- a/src/applications/legalpad/controller/LegalpadDocumentEditController.php
+++ b/src/applications/legalpad/controller/LegalpadDocumentEditController.php
@@ -1,197 +1,189 @@
<?php
/**
* @group legalpad
*/
final class LegalpadDocumentEditController extends LegalpadController {
private $id;
public function willProcessRequest(array $data) {
$this->id = idx($data, 'id');
}
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
if (!$this->id) {
$is_create = true;
$document = LegalpadDocument::initializeNewDocument($user);
$body = id(new LegalpadDocumentBody())
->setCreatorPHID($user->getPHID());
$document->attachDocumentBody($body);
$document->setDocumentBodyPHID(PhabricatorPHIDConstants::PHID_VOID);
$title = null;
$text = null;
} else {
$is_create = false;
$document = id(new LegalpadDocumentQuery())
->setViewer($user)
->needDocumentBodies(true)
- ->needSignatures(true)
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->withIDs(array($this->id))
->executeOne();
if (!$document) {
return new Aphront404Response();
}
$title = $document->getDocumentBody()->getTitle();
$text = $document->getDocumentBody()->getText();
}
$e_title = true;
$e_text = true;
$errors = array();
$can_view = null;
$can_edit = null;
if ($request->isFormPost()) {
$xactions = array();
$title = $request->getStr('title');
if (!strlen($title)) {
$e_title = pht('Required');
$errors[] = pht('The document title may not be blank.');
} else {
$xactions[] = id(new LegalpadTransaction())
->setTransactionType(LegalpadTransactionType::TYPE_TITLE)
->setNewValue($title);
}
$text = $request->getStr('text');
if (!strlen($text)) {
$e_text = pht('Required');
$errors[] = pht('The document may not be blank.');
} else {
$xactions[] = id(new LegalpadTransaction())
->setTransactionType(LegalpadTransactionType::TYPE_TEXT)
->setNewValue($text);
}
$can_view = $request->getStr('can_view');
$xactions[] = id(new LegalpadTransaction())
->setTransactionType(PhabricatorTransactions::TYPE_VIEW_POLICY)
->setNewValue($can_view);
$can_edit = $request->getStr('can_edit');
$xactions[] = id(new LegalpadTransaction())
->setTransactionType(PhabricatorTransactions::TYPE_EDIT_POLICY)
->setNewValue($can_edit);
if (!$errors) {
$editor = id(new LegalpadDocumentEditor())
->setContentSourceFromRequest($request)
->setContinueOnNoEffect(true)
->setActor($user);
$xactions = $editor->applyTransactions($document, $xactions);
return id(new AphrontRedirectResponse())
->setURI($this->getApplicationURI('view/'.$document->getID()));
}
}
if ($errors) {
// set these to what was specified in the form on post
$document->setViewPolicy($can_view);
$document->setEditPolicy($can_edit);
}
$form = id(new AphrontFormView())
->setUser($user)
->appendChild(
id(new AphrontFormTextControl())
->setID('document-title')
->setLabel(pht('Title'))
->setError($e_title)
->setValue($title)
->setName('title'))
->appendChild(
id(new PhabricatorRemarkupControl())
->setID('document-text')
->setLabel(pht('Text'))
->setError($e_text)
->setValue($text)
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_TALL)
->setName('text'));
$policies = id(new PhabricatorPolicyQuery())
->setViewer($user)
->setObject($document)
->execute();
$form
->appendChild(
id(new AphrontFormPolicyControl())
->setUser($user)
->setCapability(PhabricatorPolicyCapability::CAN_VIEW)
->setPolicyObject($document)
->setPolicies($policies)
->setName('can_view'))
->appendChild(
id(new AphrontFormPolicyControl())
->setUser($user)
->setCapability(PhabricatorPolicyCapability::CAN_EDIT)
->setPolicyObject($document)
->setPolicies($policies)
->setName('can_edit'));
$crumbs = $this->buildApplicationCrumbs($this->buildSideNav());
$submit = new AphrontFormSubmitControl();
if ($is_create) {
$submit->setValue(pht('Create Document'));
$title = pht('Create Document');
$short = pht('Create');
} else {
$submit->setValue(pht('Update Document'));
$submit->addCancelButton(
$this->getApplicationURI('view/'.$document->getID()));
$title = pht('Update Document');
$short = pht('Update');
- $signatures = $document->getSignatures();
- if ($signatures) {
- $form->appendInstructions(pht(
- 'Warning: there are %d signature(s) already for this document. '.
- 'Updating the title or text will invalidate these signatures and '.
- 'users will need to sign again. Proceed carefully.',
- count($signatures)));
- }
+
$crumbs->addTextCrumb(
$document->getMonogram(),
$this->getApplicationURI('view/'.$document->getID()));
}
$form
->appendChild($submit);
$form_box = id(new PHUIObjectBoxView())
->setHeaderText($title)
->setFormErrors($errors)
->setForm($form);
$crumbs->addTextCrumb($short);
$preview = id(new PHUIRemarkupPreviewPanel())
->setHeader(pht('Document Preview'))
->setPreviewURI($this->getApplicationURI('document/preview/'))
->setControlID('document-text')
->setSkin('document');
return $this->buildApplicationPage(
array(
$crumbs,
$form_box,
$preview
),
array(
'title' => $title,
));
}
}
diff --git a/src/applications/legalpad/query/LegalpadDocumentQuery.php b/src/applications/legalpad/query/LegalpadDocumentQuery.php
index 4936433c92..2d7c4ffa09 100644
--- a/src/applications/legalpad/query/LegalpadDocumentQuery.php
+++ b/src/applications/legalpad/query/LegalpadDocumentQuery.php
@@ -1,274 +1,265 @@
<?php
final class LegalpadDocumentQuery
extends PhabricatorCursorPagedPolicyAwareQuery {
private $ids;
private $phids;
private $creatorPHIDs;
private $contributorPHIDs;
private $signerPHIDs;
private $dateCreatedAfter;
private $dateCreatedBefore;
private $needDocumentBodies;
private $needContributors;
private $needSignatures;
private $needViewerSignatures;
public function withIDs(array $ids) {
$this->ids = $ids;
return $this;
}
public function withPHIDs(array $phids) {
$this->phids = $phids;
return $this;
}
public function withCreatorPHIDs(array $phids) {
$this->creatorPHIDs = $phids;
return $this;
}
public function withContributorPHIDs(array $phids) {
$this->contributorPHIDs = $phids;
return $this;
}
public function withSignerPHIDs(array $phids) {
$this->signerPHIDs = $phids;
return $this;
}
public function needDocumentBodies($need_bodies) {
$this->needDocumentBodies = $need_bodies;
return $this;
}
public function needContributors($need_contributors) {
$this->needContributors = $need_contributors;
return $this;
}
public function needSignatures($need_signatures) {
$this->needSignatures = $need_signatures;
return $this;
}
public function withDateCreatedBefore($date_created_before) {
$this->dateCreatedBefore = $date_created_before;
return $this;
}
public function withDateCreatedAfter($date_created_after) {
$this->dateCreatedAfter = $date_created_after;
return $this;
}
public function needViewerSignatures($need) {
$this->needViewerSignatures = $need;
return $this;
}
protected function loadPage() {
$table = new LegalpadDocument();
$conn_r = $table->establishConnection('r');
$data = queryfx_all(
$conn_r,
- 'SELECT d.* FROM %T d %Q %Q %Q %Q',
+ 'SELECT d.* FROM %T d %Q %Q %Q %Q %Q',
$table->getTableName(),
$this->buildJoinClause($conn_r),
$this->buildWhereClause($conn_r),
+ $this->buildGroupClause($conn_r),
$this->buildOrderClause($conn_r),
$this->buildLimitClause($conn_r));
$documents = $table->loadAllFromArray($data);
return $documents;
}
protected function willFilterPage(array $documents) {
- if ($this->signerPHIDs) {
- $document_map = mpull($documents, null, 'getPHID');
- $signatures = id(new LegalpadDocumentSignatureQuery())
- ->setViewer($this->getViewer())
- ->withDocumentPHIDs(array_keys($document_map))
- ->withSignerPHIDs($this->signerPHIDs)
- ->execute();
- $signatures = mgroup($signatures, 'getDocumentPHID');
- foreach ($document_map as $document_phid => $document) {
- $sigs = idx($signatures, $document_phid, array());
- foreach ($sigs as $index => $sig) {
- if ($sig->getDocumentVersion() != $document->getVersions()) {
- unset($sigs[$index]);
- }
- }
- $signer_phids = mpull($sigs, 'getSignerPHID');
- if (array_diff($this->signerPHIDs, $signer_phids)) {
- unset($documents[$document->getID()]);
- }
- }
- }
-
if ($this->needDocumentBodies) {
$documents = $this->loadDocumentBodies($documents);
}
if ($this->needContributors) {
$documents = $this->loadContributors($documents);
}
if ($this->needSignatures) {
$documents = $this->loadSignatures($documents);
}
if ($this->needViewerSignatures) {
if ($documents) {
-
if ($this->getViewer()->getPHID()) {
$signatures = id(new LegalpadDocumentSignatureQuery())
->setViewer($this->getViewer())
->withSignerPHIDs(array($this->getViewer()->getPHID()))
->withDocumentPHIDs(mpull($documents, 'getPHID'))
->execute();
$signatures = mpull($signatures, null, 'getDocumentPHID');
} else {
$signatures = array();
}
foreach ($documents as $document) {
$signature = idx($signatures, $document->getPHID());
$document->attachUserSignature(
$this->getViewer()->getPHID(),
$signature);
}
}
}
return $documents;
}
private function buildJoinClause($conn_r) {
$joins = array();
- if ($this->contributorPHIDs) {
+ if ($this->contributorPHIDs !== null) {
+ $joins[] = qsprintf(
+ $conn_r,
+ 'JOIN edge contributor ON contributor.src = d.phid
+ AND contributor.type = %d',
+ PhabricatorEdgeConfig::TYPE_OBJECT_HAS_CONTRIBUTOR);
+ }
+
+ if ($this->signerPHIDs !== null) {
$joins[] = qsprintf(
$conn_r,
- 'JOIN edge e ON e.src = d.phid');
+ 'JOIN %T signer ON signer.documentPHID = d.phid
+ AND signer.signerPHID IN (%Ls)',
+ id(new LegalpadDocumentSignature())->getTableName(),
+ $this->signerPHIDs);
}
return implode(' ', $joins);
}
+ private function buildGroupClause(AphrontDatabaseConnection $conn_r) {
+ if ($this->contributorPHIDs || $this->signerPHIDs) {
+ return 'GROUP BY d.id';
+ } else {
+ return '';
+ }
+ }
+
protected function buildWhereClause($conn_r) {
$where = array();
- $where[] = $this->buildPagingClause($conn_r);
-
- if ($this->ids) {
+ if ($this->ids !== null) {
$where[] = qsprintf(
$conn_r,
'd.id IN (%Ld)',
$this->ids);
}
- if ($this->phids) {
+ if ($this->phids !== null) {
$where[] = qsprintf(
$conn_r,
'd.phid IN (%Ls)',
$this->phids);
}
- if ($this->creatorPHIDs) {
+ if ($this->creatorPHIDs !== null) {
$where[] = qsprintf(
$conn_r,
'd.creatorPHID IN (%Ls)',
$this->creatorPHIDs);
}
- if ($this->dateCreatedAfter) {
+ if ($this->dateCreatedAfter !== null) {
$where[] = qsprintf(
$conn_r,
'd.dateCreated >= %d',
$this->dateCreatedAfter);
}
- if ($this->dateCreatedBefore) {
+ if ($this->dateCreatedBefore !== null) {
$where[] = qsprintf(
$conn_r,
'd.dateCreated <= %d',
$this->dateCreatedBefore);
}
- if ($this->contributorPHIDs) {
+ if ($this->contributorPHIDs !== null) {
$where[] = qsprintf(
$conn_r,
- 'e.type = %s AND e.dst IN (%Ls)',
- PhabricatorEdgeConfig::TYPE_OBJECT_HAS_CONTRIBUTOR,
+ 'contributor.dst IN (%Ls)',
$this->contributorPHIDs);
}
+ $where[] = $this->buildPagingClause($conn_r);
+
return $this->formatWhereClause($where);
}
private function loadDocumentBodies(array $documents) {
$body_phids = mpull($documents, 'getDocumentBodyPHID');
$bodies = id(new LegalpadDocumentBody())->loadAllWhere(
'phid IN (%Ls)',
$body_phids);
$bodies = mpull($bodies, null, 'getPHID');
foreach ($documents as $document) {
$body = idx($bodies, $document->getDocumentBodyPHID());
$document->attachDocumentBody($body);
}
return $documents;
}
private function loadContributors(array $documents) {
$document_map = mpull($documents, null, 'getPHID');
$edge_type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_CONTRIBUTOR;
$contributor_data = id(new PhabricatorEdgeQuery())
->withSourcePHIDs(array_keys($document_map))
->withEdgeTypes(array($edge_type))
->execute();
foreach ($document_map as $document_phid => $document) {
$data = $contributor_data[$document_phid];
$contributors = array_keys(idx($data, $edge_type, array()));
$document->attachContributors($contributors);
}
return $documents;
}
private function loadSignatures(array $documents) {
$document_map = mpull($documents, null, 'getPHID');
$signatures = id(new LegalpadDocumentSignatureQuery())
->setViewer($this->getViewer())
->withDocumentPHIDs(array_keys($document_map))
->execute();
$signatures = mgroup($signatures, 'getDocumentPHID');
foreach ($documents as $document) {
$sigs = idx($signatures, $document->getPHID(), array());
- foreach ($sigs as $index => $sig) {
- if ($sig->getDocumentVersion() != $document->getVersions()) {
- unset($sigs[$index]);
- }
- }
$document->attachSignatures($sigs);
}
return $documents;
}
public function getQueryApplicationClass() {
return 'PhabricatorApplicationLegalpad';
}
}
diff --git a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
index 951838d7f2..7d2fe8d96d 100644
--- a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
+++ b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
@@ -1,171 +1,210 @@
<?php
final class LegalpadDocumentSearchEngine
extends PhabricatorApplicationSearchEngine {
public function getResultTypeDescription() {
return pht('Legalpad Documents');
}
public function getApplicationClassName() {
return 'PhabricatorApplicationLegalpad';
}
public function buildSavedQueryFromRequest(AphrontRequest $request) {
$saved = new PhabricatorSavedQuery();
$saved->setParameter(
'creatorPHIDs',
$this->readUsersFromRequest($request, 'creators'));
$saved->setParameter(
'contributorPHIDs',
$this->readUsersFromRequest($request, 'contributors'));
+ $saved->setParameter(
+ 'withViewerSignature',
+ $request->getBool('withViewerSignature'));
+
$saved->setParameter('createdStart', $request->getStr('createdStart'));
$saved->setParameter('createdEnd', $request->getStr('createdEnd'));
return $saved;
}
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
$query = id(new LegalpadDocumentQuery())
- ->needViewerSignatures(true)
- ->withCreatorPHIDs($saved->getParameter('creatorPHIDs', array()))
- ->withContributorPHIDs($saved->getParameter('contributorPHIDs', array()));
+ ->needViewerSignatures(true);
+
+ $creator_phids = $saved->getParameter('creatorPHIDs', array());
+ if ($creator_phids) {
+ $query->withCreatorPHIDs($creator_phids);
+ }
+
+ $contributor_phids = $saved->getParameter('contributorPHIDs', array());
+ if ($contributor_phids) {
+ $query->withContributorPHIDs($contributor_phids);
+ }
+
+ if ($saved->getParameter('withViewerSignature')) {
+ $viewer_phid = $this->requireViewer()->getPHID();
+ if ($viewer_phid) {
+ $query->withSignerPHIDs(array($viewer_phid));
+ }
+ }
$start = $this->parseDateTime($saved->getParameter('createdStart'));
$end = $this->parseDateTime($saved->getParameter('createdEnd'));
if ($start) {
$query->withDateCreatedAfter($start);
}
if ($end) {
$query->withDateCreatedBefore($end);
}
return $query;
}
public function buildSearchForm(
AphrontFormView $form,
PhabricatorSavedQuery $saved_query) {
$creator_phids = $saved_query->getParameter('creatorPHIDs', array());
$contributor_phids = $saved_query->getParameter(
'contributorPHIDs', array());
$phids = array_merge($creator_phids, $contributor_phids);
$handles = id(new PhabricatorHandleQuery())
->setViewer($this->requireViewer())
->withPHIDs($phids)
->execute();
+ $viewer_signature = $saved_query->getParameter('withViewerSignature');
+ if (!$this->requireViewer()->getPHID()) {
+ $viewer_signature = false;
+ }
+
$form
+ ->appendChild(
+ id(new AphrontFormCheckboxControl())
+ ->addCheckbox(
+ 'withViewerSignature',
+ 1,
+ pht('Show only documents I have signed.'),
+ $viewer_signature)
+ ->setDisabled(!$this->requireViewer()->getPHID()))
->appendChild(
id(new AphrontFormTokenizerControl())
->setDatasource('/typeahead/common/users/')
->setName('creators')
->setLabel(pht('Creators'))
->setValue(array_select_keys($handles, $creator_phids)))
->appendChild(
id(new AphrontFormTokenizerControl())
->setDatasource('/typeahead/common/users/')
->setName('contributors')
->setLabel(pht('Contributors'))
->setValue(array_select_keys($handles, $contributor_phids)));
$this->buildDateRange(
$form,
$saved_query,
'createdStart',
pht('Created After'),
'createdEnd',
pht('Created Before'));
}
protected function getURI($path) {
return '/legalpad/'.$path;
}
public function getBuiltinQueryNames() {
- $names = array(
- 'all' => pht('All Documents'),
- );
+ $names = array();
+
+ if ($this->requireViewer()->isLoggedIn()) {
+ $names['signed'] = pht('Signed Documents');
+ }
+
+ $names['all'] = pht('All Documents');
return $names;
}
public function buildSavedQueryFromBuiltin($query_key) {
$query = $this->newSavedQuery();
$query->setQueryKey($query_key);
switch ($query_key) {
+ case 'signed':
+ return $query
+ ->setParameter('withViewerSignature', true);
case 'all':
return $query;
}
return parent::buildSavedQueryFromBuiltin($query_key);
}
protected function getRequiredHandlePHIDsForResultList(
array $documents,
PhabricatorSavedQuery $query) {
return array();
}
protected function renderResultList(
array $documents,
PhabricatorSavedQuery $query,
array $handles) {
assert_instances_of($documents, 'LegalpadDocument');
$viewer = $this->requireViewer();
$list = new PHUIObjectItemListView();
$list->setUser($viewer);
foreach ($documents as $document) {
$last_updated = phabricator_date($document->getDateModified(), $viewer);
$title = $document->getTitle();
$item = id(new PHUIObjectItemView())
->setObjectName($document->getMonogram())
->setHeader($title)
->setHref('/'.$document->getMonogram())
->setObject($document)
->addIcon('none', pht('Version %d', $document->getVersions()))
->addIcon('none', pht('Updated %s', $last_updated));
if ($viewer->getPHID()) {
$signature = $document->getUserSignature($viewer->getPHID());
} else {
$signature = null;
}
if ($signature) {
$item->addAttribute(
array(
id(new PHUIIconView())->setIconFont('fa-check-square-o', 'green'),
' ',
pht(
'Signed on %s',
phabricator_date($signature->getDateCreated(), $viewer)),
));
} else {
$item->addAttribute(
array(
id(new PHUIIconView())->setIconFont('fa-square-o', 'grey'),
' ',
pht('Not Signed'),
));
}
$list->addItem($item);
}
return $list;
}
}
diff --git a/src/applications/policy/__tests__/PhabricatorPolicyDataTestCase.php b/src/applications/policy/__tests__/PhabricatorPolicyDataTestCase.php
index e0f66c1569..1e74f8bc9e 100644
--- a/src/applications/policy/__tests__/PhabricatorPolicyDataTestCase.php
+++ b/src/applications/policy/__tests__/PhabricatorPolicyDataTestCase.php
@@ -1,149 +1,151 @@
<?php
final class PhabricatorPolicyDataTestCase extends PhabricatorTestCase {
protected function getPhabricatorTestCaseConfiguration() {
return array(
self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true,
);
}
public function testProjectPolicyMembership() {
$author = $this->generateNewTestUser();
$proj_a = id(new PhabricatorProject())
->setName('A')
->setAuthorPHID($author->getPHID())
- ->setIcon('fa-briefcase')
+ ->setIcon(PhabricatorProject::DEFAULT_ICON)
+ ->setColor(PhabricatorProject::DEFAULT_COLOR)
->save();
$proj_b = id(new PhabricatorProject())
->setName('B')
->setAuthorPHID($author->getPHID())
- ->setIcon('fa-briefcase')
+ ->setIcon(PhabricatorProject::DEFAULT_ICON)
+ ->setColor(PhabricatorProject::DEFAULT_COLOR)
->save();
$proj_a->setViewPolicy($proj_b->getPHID())->save();
$proj_b->setViewPolicy($proj_a->getPHID())->save();
$user = new PhabricatorUser();
$results = id(new PhabricatorProjectQuery())
->setViewer($user)
->execute();
$this->assertEqual(0, count($results));
}
public function testCustomPolicyRuleUser() {
$user_a = $this->generateNewTestUser();
$user_b = $this->generateNewTestUser();
$author = $this->generateNewTestUser();
$policy = id(new PhabricatorPolicy())
->setRules(
array(
array(
'action' => PhabricatorPolicy::ACTION_ALLOW,
'rule' => 'PhabricatorPolicyRuleUsers',
'value' => array($user_a->getPHID()),
),
))
->save();
$task = ManiphestTask::initializeNewTask($author);
$task->setViewPolicy($policy->getPHID());
$task->save();
$can_a_view = PhabricatorPolicyFilter::hasCapability(
$user_a,
$task,
PhabricatorPolicyCapability::CAN_VIEW);
$this->assertTrue($can_a_view);
$can_b_view = PhabricatorPolicyFilter::hasCapability(
$user_b,
$task,
PhabricatorPolicyCapability::CAN_VIEW);
$this->assertFalse($can_b_view);
}
public function testCustomPolicyRuleAdministrators() {
$user_a = $this->generateNewTestUser();
$user_a->setIsAdmin(true)->save();
$user_b = $this->generateNewTestUser();
$author = $this->generateNewTestUser();
$policy = id(new PhabricatorPolicy())
->setRules(
array(
array(
'action' => PhabricatorPolicy::ACTION_ALLOW,
'rule' => 'PhabricatorPolicyRuleAdministrators',
'value' => null,
),
))
->save();
$task = ManiphestTask::initializeNewTask($author);
$task->setViewPolicy($policy->getPHID());
$task->save();
$can_a_view = PhabricatorPolicyFilter::hasCapability(
$user_a,
$task,
PhabricatorPolicyCapability::CAN_VIEW);
$this->assertTrue($can_a_view);
$can_b_view = PhabricatorPolicyFilter::hasCapability(
$user_b,
$task,
PhabricatorPolicyCapability::CAN_VIEW);
$this->assertFalse($can_b_view);
}
public function testCustomPolicyRuleLunarPhase() {
$user_a = $this->generateNewTestUser();
$author = $this->generateNewTestUser();
$policy = id(new PhabricatorPolicy())
->setRules(
array(
array(
'action' => PhabricatorPolicy::ACTION_ALLOW,
'rule' => 'PhabricatorPolicyRuleLunarPhase',
'value' => 'new',
),
))
->save();
$task = ManiphestTask::initializeNewTask($author);
$task->setViewPolicy($policy->getPHID());
$task->save();
$time_a = PhabricatorTime::pushTime(934354800, 'UTC');
$can_a_view = PhabricatorPolicyFilter::hasCapability(
$user_a,
$task,
PhabricatorPolicyCapability::CAN_VIEW);
$this->assertTrue($can_a_view);
unset($time_a);
$time_b = PhabricatorTime::pushTime(1116745200, 'UTC');
$can_a_view = PhabricatorPolicyFilter::hasCapability(
$user_a,
$task,
PhabricatorPolicyCapability::CAN_VIEW);
$this->assertFalse($can_a_view);
unset($time_b);
}
}
diff --git a/src/applications/policy/rule/PhabricatorPolicyRuleLegalpadSignature.php b/src/applications/policy/rule/PhabricatorPolicyRuleLegalpadSignature.php
index 8941d53b28..4c41b94ac9 100644
--- a/src/applications/policy/rule/PhabricatorPolicyRuleLegalpadSignature.php
+++ b/src/applications/policy/rule/PhabricatorPolicyRuleLegalpadSignature.php
@@ -1,69 +1,72 @@
<?php
final class PhabricatorPolicyRuleLegalpadSignature
extends PhabricatorPolicyRule {
private $signatures = array();
public function getRuleDescription() {
return pht('signers of legalpad documents');
}
public function willApplyRules(PhabricatorUser $viewer, array $values) {
$values = array_unique(array_filter(array_mergev($values)));
if (!$values) {
return;
}
+ // TODO: This accepts signature of any version of the document, even an
+ // older version.
+
$documents = id(new LegalpadDocumentQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withPHIDs($values)
->withSignerPHIDs(array($viewer->getPHID()))
->execute();
$this->signatures = mpull($documents, 'getPHID', 'getPHID');
}
public function applyRule(PhabricatorUser $viewer, $value) {
foreach ($value as $document_phid) {
if (!isset($this->signatures[$document_phid])) {
return false;
}
}
return true;
}
public function getValueControlType() {
return self::CONTROL_TYPE_TOKENIZER;
}
public function getValueControlTemplate() {
return array(
'markup' => new AphrontTokenizerTemplateView(),
'uri' => '/typeahead/common/legalpaddocuments/',
'placeholder' => pht('Type a document title...'),
);
}
public function getRuleOrder() {
return 900;
}
public function getValueForStorage($value) {
PhutilTypeSpec::newFromString('list<string>')->check($value);
return array_values($value);
}
public function getValueForDisplay(PhabricatorUser $viewer, $value) {
$handles = id(new PhabricatorHandleQuery())
->setViewer($viewer)
->withPHIDs($value)
->execute();
return mpull($handles, 'getFullName', 'getPHID');
}
public function ruleHasEffect($value) {
return (bool)$value;
}
}
diff --git a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php
index c633b16241..3d6e688e3d 100644
--- a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php
+++ b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php
@@ -1,946 +1,935 @@
<?php
abstract class PhabricatorBaseEnglishTranslation
extends PhabricatorTranslation {
final public function getLanguage() {
return 'en';
}
public function getTranslations() {
return array(
'These %d configuration value(s) are related:' => array(
'This configuration value is related:',
'These configuration values are related:',
),
'Differential Revision(s)' => array(
'Differential Revision',
'Differential Revisions',
),
'file(s)' => array('file', 'files'),
'Maniphest Task(s)' => array('Maniphest Task', 'Maniphest Tasks'),
'Task(s)' => array('Task', 'Tasks'),
'Please fix these errors and try again.' => array(
'Please fix this error and try again.',
'Please fix these errors and try again.',
),
'%d Error(s)' => array('%d Error', '%d Errors'),
'%d Warning(s)' => array('%d Warning', '%d Warnings'),
'%d Auto-Fix(es)' => array('%d Auto-Fix', '%d Auto-Fixes'),
'%d Advice(s)' => array('%d Advice', '%d Pieces of Advice'),
'%d Detail(s)' => array('%d Detail', '%d Details'),
'(%d line(s))' => array('(%d line)', '(%d lines)'),
'COMMIT(S)' => array('COMMIT', 'COMMITS'),
'%d line(s)' => array('%d line', '%d lines'),
'%d path(s)' => array('%d path', '%d paths'),
'%d diff(s)' => array('%d diff', '%d diffs'),
'added %d commit(s): %s' => array(
'added commit: %2$s',
'added commits: %2$s',
),
'removed %d commit(s): %s' => array(
'removed commit: %2$s',
'removed commits: %2$s',
),
'changed %d commit(s), added %d: %s; removed %d: %s' =>
'changed commits, added: %3$s; removed: %5$s',
'ATTACHED %d COMMIT(S)' => array(
'ATTACHED COMMIT',
'ATTACHED COMMITS',
),
'added %d mock(s): %s' => array(
'added a mock: %2$s',
'added mocks: %2$s',
),
'removed %d mock(s): %s' => array(
'removed a mock: %2$s',
'removed mocks: %2$s',
),
'changed %d mock(s), added %d: %s; removed %d: %s' =>
'changed mocks, added: %3$s; removed: %5$s',
'ATTACHED %d MOCK(S)' => array(
'ATTACHED MOCK',
'ATTACHED MOCKS',
),
'added %d dependencie(s): %s' => array(
'added dependency: %2$s',
'added dependencies: %2$s',
),
'added %d dependent task(s): %s' => array(
'added dependent task: %2$s',
'added dependent tasks: %2$s',
),
'removed %d dependencie(s): %s' => array(
'removed dependency: %2$s',
'removed dependencies: %2$s',
),
'removed %d dependent task(s): %s' => array(
'removed dependent task: %2$s',
'removed dependent tasks: %2$s',
),
'changed %d dependencie(s), added %d: %s; removed %d: %s' =>
'changed dependencies, added: %3$s; removed: %5$s',
'changed %d dependent task(s), added %d: %s; removed %d: %s',
'changed dependent tasks, added: %3$s; removed: %5$s',
'DEPENDENT %d TASK(s)' => array(
'DEPENDENT TASK',
'DEPENDENT TASKS',
),
'DEPENDS ON %d TASK(S)' => array(
'DEPENDS ON TASK',
'DEPENDS ON TASKS',
),
'DIFFERENTIAL %d REVISION(S)' => array(
'DIFFERENTIAL REVISION',
'DIFFERENTIAL REVISIONS',
),
'added %d revision(s): %s' => array(
'added revision: %2$s',
'added revisions: %2$s',
),
'removed %d revision(s): %s' => array(
'removed revision: %2$s',
'removed revisions: %2$s',
),
'changed %d revision(s), added %d: %s; removed %d: %s' =>
'changed revisions, added %3$s; removed %5$s',
'%s edited revision(s), added %d: %s; removed %d: %s.' =>
'%s edited revisions, added: %3$s; removed: %5$s',
'There are %d raw fact(s) in storage.' => array(
'There is %d raw fact in storage.',
'There are %d raw facts in storage.',
),
'There are %d aggregate fact(s) in storage.' => array(
'There is %d aggregate fact in storage.',
'There are %d aggregate facts in storage.',
),
'%d Commit(s) Awaiting Audit' => array(
'%d Commit Awaiting Audit',
'%d Commits Awaiting Audit',
),
'%d Problem Commit(s)' => array(
'%d Problem Commit',
'%d Problem Commits',
),
'%d Review(s) Blocking Others' => array(
'%d Review Blocking Others',
'%d Reviews Blocking Others',
),
'%d Review(s) Need Attention' => array(
'%d Review Needs Attention',
'%d Reviews Need Attention',
),
'%d Review(s) Waiting on Others' => array(
'%d Review Waiting on Others',
'%d Reviews Waiting on Others',
),
'%d Flagged Object(s)' => array(
'%d Flagged Object',
'%d Flagged Objects',
),
'%d Unbreak Now Task(s)!' => array(
'%d Unbreak Now Task!',
'%d Unbreak Now Tasks!',
),
'%d Assigned Task(s)' => array(
'%d Assigned Task',
'%d Assigned Tasks',
),
'Show %d Lint Message(s)' => array(
'Show %d Lint Message',
'Show %d Lint Messages',
),
'Hide %d Lint Message(s)' => array(
'Hide %d Lint Message',
'Hide %d Lint Messages',
),
'Switch for %d Lint Message(s)' => array(
'Switch for %d Lint Message',
'Switch for %d Lint Messages',
),
'%d Lint Message(s)' => array(
'%d Lint Message',
'%d Lint Messages',
),
'This is a binary file. It is %s byte(s) in length.' => array(
'This is a binary file. It is %s byte in length.',
'This is a binary file. It is %s bytes in length.',
),
'%d Action(s) Have No Effect' => array(
'Action Has No Effect',
'Actions Have No Effect',
),
'%d Action(s) With No Effect' => array(
'Action With No Effect',
'Actions With No Effect',
),
'Some of your %d action(s) have no effect:' => array(
'One of your actions has no effect:',
'Some of your actions have no effect:',
),
'Apply remaining %d action(s)?' => array(
'Apply remaining action?',
'Apply remaining actions?',
),
'Apply %d Other Action(s)' => array(
'Apply Remaining Action',
'Apply Remaining Actions',
),
'The %d action(s) you are taking have no effect:' => array(
'The action you are taking has no effect:',
'The actions you are taking have no effect:',
),
'%s edited post(s), added %d: %s; removed %d: %s.' =>
'%s edited posts, added: %3$s; removed: %5$s',
'%s added %d post(s): %s.' => array(
array(
'%s added a post: %3$s.',
'%s added posts: %3$s.',
),
),
'%s removed %d post(s): %s.' => array(
array(
'%s removed a post: %3$s.',
'%s removed posts: %3$s.',
),
),
'%s edited blog(s), added %d: %s; removed %d: %s.' =>
'%s edited blogs, added: %3$s; removed: %5$s',
'%s added %d blog(s): %s.' => array(
array(
'%s added a blog: %3$s.',
'%s added blogs: %3$s.',
),
),
'%s removed %d blog(s): %s.' => array(
array(
'%s removed a blog: %3$s.',
'%s removed blogs: %3$s.',
),
),
'%s edited blogger(s), added %d: %s; removed %d: %s.' =>
'%s edited bloggers, added: %3$s; removed: %5$s',
'%s added %d blogger(s): %s.' => array(
array(
'%s added a blogger: %3$s.',
'%s added bloggers: %3$s.',
),
),
'%s removed %d blogger(s): %s.' => array(
array(
'%s removed a blogger: %3$s.',
'%s removed bloggers: %3$s.',
),
),
'%s edited member(s), added %d: %s; removed %d: %s.' =>
'%s edited members, added: %3$s; removed: %5$s',
'%s added %d member(s): %s.' => array(
array(
'%s added a member: %3$s.',
'%s added members: %3$s.',
),
),
'%s removed %d member(s): %s.' => array(
array(
'%s removed a member: %3$s.',
'%s removed members: %3$s.',
),
),
'%s edited project(s), added %d: %s; removed %d: %s.' =>
'%s edited projects, added: %3$s; removed: %5$s',
'%s added %d project(s): %s.' => array(
array(
'%s added a project: %3$s.',
'%s added projects: %3$s.',
),
),
'%s removed %d project(s): %s.' => array(
array(
'%s removed a project: %3$s.',
'%s removed projects: %3$s.',
),
),
'%s changed project(s) of %s, added %d: %s; removed %d: %s' =>
'%s changed projects of %s, added: %4$s; removed: %6$s',
'%s added %d project(s) to %s: %s' => array(
array(
'%s added a project to %3$s: %4$s',
'%s added projects to %3$s: %4$s',
),
),
'%s removed %d project(s) from %s: %s' => array(
array(
'%s removed a project from %3$s: %4$s',
'%s removed projects from %3$s: %4$s',
),
),
'%s edited voting user(s), added %d: %s; removed %d: %s.' =>
'%s edited voting users, added: %3$s; removed: %5$s',
'%s added %d voting user(s): %s.' => array(
array(
'%s added a voting user: %3$s.',
'%s added voting users: %3$s.',
),
),
'%s removed %d voting user(s): %s.' => array(
array(
'%s removed a voting user: %3$s.',
'%s removed voting users: %3$s.',
),
),
'%s added %d blocking task(s): %s.' => array(
array(
'%s added a blocking task: %3$s.',
'%s added blocking tasks: %3$s.'
),
),
'%s added %d blocked task(s): %s.' => array(
array(
'%s added a blocked task: %3$s.',
'%s added blocked tasks: %3$s.'
)
),
'%s removed %d blocking task(s): %s.' => array(
array(
'%s removed a blocking task: %3$s.',
'%s removed blocking tasks: %3$s.'
),
),
'%s removed %d blocked task(s): %s.' => array(
array(
'%s removed a blocked task: %3$s.',
'%s removed blocked tasks: %3$s.'
)
),
'%s edited answer(s), added %d: %s; removed %d: %s.' =>
'%s edited answers, added: %3$s; removed: %5$s',
'%s added %d answer(s): %s.' => array(
array(
'%s added an answer: %3$s.',
'%s added answers: %3$s.',
),
),
'%s removed %d answer(s): %s.' => array(
array(
'%s removed a answer: %3$s.',
'%s removed answers: %3$s.',
),
),
'%s edited question(s), added %d: %s; removed %d: %s.' =>
'%s edited questions, added: %3$s; removed: %5$s',
'%s added %d question(s): %s.' => array(
array(
'%s added a question: %3$s.',
'%s added questions: %3$s.',
),
),
'%s removed %d question(s): %s.' => array(
array(
'%s removed a question: %3$s.',
'%s removed questions: %3$s.',
),
),
'%s edited mock(s), added %d: %s; removed %d: %s.' =>
'%s edited mocks, added: %3$s; removed: %5$s',
'%s added %d mock(s): %s.' => array(
array(
'%s added a mock: %3$s.',
'%s added mocks: %3$s.',
),
),
'%s removed %d mock(s): %s.' => array(
array(
'%s removed a mock: %3$s.',
'%s removed mocks: %3$s.',
),
),
'%s edited task(s), added %d: %s; removed %d: %s.' =>
'%s edited tasks, added: %3$s; removed: %5$s',
'%s added %d task(s): %s.' => array(
array(
'%s added a task: %3$s.',
'%s added tasks: %3$s.',
),
),
'%s removed %d task(s): %s.' => array(
array(
'%s removed a task: %3$s.',
'%s removed tasks: %3$s.',
),
),
'%s edited file(s), added %d: %s; removed %d: %s.' =>
'%s edited files, added: %3$s; removed: %5$s',
'%s added %d file(s): %s.' => array(
array(
'%s added a file: %3$s.',
'%s added files: %3$s.',
),
),
'%s removed %d file(s): %s.' => array(
array(
'%s removed a file: %3$s.',
'%s removed files: %3$s.',
),
),
'%s edited account(s), added %d: %s; removed %d: %s.' =>
'%s edited accounts, added: %3$s; removed: %5$s',
'%s added %d account(s): %s.' => array(
array(
'%s added a account: %3$s.',
'%s added accounts: %3$s.',
),
),
'%s removed %d account(s): %s.' => array(
array(
'%s removed a account: %3$s.',
'%s removed accounts: %3$s.',
),
),
'%s edited charge(s), added %d: %s; removed %d: %s.' =>
'%s edited charges, added: %3$s; removed: %5$s',
'%s added %d charge(s): %s.' => array(
array(
'%s added a charge: %3$s.',
'%s added charges: %3$s.',
),
),
'%s removed %d charge(s): %s.' => array(
array(
'%s removed a charge: %3$s.',
'%s removed charges: %3$s.',
),
),
'%s edited purchase(s), added %d: %s; removed %d: %s.' =>
'%s edited purchases, added: %3$s; removed: %5$s',
'%s added %d purchase(s): %s.' => array(
array(
'%s added a purchase: %3$s.',
'%s added purchases: %3$s.',
),
),
'%s removed %d purchase(s): %s.' => array(
array(
'%s removed a purchase: %3$s.',
'%s removed purchases: %3$s.',
),
),
'%s edited contributor(s), added %d: %s; removed %d: %s.' =>
'%s edited contributors, added: %3$s; removed: %5$s',
'%s added %d contributor(s): %s.' => array(
array(
'%s added a contributor: %3$s.',
'%s added contributors: %3$s.',
),
),
'%s removed %d contributor(s): %s.' => array(
array(
'%s removed a contributor: %3$s.',
'%s removed contributors: %3$s.',
),
),
'%s edited reviewer(s), added %d: %s; removed %d: %s.' =>
'%s edited reviewers, added: %3$s; removed: %5$s',
'%s added %d reviewer(s): %s.' => array(
array(
'%s added a reviewer: %3$s.',
'%s added reviewers: %3$s.',
),
),
'%s removed %d reviewer(s): %s.' => array(
array(
'%s removed a reviewer: %3$s.',
'%s removed reviewers: %3$s.',
),
),
'%s edited object(s), added %d: %s; removed %d: %s.' =>
'%s edited objects, added: %3$s; removed: %5$s',
'%s added %d object(s): %s.' => array(
array(
'%s added a object: %3$s.',
'%s added objects: %3$s.',
),
),
'%s removed %d object(s): %s.' => array(
array(
'%s removed a object: %3$s.',
'%s removed objects: %3$s.',
),
),
'%d other(s)' => array(
'1 other',
'%d others',
),
'%s edited subscriber(s), added %d: %s; removed %d: %s.' =>
'%s edited subscribers, added: %3$s; removed: %5$s',
'%s added %d subscriber(s): %s.' => array(
array(
'%s added a subscriber: %3$s.',
'%s added subscribers: %3$s.',
),
),
'%s removed %d subscriber(s): %s.' => array(
array(
'%s removed a subscriber: %3$s.',
'%s removed subscribers: %3$s.',
),
),
'%s edited unsubscriber(s), added %d: %s; removed %d: %s.' =>
'%s edited unsubscribers, added: %3$s; removed: %5$s',
'%s added %d unsubscriber(s): %s.' => array(
array(
'%s added a unsubscriber: %3$s.',
'%s added unsubscribers: %3$s.',
),
),
'%s removed %d unsubscriber(s): %s.' => array(
array(
'%s removed a unsubscriber: %3$s.',
'%s removed unsubscribers: %3$s.',
),
),
'%s edited participant(s), added %d: %s; removed %d: %s.' =>
'%s edited participants, added: %3$s; removed: %5$s',
'%s added %d participant(s): %s.' => array(
array(
'%s added a participant: %3$s.',
'%s added participants: %3$s.',
),
),
'%s removed %d participant(s): %s.' => array(
array(
'%s removed a participant: %3$s.',
'%s removed participants: %3$s.',
),
),
'%s edited image(s), added %d: %s; removed %d: %s.' =>
'%s edited images, added: %3$s; removed: %5$s',
'%s added %d image(s): %s.' => array(
array(
'%s added an image: %3$s.',
'%s added images: %3$s.',
),
),
'%s removed %d image(s): %s.' => array(
array(
'%s removed an image: %3$s.',
'%s removed images: %3$s.',
),
),
'%d people(s)' => array(
array(
'%d person',
'%d people',
),
),
'%s Line(s)' => array(
'%s Line',
'%s Lines',
),
'Indexing %d object(s) of type %s.' => array(
'Indexing %d object of type %s.',
'Indexing %d object of type %s.',
),
'Run these %d command(s):' => array(
'Run this command:',
'Run these commands:',
),
'Install these %d PHP extension(s):' => array(
'Install this PHP extension:',
'Install these PHP extensions:',
),
'The current Phabricator configuration has these %d value(s):' => array(
'The current Phabricator configuration has this value:',
'The current Phabricator configuration has these values:',
),
'To update these %d value(s), run these command(s) from the command line:'
=> array(
'To update this value, run this command from the command line:',
'To update these values, run these commands from the command line:',
),
'You can update these %d value(s) here:' => array(
'You can update this value here:',
'You can update these values here:',
),
'The current PHP configuration has these %d value(s):' => array(
'The current PHP configuration has this value:',
'The current PHP configuration has these values:',
),
'To update these %d value(s), edit your PHP configuration file.' => array(
'To update this %d value, edit your PHP configuration file.',
'To update these %d values, edit your PHP configuration file.',
),
'To update these %d value(s), edit your PHP configuration file, located '.
'here:' => array(
'To update this value, edit your PHP configuration file, located '.
'here:',
'To update these values, edit your PHP configuration file, located '.
'here:',
),
'PHP also loaded these configuration file(s):' => array(
'PHP also loaded this configuration file:',
'PHP also loaded these configuration files:',
),
'You have %d unresolved setup issue(s)...' => array(
'You have an unresolved setup issue...',
'You have %d unresolved setup issues...',
),
'%s added %d inline comment(s).' => array(
array(
'%s added an inline comment.',
'%s added inline comments.',
),
),
'%d comment(s)' => array('%d comment', '%d comments'),
'%d rejection(s)' => array('%d rejection', '%d rejections'),
'%d update(s)' => array('%d update', '%d updates'),
'This configuration value is defined in these %d '.
'configuration source(s): %s.' => array(
'This configuration value is defined in this '.
'configuration source: %2$s.',
'This configuration value is defined in these %d '.
'configuration sources: %s.',
),
'%d Open Pull Request(s)' => array(
'%d Open Pull Request',
'%d Open Pull Requests',
),
'Stale (%s day(s))' => array(
'Stale (%s day)',
'Stale (%s days)',
),
'Old (%s day(s))' => array(
'Old (%s day)',
'Old (%s days)',
),
'%s Commit(s)' => array(
'%s Commit',
'%s Commits',
),
'%s added %d project(s): %s' => array(
array(
'%s added a project: %3$s',
'%s added projects: %3$s',
),
),
'%s removed %d project(s): %s' => array(
array(
'%s removed a project: %3$s',
'%s removed projects: %3$s',
),
),
'%s changed project(s), added %d: %s; removed %d: %s' =>
'%s changed projects, added: %3$s; removed: %5$s',
'%s attached %d file(s): %s' => array(
array(
'%s attached a file: %3$s',
'%s attached files: %3$s',
),
),
'%s detached %d file(s): %s' => array(
array(
'%s detached a file: %3$s',
'%s detached files: %3$s',
),
),
'%s changed file(s), attached %d: %s; detached %d: %s' =>
'%s changed files, attached: %3$s; detached: %5$s',
'%s added %d dependencie(s): %s.' => array(
array(
'%s added a dependency: %3$s',
'%s added dependencies: %3$s',
),
),
'%s added %d dependent task(s): %s.' => array(
array(
'%s added a dependent task: %3$s',
'%s added dependent tasks: %3$s',
),
),
'%s removed %d dependencie(s): %s.' => array(
array(
'%s removed a dependency: %3$s.',
'%s removed dependencies: %3$s.',
),
),
'%s removed %d dependent task(s): %s.' => array(
array(
'%s removed a dependent task: %3$s.',
'%s removed dependent tasks: %3$s.',
),
),
'%s added %d revision(s): %s.' => array(
array(
'%s added a revision: %3$s.',
'%s added revisions: %3$s.',
),
),
'%s removed %d revision(s): %s.' => array(
array(
'%s removed a revision: %3$s.',
'%s removed revisions: %3$s.',
),
),
'%s added %d commit(s): %s.' => array(
array(
'%s added a commit: %3$s.',
'%s added commits: %3$s.',
),
),
'%s removed %d commit(s): %s.' => array(
array(
'%s removed a commit: %3$s.',
'%s removed commits: %3$s.',
),
),
'%s edited commit(s), added %d: %s; removed %d: %s.' =>
'%s edited commits, added %3$s; removed %5$s.',
'%s changed project member(s), added %d: %s; removed %d: %s' =>
'%s changed project members, added %3$s; removed %5$s',
'%s added %d project member(s): %s' => array(
array(
'%s added a member: %3$s',
'%s added members: %3$s',
),
),
'%s removed %d project member(s): %s' => array(
array(
'%s removed a member: %3$s',
'%s removed members: %3$s',
),
),
'%d project hashtag(s) are already used: %s' => array(
'Project hashtag %2$s is already used.',
'%d project hashtags are already used: %2$s',
),
'%s changed project hashtag(s), added %d: %s; removed %d: %s' =>
'%s changed project hashtags, added %3$s; removed %5$s',
'%s added %d project hashtag(s): %s' => array(
array(
'%s added a hashtag: %3$s',
'%s added hashtags: %3$s',
),
),
'%s removed %d project hashtag(s): %s' => array(
array(
'%s removed a hashtag: %3$s',
'%s removed hashtags: %3$s',
),
),
'%d User(s) Need Approval' => array(
'%d User Needs Approval',
'%d Users Need Approval',
),
- 'Warning: there are %d signature(s) already for this document. '.
- 'Updating the title or text will invalidate these signatures and users '.
- 'will need to sign again. Proceed carefully.' => array(
- 'Warning: there is %d signature already for this document. '.
- 'Updating the title or text will invalidate this signature and the '.
- 'user will need to sign again. Proceed carefully.',
- 'Warning: there are %d signatures already for this document. '.
- 'Updating the title or text will invalidate these signatures and '.
- 'users will need to sign again. Proceed carefully.',
- ),
-
'%s older changes(s) are hidden.' => array(
'%d older change is hidden.',
'%d older changes are hidden.',
),
'%s, %s line(s)' => array(
'%s, %s line',
'%s, %s lines',
),
'%s pushed %d commit(s) to %s.' => array(
array(
'%s pushed a commit to %3$s.',
'%s pushed %d commits to %s.',
),
),
'%s commit(s)' => array(
'1 commit',
'%s commits',
),
'%s removed %d JIRA issue(s): %s.' => array(
array(
'%s removed a JIRA issue: %3$s.',
'%s removed JIRA issues: %3$s.',
),
),
'%s added %d JIRA issue(s): %s.' => array(
array(
'%s added a JIRA issue: %3$s.',
'%s added JIRA issues: %3$s.',
),
),
'%s updated JIRA issue(s): added %d %s; removed %d %s.' =>
'%s updated JIRA issues: added %3$s; removed %5$s.',
);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jul 28, 7:51 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
187446
Default Alt Text
(55 KB)

Event Timeline