Skip to content
Permalink
Browse files

Use ADODB via Composer instead of Submodules

  • Loading branch information
vboctor committed May 28, 2017
1 parent 3992d15 commit afea93e8c0019f99814b295ff5d23726dac7aa5d
Showing with 79 additions and 15 deletions.
  1. +0 −4 .gitmodules
  2. +1 −0 composer.json
  3. +55 −1 composer.lock
  4. +6 −0 config_defaults_inc.php
  5. +16 −5 core.php
  6. +1 −2 core/database_api.php
  7. +0 −2 library/README.md
  8. +0 −1 library/adodb
@@ -1,7 +1,3 @@
[submodule "library/adodb"]
path = library/adodb
url = https://github.com/mantisbt/ADOdb.git
branch = mantis-1.3
[submodule "library/phpmailer"]
path = library/phpmailer
url = https://github.com/mantisbt/PHPMailer
@@ -6,6 +6,7 @@
"slim/slim": "^3.0",
"guzzlehttp/guzzle": "^6.2",
"vboctor/disposable_email_checker": "^3.0",
"adodb/adodb-php": "^5.20",
"erusev/parsedown": "^1.6"
},
"license": "GPL v2",

Some generated files are not rendered by default. Learn more.

@@ -152,6 +152,12 @@
*/
$g_library_path = $g_absolute_path . 'library' . DIRECTORY_SEPARATOR;
/**
* Path to vendor folder for 3rd party libraries. Requires trailing / or \
* @global string $g_library_path
*/
$g_vendor_path = $g_absolute_path . 'vendor' . DIRECTORY_SEPARATOR;
/**
* Path to lang folder for language files. Requires trailing / or \
* @global string $g_language_path
@@ -116,19 +116,30 @@ function require_api( $p_api_name ) {
*/
function require_lib( $p_library_name ) {
static $s_libraries_included;
global $g_library_path;
if( !isset( $s_libraries_included[$p_library_name] ) ) {
global $g_library_path;
$t_library_file_path = $g_library_path . $p_library_name;
if( !file_exists( $t_library_file_path ) ) {
echo 'External library \'' . $t_library_file_path . '\' not found.';
exit;
if( file_exists( $t_library_file_path ) ) {
require_once( $t_library_file_path );
} else {
global $g_vendor_path;
$t_library_file_path = $g_vendor_path . $p_library_name;
if( file_exists( $t_library_file_path ) ) {
require_once( $t_library_file_path );
} else {
echo 'External library \'' . $t_library_file_path . '\' not found.';
exit;
}
}
require_once( $t_library_file_path );
$t_new_globals = array_diff_key( get_defined_vars(), $GLOBALS, array( 't_new_globals' => 0 ) );
foreach ( $t_new_globals as $t_global_name => $t_global_value ) {
$GLOBALS[$t_global_name] = $t_global_value;
}
$s_libraries_included[$p_library_name] = 1;
}
}
@@ -37,8 +37,7 @@
require_api( 'logging_api.php' );
require_api( 'utility_api.php' );
define( 'ADODB_DIR', config_get( 'library_path' ) . 'adodb' );
require_lib( 'adodb' . DIRECTORY_SEPARATOR . 'adodb.inc.php' );
require_lib( 'adodb/adodb-php/adodb.inc.php' );
# An array in which all executed queries are stored. This is used for profiling
# @global array $g_queries_array
@@ -9,7 +9,6 @@ The version and status of each is summarized below:

directory | project | version | status
----------------|-----------------|-----------|---------------
adodb | adodb | 5.20.9 | unpatched [1]
phpmailer | PHPMailer | 5.2.22 | unpatched [1]
rssbuilder | RSSBuilder | 2.2.1 | patched [2]
utf8 | phputf8 | 0.5 | unpatched
@@ -44,7 +43,6 @@ Upstream projects

project | URL
----------------|--------------------------------------------------------------------
adodb | http://adodb.sourceforge.net/ - https://github.com/ADOdb/ADOdb
phpmailer | https://github.com/PHPMailer/PHPMailer
rssbuilder | http://code.google.com/p/flaimo-php/
utf8 | http://sourceforge.net/projects/phputf8
Submodule adodb deleted from cc2c13

0 comments on commit afea93e

Please sign in to comment.
You can’t perform that action at this time.