Skip to content

Commit

Permalink
Changed WebsiteBaker version check
Browse files Browse the repository at this point in the history
  • Loading branch information
hertsch committed Jun 19, 2012
1 parent 46ead35 commit 7b43853
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions precheck.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
<?php

/**
* kitForm
*
* @author Ralf Hertsch (ralf.hertsch@phpmanufaktur.de)
* kitMarketPlace
*
* @author Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @link http://phpmanufaktur.de
* @copyright 2011
* @license GNU GPL (http://www.gnu.org/licenses/gpl.html)
* @version $Id$
* @copyright 2011 - 2012
* @license MIT License (MIT) http://www.opensource.org/licenses/MIT
*/

// include class.secure.php to protect this file and the whole CMS!
if (defined('WB_PATH')) {
if (defined('LEPTON_VERSION')) include(WB_PATH.'/framework/class.secure.php');
} else {
$oneback = "../";
$root = $oneback;
$level = 1;
while (($level < 10) && (!file_exists($root.'/framework/class.secure.php'))) {
$root .= $oneback;
$level += 1;
}
if (file_exists($root.'/framework/class.secure.php')) {
include($root.'/framework/class.secure.php');
} else {
trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
}
if (defined('WB_PATH')) {
if (defined('LEPTON_VERSION'))
include(WB_PATH.'/framework/class.secure.php');
}
else {
$oneback = "../";
$root = $oneback;
$level = 1;
while (($level < 10) && (!file_exists($root.'/framework/class.secure.php'))) {
$root .= $oneback;
$level += 1;
}
if (file_exists($root.'/framework/class.secure.php')) {
include($root.'/framework/class.secure.php');
}
else {
trigger_error(sprintf("[ <b>%s</b> ] Can't include class.secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
}
}
// end include class.secure.php

// Checking Requirements

$PRECHECK['WB_VERSION'] = array('VERSION' => '2.8', 'OPERATOR' => '>=');
$PRECHECK['PHP_VERSION'] = array('VERSION' => '5.2.0', 'OPERATOR' => '>=');
$PRECHECK['WB_ADDONS'] = array(
'dbconnect_le' => array('VERSION' => '0.64', 'OPERATOR' => '>='),
Expand All @@ -42,7 +43,7 @@
'kit_form' => array('VERSION' => '0.22', 'OPERATOR' => '>=')
);

global $database;
global $database;
$sql = "SELECT `value` FROM `".TABLE_PREFIX."settings` WHERE `name`='default_charset'";
$result = $database->query($sql);
if ($result) {
Expand Down

0 comments on commit 7b43853

Please sign in to comment.