|
22 | 22 | <script type="text/javascript" src="<?php echo $this->coreWebroot ?>/public/js/admin/admin.upgrade.js"></script>
|
23 | 23 |
|
24 | 24 | <h3>Core:</h3>
|
25 |
| -Current version: <?php echo $this->escape($this->core['currentText']); ?><br/> |
| 25 | +Current version: <?php echo $this->escape($this->core['current']); ?><br/> |
26 | 26 | <?php
|
27 |
| -if ($this->core['current'] < $this->core['target']) { |
28 |
| - echo "Need to upgrade to version: ".$this->escape($this->core['targetText']); |
| 27 | +if (version_compare($this->core['current'], $this->core['target']) === -1) { |
| 28 | + echo 'Need to upgrade to version: '.$this->escape($this->core['target']); |
29 | 29 | } else {
|
30 |
| - echo "Midas Server is up to date."; |
| 30 | + echo 'Midas Server is up to date.'; |
31 | 31 | }
|
32 | 32 | ?>
|
33 | 33 | <h3>Modules:</h3>
|
34 | 34 | <?php
|
35 | 35 | foreach ($this->modules as $name => $module) {
|
36 |
| - echo "<b>{$this->escape($name)}</b><br/>"; |
37 |
| - echo "Current version: {$this->escape($module['currentText'])} <br/>"; |
38 |
| - if ($module['current'] < $module['target']) { |
39 |
| - echo "Need to upgrade to version: ".$this->escape($module['targetText']).'<br/>'; |
| 36 | + echo '<b>'.$this->escape($name).'</b><br/>'; |
| 37 | + echo 'Current version: '.$this->escape($module['current']).'<br/>'; |
| 38 | + if (version_compare($module['current'], $module['target']) === -1) { |
| 39 | + echo 'Need to upgrade to version: '.$this->escape($module['target']).'<br/>'; |
40 | 40 | }
|
41 | 41 | }
|
42 | 42 |
|
43 |
| -if (count($this->modules) == 0) { |
44 |
| - echo "No module enabled."; |
| 43 | +if (count($this->modules) === 0) { |
| 44 | + echo 'No modules enabled.'; |
45 | 45 | }
|
46 | 46 | ?>
|
47 | 47 | <br/>
|
48 | 48 | <br/>
|
49 |
| -<form id='upgradeMIDAS' action="<?php echo $this->webroot ?>/admin/upgrade" method="post"> |
50 |
| - <input type='submit' class="globalButton" value="Upgrade"/> |
| 49 | +<form id="upgradeMIDAS" action="<?php echo $this->webroot; ?>/admin/upgrade" method="post"> |
| 50 | + <input type="submit" class="globalButton" value="Upgrade"/> |
51 | 51 | </form>
|
52 |
| -<br/><br/> |
53 |
| -<a href="<?php echo $this->webroot ?>/admin/migratemidas2">Upgrade from MIDAS2</a> |
| 52 | +<a href="<?php echo $this->webroot; ?>/admin/migratemidas2">Upgrade from Midas Server 2.x</a> |
0 commit comments