Skip to content

Commit

Permalink
最新バージョンのチェック処理を修正
Browse files Browse the repository at this point in the history
3.66と3.7を比べると3.7のほうが古い判定になるため
(7よりも66のほうが大きいという判定)
  • Loading branch information
yama committed Aug 18, 2014
1 parent 704c50f commit a301859
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nucleus/libs/ADMIN.php
Original file line number Diff line number Diff line change
Expand Up @@ -5321,8 +5321,11 @@ function pagehead($extrahead = '') {
echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">Nucleus CMS ' . $nucleus['version'] . $codenamestring . '</a>';
$newestVersion = getLatestVersion();
$newestCompare = str_replace('/','.',$newestVersion);
$newestCompare = floatval($newestCompare);
$newestCompare = sprintf('%04.2f', $newestCompare);
$currentVersion = str_replace(array('/','v'),array('.',''),$nucleus['version']);
$currentVersion = floatval($currentVersion);
$currentVersion = sprintf('%04.2f', $currentVersion);
if ($newestVersion && version_compare($newestCompare,$currentVersion) > 0) {
echo '<br /><a style="color:red" href="'._ADMINPAGEFOOT_OFFICIALURL.'upgrade.php" title="'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE.'">'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT.$newestVersion.'</a>';
}
Expand Down

0 comments on commit a301859

Please sign in to comment.