You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jp...@apache.org on 2019/12/10 10:12:31 UTC
[netbeans-tools] branch master updated: NETBEANS-3569
unsuitable/failed-verification plugin not indicated as such by plugin
portal
This is an automated email from the ASF dual-hosted git repository.
jpirek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-tools.git
The following commit(s) were added to refs/heads/master by this push:
new 0f02019 NETBEANS-3569 unsuitable/failed-verification plugin not indicated as such by plugin portal
new de3725e Merge pull request #20 from jpirek/master
0f02019 is described below
commit 0f02019a987ed4b393f4b25fafc80c3dea6ea452
Author: Jan Pirek <ja...@oracle.com>
AuthorDate: Tue Dec 10 11:04:50 2019 +0100
NETBEANS-3569
unsuitable/failed-verification plugin not indicated as such by plugin portal
---
.../src/Application/Controller/VerificationController.php | 6 +++---
.../Application/src/Application/Entity/Verification.php | 10 +++++++---
pp3/module/Application/view/application/index/catalogue.phtml | 11 ++++++++---
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/pp3/module/Application/src/Application/Controller/VerificationController.php b/pp3/module/Application/src/Application/Controller/VerificationController.php
index 2197ab1..4f8b49e 100644
--- a/pp3/module/Application/src/Application/Controller/VerificationController.php
+++ b/pp3/module/Application/src/Application/Controller/VerificationController.php
@@ -53,7 +53,7 @@ class VerificationController extends AuthenticatedController {
public function listAction() {
return new ViewModel([
'verificationRequests' => $this->_verificationRequestRepository->getVerificationRequestsForVerifier($this->getAuthenticatedUserId()),
- 'isAdmin' => $this->_isAdmin,
+ 'isAdmin' => $this->isAdmin(),
]);
}
@@ -130,7 +130,7 @@ class VerificationController extends AuthenticatedController {
private function _handleMasterVote($vote) {
$verId = $this->params()->fromQuery('id');
$bailOut = false;
- if (empty($verId) || !$this->_isAdmin) {
+ if (empty($verId) || !$this->isAdmin()) {
$bailOut = true;
}
$ver = $this->_verificationRepository->find($verId);
@@ -144,7 +144,7 @@ class VerificationController extends AuthenticatedController {
}
$ver->setStatus($vote);
$comment = $this->params()->fromPost('comment');
- if (!empty($comment)) {
+ if (!empty($comment) && $vote == \Application\Entity\Verification::STATUS_NOGO) {
$config = HTMLPurifier_Config::createDefault();
$purifier = new HTMLPurifier($config);
$comment = $purifier->purify($comment);
diff --git a/pp3/module/Application/src/Application/Entity/Verification.php b/pp3/module/Application/src/Application/Entity/Verification.php
index 68375e5..7f08608 100644
--- a/pp3/module/Application/src/Application/Entity/Verification.php
+++ b/pp3/module/Application/src/Application/Entity/Verification.php
@@ -65,11 +65,15 @@ class Verification extends Base\Verification {
public function getStatusBadgeTitle() {
if ($this->status === self::STATUS_NOGO) {
- return 'NoGo';
+ return 'Verification declined';
} elseif ($this->status === self::STATUS_GO) {
- return 'Go';
+ return 'Verified';
}
- return 'Pending';
+ return 'Verification pending';
+ }
+
+ public function isVerified() {
+ return $this->status === self::STATUS_GO;
}
public function resolveStatus($votesBreakdown) {
diff --git a/pp3/module/Application/view/application/index/catalogue.phtml b/pp3/module/Application/view/application/index/catalogue.phtml
index d4835f2..280c54d 100644
--- a/pp3/module/Application/view/application/index/catalogue.phtml
+++ b/pp3/module/Application/view/application/index/catalogue.phtml
@@ -65,9 +65,14 @@ if ($plugin) {
foreach ($plugin->getVersions() as $version) {
echo '<tr><td><span class="badge">'.$version->getVersion().'</span></td><td>';
foreach ($version->getNbVersionsPluginVersions() as $nbvPv) {
- echo '<a href="./download?id='.$version->getId().'" title="Download" target="_blank"><span class="badge badge-brown"><i class="fas fa-download"></i> NB '.$nbvPv->getNbVersion()->getVersion().'</span></a> ';
- }
- echo '</td></tr>';
+ if ($nbvPv->getVerificationId()) {
+ echo '<a href="./download?id='.$version->getId().'" title="Download" target="_blank"><span class="badge '.$nbvPv->getVerification()->getStatusBadgeClass().'" title="Download">
+ <i class="fas fa-download"></i> NB '.$nbvPv->getNbVersion()->getVersion().' - '.$nbvPv->getVerification()->getStatusBadgeTitle().'</span></a> ';
+ } else {
+ echo '<a href="./download?id='.$version->getId().'" title="Download" target="_blank"><span class="badge badge-brown"><i class="fas fa-download"></i> NB '.$nbvPv->getNbVersion()->getVersion().'</span></a> ';
+ }
+ }
+ echo ' </td></tr>';
}
echo '</tbody>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists