LEPTON CMS 7.0.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
function.getVersion.php File Reference

Go to the source code of this file.

Functions

 getVersion (string $version="")
 

Variables

if(!defined("SEC_FILE")) if(defined('LEPTON_PATH')) else
 
 $root = $oneback
 
 $level = 1
 

Function Documentation

◆ getVersion()

getVersion ( string  $version = "")

As "version_compare" itself seems only got trouble within words like "Alpha", "Beta" a.s.o. this function only modify the version-string in the way that these words are replaced by values/numbers.

E.g: "1.2.3 Beta2" => "1.2.3.22" "0.1.1 ALPHA" => "0.1.1.1"

Parameters
string$versionA version-string
Returns
string The modification of the version-string

Transform e.g. "1.23" to "1.2.3.0.0". We need this for older modules pre WB 2.8.1 to get them run under lepton-cms.

Short test if there are any chars. If not, we're handling the version as "stable". E.g. "1.0.1" will become "1.0.1.0stable".

Force the version-string to get at least 4 terms. E.g. 2.7 will become 2.7.0.0

Definition at line 51 of file function.getVersion.php.

Variable Documentation

◆ $level

$level = 1

Definition at line 25 of file function.getVersion.php.

◆ $root

$root = $oneback

Definition at line 24 of file function.getVersion.php.

◆ else

while(($level< 10) &&(!file_exists($root.SEC_FILE))) if (file_exists( $root.SEC_FILE)) else
Initial value:
{
$oneback = "../"

This file is part of LEPTON Core, released under the GNU GPL Please see LICENSE and COPYING files in your package for details, specially for terms and warranties.

NOTICE:LEPTON CMS Package has several different licenses. Please see the individual license in the header of each single file or info.php of modules and templates.

Author
LEPTON Project

Definition at line 22 of file function.getVersion.php.