Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0a11c87337d6
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e1c487d3a291
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 11, 2012

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f8a9d65 View commit details
  2. Copy the full SHA
    e1c487d View commit details
Showing with 13 additions and 10 deletions.
  1. +12 −9 admin/install.php
  2. +1 −1 plugins/XmlImportExport/ImportXml/Issue.php
21 changes: 12 additions & 9 deletions admin/install.php
Original file line number Diff line number Diff line change
@@ -51,9 +51,9 @@ function print_info_row( $p_description, $p_info = null ) {
/**
* Print Test result
*
* @param int Result - BAD|GOOD
* @param bool Fail installation or soft warning
* @param string Message to display to user
* @param int $p_result Result - BAD|GOOD
* @param bool $p_hard_fail Fail installation or soft warning
* @param string $p_message Message to display to user
*/
function print_test_result( $p_result, $p_hard_fail = true, $p_message = '' ) {
global $g_failed;
@@ -94,8 +94,8 @@ function print_test( $p_test_description, $p_result, $p_hard_fail = true, $p_mes
/**
* create an SQLArray to insert data
*
* @param string table
* @param string data
* @param string $p_table table
* @param string $p_data data
* @return array
*/
function InsertData( $p_table, $p_data ) {
@@ -173,7 +173,7 @@ function InsertData( $p_table, $p_data ) {
<?php
}

$t_config_filename = $g_absolute_path . 'config_inc.php';
$t_config_filename = config_get_global( 'absolute_path' ) . 'config_inc.php';
$t_config_exists = file_exists( $t_config_filename );
$f_hostname = null;
$f_db_type = null;
@@ -322,28 +322,31 @@ function InsertData( $p_table, $p_data ) {
</td>
<?php
$t_db_open = false;
$t_message = '';

$g_db = MantisDatabase::get_driver_instance($f_db_type);
try {
$t_result = $g_db->connect( null, $f_hostname, $f_admin_username, $f_admin_password, null, null );
} catch (Exception $ex) {
$t_message = $ex->GetMessage();
$t_result = false;
}

if( $t_result ) {
if( $t_result ) {
# check if db exists for the admin
try {
$t_result = @$g_db->Connect( null, $f_hostname, $f_admin_username, $f_admin_password, $f_database_name, null );
} catch (Exception $ex) {
$t_message = $ex->GetMessage();
$t_result = false;
}
if( $t_result ) {
$t_db_open = true;
$f_db_exists = true;
}
print_test_result( GOOD );
print_test_result( GOOD );
} else {
print_test_result( BAD, true, 'Does administrative user have access to the database? ( ' . $ex->GetMessage() . ' )' );
print_test_result( BAD, true, 'Does administrative user have access to the database? ( ' . $t_message . ' )' );
}
?>
</tr>
2 changes: 1 addition & 1 deletion plugins/XmlImportExport/ImportXml/Issue.php
Original file line number Diff line number Diff line change
@@ -250,7 +250,7 @@ public function process( XMLreader $p_reader ) {
// add bugnotes
if ( $this->new_id_ > 0 && is_array( $t_bugnotes ) && count( $t_bugnotes ) > 0 ) {
foreach ( $t_bugnotes as $t_bugnote) {
bugnote_add( $this->new_id_, $t_bugnote->note, $t_bugnote->time_tracking, $t_bugnote->private, $t_bugnote->note_type, $t_bugnote_>note_attr, $t_bugnote->reporter_id, false, $t_bugnote->date_submitted, $t_bugnote->last_modified, true );
bugnote_add( $this->new_id_, $t_bugnote->note, $t_bugnote->time_tracking, $t_bugnote->private, $t_bugnote->note_type, $t_bugnote->note_attr, $t_bugnote->reporter_id, false, $t_bugnote->date_submitted, $t_bugnote->last_modified, true );
}
}