Skip to content

Commit

Permalink
Removed WebsiteBaker version check
Browse files Browse the repository at this point in the history
  • Loading branch information
hertsch committed Jun 14, 2012
1 parent 59e0fa7 commit e7325f6
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 93 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,5 +1,9 @@
### libGitHubAPI

0.12 - 2012-06-14

* removed WebsiteBaker version check

0.11 - 2012-05-22

* Added sample droplet code git_get_file_content.php
Expand Down
90 changes: 45 additions & 45 deletions info.php
@@ -1,46 +1,46 @@
<?php

/**
* libGitHubAPI
*
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
* @author Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @link https://addons.phpmanufaktur.de/de/addons/libgithubapi.php
* @copyright 2012 phpManufaktur by Ralf Hertsch
* @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);
}
}
// end include class.secure.php


$module_directory = 'lib_githubapi';
$module_name = 'libGitHubAPI';
$module_function = (defined('LEPTON_VERSION')) ? 'library' : 'snippet';
$module_version = '0.10';
$module_status = 'Stable';
$module_platform = '2.8';
$module_author = 'Ralf Hertsch - Berlin (Germany)';
$module_license = 'MIT License (MIT)';
$module_description = 'Library to access the GitHub API';
$module_home = 'https://addons.phpmanufaktur.de/de/addons/libgithubapi.php';
$module_guid = '6B9CCCF4-C715-49B0-95BC-E46C99C80D2B';

<?php

/**
* libGitHubAPI
*
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
* @author Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @link https://addons.phpmanufaktur.de/de/addons/libgithubapi.php
* @copyright 2012 phpManufaktur by Ralf Hertsch
* @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);
}
}
// end include class.secure.php


$module_directory = 'lib_githubapi';
$module_name = 'libGitHubAPI';
$module_function = (defined('LEPTON_VERSION')) ? 'library' : 'snippet';
$module_version = '0.12';
$module_status = 'Stable';
$module_platform = '2.8';
$module_author = 'Ralf Hertsch - Berlin (Germany)';
$module_license = 'MIT License (MIT)';
$module_description = 'Library to access the GitHub API';
$module_home = 'https://addons.phpmanufaktur.de/de/addons/libgithubapi.php';
$module_guid = '6B9CCCF4-C715-49B0-95BC-E46C99C80D2B';

?>
95 changes: 47 additions & 48 deletions precheck.php
@@ -1,48 +1,47 @@
<?php

/**
* libGitHubAPI
*
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
* @author Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @link https://addons.phpmanufaktur.de/de/addons/libgithubapi.php
* @copyright 2012 phpManufaktur by Ralf Hertsch
* @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);
}
}
// end include class.secure.php

$PRECHECK['WB_VERSION'] = array('VERSION' => '2.8', 'OPERATOR' => '>=');
$PRECHECK['PHP_VERSION'] = array('VERSION' => '5.2.0', 'OPERATOR' => '>=');

global $database;
$sql = "SELECT `value` FROM `".TABLE_PREFIX."settings` WHERE `name`='default_charset'";
$result = $database->query($sql);
if ($result) {
$data = $result->fetchRow(MYSQL_ASSOC);
$PRECHECK['CUSTOM_CHECKS'] = array(
'Default Charset' => array(
'REQUIRED' => 'utf-8',
'ACTUAL' => $data['value'],
'STATUS' => ($data['value'] === 'utf-8')
)
);
}
<?php

/**
* libGitHubAPI
*
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
* @author Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @link https://addons.phpmanufaktur.de/de/addons/libgithubapi.php
* @copyright 2012 phpManufaktur by Ralf Hertsch
* @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);
}
}
// end include class.secure.php

$PRECHECK['PHP_VERSION'] = array('VERSION' => '5.2.0', 'OPERATOR' => '>=');

global $database;
$sql = "SELECT `value` FROM `".TABLE_PREFIX."settings` WHERE `name`='default_charset'";
$result = $database->query($sql);
if ($result) {
$data = $result->fetchRow(MYSQL_ASSOC);
$PRECHECK['CUSTOM_CHECKS'] = array(
'Default Charset' => array(
'REQUIRED' => 'utf-8',
'ACTUAL' => $data['value'],
'STATUS' => ($data['value'] === 'utf-8')
)
);
}

0 comments on commit e7325f6

Please sign in to comment.