mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 18:18:46 +02:00
- Moved the iTop version number to the Config class to be able to access it from the setup.
SVN:trunk[426]
This commit is contained in:
@@ -23,10 +23,6 @@
|
||||
* @license http://www.opensource.org/licenses/gpl-3.0.html LGPL
|
||||
*/
|
||||
|
||||
define('ITOP_VERSION', '0.9');
|
||||
define('ITOP_REVISION', '$WCREV$');
|
||||
define('ITOP_BUILD_DATE', '$WCNOW$');
|
||||
|
||||
require_once('../application/utils.inc.php');
|
||||
|
||||
MetaModel::Startup(ITOP_CONFIG_FILE);
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
define('ITOP_VERSION', '0.9');
|
||||
define('ITOP_REVISION', '$WCREV$');
|
||||
define('ITOP_BUILD_DATE', '$WCNOW$');
|
||||
|
||||
/**
|
||||
* Configuration read/write
|
||||
*
|
||||
|
||||
@@ -28,6 +28,7 @@ require_once('../core/config.class.inc.php');
|
||||
require_once('../core/log.class.inc.php');
|
||||
require_once('../core/cmdbsource.class.inc.php');
|
||||
require_once('./setuppage.class.inc.php');
|
||||
|
||||
define('TMP_CONFIG_FILE', '../tmp-config-itop.php');
|
||||
define('FINAL_CONFIG_FILE', '../config-itop.php');
|
||||
define('SETUP_STRUCTURE_DATA_DIR', './data/structure');
|
||||
@@ -40,6 +41,25 @@ define('MIN_MEMORY_LIMIT', 32*1024*1024);
|
||||
$sOperation = Utils::ReadParam('operation', 'step1');
|
||||
$oP = new SetupWebPage('iTop configuration wizard');
|
||||
|
||||
/**
|
||||
* Get a nicely formatted version string
|
||||
*/
|
||||
function GetITopVersion()
|
||||
{
|
||||
$sVersionString = '';
|
||||
if (ITOP_REVISION == '$WCREV$')
|
||||
{
|
||||
// This is NOT a version built using the buil system, just display the main version
|
||||
$sVersionString = "iTop Version ".ITOP_VERSION;
|
||||
}
|
||||
else
|
||||
{
|
||||
// This is a build made from SVN, let display the full information
|
||||
$sVersionString = "iTop Version ".ITOP_VERSION." revision ".ITOP_REVISION.", built on: ".ITOP_BUILD_DATE;
|
||||
}
|
||||
return $sVersionString;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to retrieve the system's temporary directory
|
||||
* Emulates sys_get_temp_dir if neeed (PHP < 5.2.1)
|
||||
@@ -460,7 +480,10 @@ function PopulateDataFilesList(SetupWebPage $oP)
|
||||
function DisplayStep1(SetupWebPage $oP)
|
||||
{
|
||||
$sNextOperation = 'step2';
|
||||
$sVersionString = GetITopVersion();
|
||||
$oP->add("<h1>iTop configuration wizard</h1>\n");
|
||||
$oP->p($sVersionString);
|
||||
$oP->log($sVersionString);
|
||||
$oP->add("<h2>Checking prerequisites</h2>\n");
|
||||
if (CheckPHPVersion($oP))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user