Skip to content

Commit

Permalink
Require install helper functions in schema.php
Browse files Browse the repository at this point in the history
Following 29898e3 which moved
install_db_now() to install_helper_functions_api.php, admin/index.php is
throwing an error as the function is not defined within schema.php.

We now require the API from within schema.php.

Fixes #20553
  • Loading branch information
dregad committed Jan 30, 2016
1 parent ed72e4d commit 6f20d37
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion admin/install.php
Expand Up @@ -32,7 +32,6 @@
define( 'MANTIS_MAINTENANCE_MODE', true );

require_once( dirname( dirname( __FILE__ ) ) . '/core.php' );
require_api( 'install_helper_functions_api.php' );
require_api( 'crypto_api.php' );
$g_error_send_page_header = false; # bypass page headers in error handler

Expand Down
5 changes: 5 additions & 0 deletions admin/schema.php
Expand Up @@ -42,6 +42,11 @@
* included in the corresponding release
*/

/**
* @uses install_helper_functions_api.php
*/
require_api( 'install_helper_functions_api.php' );

/**
* Standard table creation options
* Array key is the ADOdb datadict driver's name
Expand Down
1 change: 0 additions & 1 deletion admin/upgrade_unattended.php
Expand Up @@ -30,7 +30,6 @@
define( 'MANTIS_MAINTENANCE_MODE', true );

require_once( dirname( dirname( __FILE__ ) ) . '/core.php' );
require_api( 'install_helper_functions_api.php' );
require_api( 'crypto_api.php' );
$g_error_send_page_header = false; # suppress page headers in the error handler

Expand Down
2 changes: 0 additions & 2 deletions login_page.php
Expand Up @@ -185,8 +185,6 @@ function debug_setting_message ( $p_type, $p_setting, $p_value ) {
}

# Check for db upgrade for versions > 1.0.0 using new installer and schema
# Note: install_helper_functions_api.php required for db_null_date() function definition
require_api( 'install_helper_functions_api.php' );
require_once( 'admin' . DIRECTORY_SEPARATOR . 'schema.php' );
$t_upgrades_reqd = count( $g_upgrade ) - 1;

Expand Down

0 comments on commit 6f20d37

Please sign in to comment.