deploymentlink: show even when there are only...

...unrelated changes

fixes #12032
This commit is contained in:
Thomas Gelf 2016-11-02 17:37:04 +01:00
parent f38ded6223
commit 57e4c441bd
1 changed files with 11 additions and 2 deletions

View File

@ -1,10 +1,19 @@
<?php <?php
if (! $this->undeployedChanges) { if (! $this->undeployedChanges && ! $this->totalUndeployedChanges) {
return; return;
} }
if ($this->totalUndeployedChanges === 1) { if ($this->undeployedChanges === 0) {
if ($this->totalUndeployedChanges) {
$msg = $this->translate('The is a single pending change');
} else {
$msg = sprintf(
$this->translate('There are %d pending changes'),
$this->totalUndeployedChanges
);
}
} elseif ($this->totalUndeployedChanges === 1) {
$msg = $this->translate('There has been a single change to this object, nothing else has been modified'); $msg = $this->translate('There has been a single change to this object, nothing else has been modified');
} elseif ($this->totalUndeployedChanges === $this->undeployedChanges) { } elseif ($this->totalUndeployedChanges === $this->undeployedChanges) {
$msg = sprintf( $msg = sprintf(