Skip to content

Commit

Permalink
Merge pull request #83 from mambax7/master
Browse files Browse the repository at this point in the history
1.05 RC 4
  • Loading branch information
mambax7 authored Nov 15, 2017
2 parents beadb51 + 9368525 commit 3f7751b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
25 changes: 4 additions & 21 deletions class/utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -1380,33 +1380,16 @@ public static function checkVerXoops(XoopsModule $module = null, $requiredVer =
$module = XoopsModule::getByDirname($moduleDirName);
}
xoops_loadLanguage('admin', $moduleDirName);

//check for minimum XOOPS version
$currentVer = substr(XOOPS_VERSION, 6); // get the numeric part of string
$currArray = explode('.', $currentVer);
if (null === $requiredVer) {
$requiredVer = '' . $module->getInfo('min_xoops'); //making sure it's a string
}
$reqArray = explode('.', $requiredVer);
$success = true;
foreach ($reqArray as $k => $v) {
if (isset($currArray[$k])) {
if ($currArray[$k] > $v) {
break;
} elseif ($currArray[$k] == $v) {
continue;
} else {
$success = false;
break;
}
} else {
if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
$success = false;
break;
}
}
}
$success = true;

if (false === $success) {
if (version_compare($currentVer, $requiredVer, '<')){
$success = false;
$module->setErrors(sprintf(_AM_PUBLISHER_ERROR_BAD_XOOPS, $requiredVer, $currentVer));
}

Expand Down
6 changes: 5 additions & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h5>1.05 RC 4 [NOT RELEASED]</h5>
<h5>1.05 RC 4 [2017-11-15]</h5>
<hr>
- fix breadcrumb for subcategories (bleekk)
- change checkVerXoops(mamba)
- fix confurator link (zyspec)
- fix fmContent (zyspec)
- fix archive (zyspec)

<h5>1.05 RC 3 [2017-11-10]</h5>
<hr>
Expand Down

0 comments on commit 3f7751b

Please sign in to comment.