Skip to content

Commit aec2120

Browse files
committed
Le bouton 'mettre à jour' pour un plugin n'est plus affiché si il est introuvable sur mineweb.org
1 parent eac278d commit aec2120

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/View/Plugin/admin_index.ctp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@
5353
<a href="<?= $this->Html->url(array('controller' => 'plugin', 'action' => 'enable/'.$value->DBid, 'admin' => true)) ?>" class="btn btn-info enable"><?= $Lang->get('GLOBAL__ENABLE') ?></a>
5454
<?php } ?>
5555
<a onClick="confirmDel('<?= $this->Html->url(array('controller' => 'plugin', 'action' => 'delete/'.$value->DBid, 'admin' => true)) ?>')" class="btn btn-danger delete"><?= $Lang->get('GLOBAL__DELETE') ?></a>
56-
<?php if($value->version != $EyPlugin->getPluginLastVersion($value->apiID)) { ?>
56+
<?php
57+
$lastVersion = $EyPlugin->getPluginLastVersion($value->apiID);
58+
if($value->version != $lastVersion && $lastVersion != '0.0.0') { ?>
5759
<a href="<?= $this->Html->url(array('controller' => 'plugin', 'action' => 'update', $value->apiID, $value->slug, 'admin' => true)) ?>" class="btn btn-warning update"><?= $Lang->get('GLOBAL__UPDATE') ?></a> <!-- ICI -->
5860
<?php } ?>
5961
</td>

0 commit comments

Comments
 (0)